Merge branch 'master' into staging
[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 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
88 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
89 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
90 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
91 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
92 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
93 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
94 ;;;
95 ;;; This file is part of GNU Guix.
96 ;;;
97 ;;; GNU Guix is free software; you can redistribute it and/or modify it
98 ;;; under the terms of the GNU General Public License as published by
99 ;;; the Free Software Foundation; either version 3 of the License, or (at
100 ;;; your option) any later version.
101 ;;;
102 ;;; GNU Guix is distributed in the hope that it will be useful, but
103 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
104 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
105 ;;; GNU General Public License for more details.
106 ;;;
107 ;;; You should have received a copy of the GNU General Public License
108 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
109
110 (define-module (gnu packages python-xyz)
111 #:use-module ((guix licenses) #:prefix license:)
112 #:use-module (gnu packages)
113 #:use-module (gnu packages algebra)
114 #:use-module (gnu packages adns)
115 #:use-module (gnu packages aidc)
116 #:use-module (gnu packages attr)
117 #:use-module (gnu packages backup)
118 #:use-module (gnu packages bash)
119 #:use-module (gnu packages check)
120 #:use-module (gnu packages cmake)
121 #:use-module (gnu packages compression)
122 #:use-module (gnu packages crypto)
123 #:use-module (gnu packages databases)
124 #:use-module (gnu packages dbm)
125 #:use-module (gnu packages enchant)
126 #:use-module (gnu packages file)
127 #:use-module (gnu packages fontutils)
128 #:use-module (gnu packages gcc)
129 #:use-module (gnu packages geo)
130 #:use-module (gnu packages ghostscript)
131 #:use-module (gnu packages gl)
132 #:use-module (gnu packages glib)
133 #:use-module (gnu packages gnome)
134 #:use-module (gnu packages gnupg)
135 #:use-module (gnu packages graphviz)
136 #:use-module (gnu packages graphics)
137 #:use-module (gnu packages gsasl)
138 #:use-module (gnu packages gstreamer)
139 #:use-module (gnu packages gtk)
140 #:use-module (gnu packages haskell-xyz)
141 #:use-module (gnu packages icu4c)
142 #:use-module (gnu packages image)
143 #:use-module (gnu packages kerberos)
144 #:use-module (gnu packages libevent)
145 #:use-module (gnu packages libffi)
146 #:use-module (gnu packages libidn)
147 #:use-module (gnu packages linux)
148 #:use-module (gnu packages llvm)
149 #:use-module (gnu packages man)
150 #:use-module (gnu packages maths)
151 #:use-module (gnu packages monitoring)
152 #:use-module (gnu packages multiprecision)
153 #:use-module (gnu packages networking)
154 #:use-module (gnu packages ncurses)
155 #:use-module (gnu packages openstack)
156 #:use-module (gnu packages pcre)
157 #:use-module (gnu packages perl)
158 #:use-module (gnu packages photo)
159 #:use-module (gnu packages pkg-config)
160 #:use-module (gnu packages python)
161 #:use-module (gnu packages python-check)
162 #:use-module (gnu packages python-compression)
163 #:use-module (gnu packages python-crypto)
164 #:use-module (gnu packages python-science)
165 #:use-module (gnu packages python-web)
166 #:use-module (gnu packages qt)
167 #:use-module (gnu packages readline)
168 #:use-module (gnu packages sdl)
169 #:use-module (gnu packages search)
170 #:use-module (gnu packages shells)
171 #:use-module (gnu packages sphinx)
172 #:use-module (gnu packages ssh)
173 #:use-module (gnu packages terminals)
174 #:use-module (gnu packages tex)
175 #:use-module (gnu packages texinfo)
176 #:use-module (gnu packages textutils)
177 #:use-module (gnu packages time)
178 #:use-module (gnu packages tls)
179 #:use-module (gnu packages version-control)
180 #:use-module (gnu packages video)
181 #:use-module (gnu packages web)
182 #:use-module (gnu packages base)
183 #:use-module (gnu packages xml)
184 #:use-module (gnu packages xorg)
185 #:use-module (gnu packages xdisorg)
186 #:use-module (gnu packages tcl)
187 #:use-module (gnu packages bdw-gc)
188 #:use-module (gnu packages serialization)
189 #:use-module (guix packages)
190 #:use-module (guix download)
191 #:use-module (guix git-download)
192 #:use-module (guix hg-download)
193 #:use-module (guix utils)
194 #:use-module (guix build-system gnu)
195 #:use-module (guix build-system cmake)
196 #:use-module (guix build-system python)
197 #:use-module (guix build-system trivial)
198 #:use-module (srfi srfi-1)
199 #:use-module (srfi srfi-26))
200
201 (define-public python-slixmpp
202 (package
203 (name "python-slixmpp")
204 (version "1.5.2")
205 (source
206 (origin
207 (method git-fetch)
208 (uri
209 (git-reference
210 (url "https://lab.louiz.org/poezio/slixmpp.git")
211 (commit
212 (string-append "slix-" version))))
213 (file-name
214 (git-file-name name version))
215 (sha256
216 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
217 (build-system python-build-system)
218 (arguments
219 `(#:phases
220 (modify-phases %standard-phases
221 (add-after 'unpack 'patch
222 (lambda _
223 (substitute* "setup.py"
224 (("'CC', 'cc'")
225 "'CC', 'gcc'"))
226 #t)))))
227 (native-inputs
228 `(("cython" ,python-cython)
229 ("gnupg" ,gnupg)
230 ("pkg-config" ,pkg-config)))
231 (propagated-inputs
232 `(("python-aiodns" ,python-aiodns)
233 ("python-aiohttp" ,python-aiohttp)
234 ("python-pyasn1" ,python-pyasn1)
235 ("python-pyasn1-modules" ,python-pyasn1-modules)))
236 (inputs
237 `(("libidn" ,libidn)
238 ("python" ,python))) ; We are building a Python extension.
239 (synopsis "XMPP library without threads")
240 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
241 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
242 socket handling, the timers, the events dispatching) in order to remove all
243 threads.")
244 (home-page "https://lab.louiz.org/poezio/slixmpp")
245 (license license:expat)))
246
247 (define-public python-tenacity
248 (package
249 (name "python-tenacity")
250 (version "6.1.0")
251 (source (origin
252 (method url-fetch)
253 (uri (pypi-uri "tenacity" version))
254 (sha256
255 (base32
256 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
257 (build-system python-build-system)
258 (native-inputs
259 `(("python-setuptools-scm" ,python-setuptools-scm)
260 ("python-sphinx" ,python-sphinx)
261 ("python-tornado" ,python-tornado)
262 ("python-pytest" ,python-pytest)))
263 (propagated-inputs
264 `(("python-six" ,python-six)))
265 (arguments
266 `(#:phases (modify-phases %standard-phases
267 (replace 'check
268 (lambda _
269 (invoke "pytest")
270 #t)))))
271 (home-page "https://github.com/jd/tenacity")
272 (synopsis "Retrying library for python")
273 (description "Tenacity is a general-purpose python library to simplify the
274 task of adding retry behavior to just about anything.")
275 (license license:asl2.0)))
276
277 (define-public python-colorlog
278 (package
279 (name "python-colorlog")
280 (version "4.1.0")
281 (source (origin
282 (method url-fetch)
283 (uri (pypi-uri "colorlog" version))
284 (sha256
285 (base32
286 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
287 (build-system python-build-system)
288 (native-inputs
289 `(("python-pytest" ,python-pytest)))
290 (arguments
291 `(#:phases (modify-phases %standard-phases
292 (replace 'check
293 (lambda _
294 ;; Extend PYTHONPATH so the built package will be found.
295 (setenv "PYTHONPATH"
296 (string-append (getcwd) "/build/lib:"
297 (getenv "PYTHONPATH")))
298 (invoke "pytest" "-p" "no:logging")
299 #t)))))
300 (home-page "https://github.com/borntyping/python-colorlog")
301 (synopsis "Log formatting with colors for python")
302 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
303 with Python's logging module that outputs records using terminal colors.")
304 (license license:expat)))
305
306 (define-public python-pyprind
307 (package
308 (name "python-pyprind")
309 (version "2.11.2")
310 (source (origin
311 (method url-fetch)
312 (uri (pypi-uri "PyPrind" version))
313 (sha256
314 (base32
315 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
316 (build-system python-build-system)
317 (propagated-inputs
318 `(("python-psutil" ,python-psutil)))
319 (home-page "https://github.com/rasbt/pyprind")
320 (synopsis "Python Progress Bar and Percent Indicator Utility")
321 (description "The PyPrind (Python Progress Indicator) module provides a
322 progress bar and a percentage indicator object that let you track the progress
323 of a loop structure or other iterative computation.")
324 (license license:bsd-3)))
325
326 (define-public python-gphoto2
327 (package
328 (name "python-gphoto2")
329 (version "2.2.1")
330 (source (origin
331 (method url-fetch)
332 (uri (pypi-uri "gphoto2" version))
333 (sha256
334 (base32
335 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
336 (build-system python-build-system)
337 (native-inputs
338 `(("pkg-config" ,pkg-config)))
339 (inputs
340 `(("libgphoto2" ,libgphoto2)))
341 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
342 (synopsis "Python interface to libgphoto2")
343 (description "@code{python-gphoto2} is a comprehensive Python interface
344 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
345 automatically generate the interface code.")
346 (license license:gpl3+)))
347
348 (define-public python-colour
349 (package
350 (name "python-colour")
351 (version "0.1.5")
352 (source (origin
353 (method url-fetch)
354 (uri (pypi-uri "colour" version))
355 (sha256
356 (base32
357 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
358 (build-system python-build-system)
359 (native-inputs
360 `(("python-d2to1" ,python-d2to1)))
361 (home-page "https://github.com/vaab/colour")
362 (synopsis "Convert and manipulate various color representations")
363 (description "Pythonic way to manipulate color representations (HSL, RVB,
364 web, X11, ...).")
365 (license license:expat)))
366
367 (define-public python-d2to1
368 (package
369 (name "python-d2to1")
370 (version "0.2.12.post1")
371 (source (origin
372 (method url-fetch)
373 (uri (pypi-uri "d2to1" version))
374 (sha256
375 (base32
376 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
377 (build-system python-build-system)
378 (native-inputs
379 `(("python-nose" ,python-nose)))
380 (home-page "https://github.com/embray/d2to1")
381 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
382 in python")
383 (description "The python package d2to1 (the d is for distutils) allows
384 using distutils2-like setup.cfg files for a package's metadata with a
385 distribute/setuptools setup.py script.")
386 (license license:bsd-2)))
387
388 (define-public python-rawkit
389 (package
390 (name "python-rawkit")
391 (version "0.6.0")
392 (source (origin
393 (method url-fetch)
394 (uri (pypi-uri "rawkit" version))
395 (sha256
396 (base32
397 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
398 (build-system python-build-system)
399 (native-inputs
400 `(("python-pytest" ,python-pytest)
401 ("python-mock" ,python-mock)))
402 (inputs
403 `(("libraw" ,libraw)))
404 (home-page "https://rawkit.readthedocs.io")
405 (synopsis "Ctypes-based LibRaw binding for Python")
406 (description "The rawkit package provides two modules: rawkit and libraw.
407 The rawkit module provides a high-level Pythonic interface for developing raw
408 photos, while the libraw module provides a CTypes based interface for
409 interacting with the low-level LibRaw C APIs.")
410 (license license:expat)))
411
412 (define-public python-easygui
413 (package
414 (name "python-easygui")
415 (version "0.98.1")
416 (source (origin
417 (method url-fetch)
418 (uri (pypi-uri "easygui" version))
419 (sha256
420 (base32
421 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
422 (build-system python-build-system)
423 (propagated-inputs
424 `(("python-tkinter" ,python "tk")))
425 (home-page "https://github.com/robertlugg/easygui")
426 (synopsis "GUI programming module for Python")
427 (description "EasyGUI is a module for very simple, very easy GUI
428 programming in Python. EasyGUI is different from other GUI generators in that
429 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
430 simple function calls.")
431 (license license:bsd-3)))
432
433 (define-public python-pymediainfo
434 (package
435 (name "python-pymediainfo")
436 (version "4.1")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "pymediainfo" version))
441 (sha256
442 (base32
443 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
444 (build-system python-build-system)
445 (native-inputs
446 `(("python-setuptools-scm" ,python-setuptools-scm)
447 ("python-pytest" ,python-pytest)))
448 (inputs
449 `(("libmediainfo" ,libmediainfo)))
450 (arguments
451 `(#:phases
452 (modify-phases %standard-phases
453 (add-after 'unpack 'patch-libmediainfo
454 (lambda _
455 (substitute* "pymediainfo/__init__.py"
456 (("libmediainfo.so.0")
457 (string-append (assoc-ref %build-inputs "libmediainfo")
458 "/lib/libmediainfo.so.0")))
459 #t))
460 (replace 'check
461 (lambda _
462 ;; Extend PYTHONPATH so the built package will be found.
463 (setenv "PYTHONPATH"
464 (string-append (getcwd) "/build/lib:"
465 (getenv "PYTHONPATH")))
466 ;; Skip the only failing test "test_parse_url"
467 (invoke "pytest" "-vv" "-k" "not test_parse_url")
468 #t)))))
469 (home-page
470 "https://github.com/sbraz/pymediainfo")
471 (synopsis
472 "Python wrapper for the mediainfo library")
473 (description
474 "Python wrapper for the mediainfo library to access the technical and tag
475 data for video and audio files.")
476 (license license:expat)))
477
478 (define-public python-psutil
479 (package
480 (name "python-psutil")
481 (version "5.7.2")
482 (source
483 (origin
484 (method url-fetch)
485 (uri (pypi-uri "psutil" version))
486 (sha256
487 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
488 (build-system python-build-system)
489 (arguments
490 ;; FIXME: some tests do not return and time out. Some tests fail because
491 ;; some processes survive kill().
492 '(#:tests? #f))
493 (home-page "https://www.github.com/giampaolo/psutil")
494 (synopsis "Library for retrieving information on running processes")
495 (description
496 "psutil (Python system and process utilities) is a library for retrieving
497 information on running processes and system utilization (CPU, memory, disks,
498 network) in Python. It is useful mainly for system monitoring, profiling and
499 limiting process resources and management of running processes. It implements
500 many functionalities offered by command line tools such as: ps, top, lsof,
501 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
502 pidof, tty, taskset, pmap.")
503 (properties `((python2-variant . ,(delay python2-psutil))))
504 (license license:bsd-3)))
505
506 (define-public python2-psutil
507 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
508 (package
509 (inherit base)
510 (propagated-inputs
511 `(("python2-enum34" ,python2-enum34) ;optional
512 ,@(package-propagated-inputs base))))))
513
514 (define-public python-shapely
515 (package
516 (name "python-shapely")
517 (version "1.7.1")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "Shapely" version))
522 (sha256
523 (base32
524 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
525 (modules '((guix build utils)))
526 (snippet
527 '(begin
528 (delete-file "shapely/speedups/_speedups.c")
529 (delete-file "shapely/vectorized/_vectorized.c")
530 #t))))
531 (build-system python-build-system)
532 (native-inputs
533 `(("python-cython" ,python-cython)
534 ("python-matplotlib" ,python-matplotlib)
535 ("python-pytest" ,python-pytest)
536 ("python-pytest-cov" ,python-pytest-cov)))
537 (inputs
538 `(("geos" ,geos)))
539 (propagated-inputs
540 `(("python-numpy" ,python-numpy)))
541 (arguments
542 `(#:phases
543 (modify-phases %standard-phases
544 (add-after 'unpack 'patch-geos-path
545 (lambda* (#:key inputs #:allow-other-keys)
546 (let ((geos (assoc-ref inputs "geos"))
547 (glibc (assoc-ref inputs ,(if (%current-target-system)
548 "cross-libc" "libc"))))
549 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
550 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
551 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
552 geos "/lib/libgeos_c.so'])"))
553 (("free = load_dll\\('c'\\)\\.free")
554 (string-append "free = load_dll('c', fallbacks=['"
555 glibc "/lib/libc.so.6']).free"))
556 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
557 (string-append "free = load_dll('c', fallbacks=['"
558 glibc "/lib/libc.so.6']).free"))))
559 #t)))))
560 (home-page "https://github.com/Toblerity/Shapely")
561 (synopsis "Library for the manipulation and analysis of geometric objects")
562 (description "Shapely is a Python package for manipulation and analysis of
563 planar geometric objects. It is based on the @code{GEOS} library.")
564 (license license:bsd-3)))
565
566 (define-public python-shortuuid
567 (package
568 (name "python-shortuuid")
569 (version "0.5.0")
570 (source
571 (origin
572 (method url-fetch)
573 (uri (pypi-uri "shortuuid" version))
574 (sha256
575 (base32
576 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
577 (build-system python-build-system)
578 (native-inputs
579 `(("python-pep8" ,python-pep8)))
580 (home-page "https://github.com/skorokithakis/shortuuid")
581 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
582 (description
583 "@code{shortuuid} is a Python library for generating concise, unambiguous
584 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
585 module and then similar looking characters are removed.")
586 (license license:bsd-3)))
587
588 (define-public python-logwrap
589 (package
590 (name "python-logwrap")
591 (version "3.2.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "logwrap" version ".zip"))
596 (sha256
597 (base32
598 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
599 (build-system python-build-system)
600 (propagated-inputs
601 `(("python-six" ,python-six)
602 ("python-typing" ,python-typing)))
603 (native-inputs
604 `(("unzip" ,unzip)
605 ("python-cython" ,python-cython)
606 ("python-pytest" ,python-pytest)
607 ("python-pytest-cov" ,python-pytest-cov)
608 ("python-pytest-runner" ,python-pytest-runner)))
609 (home-page "https://github.com/penguinolog/logwrap")
610 (synopsis "Decorator for logging function arguments")
611 (description "This package provides a decorator to log function arguments
612 and function call return values in a human-readable way.")
613 (license license:asl2.0)))
614
615 (define-public python2-shapely
616 (package-with-python2 python-shapely))
617
618 (define-public python-clyent
619 (package
620 (name "python-clyent")
621 (version "1.2.1")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "clyent" version))
626 (sha256
627 (base32
628 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
629 (build-system python-build-system)
630 (native-inputs
631 `(("python-mock" ,python-mock)))
632 (home-page "https://github.com/Anaconda-Platform/clyent")
633 (synopsis "Command line client library")
634 (description "Clyent is a Python command line utility library. It is used
635 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
636 (license license:bsd-3)))
637
638 (define-public python2-clyent
639 (package-with-python2 python-clyent))
640
641 (define-public python-babel
642 (package
643 (name "python-babel")
644 (version "2.8.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "Babel" version))
649 (sha256
650 (base32
651 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-freezegun" ,python-freezegun)
655 ("python-pytest" ,python-pytest)))
656 (propagated-inputs
657 `(("python-pytz" ,python-pytz)))
658 (arguments
659 `(#:phases (modify-phases %standard-phases
660 (replace 'check
661 (lambda _
662 (invoke "pytest" "-vv" "-k"
663 (string-append
664 ;; XXX: These tests fail when using Pytest 4.x and
665 ;; Babel 2.6.0. Try removing this for later versions.
666 "not test_no_inherit_metazone_marker_never_in_output"
667 " and not test_smoke_dates"
668 " and not test_smoke_numbers")))))))
669 (home-page "http://babel.pocoo.org/")
670 (synopsis
671 "Tools for internationalizing Python applications")
672 (description
673 "Babel is composed of two major parts:
674 - tools to build and work with gettext message catalogs
675 - a Python interface to the CLDR (Common Locale Data Repository), providing
676 access to various locale display names, localized number and date formatting,
677 etc. ")
678 (license license:bsd-3)))
679
680 (define-public python2-babel
681 (package-with-python2 python-babel))
682
683 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
684 (define-public python2-babel-2.6
685 (package
686 (inherit python2-babel)
687 (version "2.6.0")
688 (source (origin
689 (method url-fetch)
690 (uri (pypi-uri "Babel" version))
691 (sha256
692 (base32
693 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
694
695 (define-public python2-backport-ssl-match-hostname
696 (package
697 (name "python2-backport-ssl-match-hostname")
698 (version "3.5.0.1")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "backports.ssl_match_hostname" version))
703 (sha256
704 (base32
705 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
706 (build-system python-build-system)
707 (arguments
708 `(#:python ,python-2
709 #:tests? #f)) ; no test target
710 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
711 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
712 (description
713 "This backport brings the ssl.match_hostname() function to users of
714 earlier versions of Python. The function checks the hostname in the
715 certificate returned by the server to which a connection has been established,
716 and verifies that it matches the intended target hostname.")
717 (license license:psfl)))
718
719 (define-public python-bitarray
720 (package
721 (name "python-bitarray")
722 (version "1.4.0")
723 (source (origin
724 (method url-fetch)
725 (uri (pypi-uri "bitarray" version))
726 (sha256
727 (base32
728 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
729 (build-system python-build-system)
730 (home-page "https://github.com/ilanschnell/bitarray")
731 (synopsis "Efficient arrays of booleans")
732 (description "This package provides an object type which efficiently
733 represents an array of booleans. Bitarrays are sequence types and behave very
734 much like usual lists. Eight bits are represented by one byte in a contiguous
735 block of memory. The user can select between two representations:
736 little-endian and big-endian. All of the functionality is implemented in C.
737 Methods for accessing the machine representation are provided. This can be
738 useful when bit level access to binary files is required, such as portable
739 bitmap image files. Also, when dealing with compressed data which uses
740 variable bit length encoding, you may find this module useful.")
741 (license license:psfl)))
742
743 (define-public python-boolean.py
744 (package
745 (name "python-boolean.py")
746 (version "3.6")
747 (source
748 (origin
749 ;; There's no source tarball on PyPI.
750 (method git-fetch)
751 (uri (git-reference
752 (url "https://github.com/bastikr/boolean.py")
753 (commit (string-append "v" version))))
754 (file-name (git-file-name name version))
755 (sha256
756 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
757 (build-system python-build-system)
758 (home-page "https://github.com/bastikr/boolean.py")
759 (synopsis "Boolean algebra in one Python module")
760 (description
761 "This is a small Python library that implements boolean algebra.
762 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
763 @code{Symbol} class that can take on one of these two values. Calculations
764 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
765 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
766 Expressions are constructed from parsed strings or directly in Python.")
767 (license license:bsd-2)))
768
769 (define-public python-hdf4
770 (package
771 (name "python-hdf4")
772 (version "0.9")
773 (source
774 (origin
775 (method url-fetch)
776 (uri (pypi-uri name version))
777 (sha256
778 (base32
779 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
780 (build-system python-build-system)
781 (native-inputs `(("nose" ,python-nose)))
782 (propagated-inputs `(("numpy" ,python-numpy)))
783 (inputs
784 `(("hdf4" ,hdf4)
785 ("libjpeg" ,libjpeg-turbo)
786 ("zlib" ,zlib)))
787 (arguments
788 `(#:phases
789 (modify-phases %standard-phases
790 (replace 'check
791 (lambda _
792 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
793 ;; on to import numpy. Somehow this works on their CI system.
794 ;; Let's just manage PYTHONPATH here instead.
795 (substitute* "runexamples.sh"
796 (("export PYTHONPATH=.*") ""))
797 (setenv "PYTHONPATH"
798 (string-append (getcwd) ":"
799 (getenv "PYTHONPATH")))
800 (invoke "./runexamples.sh")
801 (invoke "nosetests" "-v"))))))
802 (home-page "https://github.com/fhs/python-hdf4")
803 (synopsis "Python interface to the NCSA HDF4 library")
804 (description
805 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
806 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
807 NetCDF files can also be read and modified. Python-HDF4 is a fork of
808 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
809 (license license:expat)))
810
811 (define-public python2-hdf4
812 (package-with-python2 python-hdf4))
813
814 (define-public python-h5py
815 (package
816 (name "python-h5py")
817 (version "2.10.0")
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "h5py" version))
822 (sha256
823 (base32
824 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
825 (build-system python-build-system)
826 (arguments
827 `(#:tests? #f ; no test target
828 #:phases
829 (modify-phases %standard-phases
830 (add-after 'unpack 'fix-hdf5-paths
831 (lambda* (#:key inputs #:allow-other-keys)
832 (let ((prefix (assoc-ref inputs "hdf5")))
833 (substitute* "setup_build.py"
834 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
835 (string-append "['" prefix "/lib" "']"))
836 (("'/opt/local/include', '/usr/local/include'")
837 (string-append "'" prefix "/include" "'")))
838 (substitute* "setup_configure.py"
839 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
840 (string-append "['" prefix "/lib" "']")))
841 #t))))))
842 (propagated-inputs
843 `(("python-six" ,python-six)
844 ("python-numpy" ,python-numpy)))
845 (inputs
846 `(("hdf5" ,hdf5-1.10)))
847 (native-inputs
848 `(("python-cython" ,python-cython)
849 ("python-pkgconfig" ,python-pkgconfig)
850 ("pkg-config" ,pkg-config)))
851 (home-page "https://www.h5py.org/")
852 (synopsis "Read and write HDF5 files from Python")
853 (description
854 "The h5py package provides both a high- and low-level interface to the
855 HDF5 library from Python. The low-level interface is intended to be a
856 complete wrapping of the HDF5 API, while the high-level component supports
857 access to HDF5 files, datasets and groups using established Python and NumPy
858 concepts.")
859 (license license:bsd-3)))
860
861 (define-public python2-h5py
862 (package-with-python2 python-h5py))
863
864 (define-public python-sh
865 (package
866 (name "python-sh")
867 (version "1.12.14")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (pypi-uri "sh" version))
872 (sha256
873 (base32
874 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
875 (build-system python-build-system)
876 (arguments
877 '(#:phases
878 (modify-phases %standard-phases
879 (replace 'check
880 (lambda _
881 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
882 (setenv "HOME" "/tmp")
883 (invoke "python" "sh.py" "test"))))))
884 (native-inputs
885 `(("python-coverage" ,python-coverage)))
886 (home-page "https://github.com/amoffat/sh")
887 (synopsis "Python subprocess replacement")
888 (description "This package provides a replacement for Python's
889 @code{subprocess} feature.")
890 (license license:expat)))
891
892 (define-public python2-sh
893 (package-with-python2 python-sh))
894
895 (define-public python-cftime
896 (package
897 (name "python-cftime")
898 (version "1.0.4.2")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (pypi-uri "cftime" version))
903 (sha256
904 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
905 (build-system python-build-system)
906 (propagated-inputs
907 `(("python-numpy" ,python-numpy)))
908 (native-inputs
909 `(("python-coveralls" ,python-coveralls)
910 ("python-cython" ,python-cython)
911 ("python-pytest-cov" ,python-pytest-cov)))
912 (home-page "https://github.com/Unidata/cftime")
913 (synopsis "Library for time handling")
914 (description
915 "This package provides time-handling functionality that used to be part
916 of the netcdf4 package before.")
917 ;; This package claims to include code under the GPLv3 but is released
918 ;; under ISC.
919 (license (list license:isc license:gpl3+))))
920
921 (define-public python-netcdf4
922 (package
923 (name "python-netcdf4")
924 (version "1.5.3")
925 (source
926 (origin
927 (method url-fetch)
928 (uri (pypi-uri "netCDF4" version))
929 (sha256
930 (base32
931 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
932 (build-system python-build-system)
933 (arguments
934 '(#:phases
935 (modify-phases %standard-phases
936 (add-after 'unpack 'configure-locations
937 (lambda* (#:key inputs #:allow-other-keys)
938 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
939 #t)))))
940 (native-inputs
941 `(("python-cython" ,python-cython)))
942 (propagated-inputs
943 `(("python-numpy" ,python-numpy)
944 ("python-cftime" ,python-cftime)))
945 (inputs
946 `(("netcdf" ,netcdf)
947 ("hdf4" ,hdf4)
948 ("hdf5" ,hdf5)))
949 (home-page "https://github.com/Unidata/netcdf4-python")
950 (synopsis "Python/numpy interface to the netCDF library")
951 (description "Netcdf4-python is a Python interface to the netCDF C
952 library. netCDF version 4 has many features not found in earlier
953 versions of the library and is implemented on top of HDF5. This module
954 can read and write files in both the new netCDF 4 and the old netCDF 3
955 format, and can create files that are readable by HDF5 clients. The
956 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
957 to users of that module.")
958 ;; The software is mainly ISC, but includes some files covered
959 ;; by the Expat license.
960 (license (list license:isc license:expat))))
961
962 (define-public python-license-expression
963 (package
964 (name "python-license-expression")
965 (version "0.999")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "license-expression" version))
970 (sha256
971 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
972 (build-system python-build-system)
973 (propagated-inputs
974 `(("python-boolean.py" ,python-boolean.py)))
975 (home-page "https://github.com/nexB/license-expression")
976 (synopsis "Apply boolean logic to license expressions")
977 (description
978 "This Python module defines a tiny language to evaluate and compare
979 license expressions using boolean logic. Logical combinations of licenses can
980 be tested for equality, containment, and equivalence. They can be normalised
981 and simplified. It supports SPDX license expressions as well as other naming
982 conventions and aliases in the same expression.")
983 (license license:gpl2+)))
984
985 (define-public python-lockfile
986 (package
987 (name "python-lockfile")
988 (version "0.12.2")
989 (source
990 (origin
991 (method url-fetch)
992 (uri (pypi-uri "lockfile" version))
993 (sha256
994 (base32
995 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
996 (build-system python-build-system)
997 (arguments '(#:test-target "check"))
998 (native-inputs
999 `(("python-pbr" ,python-pbr)))
1000 (home-page "https://launchpad.net/pylockfile")
1001 (synopsis "Platform-independent file locking module")
1002 (description
1003 "The lockfile package exports a LockFile class which provides a simple
1004 API for locking files.")
1005 (license license:expat)))
1006
1007 (define-public python2-lockfile
1008 (package-with-python2 python-lockfile))
1009
1010 (define-public python-filelock
1011 (package
1012 (name "python-filelock")
1013 (version "3.0.12")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (pypi-uri "filelock" version))
1018 (sha256
1019 (base32
1020 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1021 (build-system python-build-system)
1022 (home-page
1023 "https://github.com/benediktschmitt/py-filelock")
1024 (synopsis "Platform independent file lock")
1025 (description "@code{filelock} contains a single module implementing
1026 a platform independent file lock in Python, which provides a simple way of
1027 inter-process communication.")
1028 (license license:unlicense)))
1029
1030 (define-public python-semantic-version
1031 (package
1032 (name "python-semantic-version")
1033 (version "2.6.0")
1034 (source
1035 (origin
1036 (method url-fetch)
1037 (uri (pypi-uri "semantic_version" version))
1038 (sha256
1039 (base32
1040 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1041 (build-system python-build-system)
1042 (arguments
1043 `(#:tests? #f)) ; PyPI tarball lacks tests
1044 (home-page "https://github.com/rbarrois/python-semanticversion")
1045 (synopsis "Semantic versioning module for Python")
1046 (description
1047 "The @code{semantic_version} class is a small library for handling
1048 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1049
1050 It can compare versions, generate a new version that represents a bump in one of
1051 the version levels, and check whether any given string is a proper semantic
1052 version identifier.")
1053 (license license:bsd-3)))
1054
1055 (define-public python2-semantic-version
1056 (package-with-python2 python-semantic-version))
1057
1058 (define-public python-serpent
1059 (package
1060 (name "python-serpent")
1061 (version "1.28")
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (pypi-uri "serpent" version))
1066 (sha256
1067 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1068 (build-system python-build-system)
1069 (native-inputs
1070 `(("python-attrs" ,python-attrs)
1071 ("python-pytz" ,python-pytz)))
1072 (home-page "https://github.com/irmen/Serpent")
1073 (synopsis "Serializer for literal Python expressions")
1074 (description
1075 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1076 serialization. It serializes an object tree into bytes (an utf-8 encoded
1077 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1078 to rebuild the original object tree.
1079
1080 Because only safe literals are encoded, it is safe to send serpent data to
1081 other machines, such as over the network.")
1082 (properties `((python2-variant . ,(delay python2-serpent))))
1083 (license license:expat)))
1084
1085 (define-public python2-serpent
1086 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1087 (package
1088 (inherit base)
1089 (propagated-inputs
1090 `(("python-enum34" ,python2-enum34)
1091 ,@(package-propagated-inputs base))))))
1092
1093 (define-public python-setuptools
1094 (package
1095 (name "python-setuptools")
1096 (version "41.0.1")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "setuptools" version ".zip"))
1101 (sha256
1102 (base32
1103 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1104 (modules '((guix build utils)))
1105 (snippet
1106 '(begin
1107 ;; Remove included binaries which are used to build self-extracting
1108 ;; installers for Windows.
1109 ;; TODO: Find some way to build them ourself so we can include them.
1110 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1111 #t))))
1112 (build-system python-build-system)
1113 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1114 ;; One could bootstrap with an internal untested setuptools.
1115 (arguments
1116 `(#:tests? #f))
1117 (home-page "https://pypi.org/project/setuptools/")
1118 (synopsis
1119 "Library designed to facilitate packaging Python projects")
1120 (description
1121 "Setuptools is a fully-featured, stable library designed to facilitate
1122 packaging Python projects, where packaging includes:
1123 Python package and module definitions,
1124 distribution package metadata,
1125 test hooks,
1126 project installation,
1127 platform-specific details,
1128 Python 3 support.")
1129 ;; TODO: setuptools now bundles the following libraries:
1130 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1131 (license (list license:psfl ; setuptools itself
1132 license:expat ; six, appdirs, pyparsing
1133 license:asl2.0 ; packaging is dual ASL2/BSD-2
1134 license:bsd-2))))
1135
1136 (define-public python2-setuptools
1137 (package-with-python2 python-setuptools))
1138
1139 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1140 (define-public python-setuptools-for-tensorflow
1141 (hidden-package
1142 (package
1143 (inherit python-setuptools)
1144 (version "39.1.0")
1145 (source (origin
1146 (inherit (package-source python-setuptools))
1147 (uri (pypi-uri "setuptools" version ".zip"))
1148 (sha256
1149 (base32
1150 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1151
1152 (define-public python-uniseg
1153 (package
1154 (name "python-uniseg")
1155 (version "0.7.1")
1156 (source
1157 (origin
1158 (method url-fetch)
1159 (uri (pypi-uri "uniseg" version ".zip"))
1160 (sha256
1161 (base32
1162 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1163 (build-system python-build-system)
1164 (arguments
1165 '(#:tests? #f)) ; The test suite requires network access.
1166 (native-inputs
1167 `(("unzip" ,unzip)))
1168 (home-page
1169 "https://bitbucket.org/emptypage/uniseg-python")
1170 (synopsis
1171 "Python library to determine Unicode text segmentations")
1172 (description
1173 "Uniseg is a Python package used to determine Unicode text segmentations.
1174 Supported segmentations include:
1175 @enumerate
1176 @item @dfn{Code point} (any value in the Unicode codespace)
1177 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1178 multiple Unicode code points, e.g. \"G\" + acute-accent)
1179 @item Word break
1180 @item Sentence break
1181 @item Line break
1182 @end enumerate")
1183 (license license:expat)))
1184
1185 (define-public python2-uniseg
1186 (package-with-python2 python-uniseg))
1187
1188 (define-public python-humanfriendly
1189 (package
1190 (name "python-humanfriendly")
1191 (version "8.2")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "humanfriendly" version))
1196 (sha256
1197 (base32
1198 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1199 (build-system python-build-system)
1200 (arguments
1201 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1202 #:tests? #f))
1203 (home-page "https://humanfriendly.readthedocs.io")
1204 (synopsis "Human-friendly input and output in Python")
1205 (description
1206 "The functions and classes in @code{humanfriendly} can be used to make
1207 text interfaces more user-friendly. It includes tools to parse and format
1208 numbers, file sizes, and timespans, timers for long-running operations, menus
1209 to allow the user to choose from a list of options, and terminal interaction
1210 helpers.")
1211 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1212 (license license:expat)))
1213
1214 (define-public python2-humanfriendly
1215 (let ((base (package-with-python2
1216 (strip-python2-variant python-humanfriendly))))
1217 (package (inherit base)
1218 (propagated-inputs
1219 `(("python2-monotonic" ,python2-monotonic)
1220 ,@(package-propagated-inputs base))))))
1221
1222 (define-public python-textparser
1223 (package
1224 (name "python-textparser")
1225 (version "0.23.0")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "textparser" version))
1230 (sha256
1231 (base32
1232 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1233 (build-system python-build-system)
1234 (home-page "https://github.com/eerimoq/textparser")
1235 (synopsis "Fast text parser for Python")
1236 (description "This library provides a text parser written in the Python
1237 language. It aims to be fast.")
1238 (license license:expat)))
1239
1240 (define-public python-aenum
1241 (package
1242 (name "python-aenum")
1243 (version "2.2.4")
1244 (source
1245 (origin
1246 (method url-fetch)
1247 (uri (pypi-uri "aenum" version))
1248 (sha256
1249 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1250 (build-system python-build-system)
1251 (arguments
1252 `(#:phases (modify-phases %standard-phases
1253 (replace 'check
1254 (lambda _
1255 (format #t "current working dir ~s~%" (getcwd))
1256 (setenv "PYTHONPATH"
1257 (string-append ".:" (getenv "PYTHONPATH")))
1258 ;; We must run the test suite module directly, as it
1259 ;; fails to define the 'tempdir' variable in scope for
1260 ;; the tests otherwise
1261 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1262 ;; issues/32/running-tests-with-python-setuppy-test).
1263 (invoke "python3" "aenum/test.py")
1264 ;; This one fails with "NameError: name
1265 ;; 'test_pickle_dump_load' is not defined" (see:
1266 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1267 ;; /error-running-the-test_v3py-test-suite).
1268 ;; (invoke "python3" "aenum/test_v3.py")
1269 #t)))))
1270 (home-page "https://bitbucket.org/stoneleaf/aenum")
1271 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1272 (description "The aenum library includes an @code{Enum} base class, a
1273 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1274 class.")
1275 (license license:bsd-3)))
1276
1277 (define-public python-can
1278 (package
1279 (name "python-can")
1280 (version "3.3.3")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (pypi-uri "python-can" version))
1285 (sha256
1286 (base32
1287 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:phases (modify-phases %standard-phases
1291 (add-after 'unpack 'relax-version-requirements
1292 (lambda _
1293 (substitute* "setup.py"
1294 (("mock~=2\\.0") "mock")
1295 (("coverage<5") "coverage")
1296 (("pytest~=4\\.3") "pytest")
1297 (("hypothesis~=4\\.56") "hypothesis"))
1298 #t))
1299 (add-after 'unpack 'fix-broken-tests
1300 ;; The tests try to run two scripts it expects should be
1301 ;; in PATH, but they aren't at this time (see:
1302 ;; https://github.com/hardbyte/python-can/issues/805).
1303 (lambda _
1304 (substitute* "test/test_scripts.py"
1305 (("\"can_logger\\.py --help\"") "")
1306 (("\"can_player\\.py --help\"") ""))
1307 #t)))))
1308 (propagated-inputs
1309 `(("python-aenum" ,python-aenum)
1310 ("python-wrapt" ,python-wrapt)))
1311 (native-inputs
1312 `(("python-codecov" ,python-codecov)
1313 ("python-coverage" ,python-coverage)
1314 ("python-future" ,python-future)
1315 ("python-hypothesis" ,python-hypothesis)
1316 ("python-mock" ,python-mock)
1317 ("python-pyserial" ,python-pyserial)
1318 ("python-pytest" ,python-pytest)
1319 ("python-pytest-cov" ,python-pytest-cov)
1320 ("python-pytest-runner" ,python-pytest-runner)
1321 ("python-pytest-timeout" ,python-pytest-timeout)))
1322 (home-page "https://github.com/hardbyte/python-can")
1323 (synopsis "Controller Area Network (CAN) interface module for Python")
1324 (description "This package defines the @code{can} module, which provides
1325 controller area network (CAN) support for Python developers; providing common
1326 abstractions to different hardware devices, and a suite of utilities for
1327 sending and receiving messages on a CAN bus.")
1328 (license license:lgpl3+)))
1329
1330 (define-public python-diskcache
1331 (package
1332 (name "python-diskcache")
1333 (version "4.1.0")
1334 (source
1335 (origin
1336 (method url-fetch)
1337 (uri (pypi-uri "diskcache" version))
1338 (sha256
1339 (base32
1340 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:tests? #f)) ;test suite not included in the release
1344 (home-page "http://www.grantjenks.com/docs/diskcache/")
1345 (synopsis "Disk and file backed cache library")
1346 (description "DiskCache is a disk and file backed persistent cache.")
1347 (license license:asl2.0)))
1348
1349 (define-public python-bitstruct
1350 (package
1351 (name "python-bitstruct")
1352 (version "8.9.0")
1353 (source
1354 (origin
1355 (method url-fetch)
1356 (uri (pypi-uri "bitstruct" version))
1357 (sha256
1358 (base32
1359 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1360 (build-system python-build-system)
1361 (home-page "https://github.com/eerimoq/bitstruct")
1362 (synopsis "Python values to and C bit field structs converter")
1363 (description "This module performs conversions between Python values and C
1364 bit field structs represented as Python byte strings. It is intended to have
1365 a similar interface as the @code{struct} module from Python, but working on
1366 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1367 (license license:expat)))
1368
1369 (define-public python-cantools
1370 (package
1371 (name "python-cantools")
1372 (version "33.1.1")
1373 (source
1374 (origin
1375 ;; We take the sources from the Git repository as the documentation is
1376 ;; not included with the PyPI archive.
1377 (method git-fetch)
1378 (uri (git-reference
1379 (url "https://github.com/eerimoq/cantools")
1380 (commit version)))
1381 (file-name (git-file-name name version))
1382 (sha256
1383 (base32
1384 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1385 (build-system python-build-system)
1386 (arguments
1387 `(#:phases
1388 (modify-phases %standard-phases
1389 (add-after 'build 'build-doc
1390 (lambda _
1391 ;; See: https://github.com/eerimoq/cantools/issues/190.
1392 (substitute* "README.rst"
1393 (("https://github.com/eerimoq/cantools/raw/master\
1394 /docs/monitor.png")
1395 "monitor.png"))
1396 (with-directory-excursion "docs"
1397 (invoke "make" "man" "info"))))
1398 (add-after 'install 'install-doc
1399 (lambda* (#:key outputs #:allow-other-keys)
1400 (let* ((out (assoc-ref outputs "out"))
1401 (info (string-append out "/share/info"))
1402 (man1 (string-append out "/share/man/man1")))
1403 (format #t "CWD: ~s~%" (getcwd))
1404 (install-file "docs/_build/texinfo/cantools.info" info)
1405 (install-file "docs/_build/man/cantools.1" man1)
1406 #t))))))
1407 (native-inputs
1408 `(("sphinx" ,python-sphinx)
1409 ("texinfo" ,texinfo)))
1410 (propagated-inputs
1411 `(("python-bitstruct" ,python-bitstruct)
1412 ("python-can" ,python-can)
1413 ("python-diskcache" ,python-diskcache)
1414 ("python-textparser" ,python-textparser)))
1415 (home-page "https://github.com/eerimoq/cantools")
1416 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1417 (description "This package includes Controller Area Network (CAN) related
1418 tools that can be used to:
1419 @itemize
1420 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1421 @item encode and decode CAN messages
1422 @item multiplex simple and extended signals
1423 @item diagnose DID encoding and decoding
1424 @item dump the CAN decoder output
1425 @item test CAN nodes
1426 @item generate C source code
1427 @item monitor the CAN bus
1428 @end itemize")
1429 (license license:expat)))
1430
1431 (define-public python-capturer
1432 (package
1433 (name "python-capturer")
1434 (version "2.4")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (pypi-uri "capturer" version))
1439 (sha256
1440 (base32
1441 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1442 (build-system python-build-system)
1443 (arguments
1444 `(#:tests? #f))
1445 (propagated-inputs
1446 `(("python-humanfriendly" ,python-humanfriendly)))
1447 (home-page "https://capturer.readthedocs.io")
1448 (synopsis "Capture stdout and stderr streams of the current process")
1449 (description
1450 "The capturer package makes it easy to capture the stdout and stderr
1451 streams of the current process and subprocesses. Output can be relayed
1452 to the terminal in real time but is also available to the Python program
1453 for additional processing.")
1454 (license license:expat)))
1455
1456 (define-public python2-capturer
1457 (package-with-python2 python-capturer))
1458
1459 (define-public python-case
1460 (package
1461 (name "python-case")
1462 (version "1.5.3")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (pypi-uri "case" version))
1467 (sha256
1468 (base32
1469 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1470 (build-system python-build-system)
1471 (propagated-inputs
1472 `(("python-mock" ,python-mock)
1473 ("python-nose" ,python-nose)
1474 ("python-six" ,python-six)
1475 ("python-unittest2" ,python-unittest2)))
1476 (native-inputs
1477 `(("python-coverage" ,python-coverage)))
1478 (home-page "https://github.com/celery/case")
1479 (synopsis "Unittest utilities and convenience methods")
1480 (description
1481 "The @code{case} package provides utilities on top of unittest, including
1482 some helpful Python 2 compatibility convenience methods.")
1483 (license license:bsd-3)))
1484
1485 (define-public python-verboselogs
1486 (package
1487 (name "python-verboselogs")
1488 (version "1.7")
1489 (source
1490 (origin
1491 (method url-fetch)
1492 (uri (pypi-uri "verboselogs" version))
1493 (sha256
1494 (base32
1495 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1496 (build-system python-build-system)
1497 (arguments
1498 `(#:phases
1499 (modify-phases %standard-phases
1500 (replace 'check
1501 (lambda _
1502 ;; Do not run pylint plugin test, as astroid is an old
1503 ;; unsupported version.
1504 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1505 "verboselogs/tests.py"))))))
1506 (native-inputs
1507 `(("python-mock" ,python-mock)
1508 ("python-pytest" ,python-pytest)))
1509 (home-page "https://verboselogs.readthedocs.io")
1510 (synopsis "Verbose logging level for Python's logging module")
1511 (description
1512 "The @code{verboselogs} package extends Python's @code{logging} module to
1513 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1514 (license license:expat)))
1515
1516 (define-public python2-verboselogs
1517 (package-with-python2 python-verboselogs))
1518
1519 (define-public python-coloredlogs
1520 (package
1521 (name "python-coloredlogs")
1522 (version "10.0")
1523 (source
1524 (origin
1525 (method url-fetch)
1526 (uri (pypi-uri "coloredlogs" version))
1527 (sha256
1528 (base32
1529 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1530 (build-system python-build-system)
1531 (arguments
1532 `(;Tests require some updated modules
1533 #:tests? #f))
1534 (propagated-inputs
1535 `(("python-capturer" ,python-capturer)))
1536 (home-page "https://coloredlogs.readthedocs.io")
1537 (synopsis "Colored stream handler for Python's logging module")
1538 (description
1539 "The @code{coloredlogs} package enables colored terminal output for
1540 Python's logging module. The @code{ColoredFormatter} class inherits from
1541 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1542 messages in color.")
1543 (license license:expat)))
1544
1545 (define-public python2-coloredlogs
1546 (package-with-python2 python-coloredlogs))
1547
1548 (define-public python-editorconfig
1549 (package
1550 (name "python-editorconfig")
1551 (version "0.12.2")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "EditorConfig" version))
1556 (sha256
1557 (base32
1558 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1559 (build-system python-build-system)
1560 (home-page "https://editorconfig.org/")
1561 (synopsis "EditorConfig bindings for python")
1562 (description "The EditorConfig project consists of a file format for
1563 defining coding styles and a collection of text editor plugins that enable
1564 editors to read the file format and adhere to defined styles. EditorConfig
1565 files are easily readable and they work nicely with version control systems.")
1566 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1567 (license (list license:bsd-2 license:psfl))))
1568
1569 (define-public dosage
1570 (package
1571 (name "dosage")
1572 (version "2.17")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "dosage" version))
1577 (sha256
1578 (base32
1579 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1580 (build-system python-build-system)
1581 (propagated-inputs
1582 `(("python2-backports-functools-lru-cache"
1583 ,python2-backports-functools-lru-cache)
1584 ("python2-backports-shutil-get-terminal-size"
1585 ,python2-backports-shutil-get-terminal-size)
1586 ("python-cached-property" ,python-cached-property)
1587 ("python-colorama" ,python-colorama)
1588 ("python-imagesize" ,python-imagesize)
1589 ("python-importlib-metadata" ,python-importlib-metadata)
1590 ("python-lxml" ,python-lxml)
1591 ("python-requests" ,python-requests)
1592 ("python-six" ,python-six)))
1593 (native-inputs
1594 `(("python-pytest-cov" ,python-pytest-cov)
1595 ("python-pytest-xdist" ,python-pytest-xdist)
1596 ("python-responses" ,python-responses)
1597 ("python-setuptools-scm" ,python-setuptools-scm)))
1598 (home-page "https://github.com/webcomics/dosage")
1599 (synopsis "Comic strip downloader and archiver")
1600 (description "Dosage is designed to keep a local copy of specific webcomics and other
1601 picture-based content such as Picture of the Day sites. With the @command{dosage}
1602 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1603 downloaded, or download a strip for a particular date or index, if possible.")
1604 (license license:expat)))
1605
1606 (define-public python-et-xmlfile
1607 (package
1608 (name "python-et-xmlfile")
1609 (version "1.0.1")
1610 (source
1611 (origin
1612 (method url-fetch)
1613 (uri (pypi-uri "et_xmlfile" version))
1614 (sha256
1615 (base32
1616 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1617 (build-system python-build-system)
1618 (arguments
1619 `(#:phases (modify-phases %standard-phases
1620 (replace 'check
1621 (lambda _
1622 (invoke "pytest"))))))
1623 (native-inputs
1624 `(("python-pytest" ,python-pytest)
1625 ("python-lxml" ,python-lxml))) ;used for the tests
1626 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1627 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1628 (description "This Python library is based upon the @code{xmlfile} module
1629 from @code{lxml}. It aims to provide a low memory, compatible implementation
1630 of @code{xmlfile}.")
1631 (license license:expat)))
1632
1633 (define-public python2-et-xmlfile
1634 (package-with-python2 python-et-xmlfile))
1635
1636 (define-public python-openpyxl
1637 (package
1638 (name "python-openpyxl")
1639 (version "3.0.5")
1640 (source
1641 (origin
1642 ;; We use the upstream repository, as the tests are not included in the
1643 ;; PyPI releases.
1644 (method hg-fetch)
1645 (uri (hg-reference
1646 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1647 (changeset version)))
1648 (file-name (string-append name "-" version "-checkout"))
1649 (sha256
1650 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1651 (build-system python-build-system)
1652 (arguments
1653 `(#:phases (modify-phases %standard-phases
1654 (replace 'check
1655 (lambda _
1656 (invoke "pytest"))))))
1657 (native-inputs
1658 ;; For the test suite.
1659 `(("python-lxml" ,python-lxml)
1660 ("python-pillow" ,python-pillow)
1661 ("python-pytest" ,python-pytest)))
1662 (propagated-inputs
1663 `(("python-et-xmlfile" ,python-et-xmlfile)
1664 ("python-jdcal" ,python-jdcal)))
1665 (home-page "https://openpyxl.readthedocs.io")
1666 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1667 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1668 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1669 standard.")
1670 (properties `((python2-variant . ,(delay python2-openpyxl))))
1671 (license license:expat)))
1672
1673 (define-public python2-openpyxl
1674 (let ((base (package-with-python2
1675 (strip-python2-variant python-openpyxl))))
1676 (package
1677 (inherit base)
1678 ;; This is the latest version that has python2 support
1679 (version "2.6.4")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "openpyxl" version))
1684 (sha256
1685 (base32
1686 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1687 (arguments '(#:tests? #f))))) ; No test suite.
1688
1689 (define-public python-eventlet
1690 (package
1691 (name "python-eventlet")
1692 (version "0.25.1")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (pypi-uri "eventlet" version))
1697 (sha256
1698 (base32
1699 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1700 (build-system python-build-system)
1701 (propagated-inputs
1702 `(("python-greenlet" ,python-greenlet)))
1703 (arguments
1704 ;; TODO: Requires unpackaged 'enum-compat'.
1705 '(#:tests? #f))
1706 (home-page "https://eventlet.net")
1707 (synopsis "Concurrent networking library for Python")
1708 (description
1709 "Eventlet is a concurrent networking library for Python that
1710 allows you to change how you run your code, not how you write it.
1711 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1712 Coroutines ensure that the developer uses a blocking style of programming
1713 that is similar to threading, but provide the benefits of non-blocking I/O.
1714 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1715 from the Python interpreter, or as a small part of a larger application.")
1716 (license license:expat)))
1717
1718 (define-public python2-eventlet
1719 (let ((base (package-with-python2
1720 (strip-python2-variant python-eventlet))))
1721 (package (inherit base)
1722 (propagated-inputs
1723 `(("python2-enum34" ,python2-enum34)
1724 ,@(package-propagated-inputs base))))))
1725
1726 (define-public python-six
1727 (package
1728 (name "python-six")
1729 (version "1.14.0")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "six" version))
1734 (sha256
1735 (base32
1736 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1737 (build-system python-build-system)
1738 (arguments
1739 `(#:phases
1740 (modify-phases %standard-phases
1741 (replace 'check
1742 (lambda _
1743 (invoke "py.test" "-v"))))))
1744 (native-inputs
1745 `(("python-pytest" ,python-pytest-bootstrap)))
1746 (home-page "https://pypi.org/project/six/")
1747 (synopsis "Python 2 and 3 compatibility utilities")
1748 (description
1749 "Six is a Python 2 and 3 compatibility library. It provides utility
1750 functions for smoothing over the differences between the Python versions with
1751 the goal of writing Python code that is compatible on both Python versions.
1752 Six supports every Python version since 2.5. It is contained in only one
1753 Python file, so it can be easily copied into your project.")
1754 (license license:x11)))
1755
1756 (define-public python2-six
1757 (package-with-python2 python-six))
1758
1759 (define-public python-six-bootstrap
1760 (package
1761 (inherit python-six)
1762 (name "python-six-bootstrap")
1763 (native-inputs `())
1764 (arguments `(#:tests? #f))))
1765
1766 (define-public python2-six-bootstrap
1767 (package-with-python2 python-six-bootstrap))
1768
1769 (define-public python-schedule
1770 (package
1771 (name "python-schedule")
1772 (version "0.4.3")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (pypi-uri "schedule" version))
1777 (sha256
1778 (base32
1779 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("python-pytest" ,python-pytest)
1783 ("python-mock" ,python-mock)))
1784 (home-page "https://github.com/dbader/schedule")
1785 (synopsis "Schedule periodic function calls in Python")
1786 (description
1787 "Schedule is an in-process scheduler for periodic jobs that uses the
1788 builder pattern for configuration. Schedule lets you run Python functions (or
1789 any other callable) periodically at pre-determined intervals using a simple,
1790 human-friendly syntax.")
1791 (license license:expat)))
1792
1793 (define-public python2-schedule
1794 (package-with-python2 python-schedule))
1795
1796 (define-public python-scour
1797 (package
1798 (name "python-scour")
1799 (version "038.1")
1800 (source
1801 (origin
1802 (method git-fetch)
1803 (uri
1804 (git-reference
1805 (url "https://github.com/scour-project/scour")
1806 (commit
1807 (string-append "v" version))))
1808 (file-name (git-file-name name version))
1809 (sha256
1810 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1811 (propagated-inputs
1812 `(("python-six" ,python-six)))
1813 (build-system python-build-system)
1814 (home-page "https://github.com/scour-project/scour")
1815 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1816 (description "The goal of Scour is to output a file that renderes
1817 identically at a fraction of the size by removing a lot of redundant
1818 information created by most SVG editors. Optimization options are typically
1819 lossless but can be tweaked for more aggressive cleaning.")
1820 (license license:asl2.0)))
1821
1822 (define-public python-mechanize
1823 (package
1824 (name "python-mechanize")
1825 (version "0.4.5")
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "mechanize" version))
1830 (sha256
1831 (base32
1832 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1833 (build-system python-build-system)
1834 (propagated-inputs
1835 `(("python-html5lib" ,python-html5lib)))
1836 (home-page "https://github.com/python-mechanize/mechanize")
1837 (synopsis
1838 "Stateful programmatic web browsing in Python")
1839 (description
1840 "Mechanize implements stateful programmatic web browsing in Python,
1841 after Andy Lester’s Perl module WWW::Mechanize.")
1842 (license license:bsd-3)))
1843
1844 (define-public python2-mechanize
1845 (package-with-python2 python-mechanize))
1846
1847 (define-public python-simpleaudio
1848 (package
1849 (name "python-simpleaudio")
1850 (version "1.0.4")
1851 (source
1852 (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "simpleaudio" version))
1855 (sha256
1856 (base32
1857 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1858 (build-system python-build-system)
1859 (arguments
1860 `(#:tests? #f))
1861 (inputs
1862 `(("alsa-lib" ,alsa-lib)))
1863 (home-page
1864 "https://github.com/hamiltron/py-simple-audio")
1865 (synopsis "Simple, asynchronous audio playback for Python 3")
1866 (description
1867 "The @code{simplaudio} package provides cross-platform, dependency-free
1868 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1869 (license license:expat))) ; MIT license
1870
1871 (define-public python-simplejson
1872 (package
1873 (name "python-simplejson")
1874 (version "3.17.0")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "simplejson" version))
1879 (sha256
1880 (base32
1881 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1882 (build-system python-build-system)
1883 (home-page "http://simplejson.readthedocs.org/en/latest/")
1884 (synopsis
1885 "Json library for Python")
1886 (description
1887 "JSON (JavaScript Object Notation) is a subset of JavaScript
1888 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1889 format.
1890
1891 Simplejson exposes an API familiar to users of the standard library marshal
1892 and pickle modules. It is the externally maintained version of the json
1893 library contained in Python 2.6, but maintains compatibility with Python 2.5
1894 and (currently) has significant performance advantages, even without using
1895 the optional C extension for speedups. Simplejson is also supported on
1896 Python 3.3+.")
1897 (license license:x11)))
1898
1899 (define-public python2-simplejson
1900 (package-with-python2 python-simplejson))
1901
1902
1903 (define-public python-pyicu
1904 (package
1905 (name "python-pyicu")
1906 (version "2.4.3")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "PyICU" version))
1911 (sha256
1912 (base32
1913 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1914 (build-system python-build-system)
1915 (inputs
1916 `(("icu4c" ,icu4c)))
1917 (native-inputs
1918 `(("python-pytest" ,python-pytest)
1919 ("python-six" ,python-six)))
1920 (home-page "https://github.com/ovalhub/pyicu")
1921 (synopsis "Python extension wrapping the ICU C++ API")
1922 (description
1923 "PyICU is a python extension wrapping the ICU C++ API.")
1924 (license license:x11)))
1925
1926 (define-public python2-pyicu
1927 (package-with-python2 python-pyicu))
1928
1929 (define-public python-dogtail
1930 (package
1931 (name "python-dogtail")
1932 (version "0.9.11")
1933 (source (origin
1934 (method url-fetch)
1935 (uri
1936 (string-append
1937 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1938 "dogtail-" version ".tar.gz"))
1939 (sha256
1940 (base32
1941 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1942 (build-system python-build-system)
1943 (arguments
1944 `(#:tests? #f ; TODO Launching dbus for the tests
1945 ; fails
1946 #:phases
1947 (modify-phases %standard-phases
1948 (replace 'check
1949 (lambda* (#:key tests? #:allow-other-keys)
1950 (when tests?
1951 (system "Xvfb :1 &")
1952 (setenv "DISPLAY" ":1")
1953 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1954 #t)))))
1955 (propagated-inputs
1956 `(("python-pygobject" ,python-pygobject)
1957 ("python-pycairo" ,python-pycairo)
1958 ("python-pyatspi" ,python-pyatspi)))
1959 (native-inputs
1960 `(("python-nose" ,python-nose)
1961 ("gtk+" ,gtk+)
1962 ("xvfb" ,xorg-server)
1963 ("dbus" ,dbus)
1964 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1965 ("gobject-introspection" ,gobject-introspection)))
1966 (home-page "https://gitlab.com/dogtail/dogtail/")
1967 (synopsis "GUI test tool and automation framework written in Python")
1968 (description
1969 "Dogtail is a GUI test tool and automation framework written in Python.
1970 It uses Accessibility (a11y) technologies to communicate with desktop
1971 applications. dogtail scripts are written in Python and executed like any
1972 other Python program.")
1973 (license license:gpl2+)))
1974
1975 (define-public python2-dogtail
1976 (package-with-python2 python-dogtail))
1977
1978 (define-public python-empy
1979 (package
1980 (name "python-empy")
1981 (version "3.3.3")
1982 (source (origin
1983 (method url-fetch)
1984 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1985 version ".tar.gz"))
1986 (sha256
1987 (base32
1988 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1989 (build-system python-build-system)
1990 (arguments
1991 `(#:tests? #f)) ; python2 only
1992 (home-page "http://www.alcyone.com/software/empy/")
1993 (synopsis "Templating system for Python")
1994 (description
1995 "EmPy is a system for embedding Python expressions and statements in
1996 template text; it takes an EmPy source file, processes it, and produces
1997 output. This is accomplished via expansions, which are special signals to the
1998 EmPy system and are set off by a special prefix (by default the at sign, @@).
1999 EmPy can expand arbitrary Python expressions and statements in this way, as
2000 well as a variety of special forms. Textual data not explicitly delimited in
2001 this way is sent unaffected to the output, allowing Python to be used in
2002 effect as a markup language. Also supported are callbacks via hooks,
2003 recording and playback via diversions, and dynamic, chainable filters. The
2004 system is highly configurable via command line options and embedded
2005 commands.")
2006 (license license:lgpl2.1+)))
2007
2008 (define-public python2-empy
2009 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2010 (package
2011 (inherit base)
2012 (arguments `(,@(package-arguments base)
2013 #:tests? #t)))))
2014
2015 (define-public python2-element-tree
2016 (package
2017 (name "python2-element-tree")
2018 (version "1.2.6")
2019 (source (origin
2020 (method url-fetch)
2021 (uri (string-append
2022 "http://effbot.org/media/downloads/elementtree-"
2023 version "-20050316.tar.gz"))
2024 (sha256
2025 (base32
2026 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2027 (build-system python-build-system)
2028 (arguments
2029 `(#:python ,python-2 ; seems to be part of Python 3
2030 #:tests? #f)) ; no 'test' sub-command
2031 (synopsis "Toolkit for XML processing in Python")
2032 (description
2033 "ElementTree is a Python library supporting lightweight XML processing.")
2034 (home-page "https://effbot.org/zone/element-index.htm")
2035 (license (license:x11-style
2036 "http://docs.python.org/2/license.html"
2037 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2038
2039 (define-public python2-pybugz
2040 (package
2041 (name "python2-pybugz")
2042 (version "0.6.11")
2043 (source (origin
2044 (method url-fetch)
2045 (uri (string-append
2046 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2047 version ".tar.gz"))
2048 (sha256
2049 (base32
2050 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2051 (patches (search-patches "pybugz-stty.patch"
2052 "pybugz-encode-error.patch"))))
2053 (build-system python-build-system)
2054 (arguments
2055 `(#:python ,python-2 ; SyntaxError with Python 3
2056 #:tests? #f)) ; no 'test' sub-command
2057 (propagated-inputs
2058 `(("element-tree" ,python2-element-tree)))
2059 (synopsis "Python and command-line interface to Bugzilla")
2060 (description
2061 "PyBugz is a Python library and command-line tool to query the Bugzilla
2062 bug tracking system. It is meant as an aid to speed up interaction with the
2063 bug tracker.")
2064 (home-page "http://www.liquidx.net/pybugz/")
2065 (license license:gpl2)))
2066
2067 (define-public python2-enum
2068 (package
2069 (name "python2-enum")
2070 (version "0.4.6")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "enum" version))
2074 (sha256
2075 (base32
2076 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2077 (build-system python-build-system)
2078 (arguments
2079 `(#:python ,python-2))
2080 (home-page "https://pypi.org/project/enum/")
2081 (synopsis "Robust enumerated type support in Python")
2082 (description
2083 "This provides a module for robust enumerations in Python. It has
2084 been superseded by the Python standard library and is provided only for
2085 compatibility.")
2086 ;; Choice of either license.
2087 (license (list license:gpl3+ license:psfl))))
2088
2089 (define-public python-enum34
2090 (package
2091 (name "python-enum34")
2092 (version "1.1.6")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (pypi-uri "enum34" version))
2097 (sha256
2098 (base32
2099 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2100 (build-system python-build-system)
2101 (home-page "https://pypi.org/project/enum34/")
2102 (synopsis "Backported Python 3.4 Enum")
2103 (description
2104 "Enum34 is the new Python stdlib enum module available in Python 3.4
2105 backported for previous versions of Python from 2.4 to 3.3.")
2106 (license license:bsd-3)))
2107
2108 (define-public python2-enum34
2109 (package-with-python2 python-enum34))
2110
2111 (define-public python-parse-type
2112 (package
2113 (name "python-parse-type")
2114 (version "0.4.2")
2115 (source
2116 (origin
2117 (method url-fetch)
2118 (uri (pypi-uri "parse_type" version))
2119 (sha256
2120 (base32
2121 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2122 (build-system python-build-system)
2123 (propagated-inputs
2124 `(("python-six" ,python-six)
2125 ("python-parse" ,python-parse)))
2126 (native-inputs
2127 `(("python-pytest" ,python-pytest)
2128 ("python-pytest-runner" ,python-pytest-runner)))
2129 (home-page "https://github.com/jenisys/parse_type")
2130 (synopsis "Extended parse module")
2131 (description
2132 "Parse_type extends the python parse module.")
2133 (properties
2134 `((python2-variant . ,(delay python2-parse-type))))
2135 (license license:bsd-3)))
2136
2137 (define-public python2-parse-type
2138 (let ((base (package-with-python2
2139 (strip-python2-variant python-parse-type))))
2140 (package (inherit base)
2141 (propagated-inputs
2142 `(("python2-enum34" ,python2-enum34)
2143 ,@(package-propagated-inputs base))))))
2144
2145 (define-public python-parse
2146 (package
2147 (name "python-parse")
2148 (version "1.8.4")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "parse" version))
2153 (sha256
2154 (base32
2155 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2156 (build-system python-build-system)
2157 (arguments
2158 `(#:phases
2159 (modify-phases %standard-phases
2160 (replace 'check
2161 (lambda _ (invoke "python" "test_parse.py"))))))
2162 (home-page "https://github.com/r1chardj0n3s/parse")
2163 (synopsis "Parse strings")
2164 (description
2165 "Parse strings using a specification based on the Python @code{format()}
2166 syntax.")
2167 (license license:x11)))
2168
2169 (define-public python-polib
2170 (package
2171 (name "python-polib")
2172 (version "1.0.8")
2173 (source (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "polib" version))
2176 (sha256
2177 (base32
2178 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2179 (build-system python-build-system)
2180 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2181 (synopsis "Manipulate, create and modify gettext files")
2182 (description "Polib can manipulate any gettext format (po, pot and mo)
2183 files. It can be used to create po files from scratch or to modify
2184 existing ones.")
2185 (license license:expat)))
2186
2187 (define-public python2-polib
2188 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2189 (package
2190 (inherit base)
2191 (arguments `(,@(package-arguments base)
2192 ;; Tests don't work with python2.
2193 #:tests? #f)))))
2194
2195 (define-public python-poyo
2196 (package
2197 (name "python-poyo")
2198 (version "0.5.0")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "poyo" version))
2203 (sha256
2204 (base32
2205 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2206 (build-system python-build-system)
2207 (home-page "https://github.com/hackebrot/poyo")
2208 (synopsis "Lightweight YAML Parser for Python")
2209 (description
2210 "This package provides a lightweight YAML Parser for Python. It supports
2211 only a chosen subset of the YAML format that is required to parse cookiecutter
2212 user configuration files. It does not have support for serializing into YAML
2213 and is not compatible with JSON.")
2214 (license license:expat)))
2215
2216 (define-public scons
2217 (package
2218 (name "scons")
2219 (version "3.0.4")
2220 (source (origin
2221 (method git-fetch)
2222 (uri (git-reference
2223 (url "https://github.com/SCons/scons")
2224 (commit version)))
2225 (file-name (git-file-name name version))
2226 (sha256
2227 (base32
2228 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2229 (build-system python-build-system)
2230 (arguments
2231 `(#:use-setuptools? #f ; still relies on distutils
2232 #:tests? #f ; no 'python setup.py test' command
2233 #:phases
2234 (modify-phases %standard-phases
2235 (add-before 'build 'bootstrap
2236 (lambda _
2237 (substitute* "src/engine/SCons/compat/__init__.py"
2238 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2239 "sys.modules[new] = __import__(old)"))
2240 (substitute* "src/engine/SCons/Platform/__init__.py"
2241 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2242 "mod = __import__(full_name)"))
2243 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2244 (chdir "build/scons")
2245 #t)))))
2246 (home-page "https://scons.org/")
2247 (synopsis "Software construction tool written in Python")
2248 (description
2249 "SCons is a software construction tool. Think of SCons as an improved,
2250 cross-platform substitute for the classic Make utility with integrated
2251 functionality similar to autoconf/automake and compiler caches such as ccache.
2252 In short, SCons is an easier, more reliable and faster way to build
2253 software.")
2254 (license license:x11)))
2255
2256 (define-public scons-python2
2257 (package
2258 (inherit (package-with-python2 scons))
2259 (name "scons-python2")))
2260
2261 (define-public python-extras
2262 (package
2263 (name "python-extras")
2264 (version "1.0.0")
2265 (source
2266 (origin
2267 (method url-fetch)
2268 (uri (pypi-uri "extras" version))
2269 (sha256
2270 (base32
2271 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2272 (build-system python-build-system)
2273 (arguments
2274 ;; FIXME: Circular dependency on testtools.
2275 '(#:tests? #f))
2276 (home-page "https://github.com/testing-cabal/extras")
2277 (synopsis "Useful extensions to the Python standard library")
2278 (description
2279 "Extras is a set of extensions to the Python standard library.")
2280 (license license:expat)))
2281
2282 (define-public python2-extras
2283 (package-with-python2 python-extras))
2284
2285 (define-public python-mimeparse
2286 (package
2287 (name "python-mimeparse")
2288 (version "1.6.0")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "python-mimeparse" version))
2293 (sha256
2294 (base32
2295 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2296 (build-system python-build-system)
2297 (arguments
2298 '(#:phases
2299 (modify-phases %standard-phases
2300 (replace 'check
2301 (lambda _
2302 (invoke "./mimeparse_test.py"))))))
2303 (home-page
2304 "https://github.com/dbtsai/python-mimeparse")
2305 (synopsis "Python library for parsing MIME types")
2306 (description
2307 "Mimeparse provides basic functions for parsing MIME type names and
2308 matching them against a list of media-ranges.")
2309 (license license:expat)))
2310
2311 (define-public python2-mimeparse
2312 (package-with-python2 python-mimeparse))
2313
2314 (define-public python-miniboa
2315 (package
2316 (name "python-miniboa")
2317 (version "1.0.7")
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (pypi-uri "miniboa" version))
2322 (sha256
2323 (base32
2324 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2325 (build-system python-build-system)
2326 (home-page "https://github.com/shmup/miniboa")
2327 (synopsis "Simple, single-threaded Telnet server")
2328 (description
2329 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2330 server.")
2331 (license license:asl2.0)))
2332
2333 (define-public python2-miniboa
2334 (package-with-python2 python-miniboa))
2335
2336 (define-public python-pafy
2337 (package
2338 (name "python-pafy")
2339 (version "0.5.3.1")
2340 (source
2341 (origin
2342 (method url-fetch)
2343 (uri (pypi-uri "pafy" version))
2344 (sha256
2345 (base32
2346 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2347 (build-system python-build-system)
2348 (arguments
2349 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2350 (propagated-inputs
2351 ;; Youtube-dl is a python package which is imported in the file
2352 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2353 `(("youtube-dl" ,youtube-dl)))
2354 (home-page "https://np1.github.io/pafy/")
2355 (synopsis "Retrieve YouTube content and metadata")
2356 (description
2357 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2358 (license license:lgpl3+)))
2359
2360 (define-public python2-funcsigs
2361 (package
2362 (name "python2-funcsigs")
2363 (version "1.0.2")
2364 (source (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "funcsigs" version))
2367 (sha256
2368 (base32
2369 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2370 (build-system python-build-system)
2371 (arguments
2372 `(#:python ,python-2))
2373 (native-inputs
2374 `(("python2-unittest2" ,python2-unittest2)))
2375 (home-page "http://funcsigs.readthedocs.org")
2376 (synopsis "Python function signatures from PEP362")
2377 (description
2378 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2379 (license license:asl2.0)))
2380
2381 (define-public python2-funcsigs-bootstrap
2382 (package
2383 (inherit python2-funcsigs)
2384 (name "python2-funcsigs-bootstrap")
2385 (native-inputs `())
2386 (arguments
2387 `(#:tests? #f
2388 ,@(package-arguments python2-funcsigs)))))
2389
2390 (define-public python-py
2391 (package
2392 (name "python-py")
2393 (version "1.8.1")
2394 (source
2395 (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "py" version))
2398 (sha256
2399 (base32
2400 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2401 (build-system python-build-system)
2402 (arguments
2403 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2404 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2405 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2406 ;; Is this module globally installed?"
2407 '(#:tests? #f))
2408 (native-inputs
2409 `(("python-setuptools-scm" ,python-setuptools-scm)))
2410 (home-page "https://github.com/pytest-dev/py")
2411 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2412 (description
2413 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2414 code introspection, and logging.")
2415 (license license:expat)))
2416
2417 (define-public python2-py
2418 (package-with-python2 python-py))
2419
2420 ;; Recent versions of python-fixtures and python-testrepository need
2421 ;; python-pbr for packaging, which itself needs these two packages for
2422 ;; testing.
2423 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2424 ;; same source, just without any test dependencies and with tests disabled.
2425 ;; python-pbr-minmal is then used to package python-fixtures and
2426 ;; python-testrepository.
2427 ;; Strictly speaking we currently could remove the test-requirements from the
2428 ;; normal python-pbr package (and save this package) since test are disabled
2429 ;; there anyway. But this may change in future.
2430 (define-public python-pbr-minimal
2431 (package
2432 (name "python-pbr-minimal")
2433 (version "3.0.1")
2434 (source
2435 (origin
2436 (method url-fetch)
2437 (uri (pypi-uri "pbr" version))
2438 (sha256
2439 (base32
2440 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2441 (build-system python-build-system)
2442 (arguments
2443 `(#:tests? #f))
2444 (home-page "https://docs.openstack.org/pbr/latest/")
2445 (synopsis "Minimal build of python-pbr used for bootstrapping")
2446 (description
2447 "Used only for bootstrapping python2-pbr, you should not need this.")
2448 (license license:asl2.0)))
2449
2450 (define-public python2-pbr-minimal
2451 (package-with-python2 python-pbr-minimal))
2452
2453 (define-public python-pbr
2454 (package
2455 (inherit python-pbr-minimal)
2456 (name "python-pbr")
2457 (arguments
2458 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2459 (propagated-inputs
2460 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2461 (native-inputs
2462 `(("python-fixtures" ,python-fixtures-bootstrap)
2463 ;; discover, coverage, hacking, subunit
2464 ("python-mock" ,python-mock)
2465 ("python-six" ,python-six)
2466 ("python-sphinx" ,python-sphinx)
2467 ("python-testrepository" ,python-testrepository-bootstrap)
2468 ("python-testresources" ,python-testresources-bootstrap)
2469 ("python-testscenarios" ,python-testscenarios-bootstrap)
2470 ("python-testtools" ,python-testtools-bootstrap)
2471 ("python-virtualenv" ,python-virtualenv)))
2472 (synopsis "Enhance the default behavior of Python’s setuptools")
2473 (description
2474 "Python Build Reasonableness (PBR) is a library that injects some useful
2475 and sensible default behaviors into your setuptools run. It will set
2476 versions, process requirements files and generate AUTHORS and ChangeLog file
2477 from git information.
2478 ")))
2479
2480 (define-public python2-pbr
2481 (package-with-python2 python-pbr))
2482
2483 (define-public python-pyrsistent
2484 (package
2485 (name "python-pyrsistent")
2486 (version "0.16.0")
2487 (home-page "https://github.com/tobgu/pyrsistent")
2488 (source (origin
2489 (method url-fetch)
2490 (uri (pypi-uri "pyrsistent" version))
2491 (sha256
2492 (base32
2493 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2494 (build-system python-build-system)
2495 (arguments
2496 '(#:phases (modify-phases %standard-phases
2497 ;; The package works fine with newer Pytest and Hypothesis, but
2498 ;; has pinned older versions to stay compatible with Python 2.
2499 (add-before 'check 'loosen-pytest-requirement
2500 (lambda _
2501 (substitute* "setup.py"
2502 (("pytest<5") "pytest")
2503 (("hypothesis<5") "hypothesis"))
2504 #t)))))
2505 (native-inputs
2506 `(("python-hypothesis" ,python-hypothesis)
2507 ("python-pytest" ,python-pytest)
2508 ("python-pytest-runner" ,python-pytest-runner)))
2509 (propagated-inputs
2510 `(("python-six" ,python-six)))
2511 (synopsis "Persistent data structures for Python")
2512 (description
2513 "Pyrsistent is a number of persistent collections (by some referred to as
2514 functional data structures). Persistent in the sense that they are immutable.
2515
2516 All methods on a data structure that would normally mutate it instead return a
2517 new copy of the structure containing the requested updates. The original
2518 structure is left untouched.")
2519 (license license:expat)))
2520
2521 (define-public python2-pyrsistent
2522 (package-with-python2 python-pyrsistent))
2523
2524 (define-public python-exif-read
2525 (package
2526 (name "python-exif-read")
2527 (version "2.1.2")
2528 (source (origin
2529 (method url-fetch)
2530 (uri (pypi-uri "ExifRead" version))
2531 (sha256
2532 (base32
2533 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2534 (build-system python-build-system)
2535 (arguments `(#:tests? #f)) ; no tests
2536 (home-page "https://github.com/ianare/exif-py")
2537 (synopsis "Python library to extract EXIF data from image files")
2538 (description
2539 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2540 files.")
2541 (license license:bsd-3)))
2542
2543 (define-public python2-exif-read
2544 (package-with-python2 python-exif-read))
2545
2546 (define-public python-pyld
2547 (package
2548 (name "python-pyld")
2549 (version "1.0.5")
2550 (source (origin
2551 (method url-fetch)
2552 (uri (pypi-uri "PyLD" version))
2553 (sha256
2554 (base32
2555 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2556 (build-system python-build-system)
2557 (home-page "https://github.com/digitalbazaar/pyld")
2558 (synopsis "Python implementation of the JSON-LD specification")
2559 (description
2560 "PyLD is an implementation of the JSON-LD specification.")
2561 (license license:bsd-3)))
2562
2563 (define-public python2-pyld
2564 (package-with-python2 python-pyld))
2565
2566 (define-public python-cli-helpers
2567 (package
2568 (name "python-cli-helpers")
2569 (version "2.0.1")
2570 (source
2571 (origin
2572 ;; There's no source tarball on PyPI.
2573 (method git-fetch)
2574 (uri (git-reference
2575 (url "https://github.com/dbcli/cli_helpers")
2576 (commit (string-append "v" version))))
2577 (file-name (git-file-name name version))
2578 (sha256
2579 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2580 (build-system python-build-system)
2581 (native-inputs
2582 `(("python-pytest" ,python-pytest)))
2583 (propagated-inputs
2584 `(("python-wcwidth" ,python-wcwidth)
2585 ("python-configobj" ,python-configobj)
2586 ("python-tabulate" ,python-tabulate)
2587 ("python-terminaltables" ,python-terminaltables)))
2588 (home-page "https://github.com/dbcli/cli_helpers")
2589 (synopsis "Helpers for building command-line apps")
2590 (description
2591 "CLI Helpers is a Python package that makes it easy to perform common
2592 tasks when building command-line apps. It's a helper library for command-line
2593 interfaces.")
2594 (license license:bsd-3)))
2595
2596 (define-public python-click
2597 (package
2598 (name "python-click")
2599 (version "7.1.2")
2600 (source
2601 (origin
2602 (method url-fetch)
2603 (uri (pypi-uri "click" version))
2604 (sha256
2605 (base32
2606 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2607 (build-system python-build-system)
2608 (arguments
2609 `(#:phases
2610 (modify-phases %standard-phases
2611 (add-after 'unpack 'fix-paths
2612 (lambda* (#:key inputs #:allow-other-keys)
2613 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2614 "cross-libc" "libc"))))
2615 (substitute* "src/click/_unicodefun.py"
2616 (("'locale'")
2617 (string-append "'" glibc "/bin/locale'"))))
2618 #t))
2619 (replace 'check
2620 (lambda _
2621 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2622 (invoke "python" "-m" "pytest"))))))
2623 (native-inputs
2624 `(("python-pytest" ,python-pytest)))
2625 (home-page "https://palletsprojects.com/p/click/")
2626 (synopsis "Command line library for Python")
2627 (description
2628 "Click is a Python package for creating command line interfaces in a
2629 composable way with as little code as necessary. Its name stands for
2630 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2631 with sensible defaults out of the box.")
2632 (license license:bsd-3)))
2633
2634 (define-public python2-click
2635 (package-with-python2 python-click))
2636
2637 (define-public python-click-5
2638 (package (inherit python-click)
2639 (name "python-click")
2640 (version "5.1")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "click" version))
2645 (sha256
2646 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2647 (arguments `())))
2648
2649 (define-public python-wheel
2650 (package
2651 (name "python-wheel")
2652 (version "0.33.6")
2653 (source
2654 (origin
2655 (method url-fetch)
2656 (uri (pypi-uri "wheel" version))
2657 (sha256
2658 (base32
2659 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2660 (build-system python-build-system)
2661 (arguments
2662 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2663 ;; fails to find the newly-built bdist_wheel library, even though it is
2664 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2665 '(#:tests? #f))
2666 (home-page "https://bitbucket.org/pypa/wheel/")
2667 (synopsis "Format for built Python packages")
2668 (description
2669 "A wheel is a ZIP-format archive with a specially formatted filename and
2670 the @code{.whl} extension. It is designed to contain all the files for a PEP
2671 376 compatible install in a way that is very close to the on-disk format. Many
2672 packages will be properly installed with only the @code{Unpack} step and the
2673 unpacked archive preserves enough information to @code{Spread} (copy data and
2674 scripts to their final locations) at any later time. Wheel files can be
2675 installed with a newer @code{pip} or with wheel's own command line utility.")
2676 (license license:expat)))
2677
2678 (define-public python2-wheel
2679 (package-with-python2 python-wheel))
2680
2681 (define-public python-vcversioner
2682 (package
2683 (name "python-vcversioner")
2684 (version "2.16.0.0")
2685 (source
2686 (origin
2687 (method url-fetch)
2688 (uri (pypi-uri "vcversioner" version))
2689 (sha256
2690 (base32
2691 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2692 (build-system python-build-system)
2693 (synopsis "Python library for version number discovery")
2694 (description "Vcversioner is a Python library that inspects tagging
2695 information in a variety of version control systems in order to discover
2696 version numbers.")
2697 (home-page "https://github.com/habnabit/vcversioner")
2698 (license license:isc)))
2699
2700 (define-public python2-vcversioner
2701 (package-with-python2 python-vcversioner))
2702
2703 (define-public python-jdcal
2704 (package
2705 (name "python-jdcal")
2706 (version "1.4")
2707 (source
2708 (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "jdcal" version))
2711 (sha256
2712 (base32
2713 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2714 (build-system python-build-system)
2715 (arguments
2716 `(#:phases (modify-phases %standard-phases
2717 (replace 'check
2718 (lambda _
2719 (invoke "pytest"))))))
2720 (native-inputs
2721 `(("python-pytest" ,python-pytest)))
2722 (home-page "https://github.com/phn/jdcal")
2723 (synopsis "Functions to convert between Julian dates Gregorian dates")
2724 (description "This Python library provides functions for converting
2725 between Julian dates and Gregorian dates.")
2726 (license license:bsd-2)))
2727
2728 (define-public python2-jdcal
2729 (package-with-python2 python-jdcal))
2730
2731 (define-public python-jsondiff
2732 (package
2733 (name "python-jsondiff")
2734 (version "1.2.0")
2735 (source
2736 (origin
2737 (method url-fetch)
2738 (uri (pypi-uri "jsondiff" version))
2739 (sha256
2740 (base32
2741 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2742 (build-system python-build-system)
2743 (native-inputs
2744 `(("python-nose" ,python-nose)
2745 ("python-nose-random" ,python-nose-random)))
2746 (home-page
2747 "https://github.com/fzumstein/jsondiff")
2748 (synopsis "Compare JSON and JSON-like structures in Python")
2749 (description "@code{jsondiff} is a Python library which lets you
2750 compare, diff, and patch JSON and JSON-like structures in Python.")
2751 (license license:expat)))
2752
2753 (define-public python-jsonschema
2754 (package
2755 (name "python-jsonschema")
2756 (version "3.2.0")
2757 (source (origin
2758 (method url-fetch)
2759 (uri (pypi-uri "jsonschema" version))
2760 (sha256
2761 (base32
2762 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2763 (build-system python-build-system)
2764 (arguments
2765 '(#:phases
2766 (modify-phases %standard-phases
2767 (replace 'check
2768 (lambda* (#:key inputs outputs #:allow-other-keys)
2769 (add-installed-pythonpath inputs outputs)
2770 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2771 (invoke "trial" "jsonschema"))))))
2772 (native-inputs
2773 `(("python-setuptools_scm" ,python-setuptools-scm)
2774 ("python-twisted" ,python-twisted)))
2775 (propagated-inputs
2776 `(("python-attrs" ,python-attrs)
2777 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2778 ("python-pyrsistent" ,python-pyrsistent)
2779 ("python-six" ,python-six)))
2780 (home-page "https://github.com/Julian/jsonschema")
2781 (synopsis "Implementation of JSON Schema for Python")
2782 (description
2783 "Jsonschema is an implementation of JSON Schema for Python.")
2784 (license license:expat)
2785 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2786
2787 (define-public python2-jsonschema
2788 (let ((jsonschema (package-with-python2
2789 (strip-python2-variant python-jsonschema))))
2790 (package (inherit jsonschema)
2791 (propagated-inputs
2792 `(("python2-functools32" ,python2-functools32)
2793 ,@(package-propagated-inputs jsonschema))))))
2794
2795 (define-public python-schema
2796 (package
2797 (name "python-schema")
2798 (version "0.6.6")
2799 (source
2800 (origin
2801 (method url-fetch)
2802 (uri (pypi-uri "schema" version))
2803 (sha256
2804 (base32
2805 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2806 (build-system python-build-system)
2807 (native-inputs
2808 `(("python-pytest" ,python-pytest)))
2809 (home-page "https://github.com/keleshev/schema")
2810 (synopsis "Simple data validation library")
2811 (description
2812 "@code{python-schema} is a library for validating Python data
2813 structures, such as those obtained from config-files, forms, external
2814 services or command-line parsing, converted from JSON/YAML (or
2815 something else) to Python data-types.")
2816 (license license:psfl)))
2817
2818 (define-public python2-schema
2819 (package-with-python2 python-schema))
2820
2821 (define-public python-schema-0.5
2822 (package (inherit python-schema)
2823 (version "0.5.0")
2824 (source
2825 (origin
2826 (method url-fetch)
2827 (uri (pypi-uri "schema" version))
2828 (sha256
2829 (base32
2830 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2831
2832 (define-public python2-schema-0.5
2833 (package-with-python2 python-schema-0.5))
2834
2835 (define-public python-kitchen
2836 (package
2837 (name "python-kitchen")
2838 (version "1.2.5")
2839 (source
2840 (origin
2841 (method url-fetch)
2842 (uri (pypi-uri "kitchen" version))
2843 (sha256
2844 (base32
2845 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2846 (build-system python-build-system)
2847 (propagated-inputs
2848 `(("python-chardet" ,python-chardet)))
2849 (home-page "https://github.com/fedora-infra/kitchen")
2850 (synopsis "Python API for snippets")
2851 (description "@code{kitchen} module provides a python API for all sorts of
2852 little useful snippets of code that everybody ends up writing for their projects
2853 but never seem big enough to build an independent release. Use kitchen and stop
2854 cutting and pasting that code over and over.")
2855 (license (list license:lgpl2.1+
2856 ;; subprocess.py, test_subprocess.py,
2857 ;; kitchen/pycompat25/defaultdict.py:
2858 license:psfl))))
2859
2860 (define-public python2-kitchen
2861 (package-with-python2 python-kitchen))
2862
2863 (define-public python-unidecode
2864 (package
2865 (name "python-unidecode")
2866 (version "1.1.1")
2867 (source (origin
2868 (method url-fetch)
2869 (uri (pypi-uri "Unidecode" version))
2870 (sha256
2871 (base32
2872 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2873 (build-system python-build-system)
2874 (home-page "https://pypi.org/project/Unidecode/")
2875 (synopsis "ASCII transliterations of Unicode text")
2876 (description
2877 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2878 useful when integrating with legacy code that doesn't support Unicode, or for
2879 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2880 machine identifiers from human-readable Unicode strings that should still be
2881 somewhat intelligible.")
2882 (license license:gpl2+)))
2883
2884 (define-public python2-unidecode
2885 (package-with-python2 python-unidecode))
2886
2887 (define-public python-text-unidecode
2888 (package
2889 (name "python-text-unidecode")
2890 (version "1.3")
2891 (source (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "text-unidecode" version))
2894 (sha256
2895 (base32
2896 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2897 (build-system python-build-system)
2898 (arguments
2899 '(#:phases (modify-phases %standard-phases
2900 (replace 'check
2901 (lambda _
2902 (setenv "PYTHONPATH"
2903 (string-append "./build/lib:"
2904 (getenv "PYTHONPATH")))
2905 (invoke "pytest" "-vv"))))))
2906 (native-inputs
2907 `(("python-pytest" ,python-pytest)))
2908 (home-page "https://github.com/kmike/text-unidecode/")
2909 (synopsis "Decode Unicode data")
2910 (description
2911 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2912 Perl library. It can create ASCII representations of Unicode data. In general
2913 users should prefer the @code{python-unidecode} package which offers better
2914 memory usage and transliteration quality.")
2915 ;; The user can choose either license.
2916 (license (list license:clarified-artistic license:gpl2+))))
2917
2918 (define-public python2-text-unidecode
2919 (package-with-python2 python-text-unidecode))
2920
2921 (define-public python-pyjwt
2922 (package
2923 (name "python-pyjwt")
2924 (version "1.7.1")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "PyJWT" version))
2929 (sha256
2930 (base32
2931 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2932 (modules '((guix build utils)))
2933 (snippet
2934 '(begin
2935 (for-each delete-file-recursively
2936 (find-files "." "\\.pyc$"))
2937 #t))))
2938 (build-system python-build-system)
2939 (arguments
2940 '(#:phases (modify-phases %standard-phases
2941 (replace 'check
2942 (lambda _
2943 ;; Mimic upstream commit 3a20892442b34c7 to get
2944 ;; rid of dependency on pytest-runner < 5.0.
2945 ;; Remove substitution for PyJWT > 1.7.1.
2946 (substitute* "setup.py"
2947 ((".*pytest-runner.*")
2948 ""))
2949 (invoke "pytest" "-vv"))))))
2950 (native-inputs
2951 `(("python-pytest" ,python-pytest)
2952 ("python-pytest-cov" ,python-pytest-cov)))
2953 (home-page "https://github.com/progrium/pyjwt")
2954 (synopsis "JSON Web Token implementation in Python")
2955 (description
2956 "PyJWT is a JSON Web Token implementation written in Python.")
2957 (license license:expat)))
2958
2959 (define-public python2-pyjwt
2960 (package-with-python2 python-pyjwt))
2961
2962 (define-public python-pykka
2963 (package
2964 (name "python-pykka")
2965 (version "1.2.1")
2966 (source
2967 (origin
2968 (method url-fetch)
2969 (uri (pypi-uri "Pykka" version))
2970 (sha256
2971 (base32
2972 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2973 (build-system python-build-system)
2974 (native-inputs
2975 `(("python-mock" ,python-mock)
2976 ("python-nose" ,python-nose)
2977 ("python-gevent" ,python-gevent)
2978 ("python-eventlet" ,python-eventlet)))
2979 (home-page "https://www.pykka.org/")
2980 (synopsis "Pykka is a Python implementation of the actor model")
2981 (description
2982 "Pykka is a Python implementation of the actor model.
2983 The actor model introduces some simple rules to control the sharing
2984 of state and cooperation between execution units, which makes it
2985 easier to build concurrent applications.")
2986 (license license:asl2.0)))
2987
2988 (define-public python2-pykka
2989 (package-with-python2 python-pykka))
2990
2991 (define-public python-pymsgbox
2992 (package
2993 (name "python-pymsgbox")
2994 (version "1.0.6")
2995 (source
2996 (origin
2997 (method git-fetch)
2998 (uri (git-reference
2999 ;; LICENSE.txt is not present on pypi
3000 (url "https://github.com/asweigart/PyMsgBox")
3001 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3002 (file-name (git-file-name name version))
3003 (sha256
3004 (base32
3005 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3006 (arguments
3007 ;; Circular dependency to run tests:
3008 ;; Tests need pyautogui, which depends on pymsgbox.
3009 '(#:tests? #f))
3010 (build-system python-build-system)
3011 (home-page "https://github.com/asweigart/PyMsgBox")
3012 (synopsis "Python module for JavaScript-like message boxes")
3013 (description
3014 "PyMsgBox is a simple, cross-platform, pure Python module for
3015 JavaScript-like message boxes. Types of dialog boxes include:
3016 @enumerate
3017 @item alert
3018 @item confirm
3019 @item prompt
3020 @item password
3021 @end enumerate
3022 ")
3023 (license license:bsd-3)))
3024
3025 (define-public python-pympler
3026 (package
3027 (name "python-pympler")
3028 (home-page "https://pythonhosted.org/Pympler/")
3029 (version "0.8")
3030 (source (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "Pympler" version))
3033 (sha256
3034 (base32
3035 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3036 (build-system python-build-system)
3037 (arguments
3038 `(#:phases (modify-phases %standard-phases
3039 (delete 'check)
3040 (add-after 'install 'check
3041 (lambda* (#:key inputs outputs #:allow-other-keys)
3042 (add-installed-pythonpath inputs outputs)
3043 (invoke "python" "setup.py" "test"))))))
3044 (synopsis "Measure, monitor and analyze memory behavior")
3045 (description
3046 "Pympler is a development tool to measure, monitor and analyze
3047 the memory behavior of Python objects in a running Python application.
3048
3049 By pympling a Python application, detailed insight in the size and the
3050 lifetime of Python objects can be obtained. Undesirable or unexpected
3051 runtime behavior like memory bloat and other @samp{pymples} can easily
3052 be identified.
3053
3054 A web profiling frontend exposes process statistics, garbage
3055 visualisation and class tracker statistics.")
3056 (license license:asl2.0)))
3057
3058 (define-public python2-pympler
3059 (package-with-python2 python-pympler))
3060
3061 (define-public python-itsdangerous
3062 (package
3063 (name "python-itsdangerous")
3064 (version "1.1.0")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "itsdangerous" version))
3069 (sha256
3070 (base32
3071 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3072 (build-system python-build-system)
3073 (home-page "https://palletsprojects.com/p/itsdangerous/")
3074 (synopsis "Python library for passing data to/from untrusted environments")
3075 (description
3076 "Itsdangerous provides various helpers to pass trusted data to untrusted
3077 environments and back.")
3078 (license license:bsd-3)))
3079
3080 (define-public python2-itsdangerous
3081 (package-with-python2 python-itsdangerous))
3082
3083 (define-public python-pyyaml
3084 (package
3085 (name "python-pyyaml")
3086 (version "5.3.1")
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "PyYAML" version))
3091 (sha256
3092 (base32
3093 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3094 (build-system python-build-system)
3095 (inputs
3096 `(("libyaml" ,libyaml)))
3097 (home-page "https://pyyaml.org")
3098 (synopsis "YAML parser and emitter for Python")
3099 (description
3100 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3101 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3102 API, and sensible error messages. PyYAML supports standard YAML tags and
3103 provides Python-specific tags that represent an arbitrary Python object.")
3104 (license license:expat)))
3105
3106 (define-public python2-pyyaml
3107 (package-with-python2 python-pyyaml))
3108
3109 (define-public python-vine
3110 (package
3111 (name "python-vine")
3112 (version "1.1.4")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "vine" version))
3117 (sha256
3118 (base32
3119 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3120 (build-system python-build-system)
3121 (native-inputs
3122 `(("python-pytest" ,python-pytest)
3123 ("python-case" ,python-case)))
3124 (home-page "https://github.com/celery/vine")
3125 (synopsis "Promises for Python")
3126 (description
3127 "@code{vine} provides a special implementation of promises in that it can
3128 be used both for \"promise of a value\" and lazy evaluation. The biggest
3129 upside for this is that everything in a promise can also be a promise,
3130 e.g. filters, callbacks and errbacks can all be promises.")
3131 (license license:bsd-3)))
3132
3133 (define-public python-virtualenv
3134 (package
3135 (name "python-virtualenv")
3136 (version "20.0.10")
3137 (source
3138 (origin
3139 (method url-fetch)
3140 (uri (pypi-uri "virtualenv" version))
3141 (sha256
3142 (base32
3143 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3144 (build-system python-build-system)
3145 (native-inputs
3146 `(("python-mock" ,python-mock)
3147 ("python-pytest" ,python-pytest)
3148 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3149 ;; be an input at all". However, removing the input makes the build error:
3150 ;; File "setup.py", line 4, in <module>
3151 ;; raise RuntimeError("setuptools >= 41 required to build")
3152 ("python-setuptools" ,python-setuptools)
3153 ("python-setuptools-scm" ,python-setuptools-scm)))
3154 (propagated-inputs
3155 `(("python-appdirs" ,python-appdirs)
3156 ("python-distlib" ,python-distlib)
3157 ("python-filelock" ,python-filelock)
3158 ("python-six" ,python-six)
3159 ("python-importlib-metadata" ,python-importlib-metadata)))
3160 (home-page "https://virtualenv.pypa.io/")
3161 (synopsis "Virtual Python environment builder")
3162 (description
3163 "Virtualenv is a tool to create isolated Python environments.")
3164 (properties `((python2-variant . ,(delay python2-virtualenv))))
3165 (license license:expat)))
3166
3167 (define-public python2-virtualenv
3168 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3169 (package
3170 (inherit base)
3171 (arguments
3172 `(#:python ,python-2
3173 #:phases
3174 (modify-phases %standard-phases
3175 (add-after 'set-paths 'adjust-PYTHONPATH
3176 (lambda* (#:key inputs #:allow-other-keys)
3177 (let* ((python (assoc-ref inputs "python"))
3178 (python-sitedir (string-append python "/lib/python2.7"
3179 "/site-packages")))
3180 ;; XXX: 'python2' always comes first on PYTHONPATH
3181 ;; and shadows the 'setuptools' input. Move python2
3182 ;; last: this should be fixed in python-build-system
3183 ;; in a future rebuild cycle.
3184 (setenv "PYTHONPATH"
3185 (string-append (string-join (delete python-sitedir
3186 (string-split
3187 (getenv "PYTHONPATH")
3188 #\:))
3189 ":")
3190 ":" python-sitedir))
3191 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3192 (getenv "PYTHONPATH"))
3193 #t))))))
3194 (propagated-inputs
3195 `(("python-contextlib2" ,python2-contextlib2)
3196 ,@(package-propagated-inputs base))))))
3197
3198 (define-public python-markupsafe
3199 (package
3200 (name "python-markupsafe")
3201 (version "1.1.1")
3202 (source
3203 (origin
3204 (method url-fetch)
3205 (uri (pypi-uri "MarkupSafe" version))
3206 (sha256
3207 (base32
3208 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3209 (build-system python-build-system)
3210 (arguments
3211 `(#:modules ((ice-9 ftw)
3212 (srfi srfi-1)
3213 (srfi srfi-26)
3214 (guix build utils)
3215 (guix build python-build-system))
3216 #:phases (modify-phases %standard-phases
3217 (replace 'check
3218 (lambda _
3219 (let ((cwd (getcwd))
3220 (libdir (find (cut string-prefix? "lib." <>)
3221 (scandir "build"))))
3222 (setenv "PYTHONPATH"
3223 (string-append cwd "/build/" libdir ":"
3224 (getenv "PYTHONPATH")))
3225 (invoke "pytest" "-vv")))))))
3226 (native-inputs
3227 `(("python-pytest" ,python-pytest)))
3228 (home-page "https://github.com/mitsuhiko/markupsafe")
3229 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3230 (description
3231 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3232 for Python.")
3233 (license license:bsd-3)))
3234
3235 (define-public python2-markupsafe
3236 (package-with-python2 python-markupsafe))
3237
3238 (define-public python-jinja2
3239 (package
3240 (name "python-jinja2")
3241 (version "2.11.2")
3242 (source
3243 (origin
3244 (method url-fetch)
3245 (uri (pypi-uri "Jinja2" version))
3246 (sha256
3247 (base32
3248 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3249 (build-system python-build-system)
3250 (arguments
3251 '(#:phases (modify-phases %standard-phases
3252 (replace 'check
3253 (lambda* (#:key tests? #:allow-other-keys)
3254 (if tests?
3255 (begin
3256 (setenv "PYTHONPATH"
3257 (string-append "./build/lib:"
3258 (getenv "PYTHONPATH")))
3259 (invoke "pytest" "-vv"))
3260 (format #t "test suite not run~%"))
3261 #t)))))
3262 (native-inputs
3263 `(("python-pytest" ,python-pytest)))
3264 (propagated-inputs
3265 `(("python-markupsafe" ,python-markupsafe)))
3266 (home-page "http://jinja.pocoo.org/")
3267 (synopsis "Python template engine")
3268 (description
3269 "Jinja2 is a small but fast and easy to use stand-alone template engine
3270 written in pure Python.")
3271 (license license:bsd-3)))
3272
3273 (define-public python2-jinja2
3274 (package-with-python2 python-jinja2))
3275
3276 (define-public python-jinja2-time
3277 (package
3278 (name "python-jinja2-time")
3279 (version "0.2.0")
3280 (source
3281 (origin
3282 (method url-fetch)
3283 (uri (pypi-uri "jinja2-time" version))
3284 (sha256
3285 (base32
3286 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3287 (build-system python-build-system)
3288 (propagated-inputs
3289 `(("python-arrow" ,python-arrow)
3290 ("python-jinja2" ,python-jinja2)))
3291 (home-page
3292 "https://github.com/hackebrot/jinja2-time")
3293 (synopsis "Jinja2 Extension for Dates and Times")
3294 (description
3295 "This package provides an extension for the template engine Jinja2. It
3296 adds a 'now' tag providing a convenient access to the arrow.now() API from
3297 templates. A format string can be provided to control the output.")
3298 (license license:expat)))
3299
3300 (define-public python-pystache
3301 (package
3302 (name "python-pystache")
3303 (version "0.5.4")
3304 (source (origin
3305 (method url-fetch)
3306 (uri (pypi-uri "pystache" version))
3307 (sha256
3308 (base32
3309 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3310 (build-system python-build-system)
3311 (arguments
3312 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3313 (home-page "http://defunkt.io/pystache/")
3314 (synopsis "Python logic-less template engine")
3315 (description
3316 "Pystache is a Python implementation of the framework agnostic,
3317 logic-free templating system Mustache.")
3318 (license license:expat)
3319 (properties `((python2-variant . ,(delay python2-pystache))))))
3320
3321 (define-public python2-pystache
3322 (package (inherit (package-with-python2
3323 (strip-python2-variant python-pystache)))
3324 (arguments
3325 `(#:python ,python-2
3326 #:phases
3327 (modify-phases %standard-phases
3328 (replace 'check
3329 (lambda _
3330 (invoke "python" "test_pystache.py"))))))))
3331
3332 (define-public python-joblib
3333 (package
3334 (name "python-joblib")
3335 (version "0.14.1")
3336 (source (origin
3337 (method url-fetch)
3338 (uri (pypi-uri "joblib" version))
3339 (sha256
3340 (base32
3341 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3342 (build-system python-build-system)
3343 (arguments
3344 `(#:phases
3345 (modify-phases %standard-phases
3346 (replace 'check
3347 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3348 (native-inputs
3349 `(("python-pytest" ,python-pytest)))
3350 (home-page "https://joblib.readthedocs.io/")
3351 (synopsis "Using Python functions as pipeline jobs")
3352 (description
3353 "Joblib is a set of tools to provide lightweight pipelining in Python.
3354 In particular, joblib offers: transparent disk-caching of the output values
3355 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3356 logging and tracing of the execution.")
3357 (license license:bsd-3)))
3358
3359 (define-public python2-joblib
3360 (package-with-python2 python-joblib))
3361
3362 (define-public python-daemon
3363 (package
3364 (name "python-daemon")
3365 (version "2.2.3")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "python-daemon" version))
3370 (sha256
3371 (base32
3372 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3373 (build-system python-build-system)
3374 (arguments
3375 `(#:phases
3376 (modify-phases %standard-phases
3377 (add-before 'check 'disable-tests
3378 (lambda _
3379 ;; FIXME: Determine why test fails
3380 (substitute* "test/test_daemon.py"
3381 (("test_detaches_process_context")
3382 "skip_test_detaches_process_context"))
3383 #t)))))
3384 (propagated-inputs
3385 `(("python-lockfile" ,python-lockfile)))
3386 (native-inputs
3387 `(("python-unittest2" ,python-unittest2)
3388 ("python-testtools" ,python-testtools)
3389 ("python-testscenarios" ,python-testscenarios)
3390 ("python-mock" ,python-mock)
3391 ("python-docutils" ,python-docutils)))
3392 (home-page "https://pagure.io/python-daemon/")
3393 (synopsis "Python library for making a Unix daemon process")
3394 (description "Python-daemon is a library that assists a Python program to
3395 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3396
3397 This library provides a @code{DaemonContext} class that manages the following
3398 important tasks for becoming a daemon process:
3399 @enumerate
3400 @item Detach the process into its own process group.
3401 @item Set process environment appropriate for running inside a chroot.
3402 @item Renounce suid and sgid privileges.
3403 @item Close all open file descriptors.
3404 @item Change the working directory, uid, gid, and umask.
3405 @item Set appropriate signal handlers.
3406 @item Open new file descriptors for stdin, stdout, and stderr.
3407 @item Manage a specified PID lock file.
3408 @item Register cleanup functions for at-exit processing.
3409 @end enumerate")
3410 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3411 (license (list license:asl2.0 license:gpl3+))))
3412
3413 (define-public python-anytree
3414 (package
3415 (name "python-anytree")
3416 (version "2.8.0")
3417 (source (origin
3418 (method url-fetch)
3419 (uri (pypi-uri "anytree" version))
3420 (sha256
3421 (base32
3422 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3423 (build-system python-build-system)
3424 (propagated-inputs
3425 `(("python-six" ,python-six)))
3426 (native-inputs
3427 `(;; For tests.
3428 ("graphviz" ,graphviz) ;for 'dot'
3429 ("python-nose" ,python-nose)))
3430 (home-page "https://github.com/c0fec0de/anytree")
3431 (synopsis "Lightweight tree data library")
3432 (description
3433 "@code{anytree} is a simple, lightweight, and extensible tree data
3434 structure for Python.")
3435 (license license:asl2.0)))
3436
3437 (define-public python-docutils
3438 (package
3439 (name "python-docutils")
3440 (version "0.16")
3441 (source
3442 (origin
3443 (method url-fetch)
3444 (uri (pypi-uri "docutils" version))
3445 (sha256
3446 (base32
3447 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3448 (build-system python-build-system)
3449 (arguments
3450 '(#:phases (modify-phases %standard-phases
3451 (replace 'check
3452 (lambda* (#:key tests? #:allow-other-keys)
3453 (if tests?
3454 (invoke "python" "test/alltests.py")
3455 (format #t "test suite not run~%"))
3456 #t)))))
3457 (home-page "http://docutils.sourceforge.net/")
3458 (synopsis "Python Documentation Utilities")
3459 (description
3460 "Docutils is a modular system for processing documentation into useful
3461 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3462 easy to use markup language, for input.
3463
3464 This package provides tools for converting @file{.rst} files to other formats
3465 via commands such as @command{rst2man}, as well as supporting Python code.")
3466 ;; Most of the source code is public domain, but some source files are
3467 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3468 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3469
3470 (define-public python2-docutils
3471 (package-with-python2 python-docutils))
3472
3473 ;; python2-sphinx fails its test suite with newer versions.
3474 (define-public python2-docutils-0.14
3475 (package
3476 (inherit python2-docutils)
3477 (version "0.14")
3478 (source (origin
3479 (method url-fetch)
3480 (uri (pypi-uri "docutils" version))
3481 (sha256
3482 (base32
3483 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3484
3485 (define-public python-restructuredtext-lint
3486 (package
3487 (name "python-restructuredtext-lint")
3488 (version "1.3.0")
3489 (source
3490 (origin
3491 (method url-fetch)
3492 (uri (pypi-uri "restructuredtext-lint" version))
3493 (sha256
3494 (base32
3495 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3496 (build-system python-build-system)
3497 (arguments
3498 `(#:phases
3499 (modify-phases %standard-phases
3500 (delete 'check)
3501 (add-after 'install 'check
3502 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3503 (when tests?
3504 (add-installed-pythonpath inputs outputs)
3505 (invoke "nosetests" "-v"))
3506 #t)))))
3507 (propagated-inputs
3508 `(("python-docutils" ,python-docutils)))
3509 (native-inputs
3510 `(("python-nose" ,python-nose)))
3511 (home-page "https://github.com/twolfson/restructuredtext-lint")
3512 (synopsis "reStructuredText linter")
3513 (description "This package provides a linter for the reStructuredText
3514 format.")
3515 (license license:unlicense)))
3516
3517 (define-public python-doc8
3518 (package
3519 (name "python-doc8")
3520 (version "0.8.0")
3521 (source
3522 (origin
3523 (method url-fetch)
3524 (uri (pypi-uri "doc8" version))
3525 (sha256
3526 (base32
3527 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3528 (build-system python-build-system)
3529 (arguments
3530 `(#:phases
3531 (modify-phases %standard-phases
3532 (delete 'check)
3533 (add-after 'install 'check
3534 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3535 (when tests?
3536 (add-installed-pythonpath inputs outputs)
3537 (invoke "pytest" "-v"))
3538 #t)))))
3539 (propagated-inputs
3540 `(("python-chardet" ,python-chardet)
3541 ("python-docutils" ,python-docutils)
3542 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3543 ("python-six" ,python-six)
3544 ("python-stevedore" ,python-stevedore)))
3545 (native-inputs
3546 `(("python-testtools" ,python-testtools)
3547 ("python-pytest" ,python-pytest)))
3548 (home-page "https://launchpad.net/doc8")
3549 (synopsis
3550 "Style checker for Sphinx (or other) RST documentation")
3551 (description
3552 "Doc8 is an opinionated style checker for reStructured Text and plain
3553 text styles of documentation.")
3554 (license license:asl2.0)))
3555
3556 (define-public python-pygments
3557 (package
3558 (name "python-pygments")
3559 (version "2.6.1")
3560 (source
3561 (origin
3562 (method url-fetch)
3563 (uri (pypi-uri "Pygments" version))
3564 (sha256
3565 (base32
3566 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3567 (build-system python-build-system)
3568 (arguments
3569 ;; FIXME: Tests require sphinx, which depends on this.
3570 '(#:tests? #f))
3571 (home-page "https://pygments.org/")
3572 (synopsis "Syntax highlighting")
3573 (description
3574 "Pygments is a syntax highlighting package written in Python.")
3575 (license license:bsd-2)
3576 (properties `((python2-variant . ,(delay python2-pygments))))))
3577
3578 ;; Pygments 2.6 and later does not support Python 2.
3579 (define-public python2-pygments
3580 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3581 (package
3582 (inherit base)
3583 (version "2.5.2")
3584 (source (origin
3585 (method url-fetch)
3586 (uri (pypi-uri "Pygments" version))
3587 (sha256
3588 (base32
3589 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3590
3591 (define-public python-bumpversion
3592 (package
3593 (name "python-bumpversion")
3594 (version "0.5.3")
3595 (source
3596 (origin
3597 (method url-fetch)
3598 (uri (pypi-uri "bumpversion" version))
3599 (sha256
3600 (base32
3601 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3602 (build-system python-build-system)
3603 (home-page "https://github.com/peritus/bumpversion")
3604 (synopsis "Tool to bump software version")
3605 (description "This tool provides a command-line interface (CLI) to bump a
3606 software version simply.")
3607 (license license:expat)))
3608
3609 (define-public python-deprecated
3610 (package
3611 (name "python-deprecated")
3612 (version "1.2.5")
3613 (source
3614 (origin
3615 (method git-fetch)
3616 (uri (git-reference
3617 (url "https://github.com/tantale/deprecated")
3618 (commit (string-append "v" version))))
3619 (file-name (git-file-name name version))
3620 (sha256
3621 (base32
3622 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3623 (build-system python-build-system)
3624 (arguments
3625 `(#:phases (modify-phases %standard-phases
3626 (replace 'check
3627 (lambda _
3628 (invoke "pytest"))))))
3629 (propagated-inputs
3630 `(("python-wrapt" ,python-wrapt)))
3631 (native-inputs
3632 `(("python-bumpversion" ,python-bumpversion)
3633 ("python-pytest" ,python-pytest)
3634 ("python-pytest-cov" ,python-pytest-cov)
3635 ("python-sphinx" ,python-sphinx)
3636 ("python-tox" ,python-tox)))
3637 (home-page "https://github.com/tantale/deprecated")
3638 (synopsis "Python decorator to deprecate classes, functions or methods")
3639 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3640 to deprecate classes, functions or methods.")
3641 (license license:expat)))
3642
3643 (define-public python-pygithub
3644 (package
3645 (name "python-pygithub")
3646 (version "1.43.8")
3647 (source
3648 ;; We fetch from the Git repo because there are no tests in the PyPI
3649 ;; archive.
3650 (origin
3651 (method git-fetch)
3652 (uri (git-reference
3653 (url "https://github.com/PyGithub/PyGithub")
3654 (commit (string-append "v" version))))
3655 (file-name (git-file-name name version))
3656 (sha256
3657 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3658 (build-system python-build-system)
3659 (arguments
3660 `(#:phases (modify-phases %standard-phases
3661 ;; Some tests rely on the network.
3662 (add-after 'unpack 'disable-failing-tests
3663 (lambda _
3664 (substitute* "tests/Issue142.py"
3665 (("testDecodeJson") "disabled_testDecodeJson"))
3666 #t))
3667 (add-before 'check 'prepare-for-tests
3668 (lambda _
3669 (for-each (lambda (f)
3670 (chmod f #o666))
3671 (find-files "./tests"))
3672 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3673 (setenv "PYTHONPATH"
3674 (string-append "./tests:" (getenv "PYTHONPATH")))
3675 #t)))))
3676 (propagated-inputs
3677 `(("python-deprecated" ,python-deprecated)
3678 ("python-pyjwt" ,python-pyjwt)
3679 ("python-requests" ,python-requests)))
3680 (native-inputs `(("python-httpretty" ,python-httpretty)))
3681 (home-page "https://pygithub.readthedocs.io/en/latest/")
3682 (synopsis "Python library for the GitHub API")
3683 (description "This library allows managing GitHub resources such as
3684 repositories, user profiles, and organizations in your Python applications,
3685 using version 3 of the GitHub application programming interface (API).")
3686 (license license:lgpl3+)))
3687
3688 (define-public python-rellu
3689 (package
3690 (name "python-rellu")
3691 (version "0.7")
3692 (source
3693 (origin
3694 (method url-fetch)
3695 (uri (pypi-uri "rellu" version))
3696 (sha256
3697 (base32
3698 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3699 (build-system python-build-system)
3700 (propagated-inputs
3701 `(("python-invoke" ,python-invoke)
3702 ("python-pygithub" ,python-pygithub)))
3703 (home-page "https://github.com/robotframework/rellu")
3704 (synopsis "Utilities to create PyPI releases")
3705 (description "This collection of utilities contains tooling and templates
3706 to assist in creating releases on GitHub and publishing them on PyPI. It is
3707 designed to be used by Robot Framework and tools and libraries in its
3708 ecosystem, but can naturally be used also by other projects.")
3709 (license license:asl2.0)))
3710
3711 (define-public python-robotframework
3712 (package
3713 (name "python-robotframework")
3714 (version "3.2.2")
3715 ;; There are no tests in the PyPI archive.
3716 (source
3717 (origin
3718 (method git-fetch)
3719 (uri (git-reference
3720 (url "https://github.com/robotframework/robotframework")
3721 (commit (string-append "v" version))))
3722 (file-name (git-file-name name version))
3723 (sha256
3724 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3725 (patches (search-patches
3726 "python-robotframework-source-date-epoch.patch"))))
3727 (build-system python-build-system)
3728 (arguments
3729 `(#:phases (modify-phases %standard-phases
3730 (add-before 'build 'build-and-install-doc
3731 (lambda* (#:key outputs #:allow-other-keys)
3732 (let* ((doc-output (assoc-ref outputs "doc"))
3733 (doc (string-append doc-output "/share/"
3734 ,name "-" ,version "/")))
3735 (invoke "invoke" "library-docs" "all")
3736 (mkdir-p doc)
3737 (copy-recursively "doc/libraries"
3738 (string-append doc "/libraries"))
3739 #t)))
3740 (replace 'check
3741 (lambda* (#:key inputs #:allow-other-keys)
3742 ;; Some tests require timezone data. Otherwise, they
3743 ;; look up /etc/localtime, which doesn't exist, and fail
3744 ;; with:
3745 ;;
3746 ;; OverflowError: mktime argument out of range
3747 (setenv "TZDIR"
3748 (string-append (assoc-ref inputs "tzdata")
3749 "/share/zoneinfo"))
3750 (setenv "TZ" "Europe/Paris")
3751
3752 (invoke "python" "utest/run.py"))))))
3753 (native-inputs
3754 `(("python-invoke" ,python-invoke)
3755 ("python-rellu" ,python-rellu)
3756 ("python:tk" ,python "tk") ;used when building the HTML doc
3757 ("tzdata" ,tzdata-for-tests)))
3758 (outputs '("out" "doc"))
3759 (home-page "https://robotframework.org")
3760 (synopsis "Generic automation framework")
3761 (description "Robot Framework is a generic automation framework for
3762 acceptance testing, acceptance test driven development (ATDD), and robotic
3763 process automation (RPA).")
3764 (license license:asl2.0)))
3765
3766 (define-public python-robotframework-lint
3767 ;; There is no properly tagged release; the commit below seems to correspond
3768 ;; to the 0.9 stable release available from PyPI. The tests are not
3769 ;; included in the PyPI archive, so we fetch the sources from the upstream
3770 ;; Git repo.
3771 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3772 (revision "0"))
3773 (package
3774 (name "python-robotframework-lint")
3775 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3776 revision commit))
3777 (source
3778 (origin
3779 (method git-fetch)
3780 (uri (git-reference
3781 (url "https://github.com/boakley/robotframework-lint")
3782 (commit commit)))
3783 (file-name (git-file-name name version))
3784 (sha256
3785 (base32
3786 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3787 (build-system python-build-system)
3788 (arguments
3789 `(#:phases
3790 (modify-phases %standard-phases
3791 (replace 'check
3792 (lambda _
3793 (invoke "python" "-m" "robot" "-A"
3794 "tests/conf/default.args" "tests"))))))
3795 (propagated-inputs
3796 `(("python-robotframework" ,python-robotframework)))
3797 (home-page "https://github.com/boakley/robotframework-lint/")
3798 (synopsis "Static analysis tool (linter) for Robot Framework")
3799 (description "This package provides the @code{rflint} command-line
3800 utility, a static analysis tool (linter) for Robot Framework source files.")
3801 (license license:asl2.0))))
3802
3803 (define-public python-robotframework-sshlibrary
3804 (package
3805 (name "python-robotframework-sshlibrary")
3806 (version "3.3.0")
3807 ;; There are no tests in the PyPI archive.
3808 (source
3809 (origin
3810 (method git-fetch)
3811 (uri (git-reference
3812 (url "https://github.com/robotframework/SSHLibrary")
3813 (commit (string-append "v" version))))
3814 (file-name (git-file-name name version))
3815 (sha256
3816 (base32
3817 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3818 (build-system python-build-system)
3819 (arguments
3820 `(#:phases
3821 (modify-phases %standard-phases
3822 (add-before 'build 'build-and-install-doc
3823 (lambda* (#:key outputs #:allow-other-keys)
3824 (let* ((doc-output (assoc-ref outputs "doc"))
3825 (doc (string-append doc-output "/share/"
3826 ,name "-" ,version "/")))
3827 (invoke "chmod" "-R" "+w" "docs")
3828 (invoke "invoke" "kw-docs" "project-docs")
3829 (mkdir-p doc)
3830 (for-each delete-file (find-files "docs" "\\.rst"))
3831 (copy-recursively "docs" doc)
3832 #t)))
3833 (replace 'check
3834 (lambda _
3835 ;; Some tests require an SSH server; we remove them.
3836 (delete-file "utest/test_client_api.py")
3837 (delete-file "utest/test_scp.py")
3838 (invoke "python" "utest/run.py"))))))
3839 (propagated-inputs
3840 `(("python-robotframework" ,python-robotframework)
3841 ("python-paramiko" ,python-paramiko)
3842 ("python-scp" ,python-scp)))
3843 (native-inputs
3844 `(("openssh" ,openssh)
3845 ("which" ,which)
3846 ;; To generate the documentation
3847 ("python-docutils" ,python-docutils)
3848 ("python-invoke" ,python-invoke)
3849 ("python-pygments" ,python-pygments)
3850 ("python-rellu" ,python-rellu)))
3851 (outputs '("out" "doc"))
3852 (home-page "https://github.com/robotframework/SSHLibrary")
3853 (synopsis "Robot Framework library for SSH and SFTP")
3854 (description "SSHLibrary is a Robot Framework library providing support
3855 for SSH and SFTP. It has the following main usages:
3856 @itemize @bullet
3857 @item Executing commands on the remote machine, either blocking or non-blocking.
3858 @item Writing and reading in an interactive shell.
3859 @item Transferring files and directories over SFTP.
3860 @item Ensuring that files and directories exist on the remote machine.
3861 @end itemize")
3862 (license license:asl2.0)))
3863
3864 (define-public python-rstr
3865 (package
3866 (name "python-rstr")
3867 (version "2.2.6")
3868 (source
3869 (origin
3870 (method url-fetch)
3871 (uri (pypi-uri "rstr" version))
3872 (sha256
3873 (base32
3874 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3875 (build-system python-build-system)
3876 (home-page
3877 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3878 (synopsis "Generate random strings in Python")
3879 (description "This package provides a python module for generating
3880 random strings of various types. It could be useful for fuzz testing,
3881 generating dummy data, or other applications. It has no dependencies
3882 outside the standard library.")
3883 (license license:bsd-3)))
3884
3885 (define-public python-scp
3886 (package
3887 (name "python-scp")
3888 (version "0.13.3")
3889 (source
3890 (origin
3891 (method url-fetch)
3892 (uri (pypi-uri "scp" version))
3893 (sha256
3894 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3895 (build-system python-build-system)
3896 (arguments
3897 '(#:tests? #f)) ;tests require an SSH server
3898 (propagated-inputs
3899 `(("python-paramiko" ,python-paramiko)))
3900 (home-page "https://github.com/jbardin/scp.py")
3901 (synopsis "SCP protocol module for Python and Paramiko")
3902 (description "The scp module extends the Paramiko library to send and
3903 receive files via the SCP1 protocol, as implemented by the OpenSSH
3904 @command{scp} program.")
3905 (license license:gpl2+)))
3906
3907 (define-public python-rst.linker
3908 (package
3909 (name "python-rst.linker")
3910 (version "1.11")
3911 (source
3912 (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "rst.linker" version))
3915 (sha256
3916 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3917 (build-system python-build-system)
3918 (propagated-inputs
3919 `(("python-dateutil" ,python-dateutil)
3920 ("python-six" ,python-six)))
3921 (native-inputs
3922 `(("python-setuptools-scm" ,python-setuptools-scm)))
3923 ;; Test would require path.py, which would introduce a cyclic dependence.
3924 (arguments `(#:tests? #f))
3925 ;; Note: As of version 1.7 the documentation is not worth building.
3926 (home-page "https://github.com/jaraco/rst.linker")
3927 (synopsis "Sphinx plugin to add links and timestamps")
3928 (description "rst.linker automatically replaces text by a
3929 reStructuredText external reference or timestamps. It's primary purpose is to
3930 augment the changelog, but it can be used for other documents, too.")
3931 (license license:expat)))
3932
3933 (define-public python2-rst.linker
3934 (package-with-python2 python-rst.linker))
3935
3936 (define-public python-feedgenerator
3937 (package
3938 (name "python-feedgenerator")
3939 (version "1.9")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (pypi-uri "feedgenerator" version))
3944 (sha256
3945 (base32
3946 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3947 (modules '((guix build utils)))
3948 (snippet
3949 '(begin
3950 ;; Remove pre-compiled .pyc files from source.
3951 (for-each delete-file-recursively
3952 (find-files "." "__pycache__" #:directories? #t))
3953 (for-each delete-file (find-files "." "\\.pyc$"))
3954 #t))))
3955 (build-system python-build-system)
3956 (propagated-inputs
3957 `(("python-pytz" ,python-pytz)
3958 ("python-six" ,python-six)))
3959 (home-page "https://github.com/getpelican/feedgenerator")
3960 (synopsis
3961 "Standalone version of Django's Atom/RSS feed generator")
3962 (description
3963 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3964 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3965 (license license:bsd-3)))
3966
3967 (define-public python2-feedgenerator
3968 (package-with-python2 python-feedgenerator))
3969
3970 (define-public python-toml
3971 (package
3972 (name "python-toml")
3973 (version "0.10.1")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "toml" version))
3978 (sha256
3979 (base32
3980 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3981 (build-system python-build-system)
3982 (arguments
3983 `(#:tests? #f)) ;no tests suite in release
3984 (home-page "https://github.com/uiri/toml")
3985 (synopsis "Library for TOML")
3986 (description
3987 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3988 Language (TOML) configuration files.")
3989 (license license:expat)))
3990
3991 (define-public python-jsonrpc-server
3992 (package
3993 (name "python-jsonrpc-server")
3994 (version "0.3.4")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "python-jsonrpc-server" version))
3999 (sha256
4000 (base32
4001 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
4002 (build-system python-build-system)
4003 (propagated-inputs
4004 `(("python-mock" ,python-mock)
4005 ("python-pytest" ,python-pytest)
4006 ("python-ujson" ,python-ujson-1)))
4007 (home-page
4008 "https://github.com/palantir/python-jsonrpc-server")
4009 (synopsis "JSON RPC 2.0 server library")
4010 (description
4011 "This package provides a JSON RPC 2.0 server library for Python.")
4012 (license license:expat)))
4013
4014 (define-public python-pydantic
4015 (package
4016 (name "python-pydantic")
4017 (version "1.6.1")
4018 (source
4019 (origin
4020 (method git-fetch)
4021 (uri (git-reference
4022 (url "https://github.com/samuelcolvin/pydantic")
4023 (commit (string-append "v" version))))
4024 (file-name (git-file-name name version))
4025 (sha256
4026 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4027 (build-system python-build-system)
4028 (arguments
4029 '(#:phases
4030 (modify-phases %standard-phases
4031 ;; Reported upstream:
4032 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4033 ;; Disable the faulty test as the fix is unclear.
4034 (add-before 'check 'disable-test
4035 (lambda _
4036 (substitute* "tests/test_validators.py"
4037 (("test_assert_raises_validation_error")
4038 "_test_assert_raises_validation_error"))
4039 #t))
4040 (replace 'check
4041 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4042 (native-inputs
4043 `(("python-pytest" ,python-pytest)))
4044 (home-page "https://github.com/samuelcolvin/pydantic")
4045 (synopsis "Python data validation and settings management")
4046 (description
4047 "Pydantic enforces type hints at runtime, and provides user friendly
4048 errors when data is invalid.")
4049 (license license:expat)))
4050
4051 (define-public python-pydocstyle
4052 (package
4053 (name "python-pydocstyle")
4054 (version "3.0.0")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (pypi-uri "pydocstyle" version))
4059 (sha256
4060 (base32
4061 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4062 (build-system python-build-system)
4063 (propagated-inputs
4064 `(("python-six" ,python-six)
4065 ("python-snowballstemmer" ,python-snowballstemmer)))
4066 (home-page
4067 "https://github.com/PyCQA/pydocstyle/")
4068 (synopsis "Python docstring style checker")
4069 (description
4070 "This package provides a style checker for the Python Language
4071 Server (PLS).")
4072 (license license:expat)))
4073
4074 (define-public python-language-server
4075 (package
4076 (name "python-language-server")
4077 (version "0.34.1")
4078 (source
4079 (origin
4080 (method url-fetch)
4081 (uri (pypi-uri "python-language-server" version))
4082 (sha256
4083 (base32
4084 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4085 (build-system python-build-system)
4086 (propagated-inputs
4087 `(("python-pluggy" ,python-pluggy)
4088 ("python-jsonrpc-server" ,python-jsonrpc-server)
4089 ("python-jedi" ,python-jedi)
4090 ("python-yapf" ,python-yapf)
4091 ("python-pyflakes" ,python-pyflakes)
4092 ("python-pydocstyle" ,python-pydocstyle)
4093 ("python-pycodestyle" ,python-pycodestyle)
4094 ("python-mccabe" ,python-mccabe)
4095 ("python-rope" ,python-rope)
4096 ("python-autopep8" ,python-autopep8)
4097 ("python-flake8" ,python-flake8)
4098 ("python-pylint" ,python-pylint)))
4099 (home-page "https://github.com/palantir/python-language-server")
4100 (synopsis "Python implementation of the Language Server Protocol")
4101 (description
4102 "The Python Language Server (pyls) is an implementation of the Python 3
4103 language specification for the Language Server Protocol (LSP). This tool is
4104 used in text editing environments to provide a complete and integrated
4105 feature-set for programming Python effectively.")
4106 (license license:expat)))
4107
4108 (define-public python-pathspec
4109 (package
4110 (name "python-pathspec")
4111 (version "0.7.0")
4112 (source
4113 (origin
4114 (method url-fetch)
4115 (uri (pypi-uri "pathspec" version))
4116 (sha256
4117 (base32
4118 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4119 (build-system python-build-system)
4120 (home-page "https://github.com/cpburnz/python-path-specification")
4121 (synopsis "Utility library for gitignore style pattern matching of file paths")
4122 (description
4123 "This package provides a utility library for gitignore style pattern
4124 matching of file paths.")
4125 (license license:mpl2.0)))
4126
4127 (define-public python-black
4128 (package
4129 (name "python-black")
4130 (version "20.8b1")
4131 (source
4132 (origin
4133 (method url-fetch)
4134 (uri (pypi-uri "black" version))
4135 (sha256
4136 (base32
4137 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4138 (build-system python-build-system)
4139 (arguments
4140 `(#:phases
4141 (modify-phases %standard-phases
4142 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4143 (lambda _
4144 (let ((python3 (which "python3")))
4145 (substitute* '("tests/data/fmtonoff.py"
4146 "tests/data/string_prefixes.py"
4147 "tests/data/function.py"
4148 "tests/data/python37.py")
4149 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4150 (string-append "#!" python3 (if (string? minor-version)
4151 minor-version
4152 "")))))
4153 #t))
4154 (add-after 'unpack 'disable-broken-tests
4155 (lambda* (#:key outputs inputs #:allow-other-keys)
4156 ;; Make installed package available for running the tests
4157 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4158 ":" (getenv "PATH")))
4159
4160 ;; These tests are supposed to be skipped when the blackd
4161 ;; dependencies are missing, but this doesn't quite work.
4162 (substitute* "tests/test_black.py"
4163 (("( *)class BlackDTestCase.*" match indent)
4164 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4165 indent "class BlackDTestCase(unittest.TestCase):\n"))
4166 (("web.Application") "False")
4167 (("@unittest_run_loop") ""))
4168
4169 ;; Patching the above file breaks the self test
4170 (substitute* "tests/test_black.py"
4171 (("( *)def test_self" match indent)
4172 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4173
4174 (substitute* "tests/test_black.py"
4175 (("( *)def test_python38" match indent)
4176 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4177 #t)))))
4178 (propagated-inputs
4179 `(("python-click" ,python-click)
4180 ("python-attrs" ,python-attrs)
4181 ("python-appdirs" ,python-appdirs)
4182 ("python-pathspec" ,python-pathspec)
4183 ("python-mypy-extensions" ,python-mypy-extensions)
4184 ("python-regex" ,python-regex)
4185 ("python-toml" ,python-toml)
4186 ("python-typed-ast" ,python-typed-ast)
4187 ("python-typing-extensions" ,python-typing-extensions)))
4188 (native-inputs
4189 `(("python-setuptools-scm" ,python-setuptools-scm)))
4190 (home-page "https://github.com/ambv/black")
4191 (synopsis "The uncompromising code formatter")
4192 (description "Black is the uncompromising Python code formatter.")
4193 (license license:expat)))
4194
4195 (define-public python-black-macchiato
4196 (package
4197 (name "python-black-macchiato")
4198 (version "1.3.0")
4199 (source
4200 (origin
4201 (method url-fetch)
4202 (uri (pypi-uri "black-macchiato" version))
4203 (sha256
4204 (base32
4205 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4206 (build-system python-build-system)
4207 (propagated-inputs
4208 `(("python-black" ,python-black)))
4209 (home-page "https://github.com/wbolster/black-macchiato")
4210 (synopsis "Partial @code{python-black} formatting")
4211 (description
4212 "This package is built on top the @{python-black} code formatter to
4213 enable formatting of partial files.")
4214 (license license:bsd-3)))
4215
4216 (define-public python-blinker
4217 (package
4218 (name "python-blinker")
4219 (version "1.4")
4220 (source
4221 (origin
4222 (method url-fetch)
4223 (uri (pypi-uri "blinker" version))
4224 (sha256
4225 (base32
4226 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4227 (build-system python-build-system)
4228 (home-page "https://pythonhosted.org/blinker/")
4229 (synopsis "Fast, simple object-to-object and broadcast signaling")
4230 (description
4231 "Blinker provides a fast dispatching system that allows any number of
4232 interested parties to subscribe to events, or \"signals\".")
4233 (license license:expat)))
4234
4235 (define-public python2-blinker
4236 (package-with-python2 python-blinker))
4237
4238 (define-public pelican
4239 (package
4240 (name "pelican")
4241 (version "4.2.0")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (pypi-uri "pelican" version))
4246 (sha256
4247 (base32
4248 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4249 (build-system python-build-system)
4250 (propagated-inputs
4251 `(("python-blinker" ,python-blinker)
4252 ("python-dateutil" ,python-dateutil)
4253 ("python-docutils" ,python-docutils)
4254 ("python-feedgenerator" ,python-feedgenerator)
4255 ("python-jinja2" ,python-jinja2)
4256 ("python-markdown" ,python-markdown)
4257 ("python-pygments" ,python-pygments)
4258 ("python-pytz" ,python-pytz)
4259 ("python-six" ,python-six)
4260 ("python-unidecode" ,python-unidecode)))
4261 (home-page "https://getpelican.com/")
4262 (arguments
4263 `(;; XXX Requires a lot more packages to do unit tests :P
4264 #:tests? #f))
4265 (synopsis "Python-based static site publishing system")
4266 (description
4267 "Pelican is a tool to generate a static blog from reStructuredText,
4268 Markdown input files, and more. Pelican uses Jinja2 for templating
4269 and is very extensible.")
4270 (license license:agpl3+)))
4271
4272 (define-public mallard-ducktype
4273 (package
4274 (name "mallard-ducktype")
4275 (version "1.0.2")
4276 (source
4277 (origin
4278 (method git-fetch)
4279 ;; git-reference because tests are not included in pypi source tarball
4280 ;; https://issues.guix.gnu.org/issue/36755#2
4281 (uri (git-reference
4282 (url "https://github.com/projectmallard/mallard-ducktype")
4283 (commit version)))
4284 (file-name (git-file-name name version))
4285 (sha256
4286 (base32
4287 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4288 (build-system python-build-system)
4289 (arguments
4290 '(#:phases
4291 (modify-phases %standard-phases
4292 (replace 'check
4293 (lambda _
4294 (with-directory-excursion "tests"
4295 (invoke "sh" "runtests")))))))
4296 (home-page "http://projectmallard.org")
4297 (synopsis "Convert Ducktype to Mallard documentation markup")
4298 (description
4299 "Ducktype is a lightweight syntax that can represent all the semantics
4300 of the Mallard XML documentation system. Ducktype files can be converted to
4301 Mallard using the @command{ducktype} tool. The yelp-tools package
4302 provides additional functionality on the produced Mallard documents.")
4303 (license license:expat)))
4304
4305 (define-public python-cython
4306 (package
4307 (name "python-cython")
4308 (version "0.29.21")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "Cython" version))
4313 (sha256
4314 (base32
4315 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4316 (build-system python-build-system)
4317 ;; we need the full python package and not just the python-wrapper
4318 ;; because we need libpython3.3m.so
4319 (inputs
4320 `(("python" ,python)))
4321 (arguments
4322 `(#:phases
4323 (modify-phases %standard-phases
4324 (add-before 'check 'set-HOME
4325 ;; some tests require access to "$HOME/.cython"
4326 (lambda _ (setenv "HOME" "/tmp") #t))
4327 (replace 'check
4328 (lambda _
4329 ;; Disable compiler optimizations to greatly reduce the running
4330 ;; time of the test suite.
4331 (setenv "CFLAGS" "-O0")
4332
4333 (invoke "python" "runtests.py" "-vv"
4334 "-j" (number->string (parallel-job-count))
4335 ;; XXX: On 32-bit architectures, running the parallel tests
4336 ;; fails on many-core systems, see
4337 ;; <https://github.com/cython/cython/issues/2807>.
4338 ,@(if (not (target-64bit?))
4339 '("-x" "run.parallel")
4340 '())))))))
4341 (home-page "https://cython.org/")
4342 (synopsis "C extensions for Python")
4343 (description "Cython is an optimising static compiler for both the Python
4344 programming language and the extended Cython programming language. It makes
4345 writing C extensions for Python as easy as Python itself.")
4346 (license license:asl2.0)
4347 (properties `((python2-variant . ,(delay python2-cython))))))
4348
4349 (define-public python2-cython
4350 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4351 (package
4352 (inherit base)
4353 (name "python2-cython")
4354 (inputs
4355 `(("python-2" ,python-2))) ;this is not automatically changed
4356 (arguments
4357 (substitute-keyword-arguments (package-arguments base)
4358 ((#:phases phases)
4359 `(modify-phases ,phases
4360 (add-before 'check 'adjust-test_embed
4361 (lambda _
4362 (substitute* "runtests.py"
4363 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4364 ;; so it can give the right -L flag to GCC when embedding static
4365 ;; builds of Python. It is unaware that the Python "config"
4366 ;; directory (where the static library lives) was renamed in
4367 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4368 ;; which works fine, because that is where the shared library is.
4369 ;;
4370 ;; It also appears to be unaware that the Makefile in Demos/embed
4371 ;; already unconditionally pass the static library location to GCC,
4372 ;; after checking sysconfig.get_config_var('LIBPL).
4373 ;;
4374 ;; The effect is that the linker is unable to resolve libexpat
4375 ;; symbols when building for Python 2, because neither the Python 2
4376 ;; shared library nor Expat is available. To fix it, we can either
4377 ;; add Expat as an input and make it visible to the linker, or just
4378 ;; prevent it from overriding the Python shared library location.
4379 ;; The end result is identical, so we take the easy route.
4380 ((" or libname not in os\\.listdir\\(libdir\\)")
4381 ""))
4382 #t)))))))))
4383
4384 ;; The RPython toolchain currently does not support Python 3.
4385 (define-public python2-rpython
4386 (package
4387 (name "python2-rpython")
4388 (version "0.2.1")
4389 (source
4390 (origin
4391 (method url-fetch)
4392 (uri (pypi-uri "rpython" version))
4393 (sha256
4394 (base32
4395 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4396 (build-system python-build-system)
4397 (arguments `(#:python ,python-2))
4398 (native-inputs
4399 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4400 (home-page "https://rpython.readthedocs.org")
4401 (synopsis "Framework for implementing interpreters and virtual machines")
4402 (description "RPython is a translation and support framework for
4403 producing implementations of dynamic languages, emphasizing a clean separation
4404 between language specification and implementation aspects.")
4405 (license license:expat)))
4406
4407 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4408 ;; python-scipy still build, as these three packages are often used together.
4409 (define-public python-numpy
4410 (package
4411 (name "python-numpy")
4412 (version "1.17.3")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (string-append
4417 "https://github.com/numpy/numpy/releases/download/v"
4418 version "/numpy-" version ".tar.gz"))
4419 (sha256
4420 (base32
4421 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4422 (build-system python-build-system)
4423 (inputs
4424 `(("openblas" ,openblas)
4425 ("lapack" ,lapack)))
4426 (native-inputs
4427 `(("python-cython" ,python-cython)
4428 ("python-pytest" ,python-pytest)
4429 ("gfortran" ,gfortran)))
4430 (arguments
4431 `(#:phases
4432 (modify-phases %standard-phases
4433 (add-before 'build 'configure-blas-lapack
4434 (lambda* (#:key inputs #:allow-other-keys)
4435 (call-with-output-file "site.cfg"
4436 (lambda (port)
4437 (format port
4438 "[openblas]
4439 libraries = openblas
4440 library_dirs = ~a/lib
4441 include_dirs = ~a/include
4442
4443 # backslash-n to make emacs happy
4444 \n[lapack]
4445 lapack_libs = lapack
4446 library_dirs = ~a/lib
4447 include_dirs = ~a/include
4448 "
4449 (assoc-ref inputs "openblas")
4450 (assoc-ref inputs "openblas")
4451 (assoc-ref inputs "lapack")
4452 (assoc-ref inputs "lapack"))))
4453 #t))
4454 (add-before 'build 'fix-executable-paths
4455 (lambda* (#:key inputs #:allow-other-keys)
4456 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4457 ;; instead of /bin/sh.
4458 (substitute* "numpy/distutils/exec_command.py"
4459 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4460 (string-append match-start (assoc-ref inputs "bash") match-end)))
4461 ;; Use "gcc" executable, not "cc".
4462 (substitute* "numpy/distutils/system_info.py"
4463 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4464 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4465 #t))
4466 ;; Tests can only be run after the library has been installed and not
4467 ;; within the source directory.
4468 (delete 'check)
4469 (add-after 'install 'check
4470 (lambda* (#:key outputs inputs #:allow-other-keys)
4471 ;; Make installed package available for running the tests
4472 (add-installed-pythonpath inputs outputs)
4473 ;; Make sure "f2py" etc is found.
4474 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4475 ":" (getenv "PATH")))
4476 (with-directory-excursion "/tmp"
4477 (invoke "python" "-c"
4478 "import numpy; numpy.test(verbose=2)")))))))
4479 (home-page "https://numpy.org")
4480 (synopsis "Fundamental package for scientific computing with Python")
4481 (description "NumPy is the fundamental package for scientific computing
4482 with Python. It contains among other things: a powerful N-dimensional array
4483 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4484 and Fortran code, useful linear algebra, Fourier transform, and random number
4485 capabilities.")
4486 (properties `((python2-variant . ,(delay python2-numpy))))
4487 (license license:bsd-3)))
4488
4489 ;; Numpy 1.16.x are the last versions that support Python 2.
4490 (define-public python2-numpy
4491 (let ((numpy (package-with-python2
4492 (strip-python2-variant python-numpy))))
4493 (package/inherit
4494 numpy
4495 (version "1.16.5")
4496 (source (origin
4497 (method url-fetch)
4498 (uri (string-append
4499 "https://github.com/numpy/numpy/releases/download/v"
4500 version "/numpy-" version ".tar.gz"))
4501 (sha256
4502 (base32
4503 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4504
4505 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4506 ;; interest only for legacy code going back to NumPy's predecessor
4507 ;; Numeric.
4508 (define-public python2-numpy-1.8
4509 (package (inherit python2-numpy)
4510 (version "1.8.2")
4511 (source
4512 (origin
4513 (method git-fetch)
4514 (uri (git-reference
4515 (url "https://github.com/numpy/numpy")
4516 (commit (string-append "v" version))))
4517 (file-name (git-file-name "numpy" version))
4518 (sha256
4519 (base32
4520 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4521 (arguments
4522 (substitute-keyword-arguments (package-arguments python2-numpy)
4523 ((#:phases phases)
4524 `(modify-phases ,phases
4525 (replace 'configure-blas-lapack
4526 (lambda* (#:key inputs #:allow-other-keys)
4527 (call-with-output-file "site.cfg"
4528 (lambda (port)
4529 (format port
4530 "[openblas]
4531 libraries = openblas,lapack
4532 library_dirs = ~a/lib:~a/lib
4533 include_dirs = ~a/include:~a/include
4534 "
4535 (assoc-ref inputs "openblas")
4536 (assoc-ref inputs "lapack")
4537 (assoc-ref inputs "openblas")
4538 (assoc-ref inputs "lapack"))))
4539 #t))))))
4540 (native-inputs
4541 `(("python2-nose" ,python2-nose)))
4542 (description "NumPy is the fundamental package for scientific computing
4543 with Python. It contains among other things: a powerful N-dimensional array
4544 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4545 and Fortran code, useful linear algebra, Fourier transform, and random number
4546 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4547 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4548 Numeric.")
4549 (license license:bsd-3)))
4550
4551 (define-public python-munch
4552 (package
4553 (name "python-munch")
4554 (version "2.0.4")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "munch" version))
4559 (sha256
4560 (base32
4561 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4562 (build-system python-build-system)
4563 (home-page "https://github.com/Infinidat/munch")
4564 (synopsis "Dot-accessible dictionary")
4565 (description "Munch is a dot-accessible dictionary similar to JavaScript
4566 objects.")
4567 (license license:expat)))
4568
4569 (define-public python2-munch
4570 (package-with-python2 python-munch))
4571
4572 (define-public python-colormath
4573 (package
4574 (name "python-colormath")
4575 (version "3.0.0")
4576 (source
4577 (origin
4578 (method url-fetch)
4579 (uri (pypi-uri "colormath" version))
4580 (sha256
4581 (base32
4582 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4583 (build-system python-build-system)
4584 (propagated-inputs
4585 `(("python-networkx" ,python-networkx)
4586 ("python-numpy" ,python-numpy)))
4587 (home-page "https://github.com/gtaylor/python-colormath")
4588 (synopsis "Color math and conversion library")
4589 (description
4590 "This is a Python library for color math and conversions.")
4591 (license license:bsd-3)))
4592
4593 (define-public python2-colormath
4594 (package-with-python2 python-colormath))
4595
4596 (define-public python-spectra
4597 (package
4598 (name "python-spectra")
4599 (version "0.0.11")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "spectra" version))
4604 (sha256
4605 (base32
4606 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4607 (build-system python-build-system)
4608 (arguments
4609 `(#:phases
4610 (modify-phases %standard-phases
4611 (replace 'check
4612 (lambda _ (invoke "nosetests" "-v"))))))
4613 (propagated-inputs
4614 `(("python-colormath" ,python-colormath)))
4615 (native-inputs
4616 `(("python-nose" ,python-nose)))
4617 (home-page "https://github.com/jsvine/spectra")
4618 (synopsis "Color scales and color conversion")
4619 (description
4620 "This package provides a Python library intended to make color math,
4621 color scales, and color space conversion easy. It has support for:
4622
4623 @enumerate
4624 @item Color scales
4625 @item Color ranges
4626 @item Color blending
4627 @item Brightening/darkening colors
4628 @item Saturating/desaturating colors
4629 @item Conversion to/from multiple color spaces.
4630 @end enumerate\n")
4631 (license license:expat)))
4632
4633 (define-public python2-spectra
4634 (package-with-python2 python-spectra))
4635
4636 (define-public python-numpy-documentation
4637 (package
4638 (name "python-numpy-documentation")
4639 (version (package-version python-numpy))
4640 (source (package-source python-numpy))
4641 (build-system python-build-system)
4642 (native-inputs
4643 `(("python-matplotlib" ,python-matplotlib)
4644 ("python-numpy" ,python-numpy)
4645 ("pkg-config" ,pkg-config)
4646 ("python-sphinx" ,python-sphinx)
4647 ("python-numpydoc" ,python-numpydoc)
4648 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4649 texlive-fonts-ec
4650 texlive-generic-ifxetex
4651 texlive-generic-pdftex
4652 texlive-amsfonts
4653 texlive-latex-capt-of
4654 texlive-latex-cmap
4655 texlive-latex-environ
4656 texlive-latex-eqparbox
4657 texlive-latex-etoolbox
4658 texlive-latex-expdlist
4659 texlive-latex-fancyhdr
4660 texlive-latex-fancyvrb
4661 texlive-latex-fncychap
4662 texlive-latex-float
4663 texlive-latex-framed
4664 texlive-latex-geometry
4665 texlive-latex-graphics
4666 texlive-latex-hyperref
4667 texlive-latex-mdwtools
4668 texlive-latex-multirow
4669 texlive-latex-needspace
4670 texlive-latex-oberdiek
4671 texlive-latex-parskip
4672 texlive-latex-preview
4673 texlive-latex-tabulary
4674 texlive-latex-threeparttable
4675 texlive-latex-titlesec
4676 texlive-latex-trimspaces
4677 texlive-latex-ucs
4678 texlive-latex-upquote
4679 texlive-latex-url
4680 texlive-latex-varwidth
4681 texlive-latex-wrapfig)))
4682 ("texinfo" ,texinfo)
4683 ("perl" ,perl)
4684 ("scipy-sphinx-theme"
4685 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4686 (method git-fetch)
4687 (uri (git-reference
4688 (url "https://github.com/scipy/scipy-sphinx-theme")
4689 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4690 (sha256
4691 (base32
4692 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4693 ,@(package-native-inputs python-numpy)))
4694 (arguments
4695 `(#:tests? #f ; we're only generating the documentation
4696 #:phases
4697 (modify-phases %standard-phases
4698 (delete 'build)
4699 (replace 'install
4700 (lambda* (#:key inputs outputs #:allow-other-keys)
4701 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4702 (doc (string-append
4703 data "/doc/" ,name "-"
4704 ,(package-version python-numpy)))
4705 (info-reader (string-append data "/info"))
4706 (html (string-append doc "/html"))
4707 (scipy-sphinx-theme "scipy-sphinx-theme")
4708 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4709 (pyver ,(string-append "PYVER=")))
4710
4711 ;; FIXME: this is needed to for texlive-union to generate
4712 ;; fonts, which are not found.
4713 (setenv "HOME" "/tmp")
4714
4715 (with-directory-excursion "doc"
4716 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4717 (mkdir-p html)
4718 (invoke "make" "html" pyver)
4719 (invoke "make" "latex" "PAPER=a4" pyver)
4720 (invoke "make" "-C" "build/latex"
4721 "all-pdf" "PAPER=a4" pyver)
4722 ;; FIXME: Generation of the info file fails.
4723 ;; (invoke "make" "info" pyver)
4724 ;; (mkdir-p info)
4725 ;; (copy-file "build/texinfo/numpy.info"
4726 ;; (string-append info "/numpy.info"))
4727 (for-each (lambda (file)
4728 (copy-file (string-append "build/latex" file)
4729 (string-append doc file)))
4730 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4731 (with-directory-excursion "build/html"
4732 (for-each (lambda (file)
4733 (let* ((dir (dirname file))
4734 (tgt-dir (string-append html "/" dir)))
4735 (unless (equal? "." dir)
4736 (mkdir-p tgt-dir))
4737 (install-file file html)))
4738 (find-files "." ".*")))))
4739 #t)))))
4740 (home-page (package-home-page python-numpy))
4741 (synopsis "Documentation for the python-numpy package")
4742 (description (package-description python-numpy))
4743 (license (package-license python-numpy))))
4744
4745 (define-public python2-numpy-documentation
4746 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4747 (package
4748 (inherit numpy-documentation)
4749 (native-inputs `(("python2-functools32" ,python2-functools32)
4750 ,@(package-native-inputs numpy-documentation))))))
4751
4752 (define-public python-pygit2
4753 (package
4754 (name "python-pygit2")
4755 (version "1.1.0")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri (pypi-uri "pygit2" version))
4760 (sha256
4761 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4762 (build-system python-build-system)
4763 (arguments
4764 '(#:tests? #f)) ; tests don't run correctly in our environment
4765 (propagated-inputs
4766 `(("python-cached-property" ,python-cached-property)
4767 ("python-cffi" ,python-cffi)
4768 ("libgit2" ,libgit2)))
4769 (native-inputs
4770 `(("python-pytest" ,python-pytest)))
4771 (home-page "https://github.com/libgit2/pygit2")
4772 (synopsis "Python bindings for libgit2")
4773 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4774 library, libgit2 implements Git plumbing.")
4775 ;; GPL2.0 only, with linking exception.
4776 (license license:gpl2)))
4777
4778 (define-public python-patiencediff
4779 (package
4780 (name "python-patiencediff")
4781 (version "0.2.0")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (pypi-uri "patiencediff" version))
4786 (sha256
4787 (base32
4788 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4789 (build-system python-build-system)
4790 (home-page "https://www.breezy-vcs.org/")
4791 (synopsis "Python implementation of the patiencediff algorithm")
4792 (description
4793 "This package contains a Python implementation of the @code{patiencediff}
4794 algorithm. Patiencediff provides a good balance of performance, nice output for
4795 humans, and implementation simplicity.")
4796 (license license:gpl2)))
4797
4798 (define-public python-pyparsing
4799 (package
4800 (name "python-pyparsing")
4801 (version "2.4.6")
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (pypi-uri "pyparsing" version))
4806 (sha256
4807 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4808 (build-system python-build-system)
4809 (outputs '("out" "doc"))
4810 (arguments
4811 `(#:tests? #f ; no test target
4812 #:phases
4813 (modify-phases %standard-phases
4814 (add-after 'install 'install-doc
4815 (lambda* (#:key outputs #:allow-other-keys)
4816 (let* ((doc (string-append (assoc-ref outputs "doc")
4817 "/share/doc/" ,name "-" ,version))
4818 (html-doc (string-append doc "/html"))
4819 (examples (string-append doc "/examples")))
4820 (mkdir-p html-doc)
4821 (mkdir-p examples)
4822 (for-each
4823 (lambda (dir tgt)
4824 (map (lambda (file)
4825 (install-file file tgt))
4826 (find-files dir ".*")))
4827 (list "docs" "htmldoc" "examples")
4828 (list doc html-doc examples))
4829 #t))))))
4830 (home-page "https://github.com/pyparsing/pyparsing")
4831 (synopsis "Python parsing class library")
4832 (description
4833 "The pyparsing module is an alternative approach to creating and
4834 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4835 of regular expressions. The pyparsing module provides a library of classes
4836 that client code uses to construct the grammar directly in Python code.")
4837 (license license:expat)))
4838
4839 (define-public python2-pyparsing
4840 (package-with-python2 python-pyparsing))
4841
4842 (define-public python-pyparsing-2.4.7
4843 (package
4844 (inherit python-pyparsing)
4845 (version "2.4.7")
4846 (source
4847 (origin
4848 (method url-fetch)
4849 (uri (pypi-uri "pyparsing" version))
4850 (sha256
4851 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4852
4853 (define-public python-numpydoc
4854 (package
4855 (name "python-numpydoc")
4856 (version "0.8.0")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (pypi-uri "numpydoc" version))
4861 (sha256
4862 (base32
4863 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4864 (build-system python-build-system)
4865 (propagated-inputs
4866 `(("python-sphinx" ,python-sphinx)))
4867 (native-inputs
4868 `(("python-nose" ,python-nose)))
4869 (home-page "https://pypi.org/project/numpydoc/")
4870 (synopsis
4871 "Numpy's Sphinx extensions")
4872 (description
4873 "Sphinx extension to support docstrings in Numpy format.")
4874 (license license:bsd-2)))
4875
4876 (define-public python2-numpydoc
4877 (package-with-python2 python-numpydoc))
4878
4879 (define-public python-numexpr
4880 (package
4881 (name "python-numexpr")
4882 (version "2.6.5")
4883 (source
4884 (origin
4885 (method url-fetch)
4886 (uri (pypi-uri "numexpr" version))
4887 (sha256
4888 (base32
4889 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4890 (build-system python-build-system)
4891 (arguments `(#:tests? #f)) ; no tests included
4892 (propagated-inputs
4893 `(("python-numpy" ,python-numpy)))
4894 (home-page "https://github.com/pydata/numexpr")
4895 (synopsis "Fast numerical expression evaluator for NumPy")
4896 (description
4897 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4898 expressions that operate on arrays are accelerated and use less memory than
4899 doing the same calculation in Python. In addition, its multi-threaded
4900 capabilities can make use of all your cores, which may accelerate
4901 computations, most specially if they are not memory-bounded (e.g. those using
4902 transcendental functions).")
4903 (license license:expat)))
4904
4905 (define-public python2-numexpr
4906 (package-with-python2 python-numexpr))
4907
4908 (define-public python-cycler
4909 (package
4910 (name "python-cycler")
4911 (version "0.10.0")
4912 (source (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "cycler" version))
4915 (sha256
4916 (base32
4917 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4918 (build-system python-build-system)
4919 (arguments
4920 ;; XXX: The current version requires 'coveralls' which we don't have.
4921 ;; Enable this for the next release which uses 'python-pytest'.
4922 '(#:tests? #f))
4923 (propagated-inputs
4924 `(("python-six" ,python-six)))
4925 (home-page "http://matplotlib.org/cycler/")
4926 (synopsis "Composable keyword argument iterator")
4927 (description
4928 "When using @code{matplotlib} and plotting more than one line, it is
4929 common to want to be able to want to be able to cycle over one or more artist
4930 styles; but the plotting logic can quickly become involved.
4931 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4932 @code{Cycler} class was developed.")
4933 (license license:bsd-3)))
4934
4935 (define-public python2-cycler
4936 (package-with-python2 python-cycler))
4937
4938 (define-public python-colorspacious
4939 (package
4940 (name "python-colorspacious")
4941 (version "1.1.2")
4942 (source
4943 (origin
4944 (method git-fetch)
4945 (uri (git-reference
4946 (url "https://github.com/njsmith/colorspacious")
4947 (commit (string-append "v" version))))
4948 (file-name (git-file-name name version))
4949 (sha256
4950 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4951 (build-system python-build-system)
4952 (propagated-inputs
4953 `(("python-numpy" ,python-numpy)))
4954 (native-inputs
4955 `(("python-nose" ,python-nose)))
4956 (arguments
4957 `(#:phases
4958 (modify-phases %standard-phases
4959 (replace 'check
4960 (lambda _
4961 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4962 (home-page "https://github.com/njsmith/colorspacious")
4963 (synopsis "Python library for colorspace conversions")
4964 (description "@code{colorspacious} is a Python library that lets you
4965 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4966 (license license:expat)))
4967
4968 (define-public python2-colorspacious
4969 (package-with-python2 python-colorspacious))
4970
4971 (define-public python-matplotlib
4972 (package
4973 (name "python-matplotlib")
4974 (version "3.1.2")
4975 (source
4976 (origin
4977 (method url-fetch)
4978 (uri (pypi-uri "matplotlib" version))
4979 (sha256
4980 (base32
4981 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4982 (build-system python-build-system)
4983 (propagated-inputs ; the following packages are all needed at run time
4984 `(("python-cycler" ,python-cycler)
4985 ("python-kiwisolver" ,python-kiwisolver)
4986 ("python-pyparsing" ,python-pyparsing)
4987 ("python-pygobject" ,python-pygobject)
4988 ("gobject-introspection" ,gobject-introspection)
4989 ("python-tkinter" ,python "tk")
4990 ("python-dateutil" ,python-dateutil)
4991 ("python-numpy" ,python-numpy)
4992 ("python-pillow" ,python-pillow)
4993 ("python-pytz" ,python-pytz)
4994 ("python-six" ,python-six)
4995 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4996 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4997 ;; object. For this reason we need to import both libraries.
4998 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4999 ("python-pycairo" ,python-pycairo)
5000 ("python-cairocffi" ,python-cairocffi)))
5001 (inputs
5002 `(("libpng" ,libpng)
5003 ("freetype" ,freetype)
5004 ("cairo" ,cairo)
5005 ("glib" ,glib)
5006 ;; FIXME: Add backends when available.
5007 ;("python-wxpython" ,python-wxpython)
5008 ("tcl" ,tcl)
5009 ("tk" ,tk)))
5010 (native-inputs
5011 `(("pkg-config" ,pkg-config)
5012 ("python-pytest" ,python-pytest)
5013 ("python-mock" ,python-mock)
5014 ("unzip" ,unzip)
5015 ("jquery-ui"
5016 ,(origin
5017 (method url-fetch)
5018 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5019 (sha256
5020 (base32
5021 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5022 (arguments
5023 `(#:phases
5024 (modify-phases %standard-phases
5025 ;; XXX We disable all image comparison tests because we're using a
5026 ;; newer version of FreeType than matplotlib expects. This leads to
5027 ;; minor differences throughout the tests.
5028 (add-after 'unpack 'fix-and-disable-failing-tests
5029 (lambda _
5030 (substitute* (append (find-files "lib/matplotlib/tests/"
5031 "test_.*\\.py$")
5032 (find-files "lib/mpl_toolkits/tests"
5033 "test_.*\\.py$"))
5034 (("^from matplotlib" match)
5035 (string-append "import pytest\n" match))
5036 (("( *)@image_comparison" match indent)
5037 (string-append indent
5038 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5039 match)))
5040 (substitute* "lib/matplotlib/tests/test_animation.py"
5041 (("/bin/sh") (which "sh")))
5042 (for-each delete-file
5043 ;; test_normal_axes, test_get_tightbbox_polar
5044 '("lib/matplotlib/tests/test_axes.py"
5045 ;; We don't use the webagg backend and this test forces it.
5046 "lib/matplotlib/tests/test_backend_webagg.py"
5047 ;; test_outward_ticks
5048 "lib/matplotlib/tests/test_tightlayout.py"
5049 ;; test_hidden_axes fails with minor extent
5050 ;; differences, possibly due to the use of a
5051 ;; different version of FreeType.
5052 "lib/matplotlib/tests/test_constrainedlayout.py"
5053 ;; Fontconfig returns no fonts.
5054 "lib/matplotlib/tests/test_font_manager.py"))
5055 #t))
5056 (add-before 'install 'install-jquery-ui
5057 (lambda* (#:key outputs inputs #:allow-other-keys)
5058 (let ((dir (string-append (assoc-ref outputs "out")
5059 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5060 (mkdir-p dir)
5061 (invoke "unzip"
5062 (assoc-ref inputs "jquery-ui")
5063 "-d" dir))
5064 #t))
5065 (replace 'check
5066 (lambda* (#:key outputs inputs #:allow-other-keys)
5067 (add-installed-pythonpath inputs outputs)
5068 (invoke "python" "tests.py" "-v"
5069 "-m" "not network and not webagg")))
5070 (add-before 'build 'configure-environment
5071 (lambda* (#:key outputs inputs #:allow-other-keys)
5072 (let ((cairo (assoc-ref inputs "cairo")))
5073 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5074 ;; has not effect.
5075 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5076 (setenv "HOME" (getcwd))
5077 ;; Fix rounding errors when using the x87 FPU.
5078 (when (string-prefix? "i686" ,(%current-system))
5079 (setenv "CFLAGS" "-ffloat-store"))
5080 (call-with-output-file "setup.cfg"
5081 (lambda (port)
5082 (format port "[directories]~%
5083 basedirlist = ~a,~a~%
5084 [packages]~%
5085 tests = True~%"
5086 (assoc-ref inputs "tcl")
5087 (assoc-ref inputs "tk")))))
5088 #t)))))
5089 (home-page "https://matplotlib.org/")
5090 (synopsis "2D plotting library for Python")
5091 (description
5092 "Matplotlib is a Python 2D plotting library which produces publication
5093 quality figures in a variety of hardcopy formats and interactive environments
5094 across platforms. Matplotlib can be used in Python scripts, the python and
5095 ipython shell, web application servers, and six graphical user interface
5096 toolkits.")
5097 (license license:psfl)
5098 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5099
5100 (define-public python2-matplotlib
5101 (let ((matplotlib (package-with-python2
5102 (strip-python2-variant python-matplotlib))))
5103 (package (inherit matplotlib)
5104 (version "2.2.4")
5105 (source
5106 (origin
5107 (method url-fetch)
5108 (uri (pypi-uri "matplotlib" version))
5109 (sha256
5110 (base32
5111 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5112 (arguments
5113 (substitute-keyword-arguments (package-arguments matplotlib)
5114 ((#:phases phases)
5115 `(modify-phases ,phases
5116 (replace 'install-jquery-ui
5117 (lambda* (#:key outputs inputs #:allow-other-keys)
5118 (let ((dir (string-append (assoc-ref outputs "out")
5119 "/lib/python2.7/site-packages/"
5120 "matplotlib/backends/web_backend/")))
5121 (mkdir-p dir)
5122 (invoke "unzip"
5123 (assoc-ref inputs "jquery-ui")
5124 "-d" dir))
5125 #t))
5126 (delete 'fix-and-disable-failing-tests)
5127 (delete 'check))))) ; These tests weren't run the the past.
5128 ;; Make sure to use special packages for Python 2 instead
5129 ;; of those automatically rewritten by package-with-python2.
5130 (propagated-inputs
5131 `(("python2-pycairo" ,python2-pycairo)
5132 ("python2-backports-functools-lru-cache"
5133 ,python2-backports-functools-lru-cache)
5134 ("python2-functools32" ,python2-functools32)
5135 ("python2-pygobject-2" ,python2-pygobject-2)
5136 ("python2-subprocess32" ,python2-subprocess32)
5137 ("python2-tkinter" ,python-2 "tk")
5138 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5139 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5140
5141 (define-public python-matplotlib-documentation
5142 (package
5143 (name "python-matplotlib-documentation")
5144 (version (package-version python-matplotlib))
5145 (source (package-source python-matplotlib))
5146 (build-system python-build-system)
5147 (native-inputs
5148 `(("python-matplotlib" ,python-matplotlib)
5149 ("python-colorspacious" ,python-colorspacious)
5150 ("python-sphinx" ,python-sphinx)
5151 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5152 ("python-sphinx-gallery" ,python-sphinx-gallery)
5153 ("python-numpydoc" ,python-numpydoc)
5154 ("python-ipython" ,python-ipython)
5155 ("python-ipykernel" ,python-ipykernel)
5156 ("python-mock" ,python-mock)
5157 ("graphviz" ,graphviz)
5158 ("texlive" ,(texlive-union (list texlive-amsfonts
5159 texlive-latex-amsmath
5160 texlive-latex-enumitem
5161 texlive-latex-expdlist
5162 texlive-latex-geometry
5163 texlive-latex-preview
5164 texlive-latex-type1cm
5165 texlive-latex-ucs
5166
5167 texlive-generic-pdftex
5168
5169 texlive-fonts-ec
5170 texlive-fonts-adobe-times
5171 texlive-fonts-txfonts)))
5172 ("texinfo" ,texinfo)
5173 ,@(package-native-inputs python-matplotlib)))
5174 (arguments
5175 `(#:tests? #f ; we're only generating documentation
5176 #:phases
5177 (modify-phases %standard-phases
5178 ;; The tests in python-matplotlib are run after the install phase, so
5179 ;; we need to delete the extra phase here.
5180 (delete 'check)
5181 (replace 'build
5182 (lambda _
5183 (chdir "doc")
5184 (setenv "PYTHONPATH"
5185 (string-append (getenv "PYTHONPATH")
5186 ":" (getcwd) "/../examples/units"))
5187 (substitute* "conf.py"
5188 ;; Don't use git.
5189 (("^SHA = check_output.*")
5190 (string-append "SHA = \"" ,version "\"\n"))
5191 ;; Don't fetch intersphinx files from the Internet
5192 (("^explicit_order_folders" m)
5193 (string-append "intersphinx_mapping = {}\n" m))
5194 (("'sphinx.ext.intersphinx',") "")
5195 ;; Disable URL embedding which requires internet access.
5196 (("'https://docs.scipy.org/doc/numpy'") "None")
5197 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5198 (invoke "make"
5199 "SPHINXBUILD=sphinx-build"
5200 "SPHINXOPTS=" ; don't abort on warnings
5201 "html" "texinfo")))
5202 (replace 'install
5203 (lambda* (#:key inputs outputs #:allow-other-keys)
5204 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5205 (doc (string-append data "/doc/python-matplotlib-" ,version))
5206 (info (string-append data "/info"))
5207 (html (string-append doc "/html")))
5208 (mkdir-p html)
5209 (mkdir-p info)
5210 (copy-recursively "build/html" html)
5211 (symlink (string-append html "/_images")
5212 (string-append info "/matplotlib-figures"))
5213 (with-directory-excursion "build/texinfo"
5214 (substitute* "matplotlib.texi"
5215 (("@image\\{([^,]*)" all file)
5216 (string-append "@image{matplotlib-figures/" file)))
5217 (symlink (string-append html "/_images")
5218 "./matplotlib-figures")
5219 (invoke "makeinfo" "--no-split"
5220 "-o" "matplotlib.info" "matplotlib.texi"))
5221 (install-file "build/texinfo/matplotlib.info" info))
5222 #t)))))
5223 (home-page (package-home-page python-matplotlib))
5224 (synopsis "Documentation for the python-matplotlib package")
5225 (description (package-description python-matplotlib))
5226 (license (package-license python-matplotlib))))
5227
5228 (define-public python2-matplotlib-documentation
5229 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5230 (package
5231 (inherit parent)
5232 (native-inputs
5233 (alist-delete "python-sphinx-copybutton"
5234 (package-native-inputs parent))))))
5235
5236 (define-public python-matplotlib-venn
5237 (package
5238 (name "python-matplotlib-venn")
5239 (version "0.11.5")
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5244 (sha256
5245 (base32
5246 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5247 (build-system python-build-system)
5248 (arguments '(#:tests? #f)) ; tests are not included
5249 (propagated-inputs
5250 `(("python-matplotlib" ,python-matplotlib)
5251 ("python-numpy" ,python-numpy)
5252 ("python-scipy" ,python-scipy)))
5253 (native-inputs
5254 `(("unzip" ,unzip)))
5255 (home-page "https://github.com/konstantint/matplotlib-venn")
5256 (synopsis "Plot area-proportional Venn diagrams")
5257 (description
5258 "This package provides tools for plotting area-proportional two- and
5259 three-way Venn diagrams in @code{matplotlib}.")
5260 (license license:expat)))
5261
5262 (define-public python-pysnptools
5263 (package
5264 (name "python-pysnptools")
5265 (version "0.4.11")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "pysnptools" version))
5270 (sha256
5271 (base32
5272 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5273 (build-system python-build-system)
5274 (arguments
5275 `(#:tests? #f ; no test data are included
5276 #:phases
5277 (modify-phases %standard-phases
5278 (replace 'check
5279 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5280 (if tests?
5281 (begin
5282 (add-installed-pythonpath inputs outputs)
5283 (invoke "python3" "pysnptools/test.py"))
5284 #t))))))
5285 (propagated-inputs
5286 `(("python-dill" ,python-dill)
5287 ("python-h5py" ,python-h5py)
5288 ("python-numpy" ,python-numpy)
5289 ("python-pandas" ,python-pandas)
5290 ("python-psutil" ,python-psutil)
5291 ("python-scipy" ,python-scipy)))
5292 (native-inputs
5293 `(("python-cython" ,python-cython)))
5294 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5295 (synopsis "Library for reading and manipulating genetic data")
5296 (description
5297 "PySnpTools is a library for reading and manipulating genetic data. It
5298 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5299 those files. It can also efficiently manipulate ranges of integers using set
5300 operators such as union, intersection, and difference.")
5301 (license license:asl2.0)))
5302
5303 (define-public python2-pysnptools
5304 (package-with-python2 python-pysnptools))
5305
5306 (define-public python-wurlitzer
5307 (package
5308 (name "python-wurlitzer")
5309 (version "2.0.1")
5310 (source
5311 (origin
5312 (method url-fetch)
5313 (uri (pypi-uri "wurlitzer" version))
5314 (sha256
5315 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5316 (build-system python-build-system)
5317 (arguments
5318 '(#:phases
5319 (modify-phases %standard-phases
5320 (replace 'check
5321 (lambda _
5322 (invoke "pytest" "-vv" "test.py"))))))
5323 (native-inputs
5324 `(("python-mock" ,python-mock)
5325 ("python-pytest" ,python-pytest)))
5326 (home-page "https://github.com/minrk/wurlitzer")
5327 (synopsis "Capture C-level output in context managers")
5328 (description
5329 "This library helps to redirect @code{sys.stdout} to a stream or a file
5330 while executing some piece of code, including C code running within a Python
5331 process.")
5332 (license license:expat)))
5333
5334 (define-public python-socksipy-branch
5335 (package
5336 (name "python-socksipy-branch")
5337 (version "1.01")
5338 (source
5339 (origin
5340 (method url-fetch)
5341 (uri (pypi-uri "SocksiPy-branch" version))
5342 (sha256
5343 (base32
5344 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5345 (build-system python-build-system)
5346 (arguments
5347 `(#:tests? #f)) ; There are no tests
5348 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5349 (synopsis "Python SOCKS module")
5350 (description
5351 "SocksiPy - A Python SOCKS client module. It provides a
5352 socket-like interface that supports connections to any TCP
5353 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5354 The original version was developed by Dan Haim, this is a
5355 branch created by Mario Vilas to address some open issues,
5356 as the original project seems to have been abandoned circa 2007.")
5357 (license license:bsd-3)))
5358
5359 (define-public python2-socksipy-branch
5360 (package-with-python2 python-socksipy-branch))
5361
5362 (define-public python-socksipychain
5363 (package
5364 (name "python-socksipychain")
5365 (version "2.1.2")
5366 (source
5367 (origin
5368 (method git-fetch)
5369 (uri (git-reference
5370 (url "https://github.com/pagekite/PySocksipyChain")
5371 (commit (string-append "v" version))))
5372 (file-name (git-file-name name version))
5373 (sha256
5374 (base32
5375 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5376 (build-system python-build-system)
5377 (arguments
5378 `(#:tests? #f)) ; Tests try to access the network.
5379 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5380 (synopsis "Python SOCKS module with chained proxies support")
5381 (description
5382 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5383 adds support for arbitrary chaining of proxy servers and various modes of
5384 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5385 a simple netcat replacement with chaining support.")
5386 (license license:bsd-3)))
5387
5388 (define-public python-pycodestyle
5389 (package
5390 (name "python-pycodestyle")
5391 (version "2.6.0")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "pycodestyle" version))
5396 (sha256
5397 (base32
5398 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5399 (build-system python-build-system)
5400 (arguments
5401 `(#:phases
5402 (modify-phases %standard-phases
5403 (replace 'check
5404 (lambda _
5405 (invoke "pytest" "-vv"))))))
5406 (native-inputs
5407 `(("python-pytest" ,python-pytest)))
5408 (home-page "https://pycodestyle.readthedocs.io/")
5409 (synopsis "Python style guide checker")
5410 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5411 Python code against some of the style conventions in
5412 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5413 (license license:expat)))
5414
5415 (define-public python2-pycodestyle
5416 (package-with-python2 python-pycodestyle))
5417
5418 (define-public python-multidict
5419 (package
5420 (name "python-multidict")
5421 (version "4.7.5")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (pypi-uri "multidict" version))
5426 (sha256
5427 (base32
5428 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5429 (build-system python-build-system)
5430 (arguments
5431 '(#:modules ((ice-9 ftw)
5432 (srfi srfi-1)
5433 (srfi srfi-26)
5434 (guix build utils)
5435 (guix build python-build-system))
5436 #:phases (modify-phases %standard-phases
5437 (replace 'check
5438 (lambda* (#:key tests? #:allow-other-keys)
5439 (if tests?
5440 (begin
5441 (let ((libdir (find (cut string-prefix? "lib." <>)
5442 (scandir "build"))))
5443 (setenv "PYTHONPATH"
5444 (string-append "./build/" libdir ":"
5445 (getenv "PYTHONPATH")))
5446 (invoke "pytest" "-vv")))
5447 (format #t "test suite not run~%"))
5448 #t)))))
5449 (native-inputs
5450 `(("python-pytest" ,python-pytest)
5451 ("python-pytest-cov" ,python-pytest-cov)))
5452 (home-page "https://github.com/aio-libs/multidict/")
5453 (synopsis "Multidict implementation")
5454 (description "Multidict is dict-like collection of key-value pairs
5455 where key might be occurred more than once in the container.")
5456 (license license:asl2.0)))
5457
5458 (define-public python-orderedmultidict
5459 (package
5460 (name "python-orderedmultidict")
5461 (version "1.0")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "orderedmultidict" version))
5466 (sha256
5467 (base32
5468 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5469 (build-system python-build-system)
5470 (arguments
5471 `(#:phases
5472 (modify-phases %standard-phases
5473 (add-after 'unpack 'fix-tests
5474 (lambda _
5475 ;; The package uses nosetest for running the tests.
5476 ;; Adding this initfile allows to run the test suite
5477 ;; without requiring nosetest.
5478 (with-output-to-file "tests/__init__.py" newline)
5479 #t)))))
5480 (propagated-inputs
5481 `(("python-six" ,python-six)))
5482 (native-inputs
5483 `(("python-pycodestyle" ,python-pycodestyle)))
5484 (home-page "https://github.com/gruns/orderedmultidict")
5485 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5486 (description "This package contains a library for ordered multivalue
5487 dictionaries. A multivalue dictionary is a dictionary that can store
5488 multiple values for the same key. An ordered multivalue dictionary is a
5489 multivalue dictionary that retains the order of insertions and deletions.")
5490 (license license:unlicense)))
5491
5492 (define-public python2-orderedmultidict
5493 (package-with-python2 python-orderedmultidict))
5494
5495 (define-public python-autopep8
5496 (package
5497 (name "python-autopep8")
5498 (version "1.5.3")
5499 (source
5500 (origin
5501 (method url-fetch)
5502 (uri (pypi-uri "autopep8" version))
5503 (sha256
5504 (base32
5505 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5506 (build-system python-build-system)
5507 (propagated-inputs
5508 `(("python-pycodestyle" ,python-pycodestyle)
5509 ("python-toml" ,python-toml)))
5510 (home-page "https://github.com/hhatto/autopep8")
5511 (synopsis "Format Python code according to the PEP 8 style guide")
5512 (description
5513 "@code{autopep8} automatically formats Python code to conform to
5514 the PEP 8 style guide. It uses the pycodestyle utility to determine
5515 what parts of the code needs to be formatted. @code{autopep8} is
5516 capable of fixing most of the formatting issues that can be reported
5517 by pycodestyle.")
5518 (license (license:non-copyleft
5519 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5520
5521 (define-public python2-autopep8
5522 (package-with-python2 python-autopep8))
5523
5524 (define-public python-distlib
5525 (package
5526 (name "python-distlib")
5527 (version "0.3.0")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "distlib" version ".zip"))
5532 (sha256
5533 (base32
5534 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5535 (build-system python-build-system)
5536 (arguments
5537 `(#:phases
5538 (modify-phases %standard-phases
5539 (add-before 'build 'no-/bin/sh
5540 (lambda _
5541 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5542 (("/bin/sh") (which "sh")))
5543 #t))
5544 (add-before 'check 'prepare-test-env
5545 (lambda _
5546 (setenv "HOME" "/tmp")
5547 ;; NOTE: Any value works, the variable just has to be present.
5548 (setenv "SKIP_ONLINE" "1")
5549 #t)))))
5550 (native-inputs `(("unzip" ,unzip)))
5551 (home-page "https://bitbucket.org/pypa/distlib")
5552 (synopsis "Distribution utilities")
5553 (description "Distlib is a library which implements low-level functions that
5554 relate to packaging and distribution of Python software. It is intended to be
5555 used as the basis for third-party packaging tools.")
5556 (license license:psfl)))
5557
5558 (define-public python-distutils-extra
5559 (package
5560 (name "python-distutils-extra")
5561 (version "2.38")
5562 (source
5563 (origin
5564 (method url-fetch)
5565 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5566 version "/+download/python-distutils-extra-"
5567 version ".tar.gz"))
5568 (sha256
5569 (base32
5570 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5571 (build-system python-build-system)
5572 (home-page "https://launchpad.net/python-distutils-extra/")
5573 (synopsis "Enhancements to Python's distutils")
5574 (description
5575 "The python-distutils-extra module enables you to easily integrate
5576 gettext support, themed icons, and scrollkeeper-based documentation into
5577 Python's distutils.")
5578 (license license:gpl2)))
5579
5580 (define-public python2-distutils-extra
5581 (package-with-python2 python-distutils-extra))
5582
5583 (define-public python2-elib.intl
5584 (package
5585 (name "python2-elib.intl")
5586 (version "0.0.3")
5587 (source
5588 (origin
5589 ;; This project doesn't tag releases or publish tarballs, so we take
5590 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5591 (method git-fetch)
5592 (uri (git-reference
5593 (url "https://github.com/dieterv/elib.intl")
5594 (commit "d09997cfef")))
5595 (file-name (string-append name "-" version "-checkout"))
5596 (sha256
5597 (base32
5598 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5599 (build-system python-build-system)
5600 (arguments
5601 ;; incompatible with Python 3 (exception syntax)
5602 `(#:python ,python-2
5603 #:tests? #f))
5604 (home-page "https://github.com/dieterv/elib.intl")
5605 (synopsis "Enhanced internationalization for Python")
5606 (description
5607 "The elib.intl module provides enhanced internationalization (I18N)
5608 services for your Python modules and applications.")
5609 (license license:lgpl3+)))
5610
5611 (define-public python-olefile
5612 (package
5613 (name "python-olefile")
5614 (version "0.46")
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5619 "download/v" version "/olefile-" version ".tar.gz"))
5620 (file-name (string-append name "-" version ".tar.gz"))
5621 (sha256
5622 (base32
5623 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5624 (build-system python-build-system)
5625 (home-page "https://www.decalage.info/python/olefileio")
5626 (synopsis "Read and write Microsoft OLE2 files.")
5627 (description
5628 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5629 Storage or Compound Document, Microsoft Office). It is an improved version of
5630 the OleFileIO module from PIL, the Python Image Library.")
5631 (license license:bsd-3)))
5632
5633 (define-public python2-olefile
5634 (package-with-python2 python-olefile))
5635
5636 (define-public python-pillow
5637 (package
5638 (name "python-pillow")
5639 (version "6.2.1")
5640 (source
5641 (origin
5642 (method url-fetch)
5643 (uri (pypi-uri "Pillow" version))
5644 (sha256
5645 (base32
5646 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5647 (build-system python-build-system)
5648 (native-inputs
5649 `(("python-pytest" ,python-pytest)))
5650 (inputs
5651 `(("freetype" ,freetype)
5652 ("lcms" ,lcms)
5653 ("libjpeg" ,libjpeg-turbo)
5654 ("libtiff" ,libtiff)
5655 ("libwebp" ,libwebp)
5656 ("openjpeg" ,openjpeg)
5657 ("zlib" ,zlib)))
5658 (propagated-inputs
5659 `(("python-olefile" ,python-olefile)))
5660 (arguments
5661 `(#:phases
5662 (modify-phases %standard-phases
5663 (add-after 'unpack 'patch-ldconfig
5664 (lambda _
5665 (substitute* "setup.py"
5666 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5667 (replace 'check
5668 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5669 (if tests?
5670 (begin
5671 (setenv "HOME" (getcwd))
5672 ;; Make installed package available for running the tests.
5673 (add-installed-pythonpath inputs outputs)
5674 (invoke "python" "selftest.py" "--installed")
5675 (invoke "python" "-m" "pytest" "-vv"))
5676 #t))))))
5677 (home-page "https://python-pillow.org")
5678 (synopsis "Fork of the Python Imaging Library")
5679 (description
5680 "The Python Imaging Library adds image processing capabilities to your
5681 Python interpreter. This library provides extensive file format support, an
5682 efficient internal representation, and fairly powerful image processing
5683 capabilities. The core image library is designed for fast access to data
5684 stored in a few basic pixel formats. It should provide a solid foundation for
5685 a general image processing tool.")
5686 (license (license:x11-style
5687 "http://www.pythonware.com/products/pil/license.htm"
5688 "The PIL Software License"))))
5689
5690 (define-public python2-pillow
5691 (package-with-python2 python-pillow))
5692
5693 (define-public python-pillow-2.9
5694 (package
5695 (inherit python-pillow)
5696 (version "2.9.0")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (pypi-uri "Pillow" version))
5701 (sha256
5702 (base32
5703 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5704 (arguments
5705 (substitute-keyword-arguments (package-arguments python-pillow)
5706 ((#:tests? _ #f) #f)))
5707 (properties '((hidden? #t)))))
5708
5709 (define-public python-roifile
5710 (package
5711 (name "python-roifile")
5712 (version "2020.5.28")
5713 (source
5714 (origin
5715 (method url-fetch)
5716 (uri (pypi-uri "roifile" version))
5717 (sha256
5718 (base32
5719 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5720 (build-system python-build-system)
5721 (arguments `(#:tests? #f)) ; there are none
5722 (propagated-inputs
5723 `(("python-numpy" ,python-numpy)))
5724 (home-page "https://www.lfd.uci.edu/~gohlke/")
5725 (synopsis "Read and write ImageJ ROI format")
5726 (description "Roifile is a Python library to read, write, create, and plot
5727 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5728 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5729 (license license:bsd-3)))
5730
5731 (define-public python-tifffile
5732 (package
5733 (name "python-tifffile")
5734 (version "2020.6.3")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "tifffile" version))
5739 (sha256
5740 (base32
5741 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5742 (build-system python-build-system)
5743 ;; Tests require lfdfiles, which depends on tifffile
5744 (arguments `(#:tests? #f))
5745 (propagated-inputs
5746 `(("python-numpy" ,python-numpy)
5747 ;;("python-lfdfiles" ,python-lfdfiles)
5748 ("python-roifile" ,python-roifile)))
5749 (home-page "https://www.lfd.uci.edu/~gohlke/")
5750 (synopsis "Read and write TIFF(r) files")
5751 (description "This package lets you read image and metadata from many
5752 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5753 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5754 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5755 (license license:bsd-3)))
5756
5757 (define-public python-lfdfiles
5758 (package
5759 (name "python-lfdfiles")
5760 (version "2020.1.1")
5761 (source
5762 (origin
5763 (method url-fetch)
5764 (uri (pypi-uri "lfdfiles" version))
5765 (sha256
5766 (base32
5767 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5768 (build-system python-build-system)
5769 (propagated-inputs
5770 `(("python-click" ,python-click)
5771 ("python-numpy" ,python-numpy)
5772 ("python-tifffile" ,python-tifffile)))
5773 (home-page "https://www.lfd.uci.edu/~gohlke/")
5774 (synopsis "Work with LFD data files")
5775 (description
5776 "Lfdfiles is a Python library and console script for reading, writing,
5777 converting, and viewing many of the proprietary file formats used to store
5778 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5779 (license license:bsd-3)))
5780
5781 (define-public python-imageio
5782 (package
5783 (name "python-imageio")
5784 (version "2.8.0")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "imageio" version))
5789 (sha256
5790 (base32
5791 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5792 (build-system python-build-system)
5793 (arguments
5794 `(#:tests? #f ; many tests require online data
5795 #:phases
5796 (modify-phases %standard-phases
5797 (replace 'check
5798 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5799 (if tests?
5800 (begin
5801 ;; Make installed package available for running the tests.
5802 (add-installed-pythonpath inputs outputs)
5803 (invoke "pytest" "-vv"))
5804 #t))))))
5805 (propagated-inputs
5806 `(("python-numpy" ,python-numpy)
5807 ("python-pillow" ,python-pillow)
5808 ("python-psutil" ,python-psutil)))
5809 (native-inputs
5810 `(("python-pytest" ,python-pytest)))
5811 (home-page "https://imageio.github.io/")
5812 (synopsis "Library for reading and writing a wide range of image data")
5813 (description
5814 "Imageio is a Python library that provides an easy interface to read and
5815 write a wide range of image data, including animated images, video, volumetric
5816 data, and scientific formats.")
5817 (license license:bsd-2)))
5818
5819 (define-public python-pycparser
5820 (package
5821 (name "python-pycparser")
5822 (version "2.20")
5823 (source
5824 (origin
5825 (method url-fetch)
5826 (uri (pypi-uri "pycparser" version))
5827 (sha256
5828 (base32
5829 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5830 (outputs '("out" "doc"))
5831 (build-system python-build-system)
5832 (native-inputs
5833 `(("pkg-config" ,pkg-config)))
5834 (arguments
5835 `(#:phases
5836 (modify-phases %standard-phases
5837 (replace 'check
5838 (lambda _
5839 (with-directory-excursion "tests"
5840 (invoke "python" "all_tests.py"))
5841 #t))
5842 (add-after 'install 'install-doc
5843 (lambda* (#:key outputs #:allow-other-keys)
5844 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5845 (doc (string-append data "/doc/" ,name "-" ,version))
5846 (examples (string-append doc "/examples")))
5847 (mkdir-p examples)
5848 (for-each (lambda (file)
5849 (copy-file (string-append "." file)
5850 (string-append doc file)))
5851 '("/README.rst" "/CHANGES" "/LICENSE"))
5852 (copy-recursively "examples" examples)
5853 #t))))))
5854 (home-page "https://github.com/eliben/pycparser")
5855 (synopsis "C parser in Python")
5856 (description
5857 "Pycparser is a complete parser of the C language, written in pure Python
5858 using the PLY parsing library. It parses C code into an AST and can serve as
5859 a front-end for C compilers or analysis tools.")
5860 (license license:bsd-3)))
5861
5862 (define-public python2-pycparser
5863 (package-with-python2 python-pycparser))
5864
5865 (define-public python-pywavelets
5866 (package
5867 (name "python-pywavelets")
5868 (version "1.1.1")
5869 (home-page "https://github.com/PyWavelets/pywt")
5870 (source (origin
5871 (method url-fetch)
5872 (uri (pypi-uri "PyWavelets" version))
5873 (sha256
5874 (base32
5875 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5876 (build-system python-build-system)
5877 (arguments
5878 '(#:modules ((ice-9 ftw)
5879 (srfi srfi-1)
5880 (srfi srfi-26)
5881 (guix build utils)
5882 (guix build python-build-system))
5883 #:phases
5884 (modify-phases %standard-phases
5885 (replace 'check
5886 (lambda _
5887 (let ((cwd (getcwd))
5888 (libdir (find (cut string-prefix? "lib." <>)
5889 (scandir "build"))))
5890 (with-directory-excursion (string-append cwd "/build/" libdir)
5891 (invoke "pytest" "-vv"))))))))
5892 (native-inputs
5893 `(("python-matplotlib" ,python-matplotlib) ;for tests
5894 ("python-pytest" ,python-pytest)))
5895 (propagated-inputs
5896 `(("python-numpy" ,python-numpy)))
5897 (synopsis "Wavelet transforms in Python")
5898 (description
5899 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5900 mathematical basis functions that are localized in both time and frequency.
5901 Wavelet transforms are time-frequency transforms employing wavelets. They are
5902 similar to Fourier transforms, the difference being that Fourier transforms are
5903 localized only in frequency instead of in time and frequency.")
5904 (license license:expat)))
5905
5906 (define-public python-pywinrm
5907 (package
5908 (name "python-pywinrm")
5909 (version "0.4.1")
5910 (source
5911 (origin
5912 (method url-fetch)
5913 (uri (pypi-uri "pywinrm" version))
5914 (sha256
5915 (base32
5916 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5917 (build-system python-build-system)
5918 (propagated-inputs
5919 `(("python-six" ,python-six)
5920 ("python-requests_ntlm" ,python-requests_ntlm)
5921 ("python-xmltodict" ,python-xmltodict)
5922 ("python-kerberos" ,python-kerberos)))
5923 (native-inputs
5924 `(("python-mock" ,python-mock)
5925 ("python-pytest" ,python-pytest)))
5926 (home-page "https://github.com/diyan/pywinrm/")
5927 (synopsis
5928 "Python library for Windows Remote Management (WinRM)")
5929 (description
5930 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5931 service. It allows you to invoke commands on target Windows machines from
5932 any machine that can run Python.")
5933 (license license:expat)))
5934
5935 (define-public python-xcffib
5936 (package
5937 (name "python-xcffib")
5938 (version "0.6.0")
5939 (source
5940 (origin
5941 (method url-fetch)
5942 (uri (pypi-uri "xcffib" version))
5943 (sha256
5944 (base32
5945 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5946 (build-system python-build-system)
5947 (inputs
5948 `(("libxcb" ,libxcb)))
5949 (propagated-inputs
5950 `(("python-cffi" ,python-cffi) ; used at run time
5951 ("python-six" ,python-six)))
5952 (arguments
5953 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5954 #:tests? #f
5955 #:phases
5956 (modify-phases %standard-phases
5957 (add-after 'unpack 'fix-libxcb-path
5958 (lambda* (#:key inputs #:allow-other-keys)
5959 (let ((libxcb (assoc-ref inputs "libxcb")))
5960 (substitute* '("xcffib/__init__.py")
5961 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5962 #t)))
5963 (add-after 'install 'install-doc
5964 (lambda* (#:key outputs #:allow-other-keys)
5965 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5966 "/doc/" ,name "-" ,version)))
5967 (mkdir-p doc)
5968 (copy-file "README.md"
5969 (string-append doc "/README.md"))
5970 #t))))))
5971 (home-page "https://github.com/tych0/xcffib")
5972 (synopsis "XCB Python bindings")
5973 (description
5974 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5975 support for Python 3 and PyPy. It is based on cffi.")
5976 (license license:expat)))
5977
5978 (define-public python2-xcffib
5979 (package-with-python2 python-xcffib))
5980
5981 (define-public python-cairocffi
5982 (package
5983 (name "python-cairocffi")
5984 (version "0.9.0")
5985 (source
5986 (origin
5987 (method url-fetch)
5988 (uri (pypi-uri "cairocffi" version))
5989 (sha256
5990 (base32
5991 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5992 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5993 (build-system python-build-system)
5994 (outputs '("out" "doc"))
5995 (inputs
5996 `(("glib" ,glib)
5997 ("gtk+" ,gtk+)
5998 ("gdk-pixbuf" ,gdk-pixbuf)
5999 ("cairo" ,cairo)
6000 ("pango" ,pango)))
6001 (native-inputs
6002 `(("pkg-config" ,pkg-config)
6003 ("python-pytest" ,python-pytest)
6004 ("python-pytest-cov" ,python-pytest-cov)
6005 ("python-pytest-runner" ,python-pytest-runner)
6006 ("python-sphinx" ,python-sphinx)
6007 ("python-docutils" ,python-docutils)))
6008 (propagated-inputs
6009 `(("python-xcffib" ,python-xcffib))) ; used at run time
6010 (arguments
6011 `(#:phases
6012 (modify-phases %standard-phases
6013 (add-after 'unpack 'patch-paths
6014 (lambda* (#:key inputs outputs #:allow-other-keys)
6015 (substitute* (find-files "." "\\.py$")
6016 (("dlopen\\(ffi, 'cairo'")
6017 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6018 "/lib/libcairo.so.2'"))
6019 (("dlopen\\(ffi, 'gdk-3'")
6020 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6021 "/lib/libgtk-3.so.0'"))
6022 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6023 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6024 "/lib/libgdk_pixbuf-2.0.so.0'"))
6025 (("dlopen\\(ffi, 'glib-2.0'")
6026 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6027 "/lib/libglib-2.0.so.0'"))
6028 (("dlopen\\(ffi, 'gobject-2.0'")
6029 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6030 "/lib/libgobject-2.0.so.0'"))
6031 (("dlopen\\(ffi, 'pangocairo-1.0'")
6032 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6033 "/lib/libpangocairo-1.0.so.0'"))
6034 (("dlopen\\(ffi, 'pango-1.0'")
6035 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6036 "/lib/libpango-1.0.so.0'")))
6037 #t))
6038 (add-after 'install 'install-doc
6039 (lambda* (#:key inputs outputs #:allow-other-keys)
6040 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6041 (doc (string-append data "/doc/" ,name "-" ,version))
6042 (html (string-append doc "/html")))
6043 (setenv "LD_LIBRARY_PATH"
6044 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6045 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6046 (setenv "LANG" "en_US.UTF-8")
6047 (mkdir-p html)
6048 (for-each (lambda (file)
6049 (copy-file (string-append "." file)
6050 (string-append doc file)))
6051 '("/README.rst" "/CHANGES" "/LICENSE"))
6052 (system* "python" "setup.py" "build_sphinx")
6053 (copy-recursively "docs/_build/html" html)
6054 #t))))))
6055 (home-page "https://github.com/Kozea/cairocffi")
6056 (synopsis "Python bindings and object-oriented API for Cairo")
6057 (description
6058 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6059 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6060 graphics library with support for multiple backends including image buffers,
6061 PNG, PostScript, PDF, and SVG file output.")
6062 (license license:bsd-3)))
6063
6064 (define-public python2-cairocffi
6065 (package-with-python2 python-cairocffi))
6066
6067 (define-public python-decorator
6068 (package
6069 (name "python-decorator")
6070 (version "4.3.0")
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (pypi-uri "decorator" version))
6075 (sha256
6076 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6077 (build-system python-build-system)
6078 (home-page "https://pypi.org/project/decorator/")
6079 (synopsis "Python module to simplify usage of decorators")
6080 (description
6081 "The aim of the decorator module is to simplify the usage of decorators
6082 for the average programmer, and to popularize decorators usage giving examples
6083 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6084 etc. The core of this module is a decorator factory.")
6085 (license license:expat)))
6086
6087 (define-public python2-decorator
6088 (package-with-python2 python-decorator))
6089
6090 (define-public python-drmaa
6091 (package
6092 (name "python-drmaa")
6093 (version "0.7.7")
6094 (source
6095 (origin
6096 (method url-fetch)
6097 (uri (pypi-uri "drmaa" version))
6098 (sha256
6099 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6100 (build-system python-build-system)
6101 ;; The test suite requires libdrmaa which is provided by the cluster
6102 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6103 ;; should be set to the path of the libdrmaa library.
6104 (arguments '(#:tests? #f))
6105 (native-inputs
6106 `(("python-nose" ,python-nose)))
6107 (home-page "https://pypi.org/project/drmaa/")
6108 (synopsis "Python bindings for the DRMAA library")
6109 (description
6110 "A Python package for Distributed Resource Management (DRM) job
6111 submission and control. This package is an implementation of the DRMAA 1.0
6112 Python language binding specification.")
6113 (license license:bsd-3)))
6114
6115 (define-public python2-drmaa
6116 (package-with-python2 python-drmaa))
6117
6118 (define-public python-grako
6119 (package
6120 (name "python-grako")
6121 (version "3.99.9")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri
6126 (pypi-uri "grako" version ".zip"))
6127 (sha256
6128 (base32
6129 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6130 (build-system python-build-system)
6131 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6132 (native-inputs
6133 `(("unzip" ,unzip)
6134 ("python-pytest" ,python-pytest)
6135 ("python-pytest-runner" ,python-pytest-runner)))
6136 (home-page "https://bitbucket.org/neogeny/grako")
6137 (synopsis "EBNF parser generator")
6138 (description
6139 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6140 memoizing PEG/Packrat parser in Python.")
6141 (license license:bsd-3)))
6142
6143 (define-public python2-grako
6144 (package-with-python2 python-grako))
6145
6146 (define-public python-grandalf
6147 (package
6148 (name "python-grandalf")
6149 (version "0.7")
6150 (source
6151 (origin
6152 ;; There's no source tarball on PyPI.
6153 (method git-fetch)
6154 (uri (git-reference
6155 (url "https://github.com/bdcht/grandalf")
6156 (commit (string-append "v" version))))
6157 (file-name (git-file-name name version))
6158 (sha256
6159 (base32
6160 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6161 (build-system python-build-system)
6162 (arguments
6163 '(#:phases
6164 (modify-phases %standard-phases
6165 (replace 'check
6166 (lambda _
6167 (invoke "python" "setup.py" "pytest"))))))
6168 (native-inputs
6169 `(("python-pytest" ,python-pytest)
6170 ("python-pytest-runner" ,python-pytest-runner)))
6171 (propagated-inputs
6172 `(("python-numpy" ,python-numpy)
6173 ("python-ply" ,python-ply)))
6174 (home-page "https://github.com/bdcht/grandalf")
6175 (synopsis "Graph and drawing algorithms framework")
6176 (description
6177 "Grandalf is a Python package made for experimentations with graphs
6178 drawing algorithms. It is written in pure Python, and currently implements
6179 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6180 minimization approach. While not as fast or featured as graphviz or other
6181 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6182 than thousands of nodes, while keeping the source code simple enough to tweak
6183 and hack any part of it for experimental purpose. With a total of about 1500
6184 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6185 in less than 600 lines. The energy minimization approach is comprised of only
6186 250 lines!
6187
6188 Grandalf does only 2 not-so-simple things:
6189 @itemize
6190 @item computing the nodes (x,y) coordinates (based on provided nodes
6191 dimensions, and a chosen layout)
6192 @item routing the edges with lines or nurbs
6193 @end itemize
6194
6195 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6196 will help you find where to draw things like nodes and edges, but it’s up to
6197 you to actually draw things with your favorite toolkit.")
6198 ;; The user can choose either license.
6199 (license (list license:gpl2 license:epl1.0))))
6200
6201 (define-public python-gridmap
6202 (package
6203 (name "python-gridmap")
6204 (version "0.14.0")
6205 (source
6206 (origin
6207 (method git-fetch)
6208 (uri (git-reference
6209 (url "https://github.com/pygridtools/gridmap")
6210 (commit (string-append "v" version))))
6211 (file-name (git-file-name name version))
6212 (sha256
6213 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6214 (build-system python-build-system)
6215 (arguments
6216 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6217 (propagated-inputs
6218 `(("python-psutil" ,python-psutil)
6219 ("python-drmaa" ,python-drmaa)
6220 ("python-pyzmq" ,python-pyzmq)))
6221 (home-page "https://github.com/pygridtools/gridmap")
6222 (synopsis "Create jobs on a cluster directly from Python")
6223 (description
6224 "Gridmap is a Python package to allow you to easily create jobs on the
6225 cluster directly from Python. You can directly map Python functions onto the
6226 cluster without needing to write any wrapper code yourself.")
6227 (license license:gpl3+)))
6228
6229 (define-public python2-gridmap
6230 (package-with-python2 python-gridmap))
6231
6232 (define-public python-honcho
6233 (package
6234 (name "python-honcho")
6235 (version "1.0.1")
6236 (source
6237 (origin
6238 (method git-fetch)
6239 (uri (git-reference
6240 (url "https://github.com/nickstenning/honcho")
6241 (commit (string-append "v" version))))
6242 (file-name (git-file-name name version))
6243 (sha256
6244 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6245 (build-system python-build-system)
6246 (native-inputs
6247 `(("python-pytest" ,python-pytest)
6248 ("python-mock" ,python-mock)
6249 ("python-tox" ,python-tox)
6250 ("which" ,which))) ;for tests
6251 (propagated-inputs
6252 `(("python-jinja2" ,python-jinja2)))
6253 (arguments
6254 `(#:phases
6255 (modify-phases %standard-phases
6256 (delete 'check)
6257 (add-after 'install 'check
6258 (lambda* (#:key outputs inputs #:allow-other-keys)
6259 ;; fix honcho path in testsuite
6260 (substitute* "tests/conftest.py"
6261 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6262 "/bin/honcho" "'")))
6263 ;; It's easier to run tests after install.
6264 ;; Make installed package available for running the tests
6265 (add-installed-pythonpath inputs outputs)
6266 (invoke "py.test" "-v"))))))
6267 (home-page "https://github.com/nickstenning/honcho")
6268 (synopsis "Manage Procfile-based applications")
6269 (description
6270 "A Procfile is a file which describes how to run an application
6271 consisting of several processes. honcho starts all listed processes.
6272 The output of all running processes is collected by honcho and
6273 displayed.")
6274 (license license:expat)))
6275
6276 (define-public python2-honcho
6277 (package-with-python2 python-honcho))
6278
6279 (define-public python-pexpect
6280 (package
6281 (name "python-pexpect")
6282 (version "4.8.0")
6283 (source
6284 (origin
6285 (method url-fetch)
6286 (uri (pypi-uri "pexpect" version))
6287 (sha256
6288 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6289 (build-system python-build-system)
6290 (arguments
6291 `(#:phases
6292 (modify-phases %standard-phases
6293 (add-before 'check 'prepare-tests
6294 (lambda _
6295 (substitute* (find-files "tests")
6296 (("/bin/ls") (which "ls"))
6297 (("/bin/echo") (which "echo"))
6298 (("/bin/which") (which "which"))
6299 ;; Many tests try to use the /bin directory which
6300 ;; is not present in the build environment.
6301 ;; Use one that's non-empty and unlikely to change.
6302 (("/bin'") "/dev'")
6303 ;; Disable failing test. See upstream bug report
6304 ;; https://github.com/pexpect/pexpect/issues/568
6305 (("def test_bash") "def _test_bash"))
6306 ;; XXX: Socket connection test gets "Connection reset by peer".
6307 ;; Why does it not work? Delete for now.
6308 (delete-file "tests/test_socket.py")
6309 #t))
6310 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6311 (native-inputs
6312 `(("python-nose" ,python-nose)
6313 ("python-pytest" ,python-pytest)
6314 ("man-db" ,man-db)
6315 ("which" ,which)
6316 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6317 (propagated-inputs
6318 `(("python-ptyprocess" ,python-ptyprocess)))
6319 (home-page "http://pexpect.readthedocs.org/")
6320 (synopsis "Controlling interactive console applications")
6321 (description
6322 "Pexpect is a pure Python module for spawning child applications;
6323 controlling them; and responding to expected patterns in their output.
6324 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6325 child application and control it as if a human were typing commands.")
6326 (license license:isc)))
6327
6328 (define-public python2-pexpect
6329 (package-with-python2 python-pexpect))
6330
6331 (define-public python-setuptools-scm
6332 (package
6333 (name "python-setuptools-scm")
6334 (version "3.4.3")
6335 (source (origin
6336 (method url-fetch)
6337 (uri (pypi-uri "setuptools_scm" version))
6338 (sha256
6339 (base32
6340 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6341 (build-system python-build-system)
6342 (home-page "https://github.com/pypa/setuptools_scm/")
6343 (synopsis "Manage Python package versions in SCM metadata")
6344 (description
6345 "Setuptools_scm handles managing your Python package versions in
6346 @dfn{software configuration management} (SCM) metadata instead of declaring
6347 them as the version argument or in a SCM managed file.")
6348 (license license:expat)))
6349
6350 (define-public python2-setuptools-scm
6351 (package-with-python2 python-setuptools-scm))
6352
6353 (define-public python-sexpdata
6354 (package
6355 (name "python-sexpdata")
6356 (version "0.0.3")
6357 (source
6358 (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "sexpdata" version))
6361 (sha256
6362 (base32
6363 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6364 (build-system python-build-system)
6365 (home-page "https://github.com/jd-boyd/sexpdata")
6366 (synopsis "S-expression parser for Python")
6367 (description
6368 "Sexpdata is an S-expression parser/serializer. It has load and dump
6369 functions like pickle, json or PyYAML module.")
6370 (license license:bsd-3)))
6371
6372 (define-public python-pathlib2
6373 (package
6374 (name "python-pathlib2")
6375 (version "2.3.3")
6376 (source
6377 (origin
6378 (method url-fetch)
6379 (uri (pypi-uri "pathlib2" version))
6380 (sha256
6381 (base32
6382 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6383 (build-system python-build-system)
6384 (propagated-inputs
6385 `(("python-scandir" ,python-scandir)
6386 ("python-six" ,python-six)))
6387 (home-page "https://pypi.org/project/pathlib2/")
6388 (synopsis "Object-oriented file system paths")
6389 (description "The goal of pathlib2 is to provide a backport of the
6390 standard @code{pathlib} module which tracks the standard library module, so
6391 all the newest features of the standard @code{pathlib} can be used also on
6392 older Python versions.")
6393 (license license:expat)))
6394
6395 (define-public python-importlib-resources
6396 (package
6397 (name "python-importlib-resources")
6398 (version "3.0.0")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "importlib_resources" version))
6403 (sha256
6404 (base32
6405 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6406 (build-system python-build-system)
6407 (native-inputs
6408 `(("python-setuptools-scm" ,python-setuptools-scm)
6409 ("python-toml" ,python-toml)))
6410 (home-page "http://importlib-resources.readthedocs.io/")
6411 (synopsis "Read resources from Python packages")
6412 (description
6413 "@code{importlib_resources} is a backport of Python 3's standard library
6414 @code{importlib.resources} module for Python 2.7, and Python 3.")
6415 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6416 (license license:asl2.0)))
6417
6418 (define-public python2-importlib-resources
6419 (package
6420 (name "python2-importlib-resources")
6421 (version "1.0.2")
6422 (source (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "importlib_resources" version))
6425 (sha256
6426 (base32
6427 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6428 (build-system python-build-system)
6429 (arguments
6430 `(#:python ,python-2
6431 #:phases (modify-phases %standard-phases
6432 ;; The build system tests for python-wheel, but it is
6433 ;; not required for Guix nor the test suite. Just drop
6434 ;; it to make bootstrapping pytest easier.
6435 (add-after 'unpack 'drop-wheel-dependency
6436 (lambda _
6437 (substitute* "setup.cfg"
6438 (("^[[:blank:]]+wheel")
6439 ""))
6440 #t)))))
6441 (propagated-inputs
6442 `(("python-pathlib2" ,python2-pathlib2)
6443 ("python-typing" ,python2-typing)))
6444 (home-page "https://gitlab.com/python-devs/importlib_resources")
6445 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6446 (description
6447 "This package provides an implementation of @code{importlib.resources}
6448 for older versions of Python.")
6449 (license license:asl2.0)))
6450
6451 ;; For importlib-metadata-bootstrap below.
6452 (define-public python2-importlib-resources-bootstrap
6453 (hidden-package
6454 (package/inherit
6455 python2-importlib-resources
6456 (name "python2-importlib-resources-bootstrap")
6457 (propagated-inputs
6458 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6459 ("python-typing" ,python2-typing))))))
6460
6461 (define-public python-importlib-metadata
6462 (package
6463 (name "python-importlib-metadata")
6464 (version "1.5.0")
6465 (source
6466 (origin
6467 (method url-fetch)
6468 (uri (pypi-uri "importlib_metadata" version))
6469 (sha256
6470 (base32
6471 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6472 (build-system python-build-system)
6473 (propagated-inputs
6474 `(("python-zipp" ,python-zipp)))
6475 (native-inputs
6476 `(("python-setuptools-scm" ,python-setuptools-scm)
6477 ("python-pyfakefs" ,python-pyfakefs)
6478 ("python-packaging" ,python-packaging)))
6479 (home-page "https://importlib-metadata.readthedocs.io/")
6480 (synopsis "Read metadata from Python packages")
6481 (description
6482 "@code{importlib_metadata} is a library which provides an API for
6483 accessing an installed Python package's metadata, such as its entry points or
6484 its top-level name. This functionality intends to replace most uses of
6485 @code{pkg_resources} entry point API and metadata API. Along with
6486 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6487 need to use the older and less efficient @code{pkg_resources} package.")
6488 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6489 (license license:asl2.0)))
6490
6491 (define-public python2-importlib-metadata
6492 (let ((base (package-with-python2 (strip-python2-variant
6493 python-importlib-metadata))))
6494 (package/inherit
6495 base
6496 (name "python2-importlib-metadata")
6497 (native-inputs
6498 `(("python-setuptools-scm" ,python2-setuptools-scm)
6499 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6500 ("python-packaging" ,python2-packaging-bootstrap)))
6501 (propagated-inputs
6502 `(("python-configparser" ,python2-configparser)
6503 ("python-contextlib2" ,python2-contextlib2)
6504 ("python-importlib-resources" ,python2-importlib-resources)
6505 ("python-pathlib2" ,python2-pathlib2)
6506 ,@(package-propagated-inputs base))))))
6507
6508 ;; This package is used by python2-pytest, and thus must not depend on it.
6509 (define-public python2-importlib-metadata-bootstrap
6510 (hidden-package
6511 (package/inherit
6512 python2-importlib-metadata
6513 (name "python2-importlib-metadata-bootstrap")
6514 (arguments
6515 `(#:tests? #f
6516 ,@(package-arguments python2-importlib-metadata)))
6517 (propagated-inputs
6518 `(("python-zipp" ,python2-zipp-bootstrap)
6519 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6520 ("python-configparser" ,python2-configparser)
6521 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6522 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6523
6524 (define-public python-importmagic
6525 (package
6526 (name "python-importmagic")
6527 (version "0.1.7")
6528 (source
6529 (origin
6530 (method url-fetch)
6531 (uri (pypi-uri "importmagic" version))
6532 (sha256
6533 (base32
6534 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6535 (build-system python-build-system)
6536 (home-page "https://github.com/alecthomas/importmagic")
6537 (synopsis "Library for adding, removing and managing Python imports")
6538 (description
6539 "Importmagic is a Python library for automatically managing imports by
6540 finding unresolved symbols in Python code and their corresponding imports.")
6541 (license license:bsd-3)))
6542
6543 (define-public python-jaraco-packaging
6544 (package
6545 (name "python-jaraco-packaging")
6546 (version "6.1")
6547 (source
6548 (origin
6549 (method url-fetch)
6550 (uri (pypi-uri "jaraco.packaging" version))
6551 (sha256
6552 (base32
6553 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6554 (build-system python-build-system)
6555 (propagated-inputs
6556 `(("python-pytest" ,python-pytest)
6557 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6558 ("python-pytest-flake8" ,python-pytest-flake8)
6559 ("python-rst.linker" ,python-rst.linker)
6560 ("python-setuptools" ,python-setuptools)
6561 ("python-setuptools-scm" ,python-setuptools-scm)
6562 ("python-six" ,python-six)
6563 ("python-sphinx" ,python-sphinx)))
6564 (home-page "https://github.com/jaraco/jaraco.packaging")
6565 (synopsis "Tools to supplement packaging Python releases")
6566 (description
6567 "This package provides various tools to supplement packaging Python
6568 releases.")
6569 (license license:expat)))
6570
6571 (define-public python-pathpy
6572 (package
6573 (name "python-pathpy")
6574 (version "11.5.1")
6575 (source
6576 (origin
6577 (method url-fetch)
6578 (uri (pypi-uri "path.py" version))
6579 (sha256
6580 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6581 (outputs '("out" "doc"))
6582 (build-system python-build-system)
6583 (propagated-inputs
6584 `(("python-appdirs" ,python-appdirs)
6585 ("python-importlib-metadata" ,python-importlib-metadata)))
6586 (native-inputs
6587 `(("python-setuptools-scm" ,python-setuptools-scm)
6588 ("python-sphinx" ,python-sphinx)
6589 ("python-rst.linker" ,python-rst.linker)
6590 ("python-pytest" ,python-pytest)
6591 ("python-pytest-runner" ,python-pytest-runner)
6592 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6593 (arguments
6594 `(#:phases
6595 (modify-phases %standard-phases
6596 (add-after 'build 'build-doc
6597 (lambda _
6598 (setenv "LANG" "en_US.UTF-8")
6599 (invoke "python" "setup.py" "build_sphinx")))
6600 (add-after 'install 'install-doc
6601 (lambda* (#:key outputs #:allow-other-keys)
6602 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6603 (doc (string-append data "/doc/" ,name "-" ,version))
6604 (html (string-append doc "/html")))
6605 (mkdir-p html)
6606 (for-each (lambda (file)
6607 (copy-file file (string-append doc "/" file)))
6608 '("README.rst" "CHANGES.rst"))
6609 (copy-recursively "build/sphinx/html" html)
6610 #t)))
6611 (replace 'check
6612 (lambda _
6613 ;; The import time test aborts if an import takes longer than
6614 ;; 100ms. It may very well take a little longer than that.
6615 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6616 (home-page "https://github.com/jaraco/path.py")
6617 (synopsis "Python module wrapper for built-in os.path")
6618 (description
6619 "@code{path.py} implements path objects as first-class entities, allowing
6620 common operations on files to be invoked on those path objects directly.")
6621 (license license:expat)))
6622
6623 (define-public python2-pathpy
6624 (package-with-python2 python-pathpy))
6625
6626 (define-public python-simplegeneric
6627 (package
6628 (name "python-simplegeneric")
6629 (version "0.8.1")
6630 (source
6631 (origin
6632 (method url-fetch)
6633 (uri (pypi-uri "simplegeneric" version ".zip"))
6634 (sha256
6635 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6636 (build-system python-build-system)
6637 (native-inputs
6638 `(("unzip" ,unzip)))
6639 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6640 (synopsis "Python module for simple generic functions")
6641 (description
6642 "The simplegeneric module lets you define simple single-dispatch generic
6643 functions, akin to Python’s built-in generic functions like @code{len()},
6644 @code{iter()} and so on. However, instead of using specially-named methods,
6645 these generic functions use simple lookup tables, akin to those used by
6646 e.g. @code{pickle.dump()} and other generic functions found in the Python
6647 standard library.")
6648 (license license:zpl2.1)))
6649
6650 (define-public python2-simplegeneric
6651 (package-with-python2 python-simplegeneric))
6652
6653 (define-public python-ipython-genutils
6654 ;; TODO: This package is retired, check if can be removed, see description.
6655 (package
6656 (name "python-ipython-genutils")
6657 (version "0.1.0")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (pypi-uri "ipython_genutils" version))
6662 (sha256
6663 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6664 (build-system python-build-system)
6665 (arguments `(#:tests? #f)) ; no tests
6666 (home-page "https://ipython.org")
6667 (synopsis "Vestigial utilities from IPython")
6668 (description
6669 "This package provides retired utilities from IPython. No packages
6670 outside IPython/Jupyter should depend on it.
6671
6672 This package shouldn't exist. It contains some common utilities shared by
6673 Jupyter and IPython projects during The Big Split. As soon as possible, those
6674 packages will remove their dependency on this, and this package will go
6675 away.")
6676 (license license:bsd-3)))
6677
6678 (define-public python2-ipython-genutils
6679 (package-with-python2 python-ipython-genutils))
6680
6681 (define-public python-ipyparallel
6682 (package
6683 (name "python-ipyparallel")
6684 (version "6.2.4")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "ipyparallel" version))
6689 (sha256
6690 (base32
6691 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6692 (build-system python-build-system)
6693 (arguments
6694 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6695 #:phases
6696 (modify-phases %standard-phases
6697 (add-before 'check 'prepare-for-tests
6698 (lambda _
6699 (setenv "HOME" (getcwd))
6700 #t)))))
6701 (propagated-inputs
6702 `(("python-dateutil" ,python-dateutil)
6703 ("python-decorator" ,python-decorator)
6704 ("python-ipykernel" ,python-ipykernel)
6705 ("python-ipython" ,python-ipython)
6706 ("python-ipython-genutils" ,python-ipython-genutils)
6707 ("python-jupyter-client" ,python-jupyter-client)
6708 ("python-pyzmq" ,python-pyzmq)
6709 ("python-tornado" ,python-tornado)
6710 ("python-traitlets" ,python-traitlets)))
6711 (native-inputs
6712 `(("python-ipython" ,python-ipython)
6713 ("python-mock" ,python-mock)
6714 ("python-nose" ,python-nose)
6715 ("python-pytest" ,python-pytest)
6716 ("python-pytest-cov" ,python-pytest-cov)
6717 ("python-testpath" ,python-testpath)))
6718 (home-page "https://ipython.org/")
6719 (synopsis "Interactive Parallel Computing with IPython")
6720 (description
6721 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6722 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6723 CLI scripts:
6724 @enumerate
6725 @item ipcluster - start/stop a cluster
6726 @item ipcontroller - start a scheduler
6727 @item ipengine - start an engine
6728 @end enumerate")
6729 (license license:bsd-3)))
6730
6731 (define-public python2-ipyparallel
6732 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6733 (package
6734 (inherit ipyparallel)
6735 (propagated-inputs
6736 `(("python2-futures" ,python2-futures)
6737 ,@(package-propagated-inputs ipyparallel))))))
6738
6739 (define-public python-ipython-cluster-helper
6740 (package
6741 (name "python-ipython-cluster-helper")
6742 (version "0.6.4")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "ipython-cluster-helper" version))
6747 (sha256
6748 (base32
6749 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6750 (modules '((guix build utils)))
6751 (snippet
6752 '(begin (substitute* "requirements.txt"
6753 (("ipython.*") "ipython\n"))
6754 #t))))
6755 (build-system python-build-system)
6756 (arguments
6757 `(#:tests? #f ; Test suite can't find IPython.
6758 #:phases
6759 (modify-phases %standard-phases
6760 (replace 'check
6761 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6762 (if tests?
6763 (begin
6764 (setenv "HOME" (getcwd))
6765 (add-installed-pythonpath inputs outputs)
6766 (invoke "python" "example/example.py" "--local"))
6767 #t))))))
6768 (propagated-inputs
6769 `(("python-ipyparallel" ,python-ipyparallel)
6770 ("python-ipython" ,python-ipython)
6771 ("python-netifaces" ,python-netifaces)
6772 ("python-pyzmq" ,python-pyzmq)
6773 ("python-setuptools" ,python-setuptools)
6774 ("python-six" ,python-six)))
6775 (home-page "https://github.com/roryk/ipython-cluster-helper")
6776 (synopsis
6777 "Simplify IPython cluster start up and use for multiple schedulers")
6778 (description
6779 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6780 profile, launches a cluster and returns a view. On program exit it shuts the
6781 cluster down and deletes the throwaway profile.")
6782 (license license:expat)))
6783
6784 (define-public python2-ipython-cluster-helper
6785 (package-with-python2 python-ipython-cluster-helper))
6786
6787 (define-public python-traitlets
6788 (package
6789 (name "python-traitlets")
6790 (version "4.3.3")
6791 (source
6792 (origin
6793 (method url-fetch)
6794 (uri (pypi-uri "traitlets" version))
6795 (sha256
6796 (base32
6797 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6798 (build-system python-build-system)
6799 (arguments
6800 `(#:phases
6801 (modify-phases %standard-phases
6802 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6803 (propagated-inputs
6804 `(("python-ipython-genutils" ,python-ipython-genutils)
6805 ("python-decorator" ,python-decorator)))
6806 (native-inputs
6807 `(("python-pytest" ,python-pytest)))
6808 (properties `((python2-variant . ,(delay python2-traitlets))))
6809 (home-page "https://ipython.org")
6810 (synopsis "Configuration system for Python applications")
6811 (description
6812 "Traitlets is a framework that lets Python classes have attributes with
6813 type checking, dynamically calculated default values, and ‘on change’
6814 callbacks. The package also includes a mechanism to use traitlets for
6815 configuration, loading values from files or from command line arguments. This
6816 is a distinct layer on top of traitlets, so you can use traitlets in your code
6817 without using the configuration machinery.")
6818 (license license:bsd-3)))
6819
6820 (define-public python2-traitlets
6821 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6822 (package
6823 (inherit traitlets)
6824 (propagated-inputs
6825 `(("python2-enum34" ,python2-enum34)
6826 ,@(package-propagated-inputs traitlets))))))
6827
6828 (define-public python-jupyter-core
6829 (package
6830 (name "python-jupyter-core")
6831 (version "4.4.0")
6832 (source
6833 (origin
6834 (method url-fetch)
6835 (uri (string-append (pypi-uri "jupyter_core" version)))
6836 (sha256
6837 (base32
6838 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6839 (build-system python-build-system)
6840 ;; FIXME: not sure how to run the tests
6841 (arguments `(#:tests? #f))
6842 (propagated-inputs
6843 `(("python-traitlets" ,python-traitlets)))
6844 (home-page "http://jupyter.org/")
6845 (synopsis "Jupyter base package")
6846 (description
6847 "Jupyter core is the base package on which Jupyter projects rely.")
6848 (license license:bsd-3)))
6849
6850 (define-public python2-jupyter-core
6851 (package-with-python2 python-jupyter-core))
6852
6853 (define-public python-jupyter-client
6854 (package
6855 (name "python-jupyter-client")
6856 (version "5.2.4")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "jupyter_client" version))
6861 (sha256
6862 (base32
6863 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6864 (build-system python-build-system)
6865 ;; Tests fail because of missing native python kernel which I assume is
6866 ;; provided by the ipython package, which we cannot use because it would
6867 ;; cause a dependency cycle.
6868 (arguments
6869 `(#:tests? #f
6870
6871 #:phases (modify-phases %standard-phases
6872 (add-after 'unpack 'set-tool-file-names
6873 (lambda* (#:key inputs #:allow-other-keys)
6874 (let ((iproute (assoc-ref inputs "iproute")))
6875 (substitute* "jupyter_client/localinterfaces.py"
6876 (("'ip'")
6877 (string-append "'" iproute "/sbin/ip'")))
6878 #t))))))
6879 (inputs
6880 `(("iproute" ,iproute)))
6881 (propagated-inputs
6882 `(("python-pyzmq" ,python-pyzmq)
6883 ("python-traitlets" ,python-traitlets)
6884 ("python-jupyter-core" ,python-jupyter-core)))
6885 (home-page "http://jupyter.org/")
6886 (synopsis "Jupyter protocol implementation and client libraries")
6887 (description
6888 "The @code{jupyter_client} package contains the reference implementation
6889 of the Jupyter protocol. It also provides client and kernel management APIs
6890 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6891 installing @code{kernelspec}s for use with Jupyter frontends.")
6892 (license license:bsd-3)))
6893
6894 (define-public python2-jupyter-client
6895 (package-with-python2 python-jupyter-client))
6896
6897 (define-public python-ipykernel
6898 (package
6899 (name "python-ipykernel")
6900 (version "5.1.3")
6901 (source
6902 (origin
6903 (method url-fetch)
6904 (uri (pypi-uri "ipykernel" version))
6905 (sha256
6906 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6907 (build-system python-build-system)
6908 (arguments
6909 `(#:phases
6910 (modify-phases %standard-phases
6911 (replace 'check
6912 (lambda _
6913 (setenv "HOME" "/tmp")
6914 (invoke "pytest" "-v")
6915 #t))
6916 (add-after 'install 'set-python-file-name
6917 (lambda* (#:key outputs #:allow-other-keys)
6918 ;; Record the absolute file name of the 'python' executable in
6919 ;; 'kernel.json'.
6920 (let ((out (assoc-ref outputs "out")))
6921 (substitute* (string-append out "/share/jupyter"
6922 "/kernels/python3/kernel.json")
6923 (("\"python\"")
6924 (string-append "\"" (which "python") "\"")))
6925 #t))))))
6926 (propagated-inputs
6927 `(("python-ipython" ,python-ipython)
6928 ;; imported at runtime during connect
6929 ("python-jupyter-client" ,python-jupyter-client)))
6930 (native-inputs
6931 `(("python-flaky" ,python-flaky)
6932 ("python-nose" ,python-nose)
6933 ("python-pytest" ,python-pytest)))
6934 (home-page "https://ipython.org")
6935 (synopsis "IPython Kernel for Jupyter")
6936 (description
6937 "This package provides the IPython kernel for Jupyter.")
6938 (properties `((python2-variant . ,(delay python2-ipykernel))))
6939 (license license:bsd-3)))
6940
6941 ;; Version 5.x and above no longer support Python 2.
6942 (define-public python2-ipykernel
6943 (package
6944 (name "python2-ipykernel")
6945 (version "4.10.1")
6946 (source
6947 (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "ipykernel" version))
6950 (sha256
6951 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6952 (build-system python-build-system)
6953 (arguments
6954 `(#:python ,python-2))
6955 (propagated-inputs
6956 `(("python2-ipython" ,python2-ipython)
6957 ;; imported at runtime during connect
6958 ("python2-jupyter-client" ,python2-jupyter-client)
6959 ("python2-tornado" ,python2-tornado)
6960 ("python2-traitlets" ,python2-traitlets)))
6961 (native-inputs
6962 `(("python2-mock" ,python2-mock)
6963 ("python2-nose" ,python2-nose)
6964 ("python2-pytest" ,python2-pytest)
6965 ("python2-pytest-cov" ,python2-pytest-cov)))
6966 (home-page "https://ipython.org")
6967 (synopsis "IPython Kernel for Jupyter")
6968 (description
6969 "This package provides the IPython kernel for Jupyter.")
6970 (license license:bsd-3)))
6971
6972 (define-public python-pari-jupyter
6973 (package
6974 (name "python-pari-jupyter")
6975 (version "1.3.2")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (pypi-uri "pari_jupyter" version))
6980 (sha256
6981 (base32
6982 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6983 (build-system python-build-system)
6984 (propagated-inputs
6985 `(("python-ipykernel" ,python-ipykernel)))
6986 (inputs
6987 `(("pari-gp" ,pari-gp)
6988 ("readline" ,readline)))
6989 (arguments
6990 `(#:tests? #f)) ; no test suite
6991 (home-page
6992 "https://github.com/jdemeyer/pari_jupyter")
6993 (synopsis "A Jupyter kernel for PARI/GP")
6994 (description "The package provides a PARI/GP kernel for Jupyter.")
6995 (license license:gpl3+)))
6996
6997 (define-public python-backcall
6998 (package
6999 (name "python-backcall")
7000 (version "0.1.0")
7001 (source
7002 (origin
7003 (method url-fetch)
7004 (uri (pypi-uri "backcall" version))
7005 (sha256
7006 (base32
7007 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7008 (build-system python-build-system)
7009 (home-page "https://github.com/takluyver/backcall/")
7010 (synopsis "Specifications for callback functions passed in to an API")
7011 (description
7012 "If your code lets other people supply callback functions, it's important
7013 to specify the function signature you expect, and check that functions support
7014 that. Adding extra parameters later would break other peoples code unless
7015 you're careful. The @code{backcall} package provides a way of specifying the
7016 callback signature using a prototype function.")
7017 (license license:bsd-3)))
7018
7019 (define-public python-ipython
7020 (package
7021 (name "python-ipython")
7022 (version "7.9.0")
7023 (source
7024 (origin
7025 (method url-fetch)
7026 (uri (pypi-uri "ipython" version ".tar.gz"))
7027 (sha256
7028 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7029 (build-system python-build-system)
7030 (propagated-inputs
7031 `(("python-backcall" ,python-backcall)
7032 ("python-pyzmq" ,python-pyzmq)
7033 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7034 ("python-terminado" ,python-terminado)
7035 ("python-matplotlib" ,python-matplotlib)
7036 ("python-numpy" ,python-numpy)
7037 ("python-numpydoc" ,python-numpydoc)
7038 ("python-jedi" ,python-jedi)
7039 ("python-jinja2" ,python-jinja2)
7040 ("python-mistune" ,python-mistune)
7041 ("python-pexpect" ,python-pexpect)
7042 ("python-pickleshare" ,python-pickleshare)
7043 ("python-simplegeneric" ,python-simplegeneric)
7044 ("python-jsonschema" ,python-jsonschema)
7045 ("python-traitlets" ,python-traitlets)
7046 ("python-nbformat" ,python-nbformat)
7047 ("python-pygments" ,python-pygments)))
7048 (inputs
7049 `(("readline" ,readline)
7050 ("which" ,which)))
7051 (native-inputs
7052 `(("graphviz" ,graphviz)
7053 ("pkg-config" ,pkg-config)
7054 ("python-requests" ,python-requests) ;; for tests
7055 ("python-testpath" ,python-testpath)
7056 ("python-nose" ,python-nose)))
7057 (arguments
7058 `(#:phases
7059 (modify-phases %standard-phases
7060 (add-after 'unpack 'make-docs-reproducible
7061 (lambda _
7062 (substitute* "IPython/sphinxext/ipython_directive.py"
7063 ((".*import datetime") "")
7064 ((".*datetime.datetime.now\\(\\)") "")
7065 (("%timeit") "# %timeit"))
7066 #t))
7067 ;; Tests can only be run after the library has been installed and not
7068 ;; within the source directory.
7069 (delete 'check)
7070 (add-after 'install 'check
7071 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7072 (if tests?
7073 (begin
7074 ;; Make installed package available for running the tests
7075 (add-installed-pythonpath inputs outputs)
7076 (setenv "HOME" "/tmp/") ;; required by a test
7077 ;; We only test the core because one of the other tests
7078 ;; tries to import ipykernel.
7079 (invoke "python" "IPython/testing/iptest.py"
7080 "-v" "IPython/core/tests"))
7081 #t)))
7082 (add-before 'check 'fix-tests
7083 (lambda* (#:key inputs #:allow-other-keys)
7084 (substitute* "./IPython/utils/_process_posix.py"
7085 (("/usr/bin/env', 'which") (which "which")))
7086 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7087 (("#!/usr/bin/env python")
7088 (string-append "#!" (which "python"))))
7089 ;; This test introduces a circular dependency on ipykernel
7090 ;; (which depends on ipython).
7091 (delete-file "IPython/core/tests/test_display.py")
7092 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7093 (delete-file "IPython/core/tests/test_interactiveshell.py")
7094 #t)))))
7095 (home-page "https://ipython.org")
7096 (synopsis "IPython is a tool for interactive computing in Python")
7097 (description
7098 "IPython provides a rich architecture for interactive computing with:
7099 Powerful interactive shells, a browser-based notebook, support for interactive
7100 data visualization, embeddable interpreters and tools for parallel
7101 computing.")
7102 (properties `((python2-variant . ,(delay python2-ipython))))
7103 (license license:bsd-3)))
7104
7105 ;; This is the latest release of the LTS version of ipython with support for
7106 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7107 ;; dropped support for Python 2.7.
7108 (define-public python2-ipython
7109 (package
7110 (name "python2-ipython")
7111 (version "5.8.0")
7112 (source
7113 (origin
7114 (method url-fetch)
7115 (uri (pypi-uri "ipython" version ".tar.gz"))
7116 (sha256
7117 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7118 (build-system python-build-system)
7119 (propagated-inputs
7120 `(("python2-backports-shutil-get-terminal-size"
7121 ,python2-backports-shutil-get-terminal-size)
7122 ("python2-pathlib2" ,python2-pathlib2)
7123 ("python2-pyzmq" ,python2-pyzmq)
7124 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7125 ("python2-terminado" ,python2-terminado)
7126 ("python2-matplotlib" ,python2-matplotlib)
7127 ("python2-numpy" ,python2-numpy)
7128 ("python2-numpydoc" ,python2-numpydoc)
7129 ("python2-jinja2" ,python2-jinja2)
7130 ("python2-mistune" ,python2-mistune)
7131 ("python2-pexpect" ,python2-pexpect)
7132 ("python2-pickleshare" ,python2-pickleshare)
7133 ("python2-simplegeneric" ,python2-simplegeneric)
7134 ("python2-jsonschema" ,python2-jsonschema)
7135 ("python2-traitlets" ,python2-traitlets)
7136 ("python2-nbformat" ,python2-nbformat)
7137 ("python2-pygments" ,python2-pygments)))
7138 (inputs
7139 `(("readline" ,readline)
7140 ("which" ,which)))
7141 (native-inputs
7142 `(("graphviz" ,graphviz)
7143 ("pkg-config" ,pkg-config)
7144 ("python2-requests" ,python2-requests) ;; for tests
7145 ("python2-testpath" ,python2-testpath)
7146 ("python2-mock" ,python2-mock)
7147 ("python2-nose" ,python2-nose)))
7148 (arguments
7149 `(#:python ,python-2
7150 #:phases
7151 (modify-phases %standard-phases
7152 (add-before 'check 'delete-broken-tests
7153 (lambda* (#:key inputs #:allow-other-keys)
7154 ;; These tests throw errors for unknown reasons.
7155 (delete-file "IPython/core/tests/test_displayhook.py")
7156 (delete-file "IPython/core/tests/test_magic_terminal.py")
7157 (delete-file "IPython/core/tests/test_profile.py")
7158 #t)))))
7159 (home-page "https://ipython.org")
7160 (synopsis "IPython is a tool for interactive computing in Python")
7161 (description
7162 "IPython provides a rich architecture for interactive computing with:
7163 Powerful interactive shells, a browser-based notebook, support for interactive
7164 data visualization, embeddable interpreters and tools for parallel
7165 computing.")
7166 (license license:bsd-3)))
7167
7168 (define-public python-ipython-documentation
7169 (package
7170 (inherit python-ipython)
7171 (name "python-ipython-documentation")
7172 (version (package-version python-ipython))
7173 (arguments
7174 `(#:phases
7175 (modify-phases %standard-phases
7176 (delete 'build)
7177 (delete 'check)
7178 (replace 'install
7179 (lambda* (#:key outputs #:allow-other-keys)
7180 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7181 (doc (string-append data "/doc/" ,name "-" ,version))
7182 (html (string-append doc "/html"))
7183 (man1 (string-append data "/man/man1"))
7184 (info (string-append data "/info"))
7185 (examples (string-append doc "/examples"))
7186 (python-arg (string-append "PYTHON=" (which "python"))))
7187 (setenv "LANG" "en_US.utf8")
7188 (with-directory-excursion "docs"
7189 ;; FIXME: pdf fails to build
7190 ;;(system* "make" "pdf" "PAPER=a4")
7191 (system* "make" python-arg "html")
7192 ;; FIXME: the generated texi file contains ^@^@, which trips
7193 ;; up the parser.
7194 ;; (system* "make" python-arg "info")
7195 )
7196 (copy-recursively "docs/man" man1)
7197 (copy-recursively "examples" examples)
7198 (copy-recursively "docs/build/html" html)
7199 ;; (copy-file "docs/build/latex/ipython.pdf"
7200 ;; (string-append doc "/ipython.pdf"))
7201 (mkdir-p info)
7202 ;; (copy-file "docs/build/texinfo/ipython.info"
7203 ;; (string-append info "/ipython.info"))
7204 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7205 #t)))))
7206 (inputs
7207 `(("python-ipython" ,python-ipython)
7208 ("python-ipykernel" ,python-ipykernel)))
7209 (native-inputs
7210 `(("python-sphinx" ,python-sphinx)
7211 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7212 ;; FIXME: It's possible that a smaller union would work just as well.
7213 ("texlive" ,(texlive-union (list texlive-amsfonts
7214 texlive-fonts-ec
7215 texlive-generic-ifxetex
7216 texlive-generic-pdftex
7217 texlive-latex-capt-of
7218 texlive-latex-cmap
7219 texlive-latex-environ
7220 texlive-latex-eqparbox
7221 texlive-latex-etoolbox
7222 texlive-latex-expdlist
7223 texlive-latex-fancyhdr
7224 texlive-latex-fancyvrb
7225 texlive-latex-fncychap
7226 texlive-latex-float
7227 texlive-latex-framed
7228 texlive-latex-geometry
7229 texlive-latex-graphics
7230 texlive-latex-hyperref
7231 texlive-latex-mdwtools
7232 texlive-latex-multirow
7233 texlive-latex-needspace
7234 texlive-latex-oberdiek
7235 texlive-latex-parskip
7236 texlive-latex-preview
7237 texlive-latex-tabulary
7238 texlive-latex-threeparttable
7239 texlive-latex-titlesec
7240 texlive-latex-trimspaces
7241 texlive-latex-ucs
7242 texlive-latex-upquote
7243 texlive-latex-url
7244 texlive-latex-varwidth
7245 texlive-latex-wrapfig)))
7246 ("texinfo" ,texinfo)))))
7247
7248 (define-public python-urwid
7249 (package
7250 (name "python-urwid")
7251 (version "2.1.0")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "urwid" version))
7256 (sha256
7257 (base32
7258 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7259 (build-system python-build-system)
7260 (home-page "http://urwid.org")
7261 (synopsis "Console user interface library for Python")
7262 (description
7263 "Urwid is a curses-based UI/widget library for Python. It includes many
7264 features useful for text console applications.")
7265 (license license:lgpl2.1+)))
7266
7267 (define-public python2-urwid
7268 (package-with-python2 python-urwid))
7269
7270 (define-public python-urwidtrees
7271 (package
7272 (name "python-urwidtrees")
7273 (version "1.0.2")
7274 (source
7275 (origin
7276 (method git-fetch)
7277 ;; package author intends on distributing via github rather than pypi:
7278 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7279 (uri (git-reference
7280 (url "https://github.com/pazz/urwidtrees")
7281 (commit version)))
7282 (file-name (git-file-name name version))
7283 (sha256
7284 (base32
7285 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7286 (build-system python-build-system)
7287 (arguments
7288 '(#:use-setuptools? #f
7289 #:tests? #f)) ; no tests
7290 (propagated-inputs `(("python-urwid" ,python-urwid)))
7291 (home-page "https://github.com/pazz/urwidtrees")
7292 (synopsis "Tree widgets for urwid")
7293 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7294 toolkit. Use it to build trees of widgets.")
7295 (license license:gpl3+)))
7296
7297 (define-public python2-urwidtrees
7298 (package-with-python2 python-urwidtrees))
7299
7300 (define-public python-ua-parser
7301 (package
7302 (name "python-ua-parser")
7303 (version "0.8.0")
7304 (source
7305 (origin
7306 (method url-fetch)
7307 (uri (pypi-uri "ua-parser" version))
7308 (sha256
7309 (base32
7310 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7311 (build-system python-build-system)
7312 (arguments
7313 `(#:tests? #f)) ;no test suite in release
7314 (native-inputs
7315 `(("python-pyyaml" ,python-pyyaml)))
7316 (home-page "https://github.com/ua-parser/uap-python")
7317 (synopsis "User agent parser")
7318 (description
7319 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7320 (license license:asl2.0)))
7321
7322 (define-public python2-ua-parser
7323 (package-with-python2 python-ua-parser))
7324
7325 (define-public python-user-agents
7326 (package
7327 (name "python-user-agents")
7328 (version "1.1.0")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "user-agents" version))
7333 (sha256
7334 (base32
7335 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7336 (build-system python-build-system)
7337 (arguments
7338 `(#:tests? #f)) ;missing devices.json test file in release
7339 (propagated-inputs
7340 `(("python-ua-parser" ,python-ua-parser)))
7341 (home-page "https://github.com/selwin/python-user-agents")
7342 (synopsis "User Agent strings parsing library")
7343 (description
7344 "A library to identify devices (phones, tablets) and their capabilities by
7345 parsing (browser/HTTP) user agent strings.")
7346 (license license:expat)))
7347
7348 (define-public python2-user-agents
7349 (package-with-python2 python-user-agents))
7350
7351 (define-public python-dbus
7352 (package
7353 (name "python-dbus")
7354 (version "1.2.16")
7355 (source
7356 (origin
7357 (method url-fetch)
7358 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7359 "dbus-python-" version ".tar.gz"))
7360 (sha256
7361 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7362 (build-system gnu-build-system)
7363 (native-inputs
7364 `(("pkg-config" ,pkg-config)))
7365 (inputs
7366 `(("python" ,python-wrapper)
7367 ("dbus-glib" ,dbus-glib)))
7368 (synopsis "Python bindings for D-bus")
7369 (description "python-dbus provides bindings for libdbus, the reference
7370 implementation of D-Bus.")
7371 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7372 (license license:expat)))
7373
7374 (define-public python2-dbus
7375 (package (inherit python-dbus)
7376 (name "python2-dbus")
7377 (inputs `(("python" ,python-2)
7378 ,@(alist-delete "python"
7379 (package-inputs python-dbus)
7380 equal?)))))
7381
7382 (define-public python-notify2
7383 (package
7384 (name "python-notify2")
7385 (version "0.3.1")
7386 (source
7387 (origin
7388 (method url-fetch)
7389 (uri (pypi-uri "notify2" version))
7390 (sha256
7391 (base32
7392 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7393 (build-system python-build-system)
7394 (arguments `(#:tests? #f)) ; tests depend on system state
7395 (native-inputs
7396 `(("python-dbus" ,python-dbus)))
7397 (home-page "https://bitbucket.org/takluyver/pynotify2")
7398 (synopsis "Python interface to D-Bus notifications")
7399 (description
7400 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7401 It is a reimplementation of pynotify in pure Python, and an alternative to
7402 the GObject Introspection bindings to libnotify for non-GTK applications.")
7403 (license (list license:bsd-2
7404 license:lgpl2.1+))))
7405
7406 (define-public python2-notify2
7407 (package-with-python2 python-notify2))
7408
7409 ;; beautifulsoup4 has a totally different namespace than 3.x,
7410 ;; and pypi seems to put it under its own name, so I guess we should too
7411 (define-public python-beautifulsoup4
7412 (package
7413 (name "python-beautifulsoup4")
7414 (version "4.9.1")
7415 (source
7416 (origin
7417 (method url-fetch)
7418 (uri (pypi-uri "beautifulsoup4" version))
7419 (sha256
7420 (base32
7421 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7422 (build-system python-build-system)
7423 (arguments
7424 `(#:phases
7425 (modify-phases %standard-phases
7426 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7427 ;; must use this conversion script when building with Python 3. The
7428 ;; conversion script also runs the tests.
7429 ;; For more information, see the file 'convert-py3k' in the source
7430 ;; distribution.
7431 (replace 'check
7432 (lambda _ (invoke "./convert-py3k"))))))
7433 (propagated-inputs
7434 `(("python-soupsieve" ,python-soupsieve)))
7435 (home-page
7436 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7437 (synopsis
7438 "Python screen-scraping library")
7439 (description
7440 "Beautiful Soup is a Python library designed for rapidly setting up
7441 screen-scraping projects. It offers Pythonic idioms for navigating,
7442 searching, and modifying a parse tree, providing a toolkit for
7443 dissecting a document and extracting what you need. It automatically
7444 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7445 (license license:expat)
7446 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7447
7448 (define-public python2-beautifulsoup4
7449 (package
7450 (inherit (package-with-python2
7451 (strip-python2-variant python-beautifulsoup4)))
7452 (arguments `(#:python ,python-2))))
7453
7454 (define-public python-soupsieve
7455 (package
7456 (name "python-soupsieve")
7457 (version "2.0.1")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "soupsieve" version))
7462 (sha256
7463 (base32
7464 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7465 (build-system python-build-system)
7466 (arguments `(#:tests? #f))
7467 ;;XXX: 2 tests fail currently despite claming they were to be
7468 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7469 ;;don't want to create a circular dependency.
7470 (home-page "https://github.com/facelessuser/soupsieve")
7471 (synopsis "CSS selector library")
7472 (description
7473 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7474 Soup 4. It aims to provide selecting, matching, and filtering using modern
7475 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7476 specifications up through the latest CSS level 4 drafts and beyond (though
7477 some are not yet implemented).")
7478 (properties `((python2-variant . ,(delay python2-soupsieve))))
7479 (license license:expat)))
7480
7481 ;; This is the last version that supports python-2
7482 (define-public python2-soupsieve
7483 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7484 (package
7485 (inherit base)
7486 (version "1.9.6")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "soupsieve" version))
7491 (sha256
7492 (base32
7493 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7494 (propagated-inputs
7495 `(("python2-backports-functools-lru-cache"
7496 ,python2-backports-functools-lru-cache)
7497 ,@(package-propagated-inputs base))))))
7498
7499 (define-public python-netifaces
7500 (package
7501 (name "python-netifaces")
7502 (version "0.10.9")
7503 (source
7504 (origin
7505 (method url-fetch)
7506 (uri (pypi-uri "netifaces" version))
7507 (sha256
7508 (base32
7509 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7510 (build-system python-build-system)
7511 (home-page "https://github.com/al45tair/netifaces")
7512 (synopsis
7513 "Python module for portable network interface information")
7514 (description
7515 "Netifaces is a Python module providing information on network
7516 interfaces in an easy and portable manner.")
7517 (license license:expat)))
7518
7519 (define-public python2-netifaces
7520 (package-with-python2 python-netifaces))
7521
7522 (define-public python-networkx
7523 (package
7524 (name "python-networkx")
7525 (version "2.5")
7526 (source
7527 (origin
7528 (method url-fetch)
7529 (uri (pypi-uri "networkx" version))
7530 (sha256
7531 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7532 (build-system python-build-system)
7533 (arguments
7534 '(#:phases (modify-phases %standard-phases
7535 (replace 'check
7536 (lambda* (#:key tests? #:allow-other-keys)
7537 (if tests?
7538 (invoke "pytest" "-vv" "--pyargs" "networkx")
7539 (format #t "test suite not run~%"))
7540 #t)))))
7541 ;; python-decorator is needed at runtime.
7542 (propagated-inputs
7543 `(("python-decorator" ,python-decorator)))
7544 (native-inputs
7545 `(("python-pytest" ,python-pytest)))
7546 (home-page "https://networkx.github.io/")
7547 (synopsis "Python module for creating and manipulating graphs and networks")
7548 (description
7549 "NetworkX is a Python package for the creation, manipulation, and study
7550 of the structure, dynamics, and functions of complex networks.")
7551 (properties `((python2-variant . ,(delay python2-networkx))))
7552 (license license:bsd-3)))
7553
7554 ;; NetworkX 2.2 is the last version with support for Python 2.
7555 (define-public python2-networkx
7556 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7557 (package
7558 (inherit base)
7559 (version "2.2")
7560 (source (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "networkx" version ".zip"))
7563 (sha256
7564 (base32
7565 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7566 (arguments
7567 `(#:python ,python-2))
7568 (native-inputs
7569 `(("python-nose" ,python2-nose)
7570 ("unzip" ,unzip))))))
7571
7572 (define-public python-datrie
7573 (package
7574 (name "python-datrie")
7575 (version "0.8.2")
7576 (source
7577 (origin
7578 (method url-fetch)
7579 (uri (pypi-uri "datrie" version))
7580 (sha256
7581 (base32
7582 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7583 (build-system python-build-system)
7584 (native-inputs
7585 `(("python-cython" ,python-cython)
7586 ("python-hypothesis" ,python-hypothesis)
7587 ("python-pytest" ,python-pytest)
7588 ("python-pytest-runner" ,python-pytest-runner)))
7589 (home-page "https://github.com/kmike/datrie")
7590 (synopsis "Fast, efficiently stored trie for Python")
7591 (description
7592 "This package provides a fast, efficiently stored trie implementation for
7593 Python.")
7594 (license license:lgpl2.1+)))
7595
7596 (define-public snakemake
7597 (package
7598 (name "snakemake")
7599 (version "5.7.1")
7600 (source
7601 (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "snakemake" version))
7604 (sha256
7605 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7606 (build-system python-build-system)
7607 (arguments
7608 ;; TODO: Package missing test dependencies.
7609 '(#:tests? #f
7610 #:phases
7611 (modify-phases %standard-phases
7612 ;; For cluster execution Snakemake will call Python. Since there is
7613 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7614 ;; this by calling the snakemake wrapper instead.
7615 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7616 (lambda* (#:key outputs #:allow-other-keys)
7617 (substitute* "snakemake/executors.py"
7618 (("\\{sys.executable\\} -m snakemake")
7619 (string-append (assoc-ref outputs "out")
7620 "/bin/snakemake")))
7621 #t)))))
7622 (propagated-inputs
7623 `(("python-appdirs" ,python-appdirs)
7624 ("python-configargparse" ,python-configargparse)
7625 ("python-datrie" ,python-datrie)
7626 ("python-docutils" ,python-docutils)
7627 ("python-gitpython" ,python-gitpython)
7628 ("python-jinja2" ,python-jinja2)
7629 ("python-jsonschema" ,python-jsonschema)
7630 ("python-networkx" ,python-networkx)
7631 ("python-psutil" ,python-psutil)
7632 ("python-pyyaml" ,python-pyyaml)
7633 ("python-ratelimiter" ,python-ratelimiter)
7634 ("python-requests" ,python-requests)
7635 ("python-wrapt" ,python-wrapt)))
7636 (home-page "https://snakemake.readthedocs.io")
7637 (synopsis "Python-based execution environment for make-like workflows")
7638 (description
7639 "Snakemake aims to reduce the complexity of creating workflows by
7640 providing a clean and modern domain specific specification language (DSL) in
7641 Python style, together with a fast and comfortable execution environment.")
7642 (license license:expat)))
7643
7644 (define-public python-pyqrcode
7645 (package
7646 (name "python-pyqrcode")
7647 (version "1.2.1")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "PyQRCode" version))
7652 (sha256
7653 (base32
7654 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7655 (build-system python-build-system)
7656 (home-page
7657 "https://github.com/mnooner256/pyqrcode")
7658 (synopsis "QR code generator")
7659 (description
7660 "Pyqrcode is a QR code generator written purely in Python with
7661 SVG, EPS, PNG and terminal output.")
7662 (license license:bsd-3)))
7663
7664 (define-public python-seaborn
7665 (package
7666 (name "python-seaborn")
7667 (version "0.10.0")
7668 (source
7669 (origin
7670 (method url-fetch)
7671 (uri (pypi-uri "seaborn" version))
7672 (sha256
7673 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7674 (build-system python-build-system)
7675 (arguments
7676 `(#:phases
7677 (modify-phases %standard-phases
7678 (add-before 'check 'start-xserver
7679 (lambda* (#:key inputs #:allow-other-keys)
7680 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7681 ;; There must be a running X server and make check doesn't
7682 ;; start one. Therefore we must do it.
7683 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7684 (setenv "DISPLAY" ":1")
7685 #t)))
7686 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7687 (propagated-inputs
7688 `(("python-pandas" ,python-pandas)
7689 ("python-matplotlib" ,python-matplotlib)
7690 ("python-numpy" ,python-numpy)
7691 ("python-scipy" ,python-scipy)))
7692 (native-inputs
7693 `(("python-pytest" ,python-pytest)
7694 ("xorg-server" ,xorg-server-for-tests)))
7695 (home-page "https://seaborn.pydata.org/")
7696 (synopsis "Statistical data visualization")
7697 (description
7698 "Seaborn is a library for making attractive and informative statistical
7699 graphics in Python. It is built on top of matplotlib and tightly integrated
7700 with the PyData stack, including support for numpy and pandas data structures
7701 and statistical routines from scipy and statsmodels.")
7702 (properties `((python2-variant . ,(delay python2-seaborn))))
7703 (license license:bsd-3)))
7704
7705 ;; 0.9.1 is the last release with support for Python 2.
7706 (define-public python2-seaborn
7707 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7708 (package
7709 (inherit base)
7710 (version "0.9.1")
7711 (source (origin
7712 (method url-fetch)
7713 (uri (pypi-uri "seaborn" version))
7714 (sha256
7715 (base32
7716 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7717
7718 (define-public python-mpmath
7719 (package
7720 (name "python-mpmath")
7721 (version "1.1.0")
7722 (source (origin
7723 (method url-fetch)
7724 (uri (pypi-uri "mpmath" version))
7725 (file-name (git-file-name name version))
7726 (sha256
7727 (base32
7728 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7729 (build-system python-build-system)
7730 (native-inputs
7731 `(("python-pytest" ,python-pytest)))
7732 (arguments
7733 '(#:phases
7734 (modify-phases %standard-phases
7735 (replace 'check
7736 (lambda _
7737 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7738 (home-page "http://mpmath.org")
7739 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7740 (description
7741 "@code{mpmath} can be used as an arbitrary-precision substitute for
7742 Python's float/complex types and math/cmath modules, but also does much
7743 more advanced mathematics.")
7744 (license license:bsd-3)))
7745
7746 (define-public python2-mpmath
7747 (package-with-python2 python-mpmath))
7748
7749 (define-public python-bigfloat
7750 (package
7751 (name "python-bigfloat")
7752 (version "0.3.0")
7753 (source
7754 (origin
7755 (method url-fetch)
7756 (uri (pypi-uri "bigfloat" version))
7757 (sha256
7758 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7759 (build-system python-build-system)
7760 (inputs
7761 `(("mpfr" ,mpfr)))
7762 (home-page "https://github.com/mdickinson/bigfloat")
7763 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7764 (description
7765 "This package provides a Python interface to the MPFR library for
7766 multiprecision arithmetic.")
7767 (license license:lgpl3+)))
7768
7769 (define-public python2-bigfloat
7770 (package-with-python2 python-bigfloat))
7771
7772 (define-public python-sympy
7773 (package
7774 (name "python-sympy")
7775 (version "1.6.2")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "sympy" version))
7780 (sha256
7781 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7782 (build-system python-build-system)
7783 (arguments
7784 `(#:phases
7785 (modify-phases %standard-phases
7786 (replace 'check
7787 (lambda* (#:key outputs #:allow-other-keys)
7788 (invoke
7789 (or (which "python3") (which "python"))
7790 "-c" "import sympy; sympy.test(\"/core\")"))))))
7791 (propagated-inputs
7792 `(("python-mpmath" ,python-mpmath)))
7793 (home-page "https://www.sympy.org/")
7794 (synopsis "Python library for symbolic mathematics")
7795 (description
7796 "SymPy is a Python library for symbolic mathematics. It aims to become a
7797 full-featured computer algebra system (CAS) while keeping the code as simple
7798 as possible in order to be comprehensible and easily extensible.")
7799 (license license:bsd-3)))
7800
7801 (define-public python2-sympy
7802 (package
7803 (inherit (package-with-python2 python-sympy))
7804 (version "1.5.1") ; last release for python2
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "sympy" version))
7809 (sha256
7810 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7811
7812 (define-public python-q
7813 (package
7814 (name "python-q")
7815 (version "2.6")
7816 (source
7817 (origin
7818 (method url-fetch)
7819 (uri (pypi-uri "q" version))
7820 (sha256
7821 (base32
7822 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7823 (build-system python-build-system)
7824 (home-page "https://github.com/zestyping/q")
7825 (synopsis "Quick-and-dirty debugging output for tired programmers")
7826 (description
7827 "q is a Python module for \"print\" style of debugging Python code. It
7828 provides convenient short API for print out of values, tracebacks, and
7829 falling into the Python interpreter.")
7830 (license license:asl2.0)))
7831
7832 (define-public python2-q
7833 (package-with-python2 python-q))
7834
7835 (define-public python-xlib
7836 (package
7837 (name "python-xlib")
7838 (version "0.27")
7839 (source
7840 (origin
7841 (method git-fetch)
7842 (uri (git-reference
7843 (url "https://github.com/python-xlib/python-xlib")
7844 (commit version)))
7845 (file-name (git-file-name name version))
7846 (sha256
7847 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7848 (build-system python-build-system)
7849 (arguments
7850 `(#:phases
7851 (modify-phases %standard-phases
7852 (add-before 'check 'start-xserver
7853 (lambda* (#:key inputs #:allow-other-keys)
7854 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7855 ;; There must be a running X server and make check doesn't
7856 ;; start one. Therefore we must do it.
7857 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7858 (setenv "DISPLAY" ":1")
7859 #t))))))
7860 (native-inputs
7861 `(("python-mock" ,python-mock)
7862 ("python-setuptools-scm" ,python-setuptools-scm)
7863 ("python-six" ,python-six)
7864 ("xorg-server" ,xorg-server)))
7865 (home-page "https://github.com/python-xlib/python-xlib")
7866 (synopsis "Python X11 client library")
7867 (description
7868 "The Python X Library is intended to be a fully functional
7869 X client library for Python programs. It is useful to implement
7870 low-level X clients. It is written entirely in Python.")
7871 (license license:gpl2+)))
7872
7873 (define-public python2-xlib
7874 (package-with-python2 python-xlib))
7875
7876 (define-public python-singledispatch
7877 (package
7878 (name "python-singledispatch")
7879 (version "3.4.0.3")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "singledispatch" version))
7884 (sha256
7885 (base32
7886 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7887 (build-system python-build-system)
7888 (native-inputs
7889 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7890 (home-page
7891 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7892 (synopsis "Backport of singledispatch feature from Python 3.4")
7893 (description
7894 "This library brings functools.singledispatch from Python 3.4 to Python
7895 2.6-3.3.")
7896 (license license:expat)))
7897
7898 (define-public python2-singledispatch
7899 (package-with-python2 python-singledispatch))
7900
7901 ;; the python- version can be removed with python-3.5
7902 (define-public python-backports-abc
7903 (package
7904 (name "python-backports-abc")
7905 (version "0.5")
7906 (source
7907 (origin
7908 (method url-fetch)
7909 (uri (pypi-uri "backports_abc" version))
7910 (sha256
7911 (base32
7912 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7913 (build-system python-build-system)
7914 (home-page "https://github.com/cython/backports_abc")
7915 (synopsis "Backport of additions to the 'collections.abc' module")
7916 (description
7917 "Python-backports-abc provides a backport of additions to the
7918 @code{collections.abc} module in Python-3.5.")
7919 (license license:psfl)))
7920
7921 (define-public python2-backports-abc
7922 (package-with-python2 python-backports-abc))
7923
7924 (define-public python-backports-csv
7925 (package
7926 (name "python-backports-csv")
7927 (version "1.0.7")
7928 (source
7929 (origin
7930 (method url-fetch)
7931 (uri (pypi-uri "backports.csv" version))
7932 (sha256
7933 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7934 (build-system python-build-system)
7935 (home-page "https://github.com/ryanhiebert/backports.csv")
7936 (synopsis "Backport of Python 3's csv module for Python 2")
7937 (description
7938 "Provides a backport of Python 3's @code{csv} module for parsing
7939 comma separated values. The API of the @code{csv} module in Python 2
7940 is drastically different from the @code{csv} module in Python 3.
7941 This is due, for the most part, to the difference between str in
7942 Python 2 and Python 3.")
7943 (license license:psfl)))
7944
7945 (define-public python2-backports-csv
7946 (package-with-python2 python-backports-csv))
7947
7948 (define-public python2-backports-shutil-get-terminal-size
7949 (package
7950 (name "python2-backports-shutil-get-terminal-size")
7951 (version "1.0.0")
7952 (source
7953 (origin
7954 (method url-fetch)
7955 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7956 (sha256
7957 (base32
7958 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7959 (build-system python-build-system)
7960 (arguments
7961 `(#:python ,python-2
7962 #:phases
7963 (modify-phases %standard-phases
7964 (replace 'check
7965 (lambda _
7966 (setenv "PYTHONPATH" (string-append "./build/lib:"
7967 (getenv "PYTHONPATH")))
7968 (invoke "py.test" "-v"))))))
7969 (native-inputs
7970 `(("python2-pytest" ,python2-pytest)))
7971 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7972 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7973 (description
7974 "This package provides a backport of the @code{get_terminal_size
7975 function} from Python 3.3's @code{shutil}.
7976 Unlike the original version it is written in pure Python rather than C,
7977 so it might be a tiny bit slower.")
7978 (license license:expat)))
7979
7980 (define-public python-waf
7981 (package
7982 (name "python-waf")
7983 (version "2.0.19")
7984 (source (origin
7985 (method url-fetch)
7986 (uri (string-append "https://waf.io/"
7987 "waf-" version ".tar.bz2"))
7988 (sha256
7989 (base32
7990 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7991 (build-system python-build-system)
7992 (arguments
7993 '(#:phases
7994 (modify-phases %standard-phases
7995 (replace 'build
7996 (lambda _
7997 ;; XXX: Find a way to add all extra tools.
7998 (let ((tools '("gccdeps"
7999 "clang_compilation_database")))
8000 (invoke "python" "waf-light" "configure" "build"
8001 (string-append "--tools="
8002 (string-join tools ","))))))
8003 (replace 'check
8004 (lambda _
8005 (invoke "python" "waf" "--version")))
8006 (replace 'install
8007 (lambda* (#:key outputs #:allow-other-keys)
8008 (let ((out (assoc-ref outputs "out")))
8009 (install-file "waf" (string-append out "/bin")))
8010 #t))
8011 ;; waf breaks when it is wrapped.
8012 (delete 'wrap))))
8013 (home-page "https://waf.io/")
8014 (synopsis "Python-based build system")
8015 (description
8016 "Waf is a Python-based framework for configuring, compiling and installing
8017 applications.")
8018 (license license:bsd-3)))
8019
8020 (define-public python2-waf
8021 (package-with-python2 python-waf))
8022
8023 (define-public python-pyzmq
8024 (package
8025 (name "python-pyzmq")
8026 (version "17.1.2")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "pyzmq" version))
8031 (sha256
8032 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8033 (build-system python-build-system)
8034 (arguments
8035 `(#:configure-flags
8036 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8037 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8038 ;; --inplace' for 'python setup.py test' to work.
8039 #:tests? #f))
8040 (inputs
8041 `(("zeromq" ,zeromq)))
8042 (native-inputs
8043 `(("pkg-config" ,pkg-config)
8044 ("python-nose" ,python-nose)))
8045 (home-page "https://github.com/zeromq/pyzmq")
8046 (synopsis "Python bindings for 0MQ")
8047 (description
8048 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8049 (license license:bsd-4)))
8050
8051 (define-public python2-pyzmq
8052 (package-with-python2 python-pyzmq))
8053
8054 (define-public python-pep8
8055 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8056 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8057 ;; some dependents' test suites, and nothing more.
8058 (package
8059 (name "python-pep8")
8060 (version "1.7.0")
8061 (source
8062 (origin
8063 (method url-fetch)
8064 (uri (pypi-uri "pep8" version))
8065 (sha256
8066 (base32
8067 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8068 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8069 (build-system python-build-system)
8070 (home-page "https://pep8.readthedocs.org/")
8071 (synopsis "Python style guide checker")
8072 (description
8073 "This tools checks Python code against some of the style conventions in
8074 PEP 8.")
8075 (license license:expat)))
8076
8077 (define-public python2-pep8
8078 (package-with-python2 python-pep8))
8079
8080 (define-public python-pep517
8081 (package
8082 (name "python-pep517")
8083 (version "0.8.2")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "pep517" version))
8088 (sha256
8089 (base32
8090 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8091 (build-system python-build-system)
8092 (arguments
8093 '(#:phases
8094 (modify-phases %standard-phases
8095 (replace 'check
8096 (lambda* (#:key tests? #:allow-other-keys)
8097 (delete-file "pytest.ini")
8098 ;; This test tries to connect to the internet
8099 (delete-file "tests/test_meta.py")
8100 (if tests?
8101 (invoke "pytest")
8102 #t))))))
8103 (native-inputs
8104 `(("python-mock" ,python-mock)
8105 ("python-pytest" ,python-pytest)
8106 ("python-testpath" ,python-testpath)))
8107 (propagated-inputs
8108 `(("python-toml" ,python-toml)
8109 ("python-wheel" ,python-wheel)))
8110 (home-page "https://github.com/pypa/pep517")
8111 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8112 (description
8113 "Wrappers to build Python packages using PEP 517 hooks.")
8114 (properties `((python2-variant . ,(delay python2-pep517))))
8115 (license license:expat)))
8116
8117 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8118 (define-public python2-pep517
8119 (let ((base (package-with-python2
8120 (strip-python2-variant python-pep517))))
8121 (package
8122 (inherit base)
8123 (name "python2-pep517")
8124 (arguments
8125 `(#:tests? #f
8126 ,@(package-arguments base)))
8127 (native-inputs `()))))
8128
8129 (define-public python-pyflakes
8130 (package
8131 (name "python-pyflakes")
8132 (version "2.2.0")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "pyflakes" version))
8137 (sha256
8138 (base32
8139 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8140 (build-system python-build-system)
8141 (home-page
8142 "https://github.com/pyflakes/pyflakes")
8143 (synopsis "Passive checker of Python programs")
8144 (description
8145 "Pyflakes statically checks Python source code for common errors.")
8146 (license license:expat)))
8147
8148 (define-public python2-pyflakes
8149 (package-with-python2 python-pyflakes))
8150
8151 ;; Flake8 2.6 requires an older version of pyflakes.
8152 ;; This should be removed ASAP.
8153 (define-public python-pyflakes-1.2
8154 (package (inherit python-pyflakes)
8155 (version "1.2.3")
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "pyflakes" version))
8160 (sha256
8161 (base32
8162 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
8163 (arguments
8164 '(#:phases
8165 (modify-phases %standard-phases
8166 ;; This one test fails.
8167 (replace 'check
8168 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
8169 (native-inputs
8170 `(("python-pytest" ,python-pytest)))))
8171
8172 (define-public python-mccabe
8173 (package
8174 (name "python-mccabe")
8175 (version "0.6.1")
8176 (source
8177 (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "mccabe" version))
8180 (sha256
8181 (base32
8182 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8183 (build-system python-build-system)
8184 (native-inputs
8185 `(("python-pytest" ,python-pytest-bootstrap)
8186 ("python-pytest-runner" ,python-pytest-runner)))
8187 (home-page "https://github.com/flintwork/mccabe")
8188 (synopsis "McCabe checker, plugin for flake8")
8189 (description
8190 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8191 complexity of Python source code.")
8192 (license license:expat)))
8193
8194 (define-public python2-mccabe
8195 (package-with-python2 python-mccabe))
8196
8197 (define-public python-mccabe-0.2.1
8198 (package (inherit python-mccabe)
8199 (version "0.2.1")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "mccabe" version))
8204 (sha256
8205 (base32
8206 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8207
8208 (define-public python2-mccabe-0.2.1
8209 (package-with-python2 python-mccabe-0.2.1))
8210
8211 ;; Flake8 2.4.1 requires an older version of pep8.
8212 ;; This should be removed ASAP.
8213 (define-public python-pep8-1.5.7
8214 (package (inherit python-pep8)
8215 (version "1.5.7")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "pep8" version))
8220 (sha256
8221 (base32
8222 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8223 (arguments
8224 ;; XXX Tests not compatible with Python 3.5.
8225 '(#:tests? #f))))
8226
8227 (define-public python2-pep8-1.5.7
8228 (package-with-python2 python-pep8-1.5.7))
8229
8230 (define-public python-flake8
8231 (package
8232 (name "python-flake8")
8233 (version "3.8.4")
8234 (source (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "flake8" version))
8237 (sha256
8238 (base32
8239 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8240 (build-system python-build-system)
8241 (arguments
8242 `(#:phases
8243 (modify-phases %standard-phases
8244 (delete 'check)
8245 (add-after 'install 'check
8246 (lambda* (#:key inputs outputs #:allow-other-keys)
8247 (add-installed-pythonpath inputs outputs)
8248 (invoke "pytest" "-v")
8249 #t)))))
8250 (propagated-inputs
8251 `(("python-pycodestyle" ,python-pycodestyle)
8252 ("python-entrypoints" ,python-entrypoints)
8253 ("python-pyflakes" ,python-pyflakes)
8254 ("python-mccabe" ,python-mccabe)))
8255 (native-inputs
8256 `(("python-mock" ,python-mock)
8257 ("python-pytest" ,python-pytest-bootstrap)))
8258 (home-page "https://gitlab.com/pycqa/flake8")
8259 (synopsis
8260 "The modular source code checker: pep8, pyflakes and co")
8261 (description
8262 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8263 (properties `((python2-variant . ,(delay python2-flake8))))
8264 (license license:expat)))
8265
8266 (define-public python2-flake8
8267 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8268 (package (inherit base)
8269 (propagated-inputs
8270 `(("python2-configparser" ,python2-configparser)
8271 ("python2-enum34" ,python2-enum34)
8272 ("python2-functools32" ,python2-functools32)
8273 ("python2-typing" ,python2-typing)
8274 ,@(package-propagated-inputs base))))))
8275
8276 ;; python-hacking requires flake8 <2.7.0.
8277 (define-public python-flake8-2.6
8278 (package
8279 (inherit python-flake8)
8280 (version "2.6.2")
8281 (source (origin
8282 (method url-fetch)
8283 (uri (pypi-uri "flake8" version))
8284 (sha256
8285 (base32
8286 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8287 (arguments
8288 `(#:phases
8289 (modify-phases %standard-phases
8290 (add-after 'unpack 'use-later-pycodestyles
8291 (lambda __
8292 (substitute* '("flake8.egg-info/requires.txt"
8293 "setup.py")
8294 (("pycodestyle >= 2.0, < 2.1")
8295 "pycodestyle >= 2.0"))
8296 #t))
8297 (delete 'check)
8298 (add-after 'install 'check
8299 (lambda* (#:key inputs outputs #:allow-other-keys)
8300 (add-installed-pythonpath inputs outputs)
8301 (invoke "pytest" "-v")
8302 #t)))))
8303 (propagated-inputs
8304 `(("python-pep8" ,python-pep8)
8305 ("python-pycodestyle" ,python-pycodestyle)
8306 ("python-entrypoints" ,python-entrypoints)
8307 ("python-pyflakes" ,python-pyflakes-1.2)
8308 ("python-mccabe" ,python-mccabe)))))
8309
8310 (define-public python-flake8-bugbear
8311 (package
8312 (name "python-flake8-bugbear")
8313 (version "20.1.4")
8314 (source
8315 (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "flake8-bugbear" version))
8318 (sha256
8319 (base32
8320 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8321 (build-system python-build-system)
8322 (arguments
8323 '(#:phases
8324 (modify-phases %standard-phases
8325 (add-before 'check 'disable-test
8326 (lambda _
8327 ;; This test fails on slow computers.
8328 (substitute* "tests/test_bugbear.py"
8329 (("def test_does_not_crash_on_any_valid_code")
8330 "def _test_does_not_crash_on_any_valid_code")))))))
8331 (native-inputs
8332 `(("python-hypothesis" ,python-hypothesis)
8333 ("python-hypothesmith" ,python-hypothesmith)))
8334 (propagated-inputs
8335 `(("python-attrs" ,python-attrs)
8336 ("python-flake8" ,python-flake8)))
8337 (home-page "https://github.com/PyCQA/flake8-bugbear")
8338 (synopsis
8339 "Flake8 plugin for finding likely bugs and design problems in your program")
8340 (description
8341 "This package contains a plugin for Flake8 finding likely bugs and
8342 design problems in your program. It contains warnings that don't belong
8343 in pyflakes and pycodestyle.")
8344 (license license:expat)))
8345
8346 (define-public python-flake8-polyfill
8347 (package
8348 (name "python-flake8-polyfill")
8349 (version "1.0.2")
8350 (source
8351 (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "flake8-polyfill" version))
8354 (sha256
8355 (base32
8356 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8357 (build-system python-build-system)
8358 (arguments
8359 '(#:phases
8360 (modify-phases %standard-phases
8361 (replace 'check
8362 (lambda _
8363 ;; Be compatible with Pytest 4:
8364 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8365 (substitute* "setup.cfg"
8366 (("\\[pytest\\]")
8367 "[tool:pytest]"))
8368
8369 (setenv "PYTHONPATH"
8370 (string-append (getcwd) "/build/lib:"
8371 (getenv "PYTHONPATH")))
8372 (invoke "py.test" "-v"))))))
8373 (native-inputs
8374 `(("python-flake8" ,python-flake8)
8375 ("python-mock" ,python-mock)
8376 ("python-pep8" ,python-pep8)
8377 ("python-pycodestyle" ,python-pycodestyle)
8378 ("python-pytest" ,python-pytest)))
8379 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8380 (synopsis "Polyfill package for Flake8 plugins")
8381 (description
8382 "This package that provides some compatibility helpers for Flake8
8383 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8384 (license license:expat)))
8385
8386 (define-public python2-flake8-polyfill
8387 (package-with-python2 python-flake8-polyfill))
8388
8389 (define-public python-flake8-pyi
8390 (package
8391 (name "python-flake8-pyi")
8392 (version "20.5.0")
8393 (source
8394 (origin
8395 (method url-fetch)
8396 (uri (pypi-uri "flake8-pyi" version))
8397 (sha256
8398 (base32
8399 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8400 (build-system python-build-system)
8401 (propagated-inputs
8402 `(("python-attrs" ,python-attrs)
8403 ("python-flake8" ,python-flake8)
8404 ("python-pyflakes" ,python-pyflakes)))
8405 (home-page "https://github.com/ambv/flake8-pyi")
8406 (synopsis
8407 "Flake8 plugin that provides specializations for type hinting stub files")
8408 (description
8409 "This package contains a plugin that provides specializations for
8410 type hinting stub files, especially interesting for linting typeshed. It
8411 adds the @file{.pyi} extension to the default value of the @code{--filename}
8412 command-line argument to Flake8. This means stubs are linted by default with
8413 this plugin enabled, without needing to explicitly list every file. It
8414 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8415 expressions after the entire file has been read. This enables support for
8416 first-class forward references that stub files use.")
8417 (license license:expat)))
8418
8419 (define-public python-flake8-pie
8420 (package
8421 (name "python-flake8-pie")
8422 (version "0.5.0")
8423 (source
8424 (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "flake8-pie" version))
8427 (sha256
8428 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8429 (build-system python-build-system)
8430 (home-page "https://github.com/sbdchd/flake8-pie")
8431 (synopsis "Flake8 extension that implements lints")
8432 (description
8433 "This package provides a flake8 extension that implements miscellaneous
8434 lints.")
8435 (license license:bsd-2)))
8436
8437 (define-public python-autoflake
8438 (package
8439 (name "python-autoflake")
8440 (version "1.3.1")
8441 (source
8442 (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "autoflake" version))
8445 (sha256
8446 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8447 (build-system python-build-system)
8448 (propagated-inputs
8449 `(("python-pyflakes" ,python-pyflakes)))
8450 (home-page "https://github.com/myint/autoflake")
8451 (synopsis "Removes unused imports and unused variables")
8452 (description
8453 "@code{autoflake} removes unused imports and unused variables from Python
8454 code as reported by @code{pyflakes}.
8455
8456 By default, it only removes unused imports for modules that are part of the
8457 standard library. Removal of unused variables is also disabled by default.
8458 It also removes useless @code{pass} statements.")
8459 (license license:expat)))
8460
8461 (define-public python-mistune
8462 (package
8463 (name "python-mistune")
8464 (version "0.8.4")
8465 (source
8466 (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "mistune" version))
8469 (sha256
8470 (base32
8471 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8472 (build-system python-build-system)
8473 (native-inputs
8474 `(("python-nose" ,python-nose)
8475 ("python-cython" ,python-cython)))
8476 (home-page "https://github.com/lepture/mistune")
8477 (synopsis "Markdown parser in pure Python")
8478 (description "This package provides a fast markdown parser in pure
8479 Python.")
8480 (license license:bsd-3)))
8481
8482 (define-public python2-mistune
8483 (package-with-python2 python-mistune))
8484
8485 (define-public python-markdown
8486 (package
8487 (name "python-markdown")
8488 (version "3.2.1")
8489 (source
8490 (origin
8491 (method url-fetch)
8492 (uri (pypi-uri "Markdown" version))
8493 (sha256
8494 (base32
8495 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8496 (build-system python-build-system)
8497 (native-inputs
8498 `(("python-nose" ,python-nose)
8499 ("python-pyyaml" ,python-pyyaml)))
8500 (home-page "https://python-markdown.github.io/")
8501 (synopsis "Python implementation of Markdown")
8502 (description
8503 "This package provides a Python implementation of John Gruber's
8504 Markdown. The library features international input, various Markdown
8505 extensions, and several HTML output formats. A command line wrapper
8506 markdown_py is also provided to convert Markdown files to HTML.")
8507 (properties `((python2-variant . ,(delay python2-markdown))))
8508 (license license:bsd-3)))
8509
8510 ;; Markdown 3.2 dropped support for Python 2.
8511 (define-public python2-markdown
8512 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8513 (package/inherit
8514 base
8515 (version "3.1.1")
8516 (source (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "Markdown" version))
8519 (sha256
8520 (base32
8521 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8522
8523 (define-public python-ptyprocess
8524 (package
8525 (name "python-ptyprocess")
8526 (version "0.5.2")
8527 (source
8528 (origin
8529 (method url-fetch)
8530 (uri (pypi-uri "ptyprocess" version))
8531 (sha256
8532 (base32
8533 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8534 (build-system python-build-system)
8535 (native-inputs
8536 `(("python-nose" ,python-nose)))
8537 (arguments
8538 `(#:phases
8539 (modify-phases %standard-phases
8540 (replace 'check
8541 (lambda _ (invoke "nosetests"))))))
8542 (home-page "https://github.com/pexpect/ptyprocess")
8543 (synopsis "Run a subprocess in a pseudo terminal")
8544 (description
8545 "This package provides a Python library used to launch a subprocess in a
8546 pseudo terminal (pty), and interact with both the process and its pty.")
8547 (license license:isc)))
8548
8549 (define-public python2-ptyprocess
8550 (package-with-python2 python-ptyprocess))
8551
8552 (define-public python-cram
8553 (package
8554 (name "python-cram")
8555 (version "0.7")
8556 (home-page "https://bitheap.org/cram/")
8557 (source (origin
8558 (method url-fetch)
8559 (uri (list (string-append home-page "cram-"
8560 version ".tar.gz")
8561 (pypi-uri "cram" version)))
8562 (sha256
8563 (base32
8564 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8565 (arguments
8566 '(#:phases
8567 (modify-phases %standard-phases
8568 (add-after 'unpack 'patch-source
8569 (lambda _
8570 (substitute* (find-files "cram" ".*\\.py$")
8571 ;; Replace default shell path.
8572 (("/bin/sh") (which "sh")))
8573 (substitute* (find-files "tests" ".*\\.t$")
8574 (("md5") "md5sum")
8575 (("/bin/bash") (which "bash"))
8576 (("/bin/sh") (which "sh")))
8577 (substitute* "cram/_test.py"
8578 ;; This hack works around a bug triggered by substituting
8579 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8580 ;; "cram -h", which breaks the output at 80 characters. This
8581 ;; causes the line showing the default shell to break into two
8582 ;; lines, but the test expects a single line...
8583 (("env\\['COLUMNS'\\] = '80'")
8584 "env['COLUMNS'] = '160'"))
8585
8586 (substitute* "Makefile"
8587 ;; Recent versions of python-coverage have caused the test
8588 ;; coverage to decrease (as of version 0.7). Allow that.
8589 (("--fail-under=100")
8590 "--fail-under=90"))
8591
8592 #t))
8593 (replace 'check
8594 ;; The test phase uses the built library and executable.
8595 (lambda* (#:key inputs outputs #:allow-other-keys)
8596 (add-installed-pythonpath inputs outputs)
8597 (setenv "PATH" (string-append (getenv "PATH") ":"
8598 (assoc-ref outputs "out") "/bin"))
8599 (invoke "make" "test"))))))
8600 (build-system python-build-system)
8601 (native-inputs
8602 `(("python-coverage" ,python-coverage)
8603 ("which" ,which)))
8604 (synopsis "Simple testing framework for command line applications")
8605 (description
8606 "Cram is a functional testing framework for command line applications.
8607 Cram tests look like snippets of interactive shell sessions. Cram runs each
8608 command and compares the command output in the test with the command’s actual
8609 output.")
8610 (license license:gpl2+)))
8611
8612 (define-public python2-cram
8613 (package-with-python2 python-cram))
8614
8615 (define-public python-crashtest
8616 (package
8617 (name "python-crashtest")
8618 (version "0.3.1")
8619 (source
8620 (origin
8621 (method url-fetch)
8622 (uri (pypi-uri "crashtest" version))
8623 (sha256
8624 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8625 (build-system python-build-system)
8626 (home-page "https://github.com/sdispater/crashtest")
8627 (synopsis "Manage Python errors with ease")
8628 (description
8629 "Python library that makes exceptions handling and inspection easier.")
8630 (license license:expat)))
8631
8632 (define-public python-straight-plugin
8633 (package
8634 (name "python-straight-plugin")
8635 (version "1.4.1")
8636 (source
8637 (origin
8638 (method url-fetch)
8639 (uri (pypi-uri "straight.plugin" version))
8640 (sha256
8641 (base32
8642 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8643 (build-system python-build-system)
8644 (home-page "https://github.com/ironfroggy/straight.plugin")
8645 (synopsis "Simple namespaced plugin facility")
8646 (description "Straight Plugin provides a type of plugin you can create from
8647 almost any existing Python modules, and an easy way for outside developers to
8648 add functionality and customization to your projects with their own plugins.")
8649 (license license:expat)))
8650
8651 (define-public python2-straight-plugin
8652 (package-with-python2 python-straight-plugin))
8653
8654 (define-public python-fonttools
8655 (package
8656 (name "python-fonttools")
8657 (version "4.6.0")
8658 (source (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "fonttools" version ".zip"))
8661 (sha256
8662 (base32
8663 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8664 (build-system python-build-system)
8665 (native-inputs
8666 `(("unzip" ,unzip)
8667 ("python-pytest" ,python-pytest)
8668 ("python-pytest-runner" ,python-pytest-runner)))
8669 (home-page "https://github.com/fonttools/fonttools")
8670 (synopsis "Tools to manipulate font files")
8671 (description
8672 "FontTools/TTX is a library to manipulate font files from Python. It
8673 supports reading and writing of TrueType/OpenType fonts, reading and writing
8674 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8675 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8676 from an XML-based format.")
8677 (license license:expat)))
8678
8679 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8680 (define-public python2-fonttools
8681 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8682 (package/inherit
8683 base
8684 (version "3.44.0")
8685 (source (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "fonttools" version ".zip"))
8688 (sha256
8689 (base32
8690 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8691
8692 (define-public python-ly
8693 (package
8694 (name "python-ly")
8695 (version "0.9.5")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri name version))
8700 (sha256
8701 (base32
8702 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8703 (build-system python-build-system)
8704 (arguments
8705 ;; FIXME: Some tests need network access.
8706 '(#:tests? #f))
8707 (synopsis "Tool and library for manipulating LilyPond files")
8708 (description "This package provides a Python library to parse, manipulate
8709 or create documents in LilyPond format. A command line program ly is also
8710 provided that can be used to do various manipulations with LilyPond files.")
8711 (home-page "https://pypi.org/project/python-ly/")
8712 (license license:gpl2+)))
8713
8714 (define-public python-appdirs
8715 (package
8716 (name "python-appdirs")
8717 (version "1.4.3")
8718 (source
8719 (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "appdirs" version))
8722 (sha256
8723 (base32
8724 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8725 (build-system python-build-system)
8726 (home-page "https://github.com/ActiveState/appdirs")
8727 (synopsis
8728 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8729 (description
8730 "This module provides a portable way of finding out where user data
8731 should be stored on various operating systems.")
8732 (license license:expat)))
8733
8734 (define-public python2-appdirs
8735 (package-with-python2 python-appdirs))
8736
8737 (define-public python-llfuse
8738 (package
8739 (name "python-llfuse")
8740 (version "1.3.6")
8741 (source (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8744 (sha256
8745 (base32
8746 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8747 (build-system python-build-system)
8748 (inputs
8749 `(("fuse" ,fuse)
8750 ("attr" ,attr)))
8751 (native-inputs
8752 `(("pkg-config" ,pkg-config)))
8753 (synopsis "Python bindings for FUSE")
8754 (description
8755 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8756 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8757 (license license:lgpl2.0+)
8758 (properties `((python2-variant . ,(delay python2-llfuse))))))
8759
8760 (define-public python2-llfuse
8761 (package (inherit (package-with-python2
8762 (strip-python2-variant python-llfuse)))
8763 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8764
8765 ;; For attic-0.16
8766 (define-public python-llfuse-0.41
8767 (package (inherit python-llfuse)
8768 (version "0.41.1")
8769 (source (origin
8770 (method url-fetch)
8771 (uri (string-append
8772 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8773 "llfuse-" version ".tar.bz2"))
8774 (sha256
8775 (base32
8776 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8777 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8778 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8779 (license (list license:expat license:lgpl2.0+))))
8780
8781 (define-public python-msgpack
8782 (package
8783 (name "python-msgpack")
8784 (version "1.0.0")
8785 (source (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "msgpack" version))
8788 (sha256
8789 (base32
8790 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8791 (build-system python-build-system)
8792 (arguments
8793 `(#:modules ((guix build utils)
8794 (guix build python-build-system)
8795 (ice-9 ftw)
8796 (srfi srfi-1)
8797 (srfi srfi-26))
8798 #:phases
8799 (modify-phases %standard-phases
8800 (replace 'check
8801 (lambda _
8802 (let ((cwd (getcwd)))
8803 (setenv "PYTHONPATH"
8804 (string-append cwd "/build/"
8805 (find (cut string-prefix? "lib" <>)
8806 (scandir (string-append cwd "/build")))
8807 ":"
8808 (getenv "PYTHONPATH")))
8809 (invoke "pytest" "-v" "test")))))))
8810 (native-inputs
8811 `(("python-pytest" ,python-pytest)))
8812 (synopsis "MessagePack (de)serializer")
8813 (description "MessagePack is a fast, compact binary serialization format,
8814 suitable for similar data to JSON. This package provides CPython bindings for
8815 reading and writing MessagePack data.")
8816 (home-page "https://pypi.org/project/msgpack/")
8817 (license license:asl2.0)))
8818
8819 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8820 ;; release 0.5. Some packages like borg still call it by the old name for now.
8821 ;; <https://bugs.gnu.org/30662>
8822 (define-public python-msgpack-transitional
8823 (package
8824 (inherit python-msgpack)
8825 (name "python-msgpack-transitional")
8826 (version "0.5.6")
8827 (source (origin
8828 (method url-fetch)
8829 (uri (pypi-uri "msgpack" version))
8830 (sha256
8831 (base32
8832 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8833 (arguments
8834 (substitute-keyword-arguments (package-arguments python-msgpack)
8835 ((#:phases phases)
8836 `(modify-phases ,phases
8837 (add-after 'unpack 'configure-transitional
8838 (lambda _
8839 ;; Keep using the old name.
8840 (substitute* "setup.py"
8841 (("TRANSITIONAL = False")
8842 "TRANSITIONAL = 1"))
8843 #t))))))))
8844
8845 (define-public python2-msgpack
8846 (package-with-python2 python-msgpack))
8847
8848 (define-public python-netaddr
8849 (package
8850 (name "python-netaddr")
8851 (version "0.7.19")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "netaddr" version))
8856 (sha256
8857 (base32
8858 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8859 (build-system python-build-system)
8860 (arguments `(#:tests? #f)) ;; No tests.
8861 (home-page "https://github.com/drkjam/netaddr/")
8862 (synopsis "Pythonic manipulation of network addresses")
8863 (description
8864 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8865 and MAC network addresses.")
8866 (license license:bsd-3)))
8867
8868 (define-public python2-netaddr
8869 (package-with-python2 python-netaddr))
8870
8871 (define-public python2-pyroute2
8872 (package
8873 (name "python2-pyroute2")
8874 (version "0.5.6")
8875 (source
8876 (origin
8877 (method url-fetch)
8878 (uri (pypi-uri "pyroute2" version))
8879 (sha256
8880 (base32
8881 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8882 (build-system python-build-system)
8883 (arguments
8884 `(#:python ,python-2)) ;Python 3.x is not supported
8885 (home-page "https://github.com/svinota/pyroute2")
8886 (synopsis "Python netlink library")
8887 (description
8888 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8889 Supported netlink families and protocols include:
8890 @itemize
8891 @item rtnl, network settings - addresses, routes, traffic controls
8892 @item nfnetlink - netfilter API: ipset, nftables, ...
8893 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8894 @item devlink - manage and monitor devlink-enabled hardware
8895 @item generic - generic netlink families
8896 @itemize
8897 @item nl80211 - wireless functions API (basic support)
8898 @item taskstats - extended process statistics
8899 @item acpi_events - ACPI events monitoring
8900 @item thermal_events - thermal events monitoring
8901 @item VFS_DQUOT - disk quota events monitoring
8902 @end itemize
8903 @end itemize")
8904 (license license:gpl2+)))
8905
8906 (define-public python-wrapt
8907 (package
8908 (name "python-wrapt")
8909 (version "1.11.2")
8910 (source
8911 (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "wrapt" version))
8914 (sha256
8915 (base32
8916 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8917 (build-system python-build-system)
8918 (arguments
8919 ;; Tests are not included in the tarball, they are only available in the
8920 ;; git repository.
8921 `(#:tests? #f))
8922 (home-page "https://github.com/GrahamDumpleton/wrapt")
8923 (synopsis "Module for decorators, wrappers and monkey patching")
8924 (description
8925 "The aim of the wrapt module is to provide a transparent object proxy for
8926 Python, which can be used as the basis for the construction of function
8927 wrappers and decorator functions.")
8928 (license license:bsd-2)))
8929
8930 (define-public python2-wrapt
8931 (package-with-python2 python-wrapt))
8932
8933 (define-public python-xlrd
8934 (package
8935 (name "python-xlrd")
8936 (version "1.2.0")
8937 (source (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "xlrd" version))
8940 (sha256
8941 (base32
8942 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8943 (build-system python-build-system)
8944 (arguments
8945 `(#:phases
8946 (modify-phases %standard-phases
8947 ;; Some tests depend on writing a temporary file to the user's home
8948 ;; directory.
8949 (add-after 'unpack 'fix-tests
8950 (lambda _
8951 (delete-file "tests/test_open_workbook.py")
8952 #t)))))
8953 (home-page "http://www.python-excel.org/")
8954 (synopsis "Library for extracting data from Excel files")
8955 (description "This package provides a library to extract data from
8956 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8957 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8958 Unicode-aware. It is not intended as an end-user tool.")
8959 (license license:bsd-3)))
8960
8961 (define-public python2-xlrd
8962 (package-with-python2 python-xlrd))
8963
8964 (define-public python-immutables
8965 (package
8966 (name "python-immutables")
8967 (version "0.14")
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "immutables" version))
8972 (sha256
8973 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8974 (build-system python-build-system)
8975 (home-page "https://github.com/MagicStack/immutables")
8976 (synopsis "High-performance immutable mapping type for Python")
8977 (description
8978 "An immutable mapping type for Python. The underlying datastructure is a
8979 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8980 functional languages.")
8981 (license license:asl2.0)))
8982
8983 (define-public python-prettytable
8984 (package
8985 (name "python-prettytable")
8986 (version "0.7.2")
8987 (source
8988 (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8991 (sha256
8992 (base32
8993 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8994 (build-system python-build-system)
8995 (home-page "https://code.google.com/archive/p/prettytable/")
8996 (synopsis "Display tabular data in an ASCII table format")
8997 (description
8998 "A library designed to represent tabular data in visually appealing ASCII
8999 tables. PrettyTable allows for selection of which columns are to be printed,
9000 independent alignment of columns (left or right justified or centred) and
9001 printing of sub-tables by specifying a row range.")
9002 (license license:bsd-3)))
9003
9004 (define-public python2-prettytable
9005 (package-with-python2 python-prettytable))
9006
9007 (define-public python-curio
9008 (package
9009 (name "python-curio")
9010 (version "1.2")
9011 (source
9012 (origin
9013 (method url-fetch)
9014 (uri (pypi-uri "curio" version))
9015 (sha256
9016 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9017 (build-system python-build-system)
9018 (arguments
9019 `(#:phases
9020 (modify-phases %standard-phases
9021 (replace 'check
9022 (lambda* (#:key inputs outputs #:allow-other-keys)
9023 (add-installed-pythonpath inputs outputs)
9024 (invoke "pytest" "-vv" "-k"
9025 ;; Tries to open an outgoing connection.
9026 "not test_ssl_outgoing"))))))
9027 (native-inputs
9028 `(("python-pytest" ,python-pytest)))
9029 (home-page "https://github.com/dabeaz/curio")
9030 (synopsis "Coroutine-based library for concurrent Python")
9031 (description
9032 "Curio is a coroutine-based library for concurrent Python systems
9033 programming. It provides standard programming abstractions such as as
9034 tasks, sockets, files, locks, and queues.")
9035 (license license:bsd-3)))
9036
9037 (define-public python-tables
9038 (package
9039 (name "python-tables")
9040 (version "3.6.1")
9041 (source
9042 (origin
9043 (method url-fetch)
9044 (uri (pypi-uri "tables" version))
9045 (sha256
9046 (base32
9047 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9048 (modules '((guix build utils)))
9049 (snippet
9050 '(begin
9051 ;; Remove pre-compiled .pyc files from source.
9052 (for-each delete-file-recursively
9053 (find-files "." "__pycache__" #:directories? #t))
9054 (for-each delete-file (find-files "." "\\.pyc$"))
9055 #t))))
9056 (build-system python-build-system)
9057 (arguments
9058 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9059 ;; or "check", so we must override the build and check phases.
9060 #:phases
9061 (modify-phases %standard-phases
9062 (add-after 'unpack 'use-gcc
9063 (lambda _
9064 (substitute* "setup.py"
9065 (("^( +)compiler = new_compiler\\(\\)" line indent)
9066 (string-append line
9067 "\n"
9068 indent
9069 "compiler.set_executables(compiler='gcc',"
9070 "compiler_so='gcc',"
9071 "linker_exe='gcc',"
9072 "linker_so='gcc -shared')")))
9073 #t))
9074 (add-after 'unpack 'disable-tuning
9075 (lambda _
9076 (substitute* "setup.py"
9077 (("cpu_flags = .*")
9078 "cpu_flags = ['sse2']\n"))
9079 #t))
9080 (replace 'build
9081 (lambda* (#:key inputs #:allow-other-keys)
9082 (invoke "python" "setup.py" "build"
9083 (string-append "--hdf5="
9084 (assoc-ref inputs "hdf5")))))
9085 (replace 'check
9086 (lambda* (#:key inputs #:allow-other-keys)
9087 (invoke "python" "setup.py" "check"
9088 (string-append "--hdf5="
9089 (assoc-ref inputs "hdf5"))))))))
9090 (propagated-inputs
9091 `(("python-numexpr" ,python-numexpr)
9092 ("python-numpy" ,python-numpy)))
9093 (native-inputs
9094 `(("python-cython" ,python-cython)
9095 ("pkg-config" ,pkg-config)))
9096 (inputs
9097 `(("hdf5" ,hdf5-1.10)
9098 ("bzip2" ,bzip2)
9099 ("zlib" ,zlib)))
9100 (home-page "https://www.pytables.org/")
9101 (synopsis "Hierarchical datasets for Python")
9102 (description "PyTables is a package for managing hierarchical datasets and
9103 designed to efficiently cope with extremely large amounts of data.")
9104 (license license:bsd-3)))
9105
9106 (define-public python2-tables
9107 (package-with-python2 python-tables))
9108
9109 (define-public python-sniffio
9110 (package
9111 (name "python-sniffio")
9112 (version "1.1.0")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "sniffio" version))
9117 (sha256
9118 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9119 (build-system python-build-system)
9120 (arguments
9121 `(#:phases
9122 (modify-phases %standard-phases
9123 (replace 'check
9124 (lambda _
9125 (invoke "pytest" "-vv"))))))
9126 (native-inputs
9127 `(("python-curio" ,python-curio)
9128 ("python-pytest" ,python-pytest)
9129 ("python-pytest-cov" ,python-pytest-cov)))
9130 (home-page "https://github.com/python-trio/sniffio")
9131 (synopsis "Detect which async library a program is running under")
9132 (description "This package detects which async library a program is
9133 running under. It supports multiple async I/O packages, like Trio, and
9134 asyncio.")
9135 ;; Either license applies.
9136 (license (list license:expat license:asl2.0))))
9137
9138 (define-public python-pytest-black
9139 (package
9140 (name "python-pytest-black")
9141 (version "0.3.8")
9142 (source
9143 (origin
9144 (method url-fetch)
9145 (uri (pypi-uri "pytest-black" version))
9146 (sha256
9147 (base32
9148 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9149 (build-system python-build-system)
9150 (propagated-inputs
9151 `(("python-pytest" ,python-pytest)
9152 ("python-black" ,python-black)
9153 ("python-toml" ,python-toml)))
9154 (native-inputs
9155 `(("python-setuptools-scm" ,python-setuptools-scm)))
9156 (home-page "https://github.com/shopkeep/pytest-black")
9157 (synopsis "Pytest plugin to enable format checking with black")
9158 (description
9159 "This package provides a pytest plugin to enable format checking with the
9160 Python code formatter \"black\".")
9161 (license license:expat)))
9162
9163 (define-public python-get-version
9164 (package
9165 (name "python-get-version")
9166 (version "2.1")
9167 (source
9168 (origin
9169 (method url-fetch)
9170 (uri (pypi-uri "get_version" version))
9171 (sha256
9172 (base32
9173 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9174 (build-system python-build-system)
9175 (propagated-inputs
9176 `(("python-pygments" ,python-pygments)
9177 ("python-pytest" ,python-pytest)
9178 ("python-pytest-black" ,python-pytest-black)
9179 ("python-pytest-cov" ,python-pytest-cov)
9180 ("python-setuptools" ,python-setuptools)
9181 ("python-testpath" ,python-testpath)))
9182 (home-page "https://github.com/flying-sheep/get_version")
9183 (synopsis "Version helper in the spirit of versioneer")
9184 (description
9185 "This package provides a version helper that lets you automatically use
9186 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9187 also supports getting the version from Python source distributions or, once
9188 your package is installed, via @code{pkg_resources} (part of
9189 @code{setuptools}).")
9190 (license license:gpl3+)))
9191
9192 (define-public python-legacy-api-wrap
9193 (package
9194 (name "python-legacy-api-wrap")
9195 (version "1.2")
9196 (source
9197 (origin
9198 (method url-fetch)
9199 (uri (pypi-uri "legacy-api-wrap" version))
9200 (sha256
9201 (base32
9202 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9203 (build-system python-build-system)
9204 (propagated-inputs
9205 `(("python-get-version" ,python-get-version)
9206 ("python-pytest" ,python-pytest)
9207 ("python-pytest-black" ,python-pytest-black)
9208 ("python-pytest-cov" ,python-pytest-cov)
9209 ("python-setuptools" ,python-setuptools)))
9210 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9211 (synopsis "Legacy API wrapper")
9212 (description "This module defines a decorator to wrap legacy APIs. The
9213 primary use case is APIs defined before keyword-only parameters existed.")
9214 (license license:gpl3+)))
9215
9216 (define-public python-pyasn1
9217 (package
9218 (name "python-pyasn1")
9219 (version "0.4.8")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "pyasn1" version))
9224 (sha256
9225 (base32
9226 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9227 (build-system python-build-system)
9228 (home-page "http://pyasn1.sourceforge.net/")
9229 (synopsis "ASN.1 types and codecs")
9230 (description
9231 "This is an implementation of ASN.1 types and codecs in Python. It is
9232 suitable for a wide range of protocols based on the ASN.1 specification.")
9233 (license license:bsd-2)))
9234
9235 (define-public python2-pyasn1
9236 (package-with-python2 python-pyasn1))
9237
9238 (define-public python-pyasn1-modules
9239 (package
9240 (name "python-pyasn1-modules")
9241 (version "0.2.2")
9242 (source
9243 (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "pyasn1-modules" version))
9246 (sha256
9247 (base32
9248 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9249 (build-system python-build-system)
9250 (propagated-inputs
9251 `(("python-pyasn1" ,python-pyasn1)))
9252 (home-page "https://sourceforge.net/projects/pyasn1/")
9253 (synopsis "ASN.1 codec implementations")
9254 (description
9255 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9256 implementations of ASN.1-based codecs and protocols.")
9257 (license license:bsd-3)))
9258
9259 (define-public python2-pyasn1-modules
9260 (package-with-python2 python-pyasn1-modules))
9261
9262 (define-public python-ipaddress
9263 (package
9264 (name "python-ipaddress")
9265 (version "1.0.22")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "ipaddress" version))
9269 (sha256
9270 (base32
9271 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9272 (build-system python-build-system)
9273 (home-page "https://github.com/phihag/ipaddress")
9274 (synopsis "IP address manipulation library")
9275 (description
9276 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9277 in Python. This library is used to create, poke at, and manipulate IPv4 and
9278 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9279 module to older versions of Python.")
9280 (license license:psfl)))
9281
9282 (define-public python2-ipaddress
9283 (package-with-python2 python-ipaddress))
9284
9285 (define-public python2-ipaddr
9286 (package
9287 (name "python2-ipaddr")
9288 (version "2.1.11")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "ipaddr" version))
9293 (sha256
9294 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9295 (build-system python-build-system)
9296 (arguments
9297 `(#:python ,python-2 ;version 2 only
9298 #:phases
9299 (modify-phases %standard-phases
9300 (replace 'check
9301 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9302 (home-page "https://github.com/google/ipaddr-py")
9303 (synopsis "IP address manipulation library")
9304 (description
9305 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9306 IPv6 addresses and networks.
9307
9308 For new implementations you may prefer to use the standard module
9309 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9310 versions of Python.")
9311 (license license:asl2.0)))
9312
9313 (define-public python-idna
9314 (package
9315 (name "python-idna")
9316 (version "2.10")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "idna" version))
9321 (sha256
9322 (base32
9323 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9324 (build-system python-build-system)
9325 (home-page "https://github.com/kjd/idna")
9326 (synopsis "Internationalized domain names in applications")
9327 (description
9328 "This is a library to support the Internationalised Domain Names in
9329 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9330 protocol is often referred to as “IDNA2008” and can produce different results
9331 from the earlier standard from 2003. The library is also intended to act as a
9332 suitable drop-in replacement for the “encodings.idna” module that comes with
9333 the Python standard library but currently only supports the older 2003
9334 specification.")
9335 (license license:bsd-4)))
9336
9337 (define-public python-idna-2.7
9338 (package (inherit python-idna)
9339 (version "2.7")
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "idna" version))
9343 (sha256
9344 (base32
9345 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9346
9347
9348 (define-public python2-idna
9349 (package-with-python2 python-idna))
9350
9351 (define-public python-libsass
9352 (package
9353 (name "python-libsass")
9354 (version "0.20.1")
9355 (source
9356 (origin
9357 ;; PyPI tarball is missing some test files.
9358 (method git-fetch)
9359 (uri (git-reference
9360 (url "https://github.com/sass/libsass-python")
9361 (commit version)))
9362 (file-name (git-file-name name version))
9363 (sha256
9364 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9365 (build-system python-build-system)
9366 (arguments
9367 `(#:phases
9368 (modify-phases %standard-phases
9369 ;; Use Guix package of libsass instead of compiling from a checkout.
9370 (add-before 'build 'set-libsass
9371 (lambda _
9372 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9373 #t))
9374 (replace 'check
9375 (lambda* (#:key inputs outputs #:allow-other-keys)
9376 (add-installed-pythonpath inputs outputs)
9377 (invoke "pytest" "sasstests.py"))))))
9378 (native-inputs
9379 `(("python-pytest" ,python-pytest)
9380 ("python-werkzeug" ,python-werkzeug)))
9381 (inputs
9382 `(("libsass" ,libsass)))
9383 (propagated-inputs
9384 `(("python-six" ,python-six)))
9385 (home-page "https://sass.github.io/libsass-python/")
9386 (synopsis "Straightforward binding of libsass for Python")
9387 (description
9388 "This package provides a simple Python extension module @code{sass} which
9389 is binding LibSass.")
9390 (license license:expat)))
9391
9392 (define-public python-idna-ssl
9393 (package
9394 (name "python-idna-ssl")
9395 (version "1.0.1")
9396 (source
9397 (origin
9398 (method url-fetch)
9399 (uri (pypi-uri "idna-ssl" version))
9400 (sha256
9401 (base32
9402 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9403 (build-system python-build-system)
9404 (arguments
9405 `(#:tests? #f)) ;circular dependency with python-aiohttp
9406 (home-page "https://github.com/aio-libs/idna-ssl")
9407 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9408 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9409 domains support.")
9410 (license license:expat)))
9411
9412 (define-public python-pretend
9413 (package
9414 (name "python-pretend")
9415 (version "1.0.9")
9416 (source
9417 (origin
9418 (method url-fetch)
9419 (uri (pypi-uri "pretend" version))
9420 (sha256
9421 (base32
9422 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9423 (build-system python-build-system)
9424 (home-page "https://github.com/alex/pretend")
9425 (synopsis "Library for stubbing in Python")
9426 (description
9427 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9428 technique for writing tests. You may hear the term mixed up with mocks,
9429 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9430 responses, rather than doing any computation.")
9431 (license license:bsd-3)))
9432
9433 (define-public python2-pretend
9434 (package-with-python2 python-pretend))
9435
9436 (define-public python-pip
9437 (package
9438 (name "python-pip")
9439 (version "20.0.2")
9440 (source
9441 (origin
9442 (method url-fetch)
9443 (uri (pypi-uri "pip" version))
9444 (sha256
9445 (base32
9446 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9447 (build-system python-build-system)
9448 (arguments
9449 '(#:tests? #f)) ; there are no tests in the pypi archive.
9450 (home-page "https://pip.pypa.io/")
9451 (synopsis "Package manager for Python software")
9452 (description
9453 "Pip is a package manager for Python software, that finds packages on the
9454 Python Package Index (PyPI).")
9455 (license license:expat)))
9456
9457 (define-public python2-pip
9458 (package-with-python2 python-pip))
9459
9460 (define-public python-tlsh
9461 (package
9462 (name "python-tlsh")
9463 (version "3.4.5")
9464 (home-page "https://github.com/trendmicro/tlsh")
9465 (source
9466 (origin
9467 (method git-fetch)
9468 (uri (git-reference
9469 (url "https://github.com/trendmicro/tlsh")
9470 (commit (string-append "v" version))))
9471 (file-name (git-file-name name version))
9472 (sha256
9473 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9474 (build-system cmake-build-system)
9475 (arguments
9476 '(#:out-of-source? #f
9477 #:phases (modify-phases %standard-phases
9478 (replace
9479 'install
9480 (lambda* (#:key outputs #:allow-other-keys)
9481 ;; Build and install the Python bindings. The underlying
9482 ;; C++ library is apparently not meant to be installed.
9483 (let ((out (assoc-ref outputs "out")))
9484 (with-directory-excursion "py_ext"
9485 (and (system* "python" "setup.py" "build")
9486 (system* "python" "setup.py" "install"
9487 (string-append "--prefix=" out))))))))))
9488 (inputs `(("python" ,python-wrapper))) ;for the bindings
9489 (synopsis "Fuzzy matching library for Python")
9490 (description
9491 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9492 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9493 value which can be used for similarity comparisons. Similar objects have
9494 similar hash values, which allows for the detection of similar objects by
9495 comparing their hash values. The byte stream should have a sufficient amount
9496 of complexity; for example, a byte stream of identical bytes will not generate
9497 a hash value.")
9498 (license license:asl2.0)))
9499
9500 (define-public python2-tlsh
9501 (package
9502 (inherit python-tlsh)
9503 (name "python2-tlsh")
9504 (inputs `(("python" ,python-2)))))
9505
9506 (define-public python-termcolor
9507 (package
9508 (name "python-termcolor")
9509 (version "1.1.0")
9510 (source
9511 (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "termcolor" version))
9514 (sha256
9515 (base32
9516 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9517 (build-system python-build-system)
9518 (arguments
9519 ;; There are no tests.
9520 `(#:tests? #f))
9521 (home-page "https://pypi.org/project/termcolor/")
9522 (synopsis "ANSII Color formatting for terminal output")
9523 (description
9524 "This package provides ANSII Color formatting for output in terminals.")
9525 (license license:expat)))
9526
9527 (define-public python2-termcolor
9528 (package-with-python2 python-termcolor))
9529
9530 (define-public python-terminaltables
9531 (package
9532 (name "python-terminaltables")
9533 (version "3.1.0")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (pypi-uri "terminaltables" version))
9538 (sha256
9539 (base32
9540 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9541 (build-system python-build-system)
9542 (home-page "https://github.com/Robpol86/terminaltables")
9543 (synopsis
9544 "Generate simple tables in terminals from a nested list of strings")
9545 (description
9546 "This package makes it easy to draw tables in terminal/console
9547 applications from a list of lists of strings. It supports multi-line rows.")
9548 (license license:expat)))
9549
9550 (define-public python-libarchive-c
9551 (package
9552 (name "python-libarchive-c")
9553 (version "2.9")
9554 (source (origin
9555 (method url-fetch)
9556 (uri (pypi-uri "libarchive-c" version))
9557 (sha256
9558 (base32
9559 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9560 (build-system python-build-system)
9561 (arguments
9562 '(#:phases (modify-phases %standard-phases
9563 (add-before
9564 'build 'reference-libarchive
9565 (lambda* (#:key inputs #:allow-other-keys)
9566 ;; Retain the absolute file name of libarchive.so.
9567 (let ((libarchive (assoc-ref inputs "libarchive")))
9568 (substitute* "libarchive/ffi.py"
9569 (("find_library\\('archive'\\)")
9570 (string-append "'" libarchive
9571 "/lib/libarchive.so'"))))))
9572 (replace 'check
9573 (lambda _ (invoke "pytest" "-vv"))))))
9574 (native-inputs
9575 `(("python-mock" ,python-mock)
9576 ("python-pytest" ,python-pytest)))
9577 (inputs
9578 `(("libarchive" ,libarchive)))
9579 (home-page "https://github.com/Changaco/python-libarchive-c")
9580 (synopsis "Python interface to libarchive")
9581 (description
9582 "This package provides Python bindings to libarchive, a C library to
9583 access possibly compressed archives in many different formats. It uses
9584 Python's @code{ctypes} foreign function interface (FFI).")
9585 (license license:lgpl2.0+)))
9586
9587 (define-public python2-libarchive-c
9588 (package-with-python2 python-libarchive-c))
9589
9590 (define-public python-file
9591 (package
9592 (inherit file)
9593 (name "python-file")
9594 (build-system python-build-system)
9595 (arguments
9596 '(#:tests? #f ;no tests
9597 #:configure-flags '("--single-version-externally-managed" "--root=/")
9598 #:phases (modify-phases %standard-phases
9599 (add-before 'build 'change-directory
9600 (lambda _
9601 (chdir "python")
9602 #t))
9603 (add-before 'build 'set-library-file-name
9604 (lambda* (#:key inputs #:allow-other-keys)
9605 (let ((file (assoc-ref inputs "file")))
9606 (substitute* "magic.py"
9607 (("find_library\\('magic'\\)")
9608 (string-append "'" file "/lib/libmagic.so'")))
9609 #t))))))
9610 (inputs `(("file" ,file)))
9611 (native-inputs (if (%current-target-system)
9612 `(("self" ,this-package))
9613 '()))
9614 (synopsis "Python bindings to the libmagic file type guesser")
9615 (description "This package provides Python bindings to the libmagic file
9616 type guesser.
9617
9618 Note that this module and the @code{python-magic} module both provide a
9619 @file{magic.py} file; these two modules, which are different and were
9620 developed separately, both serve the same purpose: provide Python bindings for
9621 libmagic.")))
9622
9623 (define-public python2-file
9624 (package-with-python2 python-file))
9625
9626 (define-public python-debian
9627 (package
9628 (name "python-debian")
9629 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9630 (version "0.1.36")
9631 (source
9632 (origin
9633 ;; Use git-fetch, as pypi doesn't include test suite.
9634 (method git-fetch)
9635 (uri (git-reference
9636 (url home-page)
9637 (commit version)))
9638 (file-name (git-file-name name version))
9639 (sha256
9640 (base32
9641 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9642 (build-system python-build-system)
9643 (arguments
9644 `(#:phases (modify-phases %standard-phases
9645 (add-after 'unpack 'remove-debian-specific-tests
9646 ;; python-apt, apt and dpkg are not yet available in guix,
9647 ;; and these tests heavily depend on them.
9648 (lambda _
9649 (delete-file "lib/debian/tests/test_deb822.py")
9650 (delete-file "lib/debian/tests/test_debfile.py")
9651 #t)))))
9652 (propagated-inputs
9653 `(("python-six" ,python-six)
9654 ("python-chardet" ,python-chardet)))
9655 (synopsis "Debian package related modules")
9656 (description
9657 ;; XXX: Use @enumerate instead of @itemize to work around
9658 ;; <http://bugs.gnu.org/21772>.
9659 "This package provides Python modules that abstract many formats of
9660 Debian-related files, such as:
9661
9662 @enumerate
9663 @item Debtags information;
9664 @item @file{debian/changelog} files;
9665 @item packages files, pdiffs;
9666 @item control files of single or multiple RFC822-style paragraphs---e.g.
9667 @file{debian/control}, @file{.changes}, @file{.dsc};
9668 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9669 contained files and meta-information.
9670 @end enumerate\n")
9671
9672 ;; Modules are either GPLv2+ or GPLv3+.
9673 (license license:gpl3+)))
9674
9675 (define-public python-nbformat
9676 (package
9677 (name "python-nbformat")
9678 (version "4.4.0")
9679 (source
9680 (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "nbformat" version))
9683 (sha256
9684 (base32
9685 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9686 (build-system python-build-system)
9687 (arguments `(#:tests? #f)) ; no test target
9688 (propagated-inputs
9689 `(("python-ipython-genutils" ,python-ipython-genutils)
9690 ("python-jsonschema" ,python-jsonschema)
9691 ("python-jupyter-core" ,python-jupyter-core)
9692 ("python-traitlets" ,python-traitlets)))
9693 (home-page "http://jupyter.org")
9694 (synopsis "Jupyter Notebook format")
9695 (description "This package provides the reference implementation of the
9696 Jupyter Notebook format and Python APIs for working with notebooks.")
9697 (license license:bsd-3)))
9698
9699 (define-public python2-nbformat
9700 (package-with-python2 python-nbformat))
9701
9702 (define-public python-bleach
9703 (package
9704 (name "python-bleach")
9705 (version "3.1.5")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "bleach" version))
9710 (sha256
9711 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9712 (build-system python-build-system)
9713 (propagated-inputs
9714 `(("python-webencodings" ,python-webencodings)
9715 ("python-six" ,python-six)))
9716 (native-inputs
9717 `(("python-datrie" ,python-datrie)
9718 ("python-genshi" ,python-genshi)
9719 ("python-lxml" ,python-lxml)
9720 ("python-pytest" ,python-pytest)))
9721 (home-page "https://github.com/mozilla/bleach")
9722 (synopsis "Whitelist-based HTML-sanitizing tool")
9723 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9724 (license license:asl2.0)))
9725
9726 (define-public python2-bleach
9727 (package-with-python2 python-bleach))
9728
9729 (define-public python-entrypoints
9730 (package
9731 (name "python-entrypoints")
9732 (version "0.3")
9733 (source
9734 (origin
9735 (method url-fetch)
9736 (uri (pypi-uri "entrypoints" version))
9737 (sha256
9738 (base32
9739 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9740 (build-system python-build-system)
9741 ;; The package does not come with a setup.py file, so we have to generate
9742 ;; one ourselves.
9743 (arguments
9744 `(#:tests? #f
9745 #:phases
9746 (modify-phases %standard-phases
9747 (add-after 'unpack 'create-setup.py
9748 (lambda _
9749 (call-with-output-file "setup.py"
9750 (lambda (port)
9751 (format port "\
9752 from setuptools import setup
9753 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9754 " ,version))))))))
9755 (home-page "https://github.com/takluyver/entrypoints")
9756 (synopsis "Discover and load entry points from installed Python packages")
9757 (description "Entry points are a way for Python packages to advertise
9758 objects with some common interface. The most common examples are
9759 @code{console_scripts} entry points, which define shell commands by
9760 identifying a Python function to run. The @code{entrypoints} module contains
9761 functions to find and load entry points.")
9762 (license license:expat)))
9763
9764 (define-public python2-entrypoints
9765 (package-with-python2 python-entrypoints))
9766
9767 (define-public python-epc
9768 (package
9769 (name "python-epc")
9770 (version "0.0.5")
9771 (source
9772 (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "epc" version))
9775 (sha256
9776 (base32
9777 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9778 (build-system python-build-system)
9779 (propagated-inputs
9780 `(("python-sexpdata" ,python-sexpdata)))
9781 (native-inputs
9782 `(("python-nose" ,python-nose)))
9783 (home-page "https://github.com/tkf/python-epc")
9784 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9785 (description
9786 "Python-EPC can call elisp functions from Python and Python functions
9787 from elisp.")
9788 (license license:gpl3)))
9789
9790 (define-public python-forex-python
9791 (package
9792 (name "python-forex-python")
9793 (version "1.5")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (pypi-uri "forex-python" version))
9798 (sha256
9799 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9800 (build-system python-build-system)
9801 (arguments
9802 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9803 ;; repository require online data.
9804 `(#:tests? #f))
9805 (propagated-inputs
9806 `(("python-requests" ,python-requests)
9807 ("python-simplejson" ,python-simplejson)))
9808 (home-page "https://github.com/MicroPyramid/forex-python")
9809 (synopsis "Foreign exchange rates and currency conversion")
9810 (description
9811 "@code{python-forex-python} can be used to manipulate foreign
9812 exchange rates and to operate currency conversions.
9813
9814 Features:
9815 @itemize
9816 @item List all currency rates.
9817 @item BitCoin price for all currencies.
9818 @item Converting amount to BitCoins.
9819 @item Get historical rates for any day since 1999.
9820 @item Conversion rate for one currency(ex; USD to INR).
9821 @item Convert amount from one currency to other.('USD 10$' to INR).
9822 @item Currency symbols.
9823 @item Currency names.
9824 @end itemize")
9825 (license license:expat)))
9826
9827 (define-public python-simpleeval
9828 (package
9829 (name "python-simpleeval")
9830 (version "0.9.10")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "simpleeval" version))
9835 (sha256
9836 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9837 (build-system python-build-system)
9838 (home-page "https://github.com/danthedeckie/simpleeval")
9839 (synopsis "Simple, safe single expression evaluator library")
9840 (description
9841 "This package provides a quick single file library for easily adding
9842 evaluatable expressions into python projects. Say you want to allow a user
9843 to set an alarm volume, which could depend on the time of day, alarm level,
9844 how many previous alarms had gone off, and if there is music playing at the
9845 time.")
9846 (license license:expat)))
9847
9848 (define-public python-nbconvert
9849 (package
9850 (name "python-nbconvert")
9851 (version "5.0.0b1")
9852 (source
9853 (origin
9854 (method url-fetch)
9855 (uri (pypi-uri "nbconvert" version))
9856 (sha256
9857 (base32
9858 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9859 (build-system python-build-system)
9860 (arguments
9861 `(;; The "bdist_egg" target is disabled by default, causing the installation
9862 ;; to fail.
9863 #:configure-flags (list "bdist_egg")
9864 ;; FIXME: 5 failures, 40 errors.
9865 #:tests? #f))
9866 ;; #:phases
9867 ;; (modify-phases %standard-phases
9868 ;; (replace 'check
9869 ;; (lambda _
9870 ;; (zero? (system* "py.test" "-v")))))
9871 (native-inputs
9872 `(("python-pytest" ,python-pytest)))
9873 (propagated-inputs
9874 `(("python-bleach" ,python-bleach)
9875 ("python-entrypoints" ,python-entrypoints)
9876 ("python-jinja2" ,python-jinja2)
9877 ("python-jupyter-core" ,python-jupyter-core)
9878 ("python-mistune" ,python-mistune)
9879 ("python-nbformat" ,python-nbformat)
9880 ("python-pygments" ,python-pygments)
9881 ("python-traitlets" ,python-traitlets)))
9882 (home-page "http://jupyter.org")
9883 (synopsis "Converting Jupyter Notebooks")
9884 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9885 notebooks to various other formats via Jinja templates. It allows you to
9886 convert an @code{.ipynb} notebook file into various static formats including:
9887
9888 @enumerate
9889 @item HTML
9890 @item LaTeX
9891 @item PDF
9892 @item Reveal JS
9893 @item Markdown (md)
9894 @item ReStructured Text (rst)
9895 @item executable script
9896 @end enumerate\n")
9897 (license license:bsd-3)))
9898
9899 (define-public python2-nbconvert
9900 (package-with-python2 python-nbconvert))
9901
9902 (define-public python-notebook
9903 (package
9904 (name "python-notebook")
9905 (version "5.7.4")
9906 (source (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "notebook" version))
9909 (sha256
9910 (base32
9911 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9912 (build-system python-build-system)
9913 (arguments
9914 `(#:phases
9915 (modify-phases %standard-phases
9916 (replace 'check
9917 (lambda _
9918 ;; These tests require a browser
9919 (delete-file-recursively "notebook/tests/selenium")
9920 ;; Some tests need HOME
9921 (setenv "HOME" "/tmp")
9922 ;; This file contains "warningfilters", which are not supported
9923 ;; by this version of nose.
9924 (delete-file "setup.cfg")
9925 (with-directory-excursion "/tmp"
9926 (invoke "nosetests" "-v"))
9927 #t)))))
9928 (propagated-inputs
9929 `(("python-jupyter-core" ,python-jupyter-core)
9930 ("python-nbformat" ,python-nbformat)
9931 ("python-nbconvert" ,python-nbconvert)
9932 ("python-prometheus-client" ,python-prometheus-client)
9933 ("python-send2trash" ,python-send2trash)
9934 ("python-terminado" ,python-terminado)))
9935 (native-inputs
9936 `(("python-nose" ,python-nose)
9937 ("python-sphinx" ,python-sphinx)
9938 ("python-requests" ,python-requests)))
9939 (home-page "http://jupyter.org/")
9940 (synopsis "Web-based notebook environment for interactive computing")
9941 (description
9942 "The Jupyter HTML notebook is a web-based notebook environment for
9943 interactive computing.")
9944 (properties `((python2-variant . ,(delay python2-notebook))))
9945 (license license:bsd-3)))
9946
9947 (define-public python2-notebook
9948 (let ((base (package-with-python2
9949 (strip-python2-variant python-notebook))))
9950 (package (inherit base)
9951 (native-inputs
9952 `(("python2-mock" ,python2-mock)
9953 ,@(package-native-inputs base)))
9954 (arguments
9955 (substitute-keyword-arguments (package-arguments base)
9956 ((#:phases phases)
9957 `(modify-phases ,phases
9958 (add-before 'check 'disable-test-case
9959 ;; The test requires network access to localhost. Curiously it
9960 ;; fails with Python 2 only. Simply make the test-case return
9961 ;; immediately.
9962 (lambda _
9963 (substitute*
9964 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9965 (("formats = self.nbconvert_api") "return #")))))))))))
9966
9967 (define-public python-widgetsnbextension
9968 (package
9969 (name "python-widgetsnbextension")
9970 (version "3.5.1")
9971 (source
9972 (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "widgetsnbextension" version))
9975 (sha256
9976 (base32
9977 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9978 (build-system python-build-system)
9979 (propagated-inputs
9980 `(("python-ipykernel" ,python-ipykernel)
9981 ("python-notebook" ,python-notebook)))
9982 (native-inputs
9983 `(("python-certifi" ,python-certifi)
9984 ("python-nose" ,python-nose)))
9985 (home-page "https://ipython.org")
9986 (synopsis "IPython HTML widgets for Jupyter")
9987 (description "This package provides interactive HTML widgets for Jupyter
9988 notebooks.")
9989 (license license:bsd-3)))
9990
9991 (define-public python2-widgetsnbextension
9992 (package-with-python2 python-widgetsnbextension))
9993
9994 (define-public python-ipywidgets
9995 (package
9996 (name "python-ipywidgets")
9997 (version "7.5.1")
9998 (source
9999 (origin
10000 (method url-fetch)
10001 (uri (pypi-uri "ipywidgets" version))
10002 (sha256
10003 (base32
10004 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10005 (build-system python-build-system)
10006 (propagated-inputs
10007 `(("python-ipython" ,python-ipython)
10008 ("python-traitlets" ,python-traitlets)
10009 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10010 (native-inputs
10011 `(("python-nose" ,python-nose)
10012 ("python-pytest" ,python-pytest)))
10013 (home-page "https://ipython.org")
10014 (synopsis "IPython HTML widgets for Jupyter")
10015 (description "Ipywidgets are interactive HTML widgets for Jupyter
10016 notebooks and the IPython kernel. Notebooks come alive when interactive
10017 widgets are used. Users gain control of their data and can visualize changes
10018 in the data.")
10019 (license license:bsd-3)))
10020
10021 (define-public python2-ipywidgets
10022 (package-with-python2 python-ipywidgets))
10023
10024 (define-public python-jupyter-console
10025 (package
10026 (name "python-jupyter-console")
10027 (version "6.1.0")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "jupyter_console" version))
10032 (sha256
10033 (base32
10034 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10035 (build-system python-build-system)
10036 (propagated-inputs
10037 `(("python-ipykernel" ,python-ipykernel)
10038 ("python-jupyter-client" ,python-jupyter-client)
10039 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10040 ("python-pygments" ,python-pygments)))
10041 (native-inputs
10042 `(("python-nose" ,python-nose)))
10043 (home-page "https://jupyter.org")
10044 (synopsis "Jupyter terminal console")
10045 (description "This package provides a terminal-based console frontend for
10046 Jupyter kernels. It also allows for console-based interaction with non-Python
10047 Jupyter kernels such as IJulia and IRKernel.")
10048 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10049 (license license:bsd-3)))
10050
10051 (define-public python2-jupyter-console
10052 (package
10053 (name "python2-jupyter-console")
10054 (version "5.2.0")
10055 (source
10056 (origin
10057 (method url-fetch)
10058 (uri (pypi-uri "jupyter_console" version))
10059 (sha256
10060 (base32
10061 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10062 (build-system python-build-system)
10063 (arguments
10064 `(#:python ,python-2
10065 #:tests? #f)) ; Tests only run in a TTY.
10066 (propagated-inputs
10067 `(("python2-ipykernel" ,python2-ipykernel)
10068 ("python2-jupyter-client" ,python2-jupyter-client)
10069 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10070 ("python2-pygments" ,python2-pygments)))
10071 (native-inputs
10072 `(("python2-nose" ,python2-nose)))
10073 (home-page "https://jupyter.org")
10074 (synopsis "Jupyter terminal console")
10075 (description "This package provides a terminal-based console frontend for
10076 Jupyter kernels. It also allows for console-based interaction with non-Python
10077 Jupyter kernels such as IJulia and IRKernel.")
10078 (license license:bsd-3)))
10079
10080 ;; The python-ipython and python-jupyter-console require each other. To get
10081 ;; the functionality in both packages working, strip down the
10082 ;; python-jupyter-console package when using it as an input to python-ipython.
10083 (define python-jupyter-console-minimal
10084 (package
10085 (inherit python-jupyter-console)
10086 (name "python-jupyter-console-minimal")
10087 (arguments
10088 (substitute-keyword-arguments
10089 (package-arguments python-jupyter-console)
10090 ((#:phases phases)
10091 `(modify-phases ,phases
10092 (add-after 'install 'delete-bin
10093 (lambda* (#:key outputs #:allow-other-keys)
10094 ;; Delete the bin files, to avoid conflicts in profiles
10095 ;; where python-ipython and python-jupyter-console are
10096 ;; both present.
10097 (delete-file-recursively
10098 (string-append
10099 (assoc-ref outputs "out") "/bin"))))))))
10100 ;; Remove the python-ipython propagated input, to avoid the cycle
10101 (propagated-inputs
10102 (alist-delete
10103 "python-ipython"
10104 (package-propagated-inputs python-jupyter-console)))))
10105
10106 (define-public python-qtconsole
10107 (package
10108 (name "python-qtconsole")
10109 (version "4.4.3")
10110 (source
10111 (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "qtconsole" version))
10114 (sha256
10115 (base32
10116 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10117 (build-system python-build-system)
10118 (arguments
10119 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10120 ;; but we only have the LTS version 5.x. This means that there might be
10121 ;; runtime errors, but since this is a dependency of the Jupyter package,
10122 ;; and Jupyter can be used without the qtconsole we can overlook this for
10123 ;; now.
10124 `(#:tests? #f
10125 #:phases
10126 (modify-phases %standard-phases
10127 (add-before 'check 'pre-check
10128 (lambda _
10129 (setenv "QT_QPA_PLATFORM" "offscreen")
10130 #t)))))
10131 (propagated-inputs
10132 `(("python-ipykernel" ,python-ipykernel)
10133 ("python-ipython" ,python-ipython)))
10134 (native-inputs
10135 `(("python-pytest" ,python-pytest)))
10136 (home-page "http://jupyter.org")
10137 (synopsis "Jupyter Qt console")
10138 (description "This package provides a Qt-based console for Jupyter with
10139 support for rich media output.")
10140 (license license:bsd-3)))
10141
10142 (define-public python-jsbeautifier
10143 (package
10144 (name "python-jsbeautifier")
10145 (version "1.10.2")
10146 (home-page "https://github.com/beautify-web/js-beautify")
10147 (source (origin
10148 (method git-fetch)
10149 (uri (git-reference
10150 (url home-page)
10151 (commit (string-append "v" version))))
10152 (file-name (git-file-name name version))
10153 (sha256
10154 (base32
10155 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10156 (build-system python-build-system)
10157 (arguments
10158 `(#:phases (modify-phases %standard-phases
10159 (add-after 'unpack 'chdir
10160 (lambda _
10161 ;; The upstream Git repository contains all the code,
10162 ;; but this package only builds the python code.
10163 (chdir "python")
10164 #t))
10165 (add-after 'unpack 'patch-python-six-requirements
10166 (lambda _
10167 (substitute* "python/setup.py"
10168 (("six>=1.12.0")
10169 "six>=1.11.0"))
10170 #t)))))
10171 (propagated-inputs
10172 `(("python-editorconfig" ,python-editorconfig)
10173 ("python-six" ,python-six)))
10174 (native-inputs
10175 `(("python-pytest" ,python-pytest)))
10176 (synopsis "JavaScript unobfuscator and beautifier")
10177 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10178 popular online obfuscators.")
10179 (license license:expat)))
10180
10181 (define-public jupyter
10182 (package
10183 (name "jupyter")
10184 (version "1.0.0")
10185 (source
10186 (origin
10187 (method url-fetch)
10188 (uri (pypi-uri "jupyter" version))
10189 (sha256
10190 (base32
10191 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10192 (build-system python-build-system)
10193 (arguments '(#:tests? #f)) ; there are none.
10194 (propagated-inputs
10195 `(("python-ipykernel" ,python-ipykernel)
10196 ("python-ipywidgets" ,python-ipywidgets)
10197 ("python-jupyter-console" ,python-jupyter-console)
10198 ("python-nbconvert" ,python-nbconvert)
10199 ("python-notebook" ,python-notebook)
10200 ("python-qtconsole" ,python-qtconsole)))
10201 (native-search-paths
10202 (list (search-path-specification
10203 (variable "JUPYTER_PATH")
10204 (files '("share/jupyter")))))
10205 (home-page "https://jupyter.org")
10206 (synopsis "Web application for interactive documents")
10207 (description
10208 "The Jupyter Notebook is a web application that allows you to create and
10209 share documents that contain live code, equations, visualizations and
10210 explanatory text. Uses include: data cleaning and transformation, numerical
10211 simulation, statistical modeling, machine learning and much more.")
10212 (license license:bsd-3)))
10213
10214 (define-public python-chardet
10215 (package
10216 (name "python-chardet")
10217 (version "3.0.4")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "chardet" version))
10222 (sha256
10223 (base32
10224 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10225 (native-inputs
10226 `(("python-hypothesis" ,python-hypothesis)
10227 ("python-pytest" ,python-pytest)
10228 ("python-pytest-runner" ,python-pytest-runner)))
10229 (build-system python-build-system)
10230 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10231 (arguments `(#:tests? #f))
10232 (home-page "https://github.com/chardet/chardet")
10233 (synopsis "Universal encoding detector for Python 2 and 3")
10234 (description
10235 "This package provides @code{chardet}, a Python module that can
10236 automatically detect a wide range of file encodings.")
10237 (license license:lgpl2.1+)))
10238
10239 (define-public python2-chardet
10240 (package-with-python2 python-chardet))
10241
10242 (define-public python-docopt
10243 (package
10244 (name "python-docopt")
10245 (version "0.6.2")
10246 (source
10247 (origin
10248 (method git-fetch)
10249 ;; The release on PyPI does not include tests.
10250 (uri (git-reference
10251 (url "https://github.com/docopt/docopt")
10252 (commit version)))
10253 (file-name (git-file-name name version))
10254 (sha256
10255 (base32
10256 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10257 (build-system python-build-system)
10258 (native-inputs
10259 `(("python-pytest" ,python-pytest)))
10260 (arguments
10261 `(#:phases
10262 (modify-phases %standard-phases
10263 (replace 'check
10264 (lambda _ (invoke "py.test"))))))
10265 (home-page "http://docopt.org")
10266 (synopsis "Command-line interface description language for Python")
10267 (description "This library allows the user to define a command-line
10268 interface from a program's help message rather than specifying it
10269 programmatically with command-line parsers like @code{getopt} and
10270 @code{argparse}.")
10271 (license license:expat)))
10272
10273 (define-public python2-docopt
10274 (package-with-python2 python-docopt))
10275
10276 (define-public python-pythondialog
10277 (package
10278 (name "python-pythondialog")
10279 (version "3.4.0")
10280 (source
10281 (origin
10282 (method url-fetch)
10283 (uri (pypi-uri "pythondialog" version))
10284 (sha256
10285 (base32
10286 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10287 (build-system python-build-system)
10288 (arguments
10289 `(#:phases
10290 (modify-phases %standard-phases
10291 (add-after 'unpack 'patch-path
10292 (lambda* (#:key inputs #:allow-other-keys)
10293 (let* ((dialog (assoc-ref inputs "dialog")))
10294 ;; Since this library really wants to grovel the search path, we
10295 ;; must hardcode dialog's store path into it.
10296 (substitute* "dialog.py"
10297 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10298 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10299 #t))))
10300 #:tests? #f)) ; no test suite
10301 (propagated-inputs
10302 `(("dialog" ,dialog)))
10303 (home-page "http://pythondialog.sourceforge.net/")
10304 (synopsis "Python interface to the UNIX dialog utility")
10305 (description "A Python wrapper for the dialog utility. Its purpose is to
10306 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10307 This allows one to make simple text-mode user interfaces on Unix-like systems")
10308 (license license:lgpl2.1)
10309 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10310
10311 (define-public python2-pythondialog
10312 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10313 (package
10314 (inherit base)
10315 (version (package-version python-pythondialog))
10316 (source (origin
10317 (method url-fetch)
10318 (uri (pypi-uri "python2-pythondialog" version))
10319 (sha256
10320 (base32
10321 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10322
10323 (define-public python-configobj
10324 (package
10325 (name "python-configobj")
10326 (version "5.0.6")
10327 (source (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "configobj" version))
10330 (sha256
10331 (base32
10332 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10333 ;; Patch setup.py so it looks for python-setuptools, which is
10334 ;; required to parse the keyword 'install_requires' in setup.py.
10335 (patches (search-patches "python-configobj-setuptools.patch"))))
10336 (build-system python-build-system)
10337 (propagated-inputs
10338 `(("python-six" ,python-six)))
10339 (synopsis "Config file reading, writing and validation")
10340 (description "ConfigObj is a simple but powerful config file reader and
10341 writer: an ini file round tripper. Its main feature is that it is very easy to
10342 use, with a straightforward programmer’s interface and a simple syntax for
10343 config files.")
10344 (home-page "https://github.com/DiffSK/configobj")
10345 (license license:bsd-3)))
10346
10347 (define-public python2-configobj
10348 (package-with-python2 python-configobj))
10349
10350 (define-public python-configargparse
10351 (package
10352 (name "python-configargparse")
10353 (version "0.14.0")
10354 (source (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "ConfigArgParse" version))
10357 (sha256
10358 (base32
10359 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10360 (build-system python-build-system)
10361 (native-inputs
10362 `(("python-pyyaml" ,python-pyyaml)))
10363 (arguments
10364 `(#:phases
10365 (modify-phases %standard-phases
10366 (replace 'check
10367 (lambda _
10368 ;; Bypass setuptools-shim because one test relies on "setup.py"
10369 ;; being the first argument passed to the python call.
10370 ;;
10371 ;; NOTE: Many tests do not run because they rely on Python's
10372 ;; built-in test.test_argparse, but we remove the unit tests from
10373 ;; our Python installation.
10374 (invoke "python" "setup.py" "test"))))))
10375 (synopsis "Replacement for argparse")
10376 (description "A drop-in replacement for argparse that allows options to also
10377 be set via config files and/or environment variables.")
10378 (home-page "https://github.com/bw2/ConfigArgParse")
10379 (license license:expat)))
10380
10381 (define-public python2-configargparse
10382 (package-with-python2 python-configargparse))
10383
10384 (define-public python-argparse-manpage
10385 (package
10386 (name "python-argparse-manpage")
10387 (version "1.1")
10388 (source
10389 (origin
10390 (method url-fetch)
10391 (uri (pypi-uri "argparse-manpage" version))
10392 (sha256
10393 (base32
10394 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10395 (build-system python-build-system)
10396 (home-page "https://github.com/praiskup/argparse-manpage")
10397 (synopsis "Build manual page from Python's ArgumentParser object")
10398 (description
10399 "This package provides tools to build manual pages from Python's
10400 @code{ArgumentParser} object.")
10401 (license license:asl2.0)))
10402
10403 (define-public python-contextlib2
10404 (package
10405 (name "python-contextlib2")
10406 (version "0.6.0.post1")
10407 (source
10408 (origin
10409 (method url-fetch)
10410 (uri (pypi-uri "contextlib2" version))
10411 (sha256
10412 (base32
10413 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10414 (build-system python-build-system)
10415 (home-page "https://contextlib2.readthedocs.org/")
10416 (synopsis "Tools for decorators and context managers")
10417 (description "This module is primarily a backport of the Python
10418 3.2 contextlib to earlier Python versions. Like contextlib, it
10419 provides utilities for common tasks involving decorators and context
10420 managers. It also contains additional features that are not part of
10421 the standard library.")
10422 (properties `((python2-variant . ,(delay python2-contextlib2))))
10423 (license license:psfl)))
10424
10425 (define-public python2-contextlib2
10426 (let ((base (package-with-python2
10427 (strip-python2-variant python-contextlib2))))
10428 (package
10429 (inherit base)
10430 (arguments
10431 (substitute-keyword-arguments (package-arguments base)
10432 ((#:phases phases)
10433 `(modify-phases ,phases
10434 (replace 'check
10435 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10436 (native-inputs
10437 `(("python2-unittest2" ,python2-unittest2))))))
10438
10439 ;; This package is used by python2-pytest via python2-importlib-metadata,
10440 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10441 (define-public python2-contextlib2-bootstrap
10442 (hidden-package
10443 (package/inherit
10444 python2-contextlib2
10445 (name "python2-contextlib2-bootstrap")
10446 (arguments
10447 `(#:tests? #f
10448 ,@(package-arguments python2-contextlib2)))
10449 (native-inputs '()))))
10450
10451 (define-public python-texttable
10452 (package
10453 (name "python-texttable")
10454 (version "1.6.2")
10455 (source
10456 (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "texttable" version))
10459 (sha256
10460 (base32
10461 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10462 (build-system python-build-system)
10463 (arguments
10464 `(#:phases
10465 (modify-phases %standard-phases
10466 (replace 'check
10467 (lambda _ (invoke "pytest" "tests.py"))))))
10468 (native-inputs
10469 `(("python-pytest" ,python-pytest)))
10470 (home-page "https://github.com/foutaise/texttable/")
10471 (synopsis "Python module for creating simple ASCII tables")
10472 (description "Texttable is a Python module for creating simple ASCII
10473 tables.")
10474 (license license:expat)))
10475
10476 (define-public python2-texttable
10477 (package-with-python2 python-texttable))
10478
10479 (define-public python-atomicwrites
10480 (package
10481 (name "python-atomicwrites")
10482 (version "1.3.0")
10483 (source (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "atomicwrites" version))
10486 (sha256
10487 (base32
10488 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10489 (build-system python-build-system)
10490 (synopsis "Atomic file writes in Python")
10491 (description "Library for atomic file writes using platform dependent tools
10492 for atomic file system operations.")
10493 (home-page "https://github.com/untitaker/python-atomicwrites")
10494 (license license:expat)))
10495
10496 (define-public python2-atomicwrites
10497 (package-with-python2 python-atomicwrites))
10498
10499 (define-public python-click-threading
10500 (package
10501 (name "python-click-threading")
10502 (version "0.4.4")
10503 (source (origin
10504 (method url-fetch)
10505 (uri (pypi-uri "click-threading" version))
10506 (sha256
10507 (base32
10508 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10509 (build-system python-build-system)
10510 (propagated-inputs
10511 `(("python-click" ,python-click)))
10512 (synopsis "Utilities for multithreading in Click")
10513 (description "This package provides utilities for multithreading in Click
10514 applications.")
10515 (home-page "https://github.com/click-contrib/click-threading")
10516 (license license:expat)))
10517
10518 (define-public python-click-log
10519 (package
10520 (name "python-click-log")
10521 (version "0.3.2")
10522 (source (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "click-log" version))
10525 (sha256
10526 (base32
10527 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10528 (build-system python-build-system)
10529 (propagated-inputs
10530 `(("python-click" ,python-click)))
10531 (synopsis "Logging for click applications")
10532 (description "This package provides a Python library for logging Click
10533 applications.")
10534 (home-page "https://github.com/click-contrib/click-log")
10535 (license license:expat)))
10536
10537 (define-public python-apipkg
10538 (package
10539 (name "python-apipkg")
10540 (version "1.5")
10541 (source (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "apipkg" version))
10544 (sha256
10545 (base32
10546 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10547 (build-system python-build-system)
10548 (native-inputs
10549 `(("python-pytest" ,python-pytest)
10550 ("python-setuptools-scm" ,python-setuptools-scm)))
10551 (synopsis "Namespace control and lazy-import mechanism")
10552 (description "With apipkg you can control the exported namespace of a Python
10553 package and greatly reduce the number of imports for your users. It is a small
10554 pure Python module that works on virtually all Python versions.")
10555 (home-page "https://github.com/pytest-dev/apipkg")
10556 (license license:expat)))
10557
10558 (define-public python-execnet
10559 (package
10560 (name "python-execnet")
10561 (version "1.4.1")
10562 (source (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "execnet" version))
10565 (sha256
10566 (base32
10567 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10568 (build-system python-build-system)
10569 (arguments
10570 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10571 ;; The two test failures are caused by the lack of an `ssh` executable.
10572 ;; The test suite can be run with pytest after the 'install' phase.
10573 #:tests? #f))
10574 (native-inputs
10575 `(("python-pytest" ,python-pytest)
10576 ("python-setuptools-scm" ,python-setuptools-scm)))
10577 (propagated-inputs
10578 `(("python-apipkg" ,python-apipkg)))
10579 (synopsis "Rapid multi-Python deployment")
10580 (description "Execnet provides a share-nothing model with
10581 channel-send/receive communication for distributing execution across many
10582 Python interpreters across version, platform and network barriers. It has a
10583 minimal and fast API targeting the following uses:
10584 @enumerate
10585 @item distribute tasks to (many) local or remote CPUs
10586 @item write and deploy hybrid multi-process applications
10587 @item write scripts to administer multiple environments
10588 @end enumerate")
10589 (home-page "https://codespeak.net/execnet/")
10590 (license license:expat)))
10591
10592 (define-public python2-execnet
10593 (package-with-python2 python-execnet))
10594
10595 (define-public python-icalendar
10596 (package
10597 (name "python-icalendar")
10598 (version "4.0.5")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "icalendar" version))
10602 (sha256
10603 (base32
10604 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10605 (build-system python-build-system)
10606 (propagated-inputs
10607 `(("python-dateutil" ,python-dateutil)
10608 ("python-pytz" ,python-pytz)))
10609 (synopsis "Python library for parsing iCalendar files")
10610 (description "The icalendar package is a parser/generator of iCalendar
10611 files for use with Python.")
10612 (home-page "https://github.com/collective/icalendar")
10613 (license license:bsd-2)))
10614
10615 (define-public python-args
10616 (package
10617 (name "python-args")
10618 (version "0.1.0")
10619 (source (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "args" version))
10622 (sha256
10623 (base32
10624 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10625 (build-system python-build-system)
10626 (home-page "https://github.com/kennethreitz/args")
10627 (synopsis "Command-line argument parser")
10628 (description
10629 "This library provides a Python module to parse command-line arguments.")
10630 (license license:bsd-3)))
10631
10632 (define-public python2-args
10633 (package-with-python2 python-args))
10634
10635 (define-public python-clint
10636 (package
10637 (name "python-clint")
10638 (version "0.5.1")
10639 (source (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "clint" version))
10642 (sha256
10643 (base32
10644 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10645 (build-system python-build-system)
10646 (arguments
10647 '(#:phases
10648 (modify-phases %standard-phases
10649 (replace 'check
10650 (lambda _ (invoke "py.test" "-v"))))))
10651 (native-inputs
10652 `(("python-pytest" ,python-pytest)))
10653 (propagated-inputs
10654 `(("python-args" ,python-args)))
10655 (home-page "https://github.com/kennethreitz/clint")
10656 (synopsis "Command-line interface tools")
10657 (description
10658 "Clint is a Python module filled with a set of tools for developing
10659 command-line applications, including tools for colored and indented
10660 output, progress bar display, and pipes.")
10661 (license license:isc)))
10662
10663 (define-public python2-clint
10664 (package-with-python2 python-clint))
10665
10666 (define-public python-rply
10667 (package
10668 (name "python-rply")
10669 (version "0.7.5")
10670 (source (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "rply" version))
10673 (sha256
10674 (base32
10675 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10676 (build-system python-build-system)
10677 (propagated-inputs
10678 `(("python-appdirs" ,python-appdirs)))
10679 (home-page "https://github.com/alex/rply")
10680 (synopsis "Parser generator for Python")
10681 (description
10682 "This package provides a pure Python based parser generator, that also
10683 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10684 with a new public API, and RPython support.")
10685 (license license:bsd-3)))
10686
10687 (define-public python2-rply
10688 (package-with-python2 python-rply))
10689
10690 (define-public python-hy
10691 (package
10692 (name "python-hy")
10693 (version "0.18.0")
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "hy" version))
10697 (sha256
10698 (base32
10699 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10700 (build-system python-build-system)
10701 (arguments
10702 '(#:phases
10703 (modify-phases %standard-phases
10704 (add-before 'install 'set-HOME
10705 (lambda _
10706 (setenv "HOME" "/tmp") #t))
10707 (replace 'check
10708 (lambda _
10709 ;; Tests require write access to HOME.
10710 (setenv "HOME" "/tmp")
10711 (invoke "nosetests"))))))
10712 (native-inputs
10713 `(("python-coverage" ,python-coverage)
10714 ("python-nose" ,python-nose)))
10715 (propagated-inputs
10716 `(("python-astor" ,python-astor)
10717 ("python-colorama" ,python-colorama)
10718 ("python-rply" ,python-rply)
10719 ("python-funcparserlib"
10720 ,python-funcparserlib)))
10721 (home-page "http://hylang.org/")
10722 (synopsis "Lisp frontend to Python")
10723 (description
10724 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10725 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10726 Python at your fingertips, in Lisp form.")
10727 (license license:expat)))
10728
10729 (define-public python2-functools32
10730 (package
10731 (name "python2-functools32")
10732 (version "3.2.3-2")
10733 (source
10734 (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "functools32" version))
10737 (sha256
10738 (base32
10739 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10740 (build-system python-build-system)
10741 (arguments
10742 `(#:python ,python-2
10743 #:tests? #f)) ; no test target
10744 (home-page "https://github.com/MiCHiLU/python-functools32")
10745 (synopsis
10746 "Backport of the functools module from Python 3.2.3")
10747 (description
10748 "This package is a backport of the @code{functools} module from Python
10749 3.2.3 for use with older versions of Python and PyPy.")
10750 (license license:expat)))
10751
10752 (define-public python2-subprocess32
10753 (package
10754 (name "python2-subprocess32")
10755 (version "3.2.7")
10756 (source (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "subprocess32" version))
10759 (sha256
10760 (base32
10761 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10762 (patches
10763 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10764 (build-system python-build-system)
10765 (arguments
10766 `(#:python ,python-2
10767 ;; The test suite fails with Python > 2.7.13:
10768 ;; import test.support
10769 ;; ImportError: No module named support
10770 #:tests? #f
10771 #:phases
10772 (modify-phases %standard-phases
10773 (add-after 'unpack 'patch-/bin/sh
10774 (lambda _
10775 (substitute* '("subprocess32.py"
10776 "test_subprocess32.py")
10777 (("/bin/sh") (which "sh")))
10778 #t)))))
10779 (home-page "https://github.com/google/python-subprocess32")
10780 (synopsis "Backport of the subprocess module from Python 3.2")
10781 (description
10782 "This is a backport of the @code{subprocess} standard library module
10783 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10784 new features. On POSIX systems it is guaranteed to be reliable when used
10785 in threaded applications. It includes timeout support from Python 3.3 but
10786 otherwise matches 3.2’s API.")
10787 (license license:psfl)))
10788
10789 (define-public python2-futures
10790 (package
10791 (name "python2-futures")
10792 (version "3.2.0")
10793 (source
10794 (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "futures" version))
10797 (sha256
10798 (base32
10799 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10800 (build-system python-build-system)
10801 (arguments
10802 `(#:python ,python-2
10803 #:phases
10804 (modify-phases %standard-phases
10805 (replace 'check
10806 (lambda _
10807 (invoke "python" "test_futures.py")
10808 #t)))))
10809 (home-page "https://github.com/agronholm/pythonfutures")
10810 (synopsis
10811 "Backport of the concurrent.futures package from Python 3.2")
10812 (description
10813 "The concurrent.futures module provides a high-level interface for
10814 asynchronously executing callables. This package backports the
10815 concurrent.futures package from Python 3.2")
10816 (license license:bsd-3)))
10817
10818 (define-public python-promise
10819 (package
10820 (name "python-promise")
10821 (version "0.4.2")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "promise" version))
10826 (sha256
10827 (base32
10828 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10829 (build-system python-build-system)
10830 ;; Tests wants python-futures, which is a python2 only program, and
10831 ;; can't be found by python-promise at test time.
10832 (arguments `(#:tests? #f))
10833 (home-page "https://github.com/syrusakbary/promise")
10834 (synopsis "Promises/A+ implementation for Python")
10835 (description
10836 "Promises/A+ implementation for Python")
10837 (properties `((python2-variant . ,(delay python2-promise))))
10838 (license license:expat)))
10839
10840 (define-public python2-promise
10841 (let ((promise (package-with-python2
10842 (strip-python2-variant python-promise))))
10843 (package (inherit promise)
10844 (arguments (substitute-keyword-arguments (package-arguments promise)
10845 ((#:tests? _) #t)))
10846 (native-inputs
10847 `(("python2-futures" ,python2-futures)
10848 ("python2-pytest" ,python2-pytest)
10849 ,@(package-native-inputs promise))))))
10850
10851 (define-public python-progressbar2
10852 (package
10853 (name "python-progressbar2")
10854 (version "3.51.3")
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "progressbar2" version))
10859 (sha256
10860 (base32
10861 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10862 (build-system python-build-system)
10863 (propagated-inputs
10864 `(("python-six" ,python-six)
10865 ("python-utils" ,python-utils)))
10866 (native-inputs
10867 `(("python-flake8" ,python-flake8)
10868 ("python-freezegun" ,python-freezegun)
10869 ("python-pycodestyle" ,python-pycodestyle)
10870 ("python-pytest" ,python-pytest)
10871 ("python-pytest-cache" ,python-pytest-cache)
10872 ("python-pytest-cov" ,python-pytest-cov)
10873 ("python-pytest-flakes" ,python-pytest-flakes)
10874 ("python-pytest-pep8" ,python-pytest-pep8)
10875 ("python-sphinx" ,python-sphinx)))
10876 (home-page "https://github.com/WoLpH/python-progressbar")
10877 (synopsis "Text progress bar library for Python")
10878 (description
10879 "This package provides a Python progressbar library to provide
10880 visual (yet text based) progress to long running operations.")
10881 (license license:bsd-3)))
10882
10883 (define-public python-progressbar33
10884 (package
10885 (name "python-progressbar33")
10886 (version "2.4")
10887 (source
10888 (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "progressbar33" version))
10891 (sha256
10892 (base32
10893 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10894 (build-system python-build-system)
10895 (home-page "https://github.com/germangh/python-progressbar")
10896 (synopsis "Text progress bar library for Python")
10897 (description
10898 "This package provides a text progress bar library for Python. This
10899 version only differs from the original @code{progressbar} package in that it
10900 uses relative package imports instead of absolute imports, which is necessary
10901 for the module to work under Python 3.3.")
10902 ;; Either or both of these licenses may be selected.
10903 (license (list license:lgpl2.1+ license:bsd-3))))
10904
10905 (define-public python-colorama
10906 (package
10907 (name "python-colorama")
10908 (version "0.4.4")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "colorama" version))
10913 (sha256
10914 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10915 (build-system python-build-system)
10916 (synopsis "Colored terminal text rendering for Python")
10917 (description "Colorama is a Python library for rendering colored terminal
10918 text.")
10919 (home-page "https://pypi.org/project/colorama/")
10920 (license license:bsd-3)))
10921
10922 (define-public python2-colorama
10923 (package-with-python2 python-colorama))
10924
10925 (define-public python-rsa
10926 (package
10927 (name "python-rsa")
10928 (version "3.4.2")
10929 (source
10930 (origin
10931 (method url-fetch)
10932 (uri (pypi-uri "rsa" version))
10933 (sha256
10934 (base32
10935 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10936 (build-system python-build-system)
10937 (propagated-inputs
10938 `(("python-pyasn1" ,python-pyasn1)))
10939 (synopsis "Pure-Python RSA implementation")
10940 (description "Python-RSA is a pure-Python RSA implementation. It supports
10941 encryption and decryption, signing and verifying signatures, and key
10942 generation according to PKCS#1 version 1.5. It can be used as a Python
10943 library as well as on the command line.")
10944 (home-page "https://stuvel.eu/rsa")
10945 (license license:asl2.0)))
10946
10947 (define-public python2-rsa
10948 (package-with-python2 python-rsa))
10949
10950 (define-public python-pluggy
10951 (package
10952 (name "python-pluggy")
10953 (version "0.13.1")
10954 (source
10955 (origin
10956 (method url-fetch)
10957 (uri (pypi-uri "pluggy" version))
10958 (sha256
10959 (base32
10960 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10961 (build-system python-build-system)
10962 (native-inputs
10963 `(("python-setuptools-scm" ,python-setuptools-scm)))
10964 (synopsis "Plugin and hook calling mechanism for Python")
10965 (description "Pluggy is an extraction of the plugin manager as used by
10966 Pytest but stripped of Pytest specific details.")
10967 (home-page "https://pypi.org/project/pluggy/")
10968 (properties `((python2-variant . ,(delay python2-pluggy))))
10969 (license license:expat)))
10970
10971 (define-public python2-pluggy
10972 (let ((base (package-with-python2 (strip-python2-variant
10973 python-pluggy))))
10974 (package/inherit
10975 base
10976 (propagated-inputs
10977 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10978
10979 ;; This package requires python2-importlib-metadata, but that package
10980 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10981 ;; variant to solve the circular dependency.
10982 (define-public python2-pluggy-bootstrap
10983 (hidden-package
10984 (package/inherit
10985 python2-pluggy
10986 (name "python2-pluggy-bootstrap")
10987 (arguments
10988 `(#:tests? #f
10989 ,@(package-arguments python2-pluggy)))
10990 (propagated-inputs
10991 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10992
10993 (define-public python-tox
10994 (package
10995 (name "python-tox")
10996 (version "3.20.0")
10997 (source
10998 (origin
10999 (method url-fetch)
11000 (uri (pypi-uri "tox" version))
11001 (sha256
11002 (base32
11003 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11004 (build-system python-build-system)
11005 (arguments
11006 ;; FIXME: Tests require pytest-timeout, which itself requires
11007 ;; pytest>=2.8.0 for installation.
11008 '(#:tests? #f))
11009 (propagated-inputs
11010 `(("python-filelock" ,python-filelock)
11011 ("python-packaging" ,python-packaging)
11012 ("python-pluggy" ,python-pluggy)
11013 ("python-py" ,python-py)
11014 ("python-six" ,python-six)
11015 ("python-toml" ,python-toml)
11016 ("python-virtualenv" ,python-virtualenv)))
11017 (native-inputs
11018 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11019 ("python-pytest" ,python-pytest) ; >= 2.3.5
11020 ("python-setuptools-scm" ,python-setuptools-scm)))
11021 (home-page "https://tox.readthedocs.io")
11022 (synopsis "Virtualenv-based automation of test activities")
11023 (description "Tox is a generic virtualenv management and test command line
11024 tool. It can be used to check that a package installs correctly with
11025 different Python versions and interpreters, or run tests in each type of
11026 supported environment, or act as a frontend to continuous integration
11027 servers.")
11028 (license license:expat)))
11029
11030 (define-public python2-tox
11031 (package-with-python2 python-tox))
11032
11033 (define-public python-jmespath
11034 (package
11035 (name "python-jmespath")
11036 (version "0.9.4")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "jmespath" version))
11041 (sha256
11042 (base32
11043 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11044 (build-system python-build-system)
11045 (native-inputs
11046 `(("python-nose" ,python-nose)))
11047 (synopsis "JSON Matching Expressions")
11048 (description "JMESPath (pronounced “james path”) is a Python library that
11049 allows one to declaratively specify how to extract elements from a JSON
11050 document.")
11051 (home-page "https://github.com/jmespath/jmespath.py")
11052 (license license:expat)))
11053
11054 (define-public python2-jmespath
11055 (package-with-python2 python-jmespath))
11056
11057 (define-public python-symengine
11058 (package
11059 (name "python-symengine")
11060 (version "0.6.1")
11061 (source
11062 (origin
11063 (method url-fetch)
11064 (uri (pypi-uri "symengine" version))
11065 (sha256
11066 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11067 (build-system python-build-system)
11068 (native-inputs
11069 `(("cmake" ,cmake)
11070 ("python-cython" ,python-cython)))
11071 (inputs
11072 `(("symengine" ,symengine)))
11073 (home-page "https://github.com/symengine/symengine.py")
11074 (synopsis "Python library providing wrappers to SymEngine")
11075 (description
11076 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11077 manipulation library.")
11078 (license license:expat)))
11079
11080 (define-public python-botocore
11081 (package
11082 (name "python-botocore")
11083 (version "1.15.26")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "botocore" version))
11088 (sha256
11089 (base32
11090 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
11091 (build-system python-build-system)
11092 (arguments
11093 ;; FIXME: Many tests are failing.
11094 '(#:tests? #f))
11095 (propagated-inputs
11096 `(("python-dateutil" ,python-dateutil)
11097 ("python-docutils" ,python-docutils)
11098 ("python-jmespath" ,python-jmespath)))
11099 (native-inputs
11100 `(("python-mock" ,python-mock)
11101 ("python-nose" ,python-nose)
11102 ("behave" ,behave)
11103 ("python-tox" ,python-tox)
11104 ("python-urllib3" ,python-urllib3)
11105 ("python-wheel" ,python-wheel)))
11106 (home-page "https://github.com/boto/botocore")
11107 (synopsis "Low-level interface to AWS")
11108 (description "Botocore is a Python library that provides a low-level
11109 interface to the Amazon Web Services (AWS) API.")
11110 (license license:asl2.0)))
11111
11112 (define-public python2-botocore
11113 (package-with-python2 python-botocore))
11114
11115 (define-public python-pyfiglet
11116 (package
11117 (name "python-pyfiglet")
11118 (version "0.8.post1")
11119 (source
11120 (origin
11121 (method url-fetch)
11122 (uri (pypi-uri "pyfiglet" version))
11123 (sha256
11124 (base32
11125 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11126 (build-system python-build-system)
11127 (home-page "https://github.com/pwaller/pyfiglet")
11128 (synopsis "Draw ASCII art big letters in Python")
11129 (description "This module lets you draw large letter from ordinary characters
11130 in pure Python.")
11131 (license license:expat)))
11132
11133 (define-public python-xdo
11134 (package
11135 (name "python-xdo")
11136 (version "0.3")
11137 (source (origin
11138 (method url-fetch)
11139 (uri (string-append
11140 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11141 "python-xdo_" version ".orig.tar.gz"))
11142 (sha256
11143 (base32
11144 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11145 (build-system python-build-system)
11146 (arguments
11147 '(#:phases
11148 (modify-phases %standard-phases
11149 (add-before 'install 'patch-libxdo-path
11150 ;; Hardcode the path of dynamically loaded libxdo library.
11151 (lambda* (#:key inputs #:allow-other-keys)
11152 (let ((libxdo (string-append
11153 (assoc-ref inputs "xdotool")
11154 "/lib/libxdo.so")))
11155 (substitute* "xdo/_xdo.py"
11156 (("find_library\\(\"xdo\"\\)")
11157 (simple-format #f "\"~a\"" libxdo)))
11158 #t))))
11159 #:tests? #f)) ; no tests provided
11160 (propagated-inputs
11161 `(("python-six" ,python-six)))
11162 (inputs
11163 `(("xdotool" ,xdotool)
11164 ("libX11" ,libx11)))
11165 (home-page "https://tracker.debian.org/pkg/python-xdo")
11166 (synopsis "Python library for simulating X11 keyboard/mouse input")
11167 (description "Provides bindings to libxdo for manipulating X11 via simulated
11168 input. (Note that this is mostly a legacy library; you may wish to look at
11169 python-xdo for newer bindings.)")
11170 (license license:bsd-3)))
11171
11172 (define-public python2-xdo
11173 (package-with-python2 python-xdo))
11174
11175 (define-public python-mako
11176 (package
11177 (name "python-mako")
11178 (version "1.1.3")
11179 (source
11180 (origin
11181 (method url-fetch)
11182 (uri (pypi-uri "Mako" version))
11183 (sha256
11184 (base32
11185 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11186 (build-system python-build-system)
11187 (arguments
11188 `(#:phases (modify-phases %standard-phases
11189 (replace 'check
11190 (lambda* (#:key tests? #:allow-other-keys)
11191 (if tests?
11192 (invoke "nosetests" "-v")
11193 (format #t "test suite not run~%"))
11194 #t)))))
11195 (propagated-inputs
11196 `(("python-markupsafe" ,python-markupsafe)))
11197 (native-inputs
11198 `(("python-mock" ,python-mock)
11199 ("python-nose" ,python-nose)))
11200 (home-page "https://www.makotemplates.org/")
11201 (synopsis "Templating language for Python")
11202 (description "Mako is a templating language for Python that compiles
11203 templates into Python modules.")
11204 (license license:expat)))
11205
11206 (define-public python2-mako
11207 (package-with-python2 python-mako))
11208
11209 (define-public python-waitress
11210 (package
11211 (name "python-waitress")
11212 (version "1.1.0")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "waitress" version))
11217 (patches (search-patches "python-waitress-fix-tests.patch"))
11218 (sha256
11219 (base32
11220 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11221 (build-system python-build-system)
11222 (home-page "https://github.com/Pylons/waitress")
11223 (synopsis "Waitress WSGI server")
11224 (description "Waitress is meant to be a production-quality pure-Python WSGI
11225 server with very acceptable performance.")
11226 (license license:zpl2.1)))
11227
11228 (define-public python2-waitress
11229 (package-with-python2 python-waitress))
11230
11231 (define-public python-whichcraft
11232 (package
11233 (name "python-whichcraft")
11234 (version "0.6.1")
11235 (source
11236 (origin
11237 (method url-fetch)
11238 (uri (pypi-uri "whichcraft" version))
11239 (sha256
11240 (base32
11241 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11242 (build-system python-build-system)
11243 (native-inputs
11244 `(("python-pytest" ,python-pytest)))
11245 (home-page "https://github.com/pydanny/whichcraft")
11246 (synopsis "Cross-platform cross-python shutil.which functionality")
11247 (description
11248 "This package provides a shim of the shutil.which function that's
11249 designed to work across multiple versions of Python.")
11250 (license license:bsd-3)))
11251
11252 (define-public python-cookiecutter
11253 (package
11254 (name "python-cookiecutter")
11255 (version "1.7.2")
11256 (source
11257 (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "cookiecutter" version))
11260 (sha256
11261 (base32
11262 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11263 (build-system python-build-system)
11264 (native-inputs
11265 `(("python-freezegun" ,python-freezegun)
11266 ("python-pytest" ,python-pytest)
11267 ("python-pytest-catchlog" ,python-pytest-catchlog)
11268 ("python-pytest-cov" ,python-pytest-cov)
11269 ("python-pytest-mock" ,python-pytest-mock)))
11270 (propagated-inputs
11271 `(("python-binaryornot" ,python-binaryornot)
11272 ("python-click" ,python-click)
11273 ("python-future" ,python-future)
11274 ("python-jinja2" ,python-jinja2)
11275 ("python-jinja2-time" ,python-jinja2-time)
11276 ("python-poyo" ,python-poyo)
11277 ("python-requests" ,python-requests)
11278 ("python-slugify" ,python-slugify)
11279 ("python-text-unidecode" ,python-text-unidecode)
11280 ("python-whichcraft" ,python-whichcraft)))
11281 (home-page "https://github.com/cookiecutter/cookiecutter")
11282 (synopsis
11283 "Command-line utility that creates projects from project templates")
11284 (description
11285 "This package provides a command-line utility that creates projects from
11286 project templates, e.g. creating a Python package project from a Python package
11287 project template.")
11288 (license license:bsd-3)))
11289
11290 (define-public python-pyquery
11291 (package
11292 (name "python-pyquery")
11293 (version "1.2.17")
11294 (source
11295 (origin
11296 (method url-fetch)
11297 (uri (pypi-uri "pyquery" version))
11298 (sha256
11299 (base32
11300 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11301 (build-system python-build-system)
11302 (native-inputs
11303 `(("python-webob" ,python-webob)
11304 ("python-webtest" ,python-webtest)))
11305 (propagated-inputs
11306 `(("python-lxml" ,python-lxml)
11307 ("python-cssselect" ,python-cssselect)))
11308 (home-page "https://github.com/gawel/pyquery")
11309 (synopsis "Make jQuery-like queries on xml documents")
11310 (description "pyquery allows you to make jQuery queries on xml documents.
11311 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11312 fast xml and html manipulation.")
11313 (license license:bsd-3)))
11314
11315 (define-public python-anyjson
11316 (package
11317 (name "python-anyjson")
11318 (version "0.3.3")
11319 (source
11320 (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "anyjson" version))
11323 (sha256
11324 (base32
11325 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11326 (build-system python-build-system)
11327 (arguments
11328 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11329 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11330 ;; whatever) so this transformation needs to be done before the tests
11331 ;; can be run. Maybe we could add a build step to transform beforehand
11332 ;; but it could be annoying/difficult.
11333 ;; We can enable tests for the Python 2 version, though, and do below.
11334 #:tests? #f))
11335 (home-page "https://bitbucket.org/runeh/anyjson/")
11336 (synopsis
11337 "Wraps best available JSON implementation in a common interface")
11338 (description
11339 "Anyjson loads whichever is the fastest JSON module installed
11340 and provides a uniform API regardless of which JSON implementation is used.")
11341 (license license:bsd-3)
11342 (properties `((python2-variant . ,(delay python2-anyjson))))))
11343
11344 (define-public python2-anyjson
11345 (let ((anyjson (package-with-python2
11346 (strip-python2-variant python-anyjson))))
11347 (package
11348 (inherit anyjson)
11349 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11350 #:tests? #t
11351 ,@(package-arguments anyjson)))
11352 (native-inputs `(("python2-nose" ,python2-nose))))))
11353
11354 (define-public python-amqp
11355 (package
11356 (name "python-amqp")
11357 (version "2.3.2")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "amqp" version))
11362 (sha256
11363 (base32
11364 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11365 (build-system python-build-system)
11366 (native-inputs
11367 `(("python-case" ,python-case)
11368 ("python-pytest-sugar" ,python-pytest-sugar)
11369 ("python-mock" ,python-mock)))
11370 (propagated-inputs
11371 `(("python-vine" ,python-vine)))
11372 (home-page "https://github.com/celery/py-amqp")
11373 (synopsis
11374 "Low-level AMQP client for Python (fork of amqplib)")
11375 (description
11376 "This is a fork of amqplib which was originally written by Barry Pederson.
11377 It is maintained by the Celery project, and used by kombu as a pure python
11378 alternative when librabbitmq is not available.")
11379 (license license:lgpl2.1+)
11380 (properties `((python2-variant . ,(delay python2-amqp))))))
11381
11382 (define-public python2-amqp
11383 (let ((amqp (package-with-python2
11384 (strip-python2-variant python-amqp))))
11385 (package
11386 (inherit amqp)
11387 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11388 ;; unmaintained. Weirdly, does not do this on the python 3
11389 ;; version?
11390 #:tests? #f
11391 ,@(package-arguments amqp))))))
11392
11393 (define-public python-txamqp
11394 (package
11395 (name "python-txamqp")
11396 (version "0.8.2")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "txAMQP" version))
11401 (sha256
11402 (base32
11403 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11404 (build-system python-build-system)
11405 (propagated-inputs
11406 `(("python-six" ,python-six)
11407 ("python-twisted" ,python-twisted)))
11408 (home-page "https://github.com/txamqp/txamqp")
11409 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11410 (description
11411 "This package provides a Python library for communicating with AMQP peers
11412 and brokers using the asynchronous networking framework Twisted. It contains
11413 all the necessary code to connect, send and receive messages to/from an
11414 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11415 also includes support for using Thrift RPC over AMQP in Twisted
11416 applications.")
11417 (license license:asl2.0)))
11418
11419 (define-public python2-txamqp
11420 (package-with-python2 python-txamqp))
11421
11422 (define-public python-kombu
11423 (package
11424 (name "python-kombu")
11425 (version "4.2.2")
11426 (source
11427 (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "kombu" version))
11430 (sha256
11431 (base32
11432 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11433 (build-system python-build-system)
11434 (native-inputs
11435 `(("python-mock" ,python-mock)
11436 ("python-case" ,python-case)
11437 ("python-pyro4" ,python-pyro4)
11438 ("python-pytest-sugar" ,python-pytest-sugar)
11439 ("python-pytz" ,python-pytz)))
11440 (propagated-inputs
11441 `(("python-anyjson" ,python-anyjson)
11442 ("python-amqp" ,python-amqp)
11443 ("python-redis" ,python-redis)))
11444 (home-page "https://kombu.readthedocs.io")
11445 (synopsis "Message passing library for Python")
11446 (description "The aim of Kombu is to make messaging in Python as easy as
11447 possible by providing an idiomatic high-level interface for the AMQ protocol,
11448 and also provide proven and tested solutions to common messaging problems.
11449 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11450 message orientation, queuing, routing, reliability and security, for which the
11451 RabbitMQ messaging server is the most popular implementation.")
11452 (license license:bsd-3)
11453 (properties `((python2-variant . ,(delay python2-kombu))))))
11454
11455 (define-public python2-kombu
11456 (let ((kombu (package-with-python2
11457 (strip-python2-variant python-kombu))))
11458 (package
11459 (inherit kombu)
11460 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11461 ;; It works fine on the python3 variant.
11462 #:tests? #f
11463 ,@(package-arguments kombu)))
11464 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11465 ,@(package-native-inputs kombu))))))
11466
11467 (define-public python-billiard
11468 (package
11469 (name "python-billiard")
11470 (version "3.5.0.5")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "billiard" version))
11475 (sha256
11476 (base32
11477 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11478 (build-system python-build-system)
11479 (native-inputs
11480 `(("python-case" ,python-case)
11481 ("python-pytest" ,python-pytest)))
11482 (home-page "https://github.com/celery/billiard")
11483 (synopsis
11484 "Python multiprocessing fork with improvements and bugfixes")
11485 (description
11486 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11487 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11488 pyprocessing package. This standalone variant is intended to be compatible with
11489 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11490 (license license:bsd-3)
11491 (properties `((python2-variant . ,(delay python2-billiard))))))
11492
11493 (define-public python2-billiard
11494 (let ((billiard (package-with-python2
11495 (strip-python2-variant python-billiard))))
11496 (package
11497 (inherit billiard)
11498 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11499 ("python2-mock" ,python2-mock)
11500 ,@(package-native-inputs billiard))))))
11501
11502 (define-public python-celery
11503 (package
11504 (name "python-celery")
11505 (version "4.2.1")
11506 (source
11507 (origin
11508 (method url-fetch)
11509 (uri (pypi-uri "celery" version))
11510 (sha256
11511 (base32
11512 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11513 (build-system python-build-system)
11514 (arguments
11515 '(;; TODO The tests fail with Python 3.7
11516 ;; https://github.com/celery/celery/issues/4849
11517 #:tests? #f
11518 #:phases
11519 (modify-phases %standard-phases
11520 (add-after 'unpack 'patch-requirements
11521 (lambda _
11522 (substitute* "requirements/test.txt"
11523 (("pytest>=3\\.0,<3\\.3")
11524 "pytest>=3.0"))
11525 #t)))))
11526 (native-inputs
11527 `(("python-case" ,python-case)
11528 ("python-pytest" ,python-pytest)))
11529 (propagated-inputs
11530 `(("python-pytz" ,python-pytz)
11531 ("python-billiard" ,python-billiard)
11532 ("python-kombu" ,python-kombu)))
11533 (home-page "https://celeryproject.org")
11534 (synopsis "Distributed Task Queue")
11535 (description "Celery is an asynchronous task queue/job queue based on
11536 distributed message passing. It is focused on real-time operation, but
11537 supports scheduling as well. The execution units, called tasks, are executed
11538 concurrently on a single or more worker servers using multiprocessing,
11539 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11540 synchronously (wait until ready).")
11541 (license license:bsd-3)
11542 (properties `((python2-variant . ,(delay python2-celery))))))
11543
11544 (define-public python2-celery
11545 (let ((celery (package-with-python2
11546 (strip-python2-variant python-celery))))
11547 (package
11548 (inherit celery)
11549 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11550 ("python2-mock" ,python2-mock)
11551 ,@(package-native-inputs celery))))))
11552
11553 (define-public python-translitcodec
11554 (package
11555 (name "python-translitcodec")
11556 (version "0.4.0")
11557 (source
11558 (origin
11559 (method url-fetch)
11560 (uri (pypi-uri "translitcodec" version))
11561 (sha256
11562 (base32
11563 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11564 (build-system python-build-system)
11565 (arguments
11566 `(#:tests? #f)) ; no tests provided
11567 (home-page
11568 "https://github.com/claudep/translitcodec")
11569 (synopsis
11570 "Unicode to 8-bit charset transliteration codec")
11571 (description
11572 "This package contains codecs for transliterating ISO 10646 texts into
11573 best-effort representations using smaller coded character sets (ASCII,
11574 ISO 8859, etc.).")
11575 (license license:expat)))
11576
11577 (define-public python2-translitcodec
11578 (package-with-python2 python-translitcodec))
11579
11580 (define-public python-editor
11581 (package
11582 (name "python-editor")
11583 (version "1.0.4")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "python-editor" version))
11588 (sha256
11589 (base32
11590 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11591 (build-system python-build-system)
11592 (arguments
11593 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11594 (home-page "https://github.com/fmoo/python-editor")
11595 (synopsis "Programmatically open an editor, capture the result")
11596 (description
11597 "python-editor is a library that provides the editor module for
11598 programmatically interfacing with your system's $EDITOR.")
11599 (license license:asl2.0)))
11600
11601 (define-public python2-editor
11602 (package-with-python2 python-editor))
11603
11604 (define-public python-vobject
11605 (package
11606 (name "python-vobject")
11607 (version "0.9.6.1")
11608 (source (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "vobject" version))
11611 (sha256
11612 (base32
11613 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11614 (build-system python-build-system)
11615 (arguments
11616 '(;; The test suite relies on some non-portable Windows interfaces.
11617 #:tests? #f))
11618 (propagated-inputs
11619 `(("python-dateutil" ,python-dateutil)
11620 ("python-pyicu" ,python-pyicu)))
11621 (synopsis "Parse and generate vCard and vCalendar files")
11622 (description "Vobject is intended to be a full featured Python package for
11623 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11624 are supported and well tested. vCard 3.0 files are supported, and all data
11625 should be imported, but only a few components are understood in a sophisticated
11626 way.")
11627 (home-page "https://eventable.github.io/vobject/")
11628 (license license:asl2.0)))
11629
11630 (define-public python2-vobject
11631 (package-with-python2 python-vobject))
11632
11633 (define-public python-munkres
11634 (package
11635 (name "python-munkres")
11636 (version "1.0.8")
11637 (source (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "munkres" version))
11640 (sha256
11641 (base32
11642 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11643 (build-system python-build-system)
11644 (arguments
11645 '(#:tests? #f)) ; no test suite
11646 (home-page "https://software.clapper.org/munkres/")
11647 (synopsis "Implementation of the Munkres algorithm")
11648 (description "The Munkres module provides an implementation of the Munkres
11649 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11650 useful for solving the Assignment Problem.")
11651 (license license:bsd-3)))
11652
11653 (define-public python2-munkres
11654 (package-with-python2 python-munkres))
11655
11656 (define-public python-whoosh
11657 (package
11658 (name "python-whoosh")
11659 (version "2.7.4")
11660 (source
11661 (origin
11662 (method url-fetch)
11663 (uri (pypi-uri "Whoosh" version))
11664 (sha256
11665 (base32
11666 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11667 (build-system python-build-system)
11668 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11669 (native-inputs
11670 `(("python-pytest" ,python-pytest)))
11671 (home-page "https://bitbucket.org/mchaput/whoosh")
11672 (synopsis "Full text indexing, search, and spell checking library")
11673 (description
11674 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11675 checking library.")
11676 (license license:bsd-2)))
11677
11678 (define-public python2-whoosh
11679 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11680 (package (inherit whoosh)
11681 (propagated-inputs
11682 `(("python2-backport-ssl-match-hostname"
11683 ,python2-backport-ssl-match-hostname)
11684 ,@(package-propagated-inputs whoosh))))))
11685
11686 (define-public python-pathlib
11687 (package
11688 (name "python-pathlib")
11689 (version "1.0.1")
11690 (source (origin
11691 (method url-fetch)
11692 (uri (pypi-uri "pathlib" version))
11693 (sha256
11694 (base32
11695 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11696 (build-system python-build-system)
11697 ;; The tests depend on the internal "test" module, which does not provide
11698 ;; a stable interface.
11699 (arguments `(#:tests? #f))
11700 (home-page "https://pathlib.readthedocs.org/")
11701 (synopsis "Object-oriented file system paths")
11702 (description "Pathlib offers a set of classes to handle file system paths.
11703 It offers the following advantages over using string objects:
11704
11705 @enumerate
11706 @item No more cumbersome use of os and os.path functions. Everything can
11707 be done easily through operators, attribute accesses, and method calls.
11708 @item Embodies the semantics of different path types. For example,
11709 comparing Windows paths ignores casing.
11710 @item Well-defined semantics, eliminating any inconsistencies or
11711 ambiguities (forward vs. backward slashes, etc.).
11712 @end enumerate
11713
11714 Note: In Python 3.4, pathlib is now part of the standard library. For other
11715 Python versions please consider python-pathlib2 instead, which tracks the
11716 standard library module. This module (python-pathlib) isn't maintained
11717 anymore.")
11718 (license license:expat)))
11719
11720 (define-public python2-pathlib
11721 (package-with-python2 python-pathlib))
11722
11723 (define-public python2-pathlib2
11724 (package
11725 (name "python2-pathlib2")
11726 (version "2.3.5")
11727 (source (origin
11728 (method url-fetch)
11729 (uri (pypi-uri "pathlib2" version))
11730 (sha256
11731 (base32
11732 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11733 (build-system python-build-system)
11734 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11735 ;; version is 3.4 which already includes this package as part of the
11736 ;; standard library.
11737 (arguments
11738 `(#:python ,python-2))
11739 (propagated-inputs
11740 `(("python2-scandir" ,python2-scandir)
11741 ("python2-six" ,python2-six)))
11742 (home-page "https://pypi.org/project/pathlib2/")
11743 (synopsis "Object-oriented file system paths - backport of standard
11744 pathlib module")
11745 (description "The goal of pathlib2 is to provide a backport of standard
11746 pathlib module which tracks the standard library module, so all the newest
11747 features of the standard pathlib can be used also on older Python versions.
11748
11749 Pathlib offers a set of classes to handle file system paths. It offers the
11750 following advantages over using string objects:
11751
11752 @enumerate
11753 @item No more cumbersome use of os and os.path functions. Everything can
11754 be done easily through operators, attribute accesses, and method calls.
11755 @item Embodies the semantics of different path types. For example,
11756 comparing Windows paths ignores casing.
11757 @item Well-defined semantics, eliminating any inconsistencies or
11758 ambiguities (forward vs. backward slashes, etc.).
11759 @end enumerate")
11760 (license license:expat)))
11761
11762 (define-public python2-pathlib2-bootstrap
11763 (hidden-package
11764 (package
11765 (inherit python2-pathlib2)
11766 (name "python2-pathlib2-bootstrap")
11767 (propagated-inputs
11768 `(("python2-scandir" ,python2-scandir)
11769 ("python2-six" ,python2-six-bootstrap))))))
11770
11771 (define-public python-jellyfish
11772 (package
11773 (name "python-jellyfish")
11774 (version "0.5.6")
11775 (source (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "jellyfish" version))
11778 (sha256
11779 (base32
11780 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11781 (build-system python-build-system)
11782 (native-inputs
11783 `(("python-pytest" ,python-pytest)))
11784 (home-page "https://github.com/jamesturk/jellyfish")
11785 (synopsis "Approximate and phonetic matching of strings")
11786 (description "Jellyfish uses a variety of string comparison and phonetic
11787 encoding algorithms to do fuzzy string matching.")
11788 (license license:bsd-2)
11789 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11790
11791 (define-public python2-jellyfish
11792 (let ((jellyfish (package-with-python2
11793 (strip-python2-variant python-jellyfish))))
11794 (package (inherit jellyfish)
11795 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11796 ,@(package-native-inputs jellyfish))))))
11797
11798 (define-public python2-unicodecsv
11799 (package
11800 (name "python2-unicodecsv")
11801 (version "0.14.1")
11802 (source (origin
11803 (method git-fetch)
11804 ;; The test suite is not included in the PyPi release.
11805 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11806 (uri (git-reference
11807 (url "https://github.com/jdunck/python-unicodecsv")
11808 (commit version)))
11809 (file-name (git-file-name name version))
11810 (sha256
11811 (base32
11812 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11813 (build-system python-build-system)
11814 (arguments
11815 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11816 #:python ,python-2))
11817 (native-inputs
11818 `(("python2-unittest2" ,python2-unittest2)))
11819 (home-page "https://github.com/jdunck/python-unicodecsv")
11820 (synopsis "Unicode CSV module for Python 2")
11821 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11822 module, adding support for Unicode strings.")
11823 (license license:bsd-2)))
11824
11825 (define-public python-rarfile
11826 (package
11827 (name "python-rarfile")
11828 (version "2.8")
11829 (source (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "rarfile" version))
11832 (sha256
11833 (base32
11834 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11835 (build-system python-build-system)
11836 (arguments
11837 '(#:phases
11838 (modify-phases %standard-phases
11839 (replace 'check
11840 ;; Many tests fail, but the installation proceeds.
11841 (lambda _ (invoke "make" "-C" "test" "test"))))))
11842 (native-inputs
11843 `(("which" ,which))) ; required for tests
11844 (propagated-inputs
11845 `(("libarchive" ,libarchive)))
11846 (home-page "https://github.com/markokr/rarfile")
11847 (synopsis "RAR archive reader for Python")
11848 (description "This is Python module for RAR archive reading. The interface
11849 is made as zipfile like as possible.")
11850 (license license:isc)))
11851
11852 (define-public python2-rarfile
11853 (package-with-python2 python-rarfile))
11854
11855 (define-public python-magic
11856 (package
11857 (name "python-magic")
11858 (version "0.4.15")
11859 (source
11860 (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "python-magic" version))
11863 (sha256
11864 (base32
11865 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11866 (file-name (string-append name "-" version "-checkout"))))
11867 (build-system python-build-system)
11868 (arguments
11869 ;; The tests are unreliable, so don't run them. The tests fail
11870 ;; under Python3 because they were written for Python2 and
11871 ;; contain import statements that do not work in Python3. One of
11872 ;; the tests fails under Python2 because its assertions are
11873 ;; overly stringent; it relies on comparing output strings which
11874 ;; are brittle and can change depending on the version of
11875 ;; libmagic being used and the system on which the test is
11876 ;; running. In my case, under GuixSD 0.10.0, only one test
11877 ;; failed, and it seems to have failed only because the version
11878 ;; of libmagic that is packaged in Guix outputs a slightly
11879 ;; different (but not wrong) string than the one that the test
11880 ;; expected.
11881 '(#:tests? #f
11882 #:phases (modify-phases %standard-phases
11883 ;; Replace a specific method call with a hard-coded
11884 ;; path to the necessary libmagic.so file in the
11885 ;; store. If we don't do this, then the method call
11886 ;; will fail to find the libmagic.so file, which in
11887 ;; turn will cause any application using
11888 ;; python-magic to fail.
11889 (add-before 'build 'hard-code-path-to-libmagic
11890 (lambda* (#:key inputs #:allow-other-keys)
11891 (let ((file (assoc-ref inputs "file")))
11892 (substitute* "magic.py"
11893 (("ctypes.util.find_library\\('magic'\\)")
11894 (string-append "'" file "/lib/libmagic.so'")))
11895 #t)))
11896 (add-before 'install 'disable-egg-compression
11897 (lambda _
11898 (let ((port (open-file "setup.cfg" "a")))
11899 (display "\n[easy_install]\nzip_ok = 0\n"
11900 port)
11901 (close-port port)
11902 #t))))))
11903 (inputs
11904 ;; python-magic needs to be able to find libmagic.so.
11905 `(("file" ,file)))
11906 (home-page
11907 "https://github.com/ahupp/python-magic")
11908 (synopsis
11909 "File type identification using libmagic")
11910 (description
11911 "This module uses ctypes to access the libmagic file type
11912 identification library. It makes use of the local magic database and
11913 supports both textual and MIME-type output. Note that this module and
11914 the python-file module both provide a \"magic.py\" file; these two
11915 modules, which are different and were developed separately, both serve
11916 the same purpose: to provide Python bindings for libmagic.")
11917 (license license:expat)))
11918
11919 (define-public python2-magic
11920 (package-with-python2 python-magic))
11921
11922 (define-public python2-s3cmd
11923 (package
11924 (name "python2-s3cmd")
11925 (version "1.6.1")
11926 (source
11927 (origin
11928 (method url-fetch)
11929 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11930 "s3cmd-" version ".tar.gz"))
11931 (sha256
11932 (base32
11933 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11934 (build-system python-build-system)
11935 (arguments
11936 ;; s3cmd is written for python2 only and contains no tests.
11937 `(#:python ,python-2
11938 #:tests? #f))
11939 (propagated-inputs
11940 `(("python2-dateutil" ,python2-dateutil)
11941 ;; The python-file package also provides a magic.py module.
11942 ;; This is an unfortunate state of affairs; however, s3cmd
11943 ;; fails to install if it cannot find specifically the
11944 ;; python-magic package. Thus we include it, instead of using
11945 ;; python-file. Ironically, s3cmd sometimes works better
11946 ;; without libmagic bindings at all:
11947 ;; https://github.com/s3tools/s3cmd/issues/198
11948 ("python2-magic" ,python2-magic)))
11949 (home-page "https://s3tools.org/s3cmd")
11950 (synopsis "Command line tool for S3-compatible storage services")
11951 (description
11952 "S3cmd is a command line tool for uploading, retrieving and managing data
11953 in storage services that are compatible with the Amazon Simple Storage
11954 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11955 GnuPG encryption, and more. It also supports management of Amazon's
11956 CloudFront content delivery network.")
11957 (license license:gpl2+)))
11958
11959 (define-public python-pkgconfig
11960 (package
11961 (name "python-pkgconfig")
11962 (version "1.3.1")
11963 (source
11964 (origin
11965 (method url-fetch)
11966 (uri (pypi-uri "pkgconfig" version))
11967 (sha256
11968 (base32
11969 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11970 (build-system python-build-system)
11971 (native-inputs
11972 `(("python-nose" ,python-nose)))
11973 (inputs
11974 `(("pkg-config" ,pkg-config)))
11975 (arguments
11976 `(#:phases
11977 (modify-phases %standard-phases
11978 (add-before 'build 'patch
11979 ;; Hard-code the path to pkg-config.
11980 (lambda _
11981 (substitute* "pkgconfig/pkgconfig.py"
11982 (("cmd = 'pkg-config")
11983 (string-append "cmd = '" (which "pkg-config"))))
11984 #t))
11985 (replace 'check
11986 (lambda _
11987 (invoke "nosetests" "test.py"))))))
11988 (home-page "https://github.com/matze/pkgconfig")
11989 (synopsis "Python interface for pkg-config")
11990 (description "This module provides a Python interface to pkg-config. It
11991 can be used to find all pkg-config packages, check if a package exists,
11992 check if a package meets certain version requirements, query CFLAGS and
11993 LDFLAGS and parse the output to build extensions with setup.py.")
11994 (license license:expat)))
11995
11996 (define-public python2-pkgconfig
11997 (package-with-python2 python-pkgconfig))
11998
11999 (define-public python-bz2file
12000 (package
12001 (name "python-bz2file")
12002 (version "0.98")
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "bz2file" version))
12007 (sha256
12008 (base32
12009 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12010 (build-system python-build-system)
12011 (arguments
12012 `(#:tests? #f)) ; Tests use deprecated python modules.
12013 (home-page "https://github.com/nvawda/bz2file")
12014 (synopsis "Read and write bzip2-compressed files")
12015 (description
12016 "Bz2file is a Python library for reading and writing bzip2-compressed
12017 files. It contains a drop-in replacement for the I/O interface in the
12018 standard library's @code{bz2} module, including features from the latest
12019 development version of CPython that are not available in older releases.")
12020 (license license:asl2.0)))
12021
12022 (define-public python2-bz2file
12023 (package-with-python2 python-bz2file))
12024
12025 (define-public python-future
12026 (package
12027 (name "python-future")
12028 (version "0.17.1")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "future" version))
12033 (sha256
12034 (base32
12035 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12036 (build-system python-build-system)
12037 ;; Many tests connect to the network or are otherwise flawed.
12038 ;; https://github.com/PythonCharmers/python-future/issues/210
12039 (arguments
12040 `(#:tests? #f))
12041 (home-page "https://python-future.org")
12042 (synopsis "Single-source support for Python 3 and 2")
12043 (description
12044 "@code{python-future} is the missing compatibility layer between Python 2 and
12045 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12046 to support both Python 2 and Python 3 with minimal overhead.")
12047 (license license:expat)))
12048
12049 (define-public python2-future
12050 (package-with-python2 python-future))
12051
12052 (define-public python-cysignals
12053 (package
12054 (name "python-cysignals")
12055 (version "1.9.0")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (pypi-uri "cysignals" version))
12060 (sha256
12061 (base32
12062 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12063 (build-system python-build-system)
12064 (native-inputs
12065 `(("python-cython" ,python-cython)
12066 ("python-sphinx" ,python-sphinx)))
12067 (inputs
12068 `(("pari-gp" ,pari-gp)))
12069 (arguments
12070 `(#:modules ((guix build python-build-system)
12071 ((guix build gnu-build-system) #:prefix gnu:)
12072 (guix build utils))
12073 ;; FIXME: Tests are executed after installation and currently fail
12074 ;; when not installing into standard locations; the author is working
12075 ;; on a fix.
12076 #:tests? #f
12077 #:phases
12078 (modify-phases %standard-phases
12079 (add-before
12080 'build 'configure
12081 (assoc-ref gnu:%standard-phases 'configure)))))
12082 (home-page
12083 "https://github.com/sagemath/cysignals")
12084 (synopsis
12085 "Handling of interrupts and signals for Cython")
12086 (description
12087 "The cysignals package provides mechanisms to handle interrupts (and
12088 other signals and errors) in Cython code, using two related approaches,
12089 for mixed Cython/Python code or external C libraries and pure Cython code,
12090 respectively.")
12091 (license license:lgpl3+)))
12092
12093 (define-public python2-cysignals
12094 (package-with-python2 python-cysignals))
12095
12096 (define-public python2-shedskin
12097 (package
12098 (name "python2-shedskin")
12099 (version "0.9.4")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (string-append "https://github.com/shedskin/shedskin/"
12104 "releases/download/v" version
12105 "/shedskin-" version ".tgz"))
12106 (sha256
12107 (base32
12108 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12109 (build-system python-build-system)
12110 (arguments
12111 `(#:python ,python-2
12112 #:phases (modify-phases %standard-phases
12113 (add-after 'unpack 'fix-resulting-include-libs
12114 (lambda* (#:key inputs #:allow-other-keys)
12115 (let ((libgc (assoc-ref inputs "libgc"))
12116 (pcre (assoc-ref inputs "pcre")))
12117 (substitute* "shedskin/makefile.py"
12118 (("variable == 'CCFLAGS':[ ]*")
12119 (string-append "variable == 'CCFLAGS':\n"
12120 " line += ' -I " pcre "/include"
12121 " -I " libgc "/include'"))
12122 (("variable == 'LFLAGS':[ ]*")
12123 (string-append "variable == 'LFLAGS':\n"
12124 " line += ' -L" pcre "/lib"
12125 " -L " libgc "/lib'")))
12126 #t))))))
12127 (inputs `(("pcre" ,pcre)
12128 ("libgc" ,libgc)))
12129 (home-page "https://shedskin.github.io/")
12130 (synopsis "Experimental Python-2 to C++ Compiler")
12131 (description (string-append "This is an experimental compiler for a subset of
12132 Python. It generates C++ code and a Makefile."))
12133 (license (list license:gpl3 license:bsd-3 license:expat))))
12134
12135 (define-public python2-rope
12136 (package
12137 (name "python2-rope")
12138 (version "0.11.0")
12139 (source
12140 (origin
12141 (method url-fetch)
12142 (uri (pypi-uri "rope" version))
12143 (sha256
12144 (base32
12145 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12146 (arguments
12147 ;; Rope has only partial python3 support, see `python-rope'
12148 `(#:python ,python-2))
12149 (build-system python-build-system)
12150 (native-inputs
12151 `(("python2-unittest2" ,python2-unittest2)))
12152 (home-page "https://github.com/python-rope/rope")
12153 (synopsis "Refactoring library for Python")
12154 (description "Rope is a refactoring library for Python. It facilitates
12155 the renaming, moving and extracting of attributes, functions, modules, fields
12156 and parameters in Python 2 source code. These refactorings can also be applied
12157 to occurrences in strings and comments.")
12158 (license license:gpl2)))
12159
12160 (define-public python-rope
12161 (package
12162 (inherit python2-rope)
12163 (name "python-rope")
12164 (arguments `(#:python ,python-wrapper
12165 ;; XXX: Only partial python3 support, results in some failing
12166 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12167 #:tests? #f))
12168 (properties `((python2-variant . ,(delay python2-rope))))))
12169
12170 (define-public python-py3status
12171 (package
12172 (name "python-py3status")
12173 (version "3.21")
12174 (source
12175 (origin
12176 (method url-fetch)
12177 (uri (pypi-uri "py3status" version))
12178 (sha256
12179 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12180 (build-system python-build-system)
12181 (inputs
12182 `(("file" ,file)))
12183 (arguments
12184 '(#:phases
12185 (modify-phases %standard-phases
12186 ;; 'file' is used for detection of configuration file encoding
12187 ;; let's make link the dependency to particular input
12188 (add-before 'build 'patch-file-path
12189 (lambda* (#:key inputs #:allow-other-keys)
12190 (let ((file-path (assoc-ref inputs "file")))
12191 (substitute* "py3status/parse_config.py"
12192 (("\\[\"file\", \"-b\"")
12193 (string-append "['" file-path "/bin/file', '-b'")))
12194 #t))))
12195 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12196 (home-page "https://github.com/ultrabug/py3status")
12197 (synopsis "Extensible i3status wrapper written in Python")
12198 (description "py3status is an i3status wrapper which extends i3status
12199 functionality in a modular way, allowing you to extend your panel with your
12200 own code, responding to click events and updating clock every second.")
12201 (license license:bsd-3)))
12202
12203 (define-public python2-selectors2
12204 (package
12205 (name "python2-selectors2")
12206 (version "2.0.1")
12207 (source (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "selectors2" version))
12210 (sha256
12211 (base32
12212 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12213 (build-system python-build-system)
12214 (arguments
12215 `(#:python ,python-2))
12216 (native-inputs
12217 `(("python2-mock" ,python2-mock)
12218 ("python2-psutil" ,python2-psutil)))
12219 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12220 (synopsis "Backport of the selectors module from Python 3.5+")
12221 (description
12222 "This package provides a drop-in replacement for the @code{selectors}
12223 module in Python 3.5 and later.")
12224 (license license:expat)))
12225
12226 (define-public python-tblib
12227 (package
12228 (name "python-tblib")
12229 (version "1.6.0")
12230 (source (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "tblib" version))
12233 (sha256
12234 (base32
12235 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12236 (build-system python-build-system)
12237 (arguments
12238 `(#:phases
12239 (modify-phases %standard-phases
12240 (replace 'check
12241 (lambda _
12242 ;; Upstream runs tests after installation and the package itself
12243 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12244 ;; found.
12245 (setenv "PYTHONPATH"
12246 (string-append (getcwd) "/build/lib:"
12247 (getenv "PYTHONPATH")))
12248 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12249 (native-inputs
12250 `(("python-pytest" ,python-pytest)
12251 ("python-six" ,python-six)))
12252 (home-page "https://github.com/ionelmc/python-tblib")
12253 (synopsis "Traceback serialization library")
12254 (description
12255 "Traceback serialization allows you to:
12256
12257 @enumerate
12258 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12259 different processes. This allows better error handling when running code over
12260 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12261
12262 @item Parse traceback strings and raise with the parsed tracebacks.
12263 @end enumerate\n")
12264 (license license:bsd-3)))
12265
12266 (define-public python2-tblib
12267 (package-with-python2 python-tblib))
12268
12269 (define-public python-greenlet
12270 (package
12271 (name "python-greenlet")
12272 (version "0.4.16")
12273 (source (origin
12274 (method url-fetch)
12275 (uri (pypi-uri "greenlet" version))
12276 (sha256
12277 (base32
12278 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12279 (build-system python-build-system)
12280 (home-page "https://greenlet.readthedocs.io/")
12281 (synopsis "Lightweight in-process concurrent programming")
12282 (description
12283 "Greenlet package is a spin-off of Stackless, a version of CPython
12284 that supports micro-threads called \"tasklets\". Tasklets run
12285 pseudo-concurrently (typically in a single or a few OS-level threads) and
12286 are synchronized with data exchanges on \"channels\".")
12287 (license (list license:psfl license:expat))))
12288
12289 (define-public python2-greenlet
12290 (package-with-python2 python-greenlet))
12291
12292 (define-public python-objgraph
12293 (package
12294 (name "python-objgraph")
12295 (version "3.4.1")
12296 (source
12297 (origin
12298 (method url-fetch)
12299 (uri (pypi-uri "objgraph" version))
12300 (sha256
12301 (base32
12302 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12303 (build-system python-build-system)
12304 (propagated-inputs
12305 `(("python-graphviz" ,python-graphviz)))
12306 (native-inputs
12307 `(("python-mock" ,python-mock)
12308 ("graphviz" ,graphviz)))
12309 (home-page "https://mg.pov.lt/objgraph/")
12310 (synopsis "Draw Python object reference graphs with graphviz")
12311 (description
12312 "This package provides tools to draw Python object reference graphs with
12313 graphviz.")
12314 (license license:expat)))
12315
12316 (define-public python2-objgraph
12317 (package-with-python2 python-objgraph))
12318
12319 (define-public python-gevent
12320 (package
12321 (name "python-gevent")
12322 (version "20.6.2")
12323 (source (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "gevent" version))
12326 (sha256
12327 (base32
12328 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12329 (modules '((guix build utils)))
12330 (snippet
12331 '(begin
12332 ;; unbunding libev and c-ares
12333 (delete-file-recursively "deps")
12334 #t))))
12335 (build-system python-build-system)
12336 (arguments
12337 `(#:modules ((ice-9 ftw)
12338 (ice-9 match)
12339 (srfi srfi-26)
12340 (guix build utils)
12341 (guix build python-build-system))
12342 #:phases (modify-phases %standard-phases
12343 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12344 (lambda _
12345 (substitute* "src/gevent/subprocess.py"
12346 (("/bin/sh") (which "sh")))
12347 (for-each (lambda (file)
12348 (substitute* file
12349 (("/bin/sh") (which "sh"))
12350 (("/bin/true") (which "true"))))
12351 (find-files "src/greentest" "\\.py$"))
12352 #t))
12353 (add-before 'build 'do-not-use-bundled-sources
12354 (lambda _
12355 (setenv "GEVENTSETUP_EMBED" "0")
12356
12357 ;; Prevent building bundled libev.
12358 (substitute* "setup.py"
12359 (("run_make=_BUILDING")
12360 "run_make=False"))
12361 #t))
12362 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12363 (lambda* (#:key inputs #:allow-other-keys)
12364 (let ((greenlet (string-append
12365 (assoc-ref inputs "python-greenlet")
12366 "/include")))
12367 (match (scandir greenlet
12368 (lambda (item)
12369 (string-prefix? "python" item)))
12370 ((python)
12371 (setenv "C_INCLUDE_PATH"
12372 (string-append greenlet "/" python ":"
12373 (or (getenv "C_INCLUDE_PATH")
12374 ""))))))
12375 #t))
12376 (add-before 'check 'pretend-to-be-CI
12377 (lambda _
12378 ;; A few tests are skipped due to network constraints or
12379 ;; get longer timeouts when running in a CI environment.
12380 ;; Piggy-back on that, as we need the same adjustments.
12381 (setenv "TRAVIS" "1")
12382 (setenv "APPVEYOR" "1")
12383 #t))
12384 (add-before 'check 'adjust-tests
12385 (lambda _
12386 (let ((disabled-tests
12387 '(;; These tests rely on networking which is not
12388 ;; available in the build container.
12389 "test_urllib2net.py"
12390 "test__server.py"
12391 "test__server_pywsgi.py"
12392 "test_socket.py"
12393 "test__socket.py"
12394 "test__socket_ssl.py"
12395 "test__socket_dns.py"
12396 "test__socket_dns6.py"
12397 "test___example_servers.py"
12398 "test__getaddrinfo_import.py"
12399 "test__examples.py"
12400 "test_httplib.py"
12401 "test_https.py"
12402 "test_urllib2_localnet.py"
12403 "test_ssl.py"
12404 "test__ssl.py"
12405 ;; XXX: These tests borrow functionality from the
12406 ;; Python builtin 'test' module, but it is not
12407 ;; installed with the Guix Python distribution.
12408 "test_smtpd.py"
12409 "test_wsgiref.py"
12410 "test_urllib2.py"
12411 "test_thread.py"
12412 "test_threading.py"
12413 "test__threading_2.py"
12414 ;; These tests rely on KeyboardInterrupts which do not
12415 ;; work inside the build container for some reason
12416 ;; (lack of controlling terminal?).
12417 "test_subprocess.py"
12418 "test__issues461_471.py"
12419 ;; TODO: Patch out the tests that use getprotobyname, etc
12420 ;; instead of disabling all the tests from these files.
12421 "test__resolver_dnspython.py"
12422 "test__doctests.py"
12423 "test__all__.py"
12424 "test___config.py"
12425 "test__execmodules.py")))
12426 (call-with-output-file "skipped_tests.txt"
12427 (lambda (port)
12428 (format port "~a~%"
12429 (string-join disabled-tests "\n"))))
12430 #t)))
12431 (replace 'check
12432 (lambda _
12433 ;; Make sure the build directory is on PYTHONPATH.
12434 (setenv "PYTHONPATH"
12435 (string-append
12436 (getenv "PYTHONPATH") ":"
12437 (getcwd) "/build/"
12438 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12439
12440 ;; Use the build daemons configured number of workers.
12441 (setenv "NWORKERS" (number->string (parallel-job-count)))
12442
12443 (invoke "python" "-m" "gevent.tests" "--config"
12444 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12445 (propagated-inputs
12446 `(("python-greenlet" ,python-greenlet)
12447 ("python-objgraph" ,python-objgraph)
12448 ("python-zope.event" ,python-zope-event)
12449 ("python-zope.interface" ,python-zope-interface)))
12450 (native-inputs
12451 `(("python-six" ,python-six)
12452
12453 ;; For tests.
12454 ("python-dnspython" ,python-dnspython)
12455 ("python-psutil" ,python-psutil)))
12456 (inputs
12457 `(("c-ares" ,c-ares)
12458 ("libev" ,libev)))
12459 (home-page "http://www.gevent.org/")
12460 (synopsis "Coroutine-based network library")
12461 (description
12462 "gevent is a coroutine-based Python networking library that uses greenlet
12463 to provide a high-level synchronous API on top of the libev event loop.")
12464 (license license:expat)
12465 (properties `((python2-variant . ,(delay python2-gevent))))))
12466
12467 (define-public python2-gevent
12468 (let ((base (package-with-python2
12469 (strip-python2-variant python-gevent))))
12470 (package
12471 (inherit base)
12472 (native-inputs `(,@(package-native-inputs base)
12473 ("python-mock" ,python2-mock)
12474 ("python2-selectors2" ,python2-selectors2))))))
12475
12476 (define-public python-fastimport
12477 (package
12478 (name "python-fastimport")
12479 (version "0.9.8")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "fastimport" version))
12484 (sha256
12485 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12486 (build-system python-build-system)
12487 (home-page "https://github.com/jelmer/python-fastimport")
12488 (synopsis "VCS fastimport parser and generator in Python")
12489 (description "This package provides a parser for and generator of the Git
12490 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12491 format.")
12492 (license license:gpl2+)))
12493
12494 (define-public python2-fastimport
12495 (package-with-python2 python-fastimport))
12496
12497 (define-public python-twisted
12498 (package
12499 (name "python-twisted")
12500 (version "19.7.0")
12501 (source (origin
12502 (method url-fetch)
12503 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12504 (sha256
12505 (base32
12506 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12507 (build-system python-build-system)
12508 (arguments
12509 '(#:tests? #f)) ; FIXME: some tests fail
12510 (propagated-inputs
12511 `(("python-zope-interface" ,python-zope-interface)
12512 ("python-pyhamcrest" ,python-pyhamcrest)
12513 ("python-incremental" ,python-incremental)
12514 ("python-hyperlink" ,python-hyperlink)
12515 ("python-constantly" ,python-constantly)
12516 ("python-automat" ,python-automat)))
12517 (home-page "https://twistedmatrix.com/")
12518 (synopsis "Asynchronous networking framework written in Python")
12519 (description
12520 "Twisted is an extensible framework for Python programming, with special
12521 focus on event-based network programming and multiprotocol integration.")
12522 (license license:expat)))
12523
12524 (define-public python2-twisted
12525 (package-with-python2 python-twisted))
12526
12527 (define-public python-pika
12528 (package
12529 (name "python-pika")
12530 (version "0.12.0")
12531 (source
12532 (origin
12533 (method url-fetch)
12534 (uri (pypi-uri "pika" version))
12535 (sha256
12536 (base32
12537 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12538 (build-system python-build-system)
12539 (native-inputs
12540 `(("python-pyev" ,python-pyev)
12541 ("python-tornado" ,python-tornado)
12542 ("python-twisted" ,python-twisted)))
12543 (home-page "https://pika.readthedocs.org")
12544 (synopsis "Pure Python AMQP Client Library")
12545 (description
12546 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12547 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12548 network support library.")
12549 (license license:bsd-3)))
12550
12551 (define-public python2-pika
12552 (package-with-python2 python-pika))
12553
12554 (define-public python-ply
12555 (package
12556 (name "python-ply")
12557 (version "3.11")
12558 (source
12559 (origin
12560 (method url-fetch)
12561 (uri (pypi-uri "ply" version))
12562 (sha256
12563 (base32
12564 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12565 (build-system python-build-system)
12566 (home-page "http://www.dabeaz.com/ply/")
12567 (synopsis "Python Lex & Yacc")
12568 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12569 It uses LR parsing and does extensive error checking.")
12570 (license license:bsd-3)))
12571
12572 (define-public python-tabulate
12573 (package
12574 (name "python-tabulate")
12575 (version "0.8.7")
12576 (source (origin
12577 (method url-fetch)
12578 (uri (pypi-uri "tabulate" version))
12579 (sha256
12580 (base32
12581 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12582 (build-system python-build-system)
12583 (arguments
12584 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12585 ;; and the latest release is not tagged in the upstream repository.
12586 '(#:tests? #f))
12587 (home-page "https://bitbucket.org/astanin/python-tabulate")
12588 (synopsis "Pretty-print tabular data")
12589 (description
12590 "Tabulate is a library and command-line utility to pretty-print tabular
12591 data in Python.")
12592 (license license:expat)))
12593
12594 (define-public python2-tabulate
12595 (package-with-python2 python-tabulate))
12596
12597 (define-public python-kazoo
12598 (package
12599 (name "python-kazoo")
12600 (version "2.4.0")
12601 (source
12602 (origin
12603 (method url-fetch)
12604 (uri (pypi-uri "kazoo" version))
12605 (sha256
12606 (base32
12607 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12608 (build-system python-build-system)
12609 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12610 (propagated-inputs
12611 `(("python-six" ,python-six)))
12612 (home-page "https://kazoo.readthedocs.org")
12613 (synopsis "High-level Zookeeper client library")
12614 (description
12615 "Kazoo is a Python client library for the Apache Zookeeper distributed
12616 application service. It is designed to be easy to use and to avoid common
12617 programming errors.")
12618 (license license:asl2.0)))
12619
12620 (define-public python2-kazoo
12621 (package-with-python2 python-kazoo))
12622
12623 (define-public python-pykafka
12624 (package
12625 (name "python-pykafka")
12626 (version "2.4.0")
12627 (source (origin
12628 (method url-fetch)
12629 (uri (pypi-uri "pykafka" version))
12630 (sha256
12631 (base32
12632 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12633 (build-system python-build-system)
12634 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12635 (propagated-inputs
12636 `(("python-gevent" ,python-gevent)
12637 ("python-kazoo" ,python-kazoo)
12638 ("python-tabulate" ,python-tabulate)))
12639 (inputs
12640 `(("librdkafka" ,librdkafka)))
12641 (home-page "https://pykafka.readthedocs.io/")
12642 (synopsis "Apache Kafka client for Python")
12643 (description
12644 "PyKafka is a client for the Apache Kafka distributed messaging system.
12645 It includes Python implementations of Kafka producers and consumers, which
12646 are optionally backed by a C extension built on librdkafka.")
12647 (license license:asl2.0)))
12648
12649 (define-public python2-pykafka
12650 (package-with-python2 python-pykafka))
12651
12652 (define-public python-wcwidth
12653 (package
12654 (name "python-wcwidth")
12655 (version "0.1.8")
12656 (source (origin
12657 (method url-fetch)
12658 (uri (pypi-uri "wcwidth" version))
12659 (sha256
12660 (base32
12661 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12662 (build-system python-build-system)
12663 (home-page "https://github.com/jquast/wcwidth")
12664 (synopsis "Measure number of terminal column cells of wide-character codes")
12665 (description "Wcwidth measures the number of terminal column cells of
12666 wide-character codes. It is useful for those implementing a terminal emulator,
12667 or programs that carefully produce output to be interpreted by one. It is a
12668 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12669 specified in POSIX.1-2001 and POSIX.1-2008.")
12670 (license license:expat)))
12671
12672 (define-public python2-wcwidth
12673 (package-with-python2 python-wcwidth))
12674
12675 (define-public python2-jsonrpclib
12676 (package
12677 (name "python2-jsonrpclib")
12678 (version "0.1.7")
12679 (source (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "jsonrpclib" version))
12682 (sha256
12683 (base32
12684 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12685 (build-system python-build-system)
12686 (arguments
12687 `(#:tests? #f
12688 #:python ,python-2))
12689 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12690 (synopsis "Implementation of JSON-RPC specification for Python")
12691 (description
12692 "This library is an implementation of the JSON-RPC specification.
12693 It supports both the original 1.0 specification, as well as the
12694 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12695 etc.")
12696 (license license:asl2.0)))
12697
12698 (define-public python-chai
12699 (package
12700 (name "python-chai")
12701 (version "1.1.2")
12702 (source (origin
12703 (method url-fetch)
12704 (uri (pypi-uri "chai" version))
12705 (sha256
12706 (base32
12707 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12708 (build-system python-build-system)
12709 (home-page "https://github.com/agoragames/chai")
12710 (synopsis "Mocking framework for Python")
12711 (description
12712 "Chai provides an api for mocking, stubbing and spying your python
12713 objects, patterned after the Mocha library for Ruby.")
12714 (license license:bsd-3)))
12715
12716 (define-public python2-chai
12717 (package-with-python2 python-chai))
12718
12719 (define-public python-inflection
12720 (package
12721 (name "python-inflection")
12722 (version "0.3.1")
12723 (source
12724 (origin (method url-fetch)
12725 (uri (pypi-uri "inflection" version))
12726 (sha256
12727 (base32
12728 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12729 (build-system python-build-system)
12730 (native-inputs
12731 `(("python-pytest" ,python-pytest)))
12732 (home-page "https://github.com/jpvanhal/inflection")
12733 (synopsis "Python string transformation library")
12734 (description
12735 "Inflection is a string transformation library. It singularizes
12736 and pluralizes English words, and transforms strings from CamelCase to
12737 underscored string.")
12738 (license license:expat)))
12739
12740 (define-public python2-inflection
12741 (package-with-python2 python-inflection))
12742
12743 (define-public python-pylev
12744 (package
12745 (name "python-pylev")
12746 (version "1.3.0")
12747 (source (origin
12748 (method url-fetch)
12749 (uri (pypi-uri "pylev" version))
12750 (sha256
12751 (base32
12752 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12753 (build-system python-build-system)
12754 (home-page "https://github.com/toastdriven/pylev")
12755 (synopsis "Levenshtein distance implementation in Python")
12756 (description "Pure Python Levenshtein implementation, based off the
12757 Wikipedia code samples at
12758 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12759 (license license:bsd-3)))
12760
12761 (define-public python2-pylev
12762 (package-with-python2 python-pylev))
12763
12764 (define-public python-cleo
12765 (package
12766 (name "python-cleo")
12767 (version "0.8.1")
12768 (source (origin
12769 (method url-fetch)
12770 (uri (pypi-uri "cleo" version))
12771 (sha256
12772 (base32
12773 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12774 (build-system python-build-system)
12775 (native-inputs
12776 `( ;; For testing
12777 ("python-mock" ,python-mock)
12778 ("python-pytest-mock" ,python-pytest-mock)
12779 ("python-pytest" ,python-pytest)))
12780 (propagated-inputs
12781 `(("python-backpack" ,python-backpack)
12782 ("python-clikit" ,python-clikit)
12783 ("python-pastel" ,python-pastel)
12784 ("python-pylev" ,python-pylev)))
12785 (home-page "https://github.com/sdispater/cleo")
12786 (synopsis "Command-line arguments library for Python")
12787 (description
12788 "Cleo allows you to create command-line commands with signature in
12789 docstring and colored output.")
12790 (license license:expat)))
12791
12792 (define-public python2-cleo
12793 (package-with-python2 python-cleo))
12794
12795 (define-public python-tomlkit
12796 (package
12797 (name "python-tomlkit")
12798 (version "0.6.0")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "tomlkit" version))
12803 (sha256
12804 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12805 (build-system python-build-system)
12806 (native-inputs
12807 `(("python-pytest" ,python-pytest)))
12808 (home-page "https://github.com/sdispater/tomlkit")
12809 (synopsis "Style-preserving TOML library")
12810 (description
12811 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12812 preserves all comments, indentations, whitespace and internal element ordering,
12813 and makes them accessible and editable via an intuitive API. It can also
12814 create new TOML documents from scratch using the provided helpers. Part of the
12815 implementation has been adapted, improved, and fixed from Molten.")
12816 (license license:expat)))
12817
12818 (define-public python-shellingham
12819 (package
12820 (name "python-shellingham")
12821 (version "1.3.2")
12822 (source
12823 (origin
12824 (method url-fetch)
12825 (uri (pypi-uri "shellingham" version))
12826 (sha256
12827 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12828 (build-system python-build-system)
12829 (arguments
12830 `(#:phases
12831 (modify-phases %standard-phases
12832 (add-after 'unpack 'restore-setup.py
12833 ;; setup.py will return in the next release.
12834 ;; <https://github.com/sarugaku/shellingham/issues/33>
12835 (lambda _
12836 (with-output-to-file "setup.py"
12837 (lambda _
12838 (display "from setuptools import setup\nsetup()\n")))
12839 #t)))))
12840 (home-page "https://github.com/sarugaku/shellingham")
12841 (synopsis "Tool to detect surrounding shell")
12842 (description
12843 "Shellingham detects what shell the current Python executable is
12844 running in.")
12845 (license license:isc)))
12846
12847 (define-public python-memcached
12848 (package
12849 (name "python-memcached")
12850 (version "1.59")
12851 (source
12852 (origin
12853 (method url-fetch)
12854 (uri (pypi-uri "python-memcached" version))
12855 (sha256
12856 (base32
12857 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12858 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12859 (build-system python-build-system)
12860 (propagated-inputs `(("python-six" ,python-six)))
12861 (home-page
12862 "https://github.com/linsomniac/python-memcached")
12863 (synopsis "Pure python memcached client")
12864 (description
12865 "This software is a pure Python interface to the memcached memory cache
12866 daemon. It is the client side software which allows storing values in one or
12867 more, possibly remote, memcached servers.")
12868 (license license:psfl)))
12869
12870 (define-public python-clikit
12871 (package
12872 (name "python-clikit")
12873 (version "0.6.2")
12874 (source
12875 (origin
12876 (method url-fetch)
12877 (uri (pypi-uri "clikit" version))
12878 (sha256
12879 (base32
12880 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12881 (build-system python-build-system)
12882 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12883 (propagated-inputs
12884 `(("python-crashtest" ,python-crashtest)
12885 ("python-pastel" ,python-pastel)
12886 ("python-pylev" ,python-pylev)))
12887 (home-page "https://github.com/sdispater/clikit")
12888 (synopsis "Group of utilities to build command line interfaces")
12889 (description
12890 "CliKit is a group of utilities to build testable command line
12891 interfaces.")
12892 (properties `((python2-variant . ,(delay python2-clikit))))
12893 (license license:expat)))
12894
12895 (define-public python2-clikit
12896 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12897 (package/inherit
12898 base
12899 (propagated-inputs
12900 `(("python-enum34" ,python2-enum34)
12901 ("python-typing" ,python2-typing)
12902 ,@(package-propagated-inputs base))))))
12903
12904 (define-public python-msgpack-python
12905 (package
12906 (name "python-msgpack-python")
12907 (version "0.5.6")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "msgpack-python" version))
12912 (sha256
12913 (base32
12914 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12915 (build-system python-build-system)
12916 (home-page "http://msgpack.org/")
12917 (synopsis "Package to deserialize messages in MessagePack binary format")
12918 (description
12919 "MessagePack is an efficient binary serialization format. It lets you
12920 exchange data among multiple languages like JSON. But it's faster and
12921 smaller. Small integers are encoded into a single byte, and typical short
12922 strings require only one extra byte in addition to the strings themselves.")
12923 (license license:asl2.0)))
12924
12925 (define-public python-cachy
12926 (package
12927 (name "python-cachy")
12928 (version "0.3.0")
12929 (source
12930 (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "cachy" version))
12933 (sha256
12934 (base32
12935 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12936 (build-system python-build-system)
12937 (arguments
12938 '(#:phases
12939 (modify-phases %standard-phases
12940 (replace 'check
12941 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12942 "pytest"))))))
12943 (native-inputs
12944 `(("memcached" ,memcached)
12945 ("python-fakeredis" ,python-fakeredis)
12946 ("python-flexmock" ,python-flexmock)
12947 ("python-pifpaf" ,python-pifpaf)
12948 ("python-pytest" ,python-pytest)))
12949 (propagated-inputs
12950 `(("python-memcached" ,python-memcached)
12951 ("python-msgpack-python" ,python-msgpack-python)
12952 ("python-redis" ,python-redis)))
12953 (home-page "https://github.com/sdispater/cachy")
12954 (synopsis "Simple yet effective caching library")
12955 (description
12956 "Cachy provides a simple yet effective caching library. A simple but
12957 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12958 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12959 (license license:expat)))
12960
12961 (define-public poetry
12962 (package
12963 (name "poetry")
12964 (version "1.0.10")
12965 ;; Poetry can only be built from source with Poetry.
12966 (source
12967 (origin
12968 (method url-fetch)
12969 (uri (pypi-uri "poetry" version))
12970 (sha256
12971 (base32
12972 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12973 (build-system python-build-system)
12974 (arguments
12975 `(#:tests? #f ;; Pypi does not have tests.
12976 #:phases
12977 (modify-phases %standard-phases
12978 (add-before 'build 'patch-setup-py
12979 (lambda _
12980 (substitute* "setup.py"
12981 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12982 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12983 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12984 ;; Reported upstream:
12985 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12986 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12987 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12988 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12989 #t)))))
12990 (propagated-inputs
12991 `(("python-cachecontrol" ,python-cachecontrol)
12992 ("python-cachy" ,python-cachy)
12993 ("python-cleo" ,python-cleo)
12994 ("python-clikit" ,python-clikit)
12995 ("python-html5lib" ,python-html5lib)
12996 ("python-jsonschema" ,python-jsonschema)
12997 ("python-keyring" ,python-keyring)
12998 ("python-msgpack-transitional" ,python-msgpack-transitional)
12999 ("python-pexpect" ,python-pexpect)
13000 ("python-pkginfo" ,python-pkginfo)
13001 ("python-pyparsing" ,python-pyparsing)
13002 ("python-pyrsistent" ,python-pyrsistent)
13003 ("python-requests" ,python-requests)
13004 ("python-requests-toolbelt" ,python-requests-toolbelt)
13005 ("python-shellingham" ,python-shellingham)
13006 ("python-tomlkit" ,python-tomlkit)
13007 ("python-virtualenv" ,python-virtualenv)))
13008 (home-page "https://python-poetry.org")
13009 (synopsis "Python dependency management and packaging made easy")
13010 (description "Poetry is a tool for dependency management and packaging
13011 in Python. It allows you to declare the libraries your project depends on and
13012 it will manage (install/update) them for you.")
13013 (license license:expat)))
13014
13015 (define-public python-lark-parser
13016 (package
13017 (name "python-lark-parser")
13018 (version "0.9.0")
13019 (source (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "lark-parser" version))
13022 (sha256
13023 (base32
13024 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13025 (build-system python-build-system)
13026 (home-page "https://github.com/lark-parser/lark")
13027 (synopsis "Multi-language parser for Python")
13028 (description
13029 "Lark is a parser built with a focus on ergonomics, performance and
13030 resilience. Lark can parse all context-free languages. That means it is
13031 capable of parsing almost any programming language out there, and to
13032 some degree most natural languages too.")
13033 (license license:expat)))
13034
13035 (define-public python-libcst
13036 (package
13037 (name "python-libcst")
13038 (version "0.3.8")
13039 (source (origin
13040 (method url-fetch)
13041 (uri (pypi-uri "libcst" version))
13042 (sha256
13043 (base32
13044 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13045 (build-system python-build-system)
13046 (arguments
13047 `(#:phases
13048 (modify-phases %standard-phases
13049 (add-after 'unpack 'remove-failing-tests
13050 (lambda _
13051 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13052 (delete-file "libcst/tests/test_fuzz.py")
13053 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13054 (delete-file "libcst/tests/test_pyre_integration.py")
13055 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13056 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13057 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13058 #t))
13059 (add-before 'check 'generate-test-data
13060 (lambda _
13061 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13062 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13063 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13064 (replace 'check
13065 (lambda _
13066 (invoke "python" "-m" "unittest")
13067 #t)))))
13068 (native-inputs
13069 `(("python-black" ,python-black)
13070 ("python-isort" ,python-isort)))
13071 (propagated-inputs
13072 `(("python-typing-extensions" ,python-typing-extensions)
13073 ("python-typing-inspect" ,python-typing-inspect)
13074 ("python-pyyaml" ,python-pyyaml)))
13075 (home-page "https://github.com/Instagram/LibCST")
13076 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13077 (description
13078 "LibCST parses Python source code as a CST tree that keeps all
13079 formatting details (comments, whitespaces, parentheses, etc). It's useful
13080 for building automated refactoring (codemod) applications and linters.
13081 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13082 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13083 naming node types and fields, LibCST creates a lossless CST that looks and
13084 feels like an AST.")
13085 (license (list license:expat
13086 ;; Some files unde libcst/_parser/ are under Python Software
13087 ;; Foundation license (see LICENSE file for details)
13088 license:psfl
13089 ;; libcst/_add_slots.py
13090 license:asl2.0))))
13091
13092 (define-public python-typing-inspect
13093 (package
13094 (name "python-typing-inspect")
13095 (version "0.6.0")
13096 (source (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "typing_inspect" version))
13099 (sha256
13100 (base32
13101 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13102 (build-system python-build-system)
13103 (propagated-inputs
13104 `(("python-mypy-extensions" ,python-mypy-extensions)
13105 ("python-typing-extensions" ,python-typing-extensions)))
13106 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13107 (synopsis "API for inspection of types in the Python @code{typing} module")
13108 (description
13109 "The @code{typing_inspect} module defines experimental API for runtime
13110 inspection of types defined in the Python standard typing module.")
13111 (license license:expat)))
13112
13113 (define-public python-lazy-object-proxy
13114 (package
13115 (name "python-lazy-object-proxy")
13116 (version "1.5.1")
13117 (source (origin
13118 (method url-fetch)
13119 (uri (pypi-uri "lazy-object-proxy" version))
13120 (sha256
13121 (base32
13122 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13123 (native-inputs
13124 `(("python-setuptools-scm" ,python-setuptools-scm)))
13125 (build-system python-build-system)
13126 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13127 (synopsis "Lazy object proxy for python")
13128 (description
13129 "Lazy object proxy is an object that wraps a callable but defers the call
13130 until the object is actually required, and caches the result of said call.")
13131 (license license:bsd-2)))
13132
13133 (define-public python2-lazy-object-proxy
13134 (package-with-python2 python-lazy-object-proxy))
13135
13136 (define-public python-dnspython
13137 (package
13138 (name "python-dnspython")
13139 (version "1.16.0")
13140 (source (origin
13141 (method url-fetch)
13142 (uri (string-append "http://www.dnspython.org/kits/"
13143 version "/dnspython-" version ".tar.gz"))
13144 (sha256
13145 (base32
13146 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13147 (build-system python-build-system)
13148 (arguments '(#:tests? #f)) ; XXX: requires internet access
13149 (home-page "http://www.dnspython.org")
13150 (synopsis "DNS toolkit for Python")
13151 (description
13152 "dnspython is a DNS toolkit for Python. It supports almost all record
13153 types. It can be used for queries, zone transfers, and dynamic updates.
13154 It supports TSIG authenticated messages and EDNS0.")
13155 (license license:expat)))
13156
13157 (define-public python2-dnspython
13158 (package-with-python2 python-dnspython))
13159
13160 (define-public python-py3dns
13161 (package
13162 (name "python-py3dns")
13163 (version "3.2.1")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "py3dns" version))
13168 (sha256
13169 (base32
13170 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13171 (build-system python-build-system)
13172 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13173 ;; removing functionality so we copy from Nix and "just don't build it".
13174 (arguments
13175 `(#:phases
13176 (modify-phases %standard-phases
13177 (add-after 'unpack 'patch-source
13178 (lambda _
13179 (substitute* "setup.py"
13180 (("import DNS") "")
13181 (("DNS.__version__") (string-append "\"" ,version "\"")))
13182 #t)))
13183 #:tests? #f)) ; Also skip the tests.
13184 (home-page "https://launchpad.net/py3dns")
13185 (synopsis "Python 3 DNS library")
13186 (description "This Python 3 module provides a DNS API for looking up DNS
13187 entries from within Python 3 modules and applications. This module is a
13188 simple, lightweight implementation.")
13189 (license license:psfl)))
13190
13191 (define-public python-email-validator
13192 (package
13193 (name "python-email-validator")
13194 (version "1.0.2")
13195 (source
13196 (origin (method url-fetch)
13197 (uri (pypi-uri "email_validator" version))
13198 (sha256
13199 (base32
13200 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13201 (build-system python-build-system)
13202 (arguments
13203 '(#:phases
13204 (modify-phases %standard-phases
13205 (add-before 'build 'use-dnspython
13206 (lambda _
13207 (substitute* "setup.py"
13208 (("dnspython3") "dnspython"))
13209 #t)))))
13210 (propagated-inputs
13211 `(("python-dnspython" ,python-dnspython)
13212 ("python-idna" ,python-idna)))
13213 (home-page "https://github.com/JoshData/python-email-validator")
13214 (synopsis "Email address validation library for Python")
13215 (description
13216 "This library validates email address syntax and deliverability.")
13217 (license license:cc0)))
13218
13219 (define-public python2-email-validator
13220 (package-with-python2 python-email-validator))
13221
13222 (define-public python-ukpostcodeparser
13223 (package
13224 (name "python-ukpostcodeparser")
13225 (version "1.0.3")
13226 (source (origin
13227 (method url-fetch)
13228 (uri (pypi-uri "UkPostcodeParser" version))
13229 (sha256
13230 (base32
13231 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13232 (build-system python-build-system)
13233 (home-page "https://github.com/hamstah/ukpostcodeparser")
13234 (synopsis "UK Postcode parser for Python")
13235 (description
13236 "This library provides the @code{parse_uk_postcode} function for
13237 parsing UK postcodes.")
13238 (license license:expat)))
13239
13240 (define-public python2-ukpostcodeparser
13241 (package-with-python2 python-ukpostcodeparser))
13242
13243 (define-public python-faker
13244 (package
13245 (name "python-faker")
13246 (version "4.0.2")
13247 (source (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "Faker" version))
13250 (sha256
13251 (base32
13252 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13253 (build-system python-build-system)
13254 (arguments
13255 '(#:phases
13256 (modify-phases %standard-phases
13257 (replace 'check
13258 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13259 (native-inputs
13260 `(;; For testing
13261 ("python-freezegun" ,python-freezegun)
13262 ("python-pytest" ,python-pytest)
13263 ("python-random2" ,python-random2)
13264 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13265 ("python-validators" ,python-validators)))
13266 (propagated-inputs
13267 `(("python-dateutil" ,python-dateutil)
13268 ("python-text-unidecode" ,python-text-unidecode)))
13269 (home-page "https://github.com/joke2k/faker")
13270 (synopsis "Python package that generates fake data")
13271 (description
13272 "Faker is a Python package that generates fake data such as names,
13273 addresses, and phone numbers.")
13274 (license license:expat)
13275 (properties `((python2-variant . ,(delay python2-faker))))))
13276
13277 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13278 (define-public python2-faker
13279 (let ((base (package-with-python2 (strip-python2-variant
13280 python-faker))))
13281 (package
13282 (inherit base)
13283 (version "3.0.1")
13284 (source (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "Faker" version))
13287 (sha256
13288 (base32
13289 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13290 (native-inputs
13291 `(("python-mock" ,python2-mock)
13292 ,@(package-native-inputs base)))
13293 (propagated-inputs
13294 `(("python2-ipaddress" ,python2-ipaddress)
13295 ("python2-six" ,python2-six)
13296 ,@(package-propagated-inputs base))))))
13297
13298 (define-public python-pyaml
13299 (package
13300 (name "python-pyaml")
13301 (version "18.11.0")
13302 (source (origin
13303 (method url-fetch)
13304 (uri (pypi-uri "pyaml" version))
13305 (sha256
13306 (base32
13307 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13308 (build-system python-build-system)
13309 (native-inputs
13310 `(("python-unidecode" ,python-unidecode)))
13311 (propagated-inputs
13312 `(("python-pyyaml" ,python-pyyaml)))
13313 (home-page "https://github.com/mk-fg/pretty-yaml")
13314 (synopsis "YAML pretty-print library for Python")
13315 (description
13316 "pyaml is a PyYAML based python module to produce pretty and readable
13317 YAML-serialized data.")
13318 (license license:wtfpl2)))
13319
13320 (define-public python2-pyaml
13321 (package-with-python2 python-pyaml))
13322
13323 (define-public python-backpack
13324 (package
13325 (name "python-backpack")
13326 (version "0.1")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (pypi-uri "backpack" version))
13331 (sha256
13332 (base32
13333 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13334 (build-system python-build-system)
13335 (native-inputs
13336 `(("python-pytest" ,python-pytest)
13337 ("python-nose" ,python-nose)))
13338 (propagated-inputs
13339 `(("python-simplejson" ,python-simplejson)))
13340 (home-page "https://github.com/sdispater/backpack")
13341 (synopsis "Utilities for working with Python collections")
13342 (description "Backpack provides some useful utilities for working with
13343 collections of data.")
13344 (license license:expat)))
13345
13346 (define-public python2-backpack
13347 (package-with-python2 python-backpack))
13348
13349 (define-public python-prompt-toolkit
13350 (package
13351 (name "python-prompt-toolkit")
13352 (version "3.0.7")
13353 (source
13354 (origin
13355 (method url-fetch)
13356 (uri (pypi-uri "prompt_toolkit" version))
13357 (sha256
13358 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13359 (build-system python-build-system)
13360 (arguments
13361 `(#:phases
13362 (modify-phases %standard-phases
13363 (delete 'check)
13364 (add-after 'install 'post-install-check
13365 (lambda* (#:key inputs outputs #:allow-other-keys)
13366 ;; HOME is needed for the test
13367 ;; "test_pathcompleter_can_expanduser".
13368 (setenv "HOME" "/tmp")
13369 (add-installed-pythonpath inputs outputs)
13370 (invoke "py.test"))))))
13371 (propagated-inputs
13372 `(("python-wcwidth" ,python-wcwidth)))
13373 (native-inputs
13374 `(("python-pytest" ,python-pytest)))
13375 (home-page
13376 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13377 (synopsis "Library for building command line interfaces in Python")
13378 (description
13379 "Prompt-Toolkit is a library for building interactive command line
13380 interfaces in Python. It's like GNU Readline but it also features syntax
13381 highlighting while typing, out-of-the-box multi-line input editing, advanced
13382 code completion, incremental search, support for Chinese double-width
13383 characters, mouse support, and auto suggestions.")
13384 (license license:bsd-3)
13385 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13386
13387 (define-public python-prompt-toolkit-2
13388 (package (inherit python-prompt-toolkit)
13389 (name "python-prompt-toolkit")
13390 (version "2.0.7")
13391 (source
13392 (origin
13393 (method url-fetch)
13394 (uri (pypi-uri "prompt_toolkit" version))
13395 (sha256
13396 (base32
13397 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13398 (propagated-inputs
13399 `(("python-wcwidth" ,python-wcwidth)
13400 ("python-six" ,python-six)
13401 ("python-pygments" ,python-pygments)))
13402 (properties '())))
13403
13404 (define-public python2-prompt-toolkit
13405 (package-with-python2 python-prompt-toolkit-2))
13406
13407 (define-public python-prompt-toolkit-1
13408 (package (inherit python-prompt-toolkit-2)
13409 (version "1.0.15")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13414 (sha256
13415 (base32
13416 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13417
13418 (define-public python2-prompt-toolkit-1
13419 (package-with-python2 python-prompt-toolkit-1))
13420
13421 (define-public python-jedi
13422 (package
13423 (name "python-jedi")
13424 (version "0.17.2")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (pypi-uri "jedi" version))
13429 (sha256
13430 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13431 (build-system python-build-system)
13432 (arguments
13433 `(#:phases
13434 (modify-phases %standard-phases
13435 (replace 'check
13436 (lambda _
13437 (setenv "HOME" "/tmp")
13438 (invoke "python" "-m" "pytest" "-vv"))))))
13439 (native-inputs
13440 `(("python-pytest" ,python-pytest)
13441 ("python-docopt" ,python-docopt)))
13442 (propagated-inputs
13443 `(("python-parso" ,python-parso)))
13444 (home-page "https://github.com/davidhalter/jedi")
13445 (synopsis "Autocompletion and static analysis library for Python")
13446 (description
13447 "Jedi is a static analysis tool for Python that can be used in Integrated
13448 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13449 on a deeper level than many other static analysis frameworks for Python.
13450
13451 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13452 well.")
13453 (license license:expat)))
13454
13455 (define-public python2-jedi
13456 (package-with-python2 python-jedi))
13457
13458 (define-public ptpython
13459 (package
13460 (name "ptpython")
13461 (version "3.0.5")
13462 (source (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "ptpython" version))
13465 (sha256
13466 (base32
13467 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13468 (build-system python-build-system)
13469 (arguments
13470 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13471 (propagated-inputs
13472 `(("python-appdirs" ,python-appdirs)
13473 ("python-jedi" ,python-jedi)
13474 ("python-prompt-toolkit" ,python-prompt-toolkit)
13475 ("python-pygments" ,python-pygments)))
13476 (home-page "https://github.com/jonathanslenders/ptpython")
13477 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13478 (description
13479 "ptpython is a Python read-eval-print loop with IDE-like features.
13480 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13481 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13482 etc.")
13483 (license license:bsd-3)
13484 (properties `((python2-variant . ,(delay ptpython-2))))))
13485
13486 (define-public ptpython-2
13487 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13488 (package
13489 (inherit base)
13490 (name "ptpython2"))))
13491
13492 (define-public python-stem
13493 (package
13494 (name "python-stem")
13495 (version "1.8.0")
13496 (source
13497 (origin
13498 (method url-fetch)
13499 (uri (pypi-uri "stem" version))
13500 (sha256
13501 (base32
13502 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13503 (build-system python-build-system)
13504 (arguments
13505 `(#:phases
13506 (modify-phases %standard-phases
13507 (replace 'check
13508 (lambda _
13509 (invoke "./run_tests.py" "--unit")
13510 #t)))))
13511 (native-inputs
13512 `(("python-mock" ,python-mock)
13513 ("python-pycodestyle" ,python-pycodestyle)
13514 ("python-pyflakes" ,python-pyflakes)))
13515 (home-page "https://stem.torproject.org/")
13516 (synopsis
13517 "Python controller library that allows applications to interact with Tor")
13518 (description
13519 "Stem is a Python controller library for Tor. With it you can use Tor's
13520 control protocol to script against the Tor process and read descriptor data
13521 relays publish about themselves.")
13522 (license license:lgpl3)))
13523
13524 (define-public python2-stem
13525 (package-with-python2 python-stem))
13526
13527 (define-public python-pyserial
13528 (package
13529 (name "python-pyserial")
13530 (version "3.4")
13531 (source
13532 (origin
13533 (method url-fetch)
13534 (uri (pypi-uri "pyserial" version))
13535 (sha256
13536 (base32
13537 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13538 (build-system python-build-system)
13539 (arguments
13540 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13541 ;; #:phases
13542 ;; (modify-phases %standard-phases
13543 ;; (replace 'check
13544 ;; (lambda _
13545 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13546 (home-page
13547 "https://github.com/pyserial/pyserial")
13548 (synopsis "Python Serial Port Bindings")
13549 (description "@code{pyserial} provide serial port bindings for Python. It
13550 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13551 and/or Xon/Xoff. The port is accessed in RAW mode.")
13552 (license license:bsd-3)))
13553
13554 (define-public python2-pyserial
13555 (package-with-python2 python-pyserial))
13556
13557 (define-public python-kivy
13558 (package
13559 (name "python-kivy")
13560 (version "1.10.1")
13561 (source
13562 (origin
13563 (method url-fetch)
13564 (uri (pypi-uri "Kivy" version))
13565 (file-name (string-append name "-" version ".tar.gz"))
13566 (sha256
13567 (base32
13568 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13569 (build-system python-build-system)
13570 (arguments
13571 `(#:tests? #f ; Tests require many optional packages
13572 #:phases
13573 (modify-phases %standard-phases
13574 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13575 (lambda* (#:key inputs #:allow-other-keys)
13576 (setenv "KIVY_SDL2_PATH"
13577 (string-append (assoc-ref inputs "sdl-union")
13578 "/include/SDL2"))
13579 #t)))))
13580 (native-inputs
13581 `(("pkg-config" ,pkg-config)
13582 ("python-cython" ,python-cython)))
13583 (inputs
13584 `(("gstreamer" ,gstreamer)
13585 ("mesa" ,mesa)
13586 ("sdl-union"
13587 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13588 (home-page "https://kivy.org")
13589 (synopsis
13590 "Multitouch application framework")
13591 (description
13592 "A software library for rapid development of
13593 hardware-accelerated multitouch applications.")
13594 (license license:expat)))
13595
13596 (define-public python2-kivy
13597 (package-with-python2 python-kivy))
13598
13599 (define-public python-binaryornot
13600 (package
13601 (name "python-binaryornot")
13602 (version "0.4.4")
13603 (source (origin
13604 (method url-fetch)
13605 (uri (pypi-uri "binaryornot" version))
13606 (sha256
13607 (base32
13608 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13609 (build-system python-build-system)
13610 (arguments
13611 `(#:phases
13612 (modify-phases %standard-phases
13613 (add-after 'unpack 'patch-tests
13614 (lambda _
13615 ;; TypeError: binary() got an unexpected keyword argument
13616 ;; 'average_size'.
13617 (substitute* "tests/test_check.py"
13618 (("average_size=512") ""))
13619 #t)))))
13620 (propagated-inputs
13621 `(("python-chardet" ,python-chardet)
13622 ("python-hypothesis" ,python-hypothesis)))
13623 (home-page "https://github.com/audreyr/binaryornot")
13624 (synopsis "Package to check if a file is binary or text")
13625 (description "Ultra-lightweight pure Python package to check if a file is
13626 binary or text.")
13627 (license license:bsd-3)
13628 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13629
13630 (define-public python2-binaryornot
13631 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13632 (package (inherit base)
13633 (propagated-inputs
13634 `(("python2-enum34" ,python2-enum34)
13635 ,@(package-propagated-inputs base))))))
13636
13637 (define-public python-binwalk
13638 (package
13639 (name "python-binwalk")
13640 (version "2.2.0")
13641 (source
13642 (origin
13643 (method git-fetch)
13644 (uri (git-reference
13645 (url "https://github.com/ReFirmLabs/binwalk")
13646 (commit (string-append "v" version))))
13647 (file-name (git-file-name name version))
13648 (sha256
13649 (base32
13650 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13651 (build-system python-build-system)
13652 (arguments
13653 `(#:phases
13654 (modify-phases %standard-phases
13655 (add-before 'check 'set-pythonpath
13656 (lambda _
13657 (setenv "PYTHONPATH"
13658 (string-append
13659 (getcwd) "/src/"
13660 ":" (getenv "PYTHONPATH")))
13661 (setenv "HOME" "")
13662 #t)))))
13663 (native-inputs
13664 `(("python-coverage" ,python-coverage)
13665 ("python-nose" ,python-nose)))
13666 (home-page "https://github.com/ReFirmLabs/binwalk")
13667 (synopsis "Firmware analysis tool")
13668 (description "Binwalk is a tool for analyzing, reverse engineering, and
13669 extracting firmware images")
13670 (license license:expat)))
13671
13672 (define-public python-nltk
13673 (package
13674 (name "python-nltk")
13675 (version "3.2.1")
13676 (source (origin
13677 (method url-fetch)
13678 (uri (pypi-uri "nltk" version))
13679 (sha256
13680 (base32
13681 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13682 (build-system python-build-system)
13683 (arguments
13684 '(;; The tests require some extra resources to be downloaded.
13685 ;; TODO Try packaging these resources.
13686 #:tests? #f))
13687 (home-page "http://nltk.org/")
13688 (synopsis "Natural Language Toolkit")
13689 (description "It provides interfaces to over 50 corpora and lexical
13690 resources such as WordNet, along with a suite of text processing libraries
13691 for classification, tokenization, stemming, tagging, parsing, and semantic
13692 reasoning, wrappers for natural language processing libraries.")
13693 (license license:asl2.0)))
13694
13695 (define-public python2-nltk
13696 (package-with-python2 python-nltk))
13697
13698 (define-public python-pymongo
13699 (package
13700 (name "python-pymongo")
13701 (version "3.7.2")
13702 (source (origin
13703 (method url-fetch)
13704 (uri (pypi-uri "pymongo" version))
13705 (sha256
13706 (base32
13707 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13708 (build-system python-build-system)
13709 (propagated-inputs
13710 `(("python-certifi" ,python-certifi)))
13711 (home-page "https://github.com/mongodb/mongo-python-driver")
13712 (synopsis "Python driver for MongoDB")
13713 (description "Python driver for MongoDB.")
13714 (license license:asl2.0)))
13715
13716 (define-public python2-pymongo
13717 (package-with-python2 python-pymongo))
13718
13719 (define-public python-consul
13720 (package
13721 (name "python-consul")
13722 (version "0.6.1")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "python-consul" version))
13727 (sha256
13728 (base32
13729 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13730 (build-system python-build-system)
13731 (arguments
13732 '(#:tests? #f)) ; The tests are not distributed
13733 (propagated-inputs
13734 `(("python-requests" ,python-requests)
13735 ("python-six" ,python-six)))
13736 (home-page "https://github.com/cablehead/python-consul")
13737 (synopsis "Python client for Consul")
13738 (description
13739 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13740 discovery, monitoring and configuration.")
13741 (license license:expat)))
13742
13743 (define-public python2-consul
13744 (package-with-python2 python-consul))
13745
13746 (define-public python-schematics
13747 (package
13748 (name "python-schematics")
13749 (version "1.1.1")
13750 (source
13751 (origin
13752 (method git-fetch)
13753 (uri (git-reference
13754 (url "https://github.com/schematics/schematics")
13755 (commit (string-append "v" version))))
13756 (file-name (git-file-name name version))
13757 (sha256
13758 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13759 (build-system python-build-system)
13760 (propagated-inputs
13761 `(("python-six" ,python-six)))
13762 (arguments
13763 ;; The tests require a bunch of not very nice packages with fixed
13764 ;; version requirements (e.g. python-coveralls).
13765 `(#:tests? #f))
13766 (home-page "https://github.com/schematics/schematics")
13767 (synopsis "Python Data Structures for Humans")
13768 (description "Python Data Structures for Humans.")
13769 (license license:bsd-3)))
13770
13771 (define-public python2-schematics
13772 (package-with-python2 python-schematics))
13773
13774 (define-public python-odfpy
13775 (package
13776 (name "python-odfpy")
13777 (version "1.4.1")
13778 (source (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "odfpy" version))
13781 (sha256
13782 (base32
13783 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13784 (arguments
13785 `(#:phases
13786 (modify-phases %standard-phases
13787 (replace 'check
13788 (lambda _
13789 (setenv "PYTHONPATH" (string-append "./build/lib:"
13790 (getenv "PYTHONPATH")))
13791 (invoke "pytest" "-vv"))))))
13792 (build-system python-build-system)
13793 (native-inputs
13794 `(("python-pytest" ,python-pytest)))
13795 (propagated-inputs
13796 `(("python-defusedxml" ,python-defusedxml)))
13797 (home-page "https://github.com/eea/odfpy")
13798 (synopsis "Python API and tools to manipulate OpenDocument files")
13799 (description "Collection of libraries and utility programs written in
13800 Python to manipulate OpenDocument 1.2 files.")
13801 (license
13802 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13803 ;; number of files with other licenses.
13804 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13805
13806 (define-public python2-odfpy
13807 (package-with-python2 python-odfpy))
13808
13809 (define-public python-natsort
13810 (package
13811 (name "python-natsort")
13812 (version "7.0.1")
13813 (source (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "natsort" version))
13816 (sha256
13817 (base32
13818 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13819 (build-system python-build-system)
13820 (arguments
13821 `(#:modules ((guix build utils)
13822 (guix build python-build-system)
13823 (srfi srfi-1)
13824 (srfi srfi-26)
13825 (ice-9 ftw))
13826 #:phases
13827 (modify-phases %standard-phases
13828 (add-before 'check 'set-cachedir
13829 ;; Tests require write access to $HOME by default
13830 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13831 (replace 'check
13832 (lambda _
13833 (let ((cwd (getcwd)))
13834 (setenv "PYTHONPATH"
13835 (string-append
13836 cwd "/build/"
13837 (find (cut string-prefix? "lib" <>)
13838 (scandir (string-append cwd "/build")))
13839 ":"
13840 (getenv "PYTHONPATH")))
13841 (invoke "pytest" "-v")))))))
13842 (native-inputs
13843 `(("python-hypothesis" ,python-hypothesis)
13844 ("python-pytest-cov" ,python-pytest-cov)
13845 ("python-pytest-mock" ,python-pytest-mock)
13846 ("python-pytest" ,python-pytest)))
13847 (propagated-inputs ; TODO: Add python-fastnumbers.
13848 `(("python-pyicu" ,python-pyicu)))
13849 (home-page "https://github.com/SethMMorton/natsort")
13850 (synopsis "Natural sorting for python and shell")
13851 (description
13852 "Natsort lets you apply natural sorting on lists instead of
13853 lexicographical. If you use the built-in @code{sorted} method in python
13854 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13855 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13856 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13857 identifies numbers and sorts them separately from strings. It can also sort
13858 version numbers, real numbers, mixed types and more, and comes with a shell
13859 command @command{natsort} that exposes this functionality in the command line.")
13860 (license license:expat)
13861 (properties `((python2-variant . ,(delay python2-natsort))))))
13862
13863 ;; Natsort 6.x are the last versions with support for Python 2.
13864 (define-public python2-natsort
13865 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13866 (package (inherit base)
13867 (version "6.2.1")
13868 (source (origin
13869 (method url-fetch)
13870 (uri (pypi-uri "natsort" version))
13871 (sha256
13872 (base32
13873 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13874 (native-inputs
13875 `(("python2-pathlib" ,python2-pathlib)
13876 ,@(package-native-inputs base))))))
13877
13878 (define-public glances
13879 (package
13880 (name "glances")
13881 (version "3.1.4")
13882 (source
13883 (origin
13884 (method url-fetch)
13885 (uri (pypi-uri "Glances" version))
13886 (sha256
13887 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13888 (modules '((guix build utils)))
13889 (snippet
13890 '(begin
13891 ;; Glances phones PyPI for weekly update checks by default.
13892 ;; Disable these. The user can re-enable them if desired.
13893 (substitute* "glances/outdated.py"
13894 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13895 (string-append indentation
13896 "self.args.disable_check_update = True\n"
13897 line)))
13898 #t))))
13899 (build-system python-build-system)
13900 (propagated-inputs
13901 `(("python-future" ,python-future)
13902 ("python-psutil" ,python-psutil)))
13903 (home-page "https://github.com/nicolargo/glances")
13904 (synopsis "Cross-platform curses-based monitoring tool")
13905 (description
13906 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13907 Glances uses the PsUtil library to get information from your system. It
13908 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13909 (license license:lgpl3+)))
13910
13911 (define-public python-glances
13912 (deprecated-package "python-glances" glances))
13913
13914 (define-public python-graphql-core
13915 (package
13916 (name "python-graphql-core")
13917 (version "0.5.3")
13918 (source
13919 (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "graphql-core" version))
13922 (sha256
13923 (base32
13924 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13925 (build-system python-build-system)
13926 (arguments
13927 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13928 #:phases
13929 (modify-phases %standard-phases
13930 (add-after 'unpack 'patch-hardcoded-version
13931 (lambda _ (substitute*
13932 "setup.py"
13933 (("'gevent==1.1rc1'") "'gevent'"))
13934 #t)))))
13935 (native-inputs
13936 `(("python-gevent" ,python-gevent)
13937 ("python-mock" ,python-mock)
13938 ("python-pytest-mock" ,python-pytest-mock)))
13939 (propagated-inputs
13940 `(("python-promise" ,python-promise)
13941 ("python-six" ,python-six)))
13942 (home-page "https://github.com/graphql-python/graphql-core")
13943 (synopsis "GraphQL implementation for Python")
13944 (description
13945 "GraphQL implementation for Python. GraphQL is a data query language and
13946 runtime designed and used to request and deliver data to mobile and web apps.
13947 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13948 to Python.")
13949 (license license:expat)))
13950
13951 (define-public python2-graphql-core
13952 (package-with-python2 python-graphql-core))
13953
13954 (define-public python-graphql-relay
13955 (package
13956 (name "python-graphql-relay")
13957 (version "0.4.5")
13958 (source
13959 (origin
13960 (method url-fetch)
13961 (uri (pypi-uri "graphql-relay" version))
13962 (sha256
13963 (base32
13964 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13965 (build-system python-build-system)
13966 (arguments
13967 '(#:tests? #f)) ; The tests are not distributed
13968 (propagated-inputs
13969 `(("python-graphql-core" ,python-graphql-core)
13970 ("python-promise" ,python-promise)
13971 ("python-six" ,python-six)))
13972 (home-page "https://github.com/graphql-python/graphql-relay-py")
13973 (synopsis "Relay implementation for Python")
13974 (description
13975 "This is a library to allow the easy creation of Relay-compliant servers
13976 using the GraphQL Python reference implementation of a GraphQL server. It
13977 should be noted that the code is a exact port of the original
13978 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13979 from Facebook.")
13980 (license license:expat)))
13981
13982 (define-public python2-graphql-relay
13983 (package-with-python2 python-graphql-relay))
13984
13985 (define-public python-graphene
13986 (package
13987 (name "python-graphene")
13988 (version "0.10.2")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "graphene" version))
13993 (sha256
13994 (base32
13995 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13996 (build-system python-build-system)
13997 (propagated-inputs
13998 `(("python-graphql-core" ,python-graphql-core)
13999 ("python-graphql-relay" ,python-graphql-relay)
14000 ("python-iso8601" ,python-iso8601)
14001 ("python-promise" ,python-promise)
14002 ("python-six" ,python-six)))
14003 (arguments
14004 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14005 (home-page "https://graphene-python.org/")
14006 (synopsis "GraphQL Framework for Python")
14007 (description
14008 "Graphene is a Python library for building GraphQL schemas/types.
14009 A GraphQL schema describes your data model, and provides a GraphQL server
14010 with an associated set of resolve methods that know how to fetch data.")
14011 (properties `((python2-variant . ,(delay python2-graphene))))
14012 (license license:expat)))
14013
14014 (define-public python2-graphene
14015 (let ((base (package-with-python2
14016 (strip-python2-variant python-graphene))))
14017 (package (inherit base)
14018 (native-inputs
14019 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14020 ,@(package-native-inputs base))))))
14021
14022 (define-public python-nautilus
14023 (package
14024 (name "python-nautilus")
14025 (version "0.4.9")
14026 (source
14027 (origin
14028 (method url-fetch)
14029 (uri (pypi-uri "nautilus" version))
14030 (sha256
14031 (base32
14032 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14033 (build-system python-build-system)
14034 (arguments `(#:tests? #f)) ; fails to import test modules
14035 (propagated-inputs
14036 `(("python-bcrypt" ,python-bcrypt)
14037 ("python-click" ,python-click)
14038 ("python-consul" ,python-consul)
14039 ("python-graphene" ,python-graphene)
14040 ("python-jinja2" ,python-jinja2)
14041 ("python-peewee" ,python-peewee)
14042 ("python-pika" ,python-pika)
14043 ("python-tornado" ,python-tornado)
14044 ("python-wtforms" ,python-wtforms)))
14045 (native-inputs
14046 `(("python-nose2" ,python-nose2)))
14047 (home-page "https://github.com/AlecAivazis/nautilus")
14048 (synopsis "Library for creating microservice applications")
14049 (description
14050 "Nautilus is a framework for flux based microservices that looks to
14051 provide extendible implementations of common aspects of a cloud so that you can
14052 focus on building massively scalable web applications.")
14053 (license license:expat)))
14054
14055 (define-public python-random2
14056 (package
14057 (name "python-random2")
14058 (version "1.0.1")
14059 (source (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "random2" version ".zip"))
14062 (sha256
14063 (base32
14064 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14065 (build-system python-build-system)
14066 (native-inputs `(("unzip" ,unzip)))
14067 (home-page "http://pypi.python.org/pypi/random2")
14068 (synopsis "Python 3 version of the Python 2 @code{random} module")
14069 (description
14070 "This package provides a Python 3 ported version of Python 2.7’s
14071 @code{random} module. It has also been back-ported to work in Python 2.6.
14072
14073 In Python 3, the implementation of @code{randrange()} was changed, so that
14074 even with the same seed you get different sequences in Python 2 and 3.
14075
14076 This package closes that gap, allowing stable random number generation
14077 between the different Python versions.")
14078 (license license:psfl)))
14079
14080 (define-public python2-random2
14081 (package-with-python2 python-random2))
14082
14083 (define-public python-snowballstemmer
14084 (package
14085 (name "python-snowballstemmer")
14086 (version "2.0.0")
14087 (source (origin
14088 (method url-fetch)
14089 (uri (pypi-uri "snowballstemmer" version))
14090 (sha256
14091 (base32
14092 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14093 (build-system python-build-system)
14094 (arguments
14095 `(;; No tests exist
14096 #:tests? #f))
14097 (home-page "https://github.com/shibukawa/snowball_py")
14098 (synopsis "Snowball stemming library collection for Python")
14099 (description "This package provides 16 word stemmer algorithms generated
14100 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14101 English stemmer.")
14102 (license license:bsd-3)))
14103
14104 (define-public python2-snowballstemmer
14105 (package-with-python2 python-snowballstemmer))
14106
14107 (define-public python-setproctitle
14108 (package
14109 (name "python-setproctitle")
14110 (version "1.1.10")
14111 (source
14112 (origin
14113 (method url-fetch)
14114 (uri (pypi-uri "setproctitle" version))
14115 (sha256
14116 (base32
14117 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14118 (build-system python-build-system)
14119 (arguments
14120 '(#:phases
14121 (modify-phases %standard-phases
14122 (add-before 'check 'patch-Makefile
14123 ;; Stricly this is only required for the python2 variant.
14124 ;; But adding a phase in an inherited package seems to be
14125 ;; cumbersum. So we patch even for python3.
14126 (lambda _
14127 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14128 (when nose
14129 (substitute* "Makefile"
14130 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14131 (string-append nose "/bin/nosetests "))))
14132 #t)))
14133 (replace 'check
14134 (lambda _
14135 (setenv "PYTHON" (or (which "python3") (which "python")))
14136 (setenv "PYCONFIG" (if (which "python3-config")
14137 "python3-config --embed"
14138 "python-config"))
14139 (setenv "CC" "gcc")
14140 ;; No need to extend PYTHONPATH to find the built package, since
14141 ;; the Makefile will build anyway
14142 (invoke "make" "check"))))))
14143 (native-inputs
14144 `(("procps" ,procps))) ; required for tests
14145 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14146 (synopsis
14147 "Setproctitle implementation for Python to customize the process title")
14148 (description "The library allows a process to change its title (as displayed
14149 by system tools such as ps and top).
14150
14151 Changing the title is mostly useful in multi-process systems, for
14152 example when a master process is forked: changing the children's title
14153 allows identifying the task each process is busy with. The technique
14154 is used by PostgreSQL and the OpenSSH Server for example.")
14155 (license license:bsd-3)
14156 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14157
14158 (define-public python2-setproctitle
14159 (let ((base (package-with-python2
14160 (strip-python2-variant python-setproctitle))))
14161 (package
14162 (inherit base)
14163 (native-inputs `(("python2-nose" ,python2-nose)
14164 ,@(package-native-inputs base))))))
14165
14166 (define-public python-validictory
14167 (package
14168 (name "python-validictory")
14169 (version "1.0.1")
14170 (source
14171 (origin
14172 (method url-fetch)
14173 (uri (pypi-uri "validictory" version))
14174 (sha256
14175 (base32
14176 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14177 (build-system python-build-system)
14178 (arguments
14179 '(#:phases
14180 (modify-phases %standard-phases
14181 (add-after 'unpack 'bootstrap
14182 ;; Move the tests out of the package directory to avoid
14183 ;; packaging them.
14184 (lambda* _
14185 (rename-file "validictory/tests" "tests")
14186 (delete-file "tests/__init__.py")))
14187 (replace 'check
14188 (lambda _
14189 ;; Extend PYTHONPATH so the built package will be found.
14190 (setenv "PYTHONPATH"
14191 (string-append (getcwd) "/build/lib:"
14192 (getenv "PYTHONPATH")))
14193 (invoke "py.test" "-vv" ))))))
14194 (native-inputs
14195 `(("python-pytest" ,python-pytest)))
14196 (home-page
14197 "https://github.com/jamesturk/validictory")
14198 (synopsis "General purpose Python data validator")
14199 (description "It allows validation of arbitrary Python data structures.
14200
14201 The schema format is based on the JSON Schema
14202 proposal (http://json-schema.org), so combined with json the library is also
14203 useful as a validator for JSON data.")
14204 (license license:expat)))
14205
14206 (define-public python2-validictory
14207 (package-with-python2 python-validictory))
14208
14209 (define-public python-pyelftools
14210 (package
14211 (name "python-pyelftools")
14212 (version "0.25")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "pyelftools" version))
14217 (sha256
14218 (base32
14219 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14220 (build-system python-build-system)
14221 (arguments
14222 `(#:phases
14223 (modify-phases %standard-phases
14224 (add-before 'check 'set-pythonpath
14225 (lambda _
14226 (setenv "PYTHONPATH"
14227 (string-append
14228 (getcwd) "/test/"
14229 ":" (getenv "PYTHONPATH")))
14230 #t)))))
14231 (home-page
14232 "https://github.com/eliben/pyelftools")
14233 (synopsis
14234 "Analyze binary and library file information")
14235 (description "This Python library provides interfaces for parsing and
14236 analyzing two binary and library file formats; the Executable and Linking
14237 Format (ELF), and debugging information in the Debugging With Attributed
14238 Record Format (DWARF).")
14239 (license license:public-domain)))
14240
14241 (define-public python-pyev
14242 (package
14243 (name "python-pyev")
14244 (version "0.9.0")
14245 (source
14246 (origin
14247 (method url-fetch)
14248 (uri (pypi-uri "pyev" version))
14249 (sha256
14250 (base32
14251 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14252 (build-system python-build-system)
14253 (arguments
14254 `(#:tests? #f ; no test suite
14255 #:phases
14256 (modify-phases %standard-phases
14257 (add-after 'unpack 'patch
14258 (lambda* (#:key inputs #:allow-other-keys)
14259 (let ((libev (string-append (assoc-ref inputs "libev")
14260 "/lib/libev.so.4")))
14261 (substitute* "setup.py"
14262 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14263 (string-append "libev_dll_name = \"" libev "\"")))))))))
14264 (inputs
14265 `(("libev" ,libev)))
14266 (home-page "http://pythonhosted.org/pyev/")
14267 (synopsis "Python libev interface")
14268 (description "Pyev provides a Python interface to libev.")
14269 (license license:gpl3)))
14270
14271 (define-public python2-pyev
14272 (package-with-python2 python-pyev))
14273
14274 (define-public python-imagesize
14275 (package
14276 (name "python-imagesize")
14277 (version "1.2.0")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "imagesize" version))
14282 (sha256
14283 (base32
14284 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14285 (build-system python-build-system)
14286 (home-page "https://github.com/shibukawa/imagesize_py")
14287 (synopsis "Gets image size of files in various formats in Python")
14288 (description
14289 "This package allows determination of image size from
14290 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14291 (license license:expat)))
14292
14293 (define-public python2-imagesize
14294 (package-with-python2 python-imagesize))
14295
14296 (define-public python-termstyle
14297 (package
14298 (name "python-termstyle")
14299 (version "0.1.11")
14300 (source
14301 (origin
14302 (method url-fetch)
14303 (uri (pypi-uri "termstyle" version))
14304 (sha256
14305 (base32
14306 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14307 (build-system python-build-system)
14308 (arguments
14309 '(#:phases
14310 (modify-phases %standard-phases
14311 (replace 'check
14312 (lambda _
14313 (invoke "python" "test3.py"))))))
14314 (home-page "https://github.com/gfxmonk/termstyle")
14315 (synopsis "Console text coloring for Python")
14316 (description "This package provides console text coloring for Python.")
14317 (license license:bsd-3)))
14318
14319 (define-public python-argcomplete
14320 (package
14321 (name "python-argcomplete")
14322 (version "1.11.1")
14323 (source
14324 (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "argcomplete" version))
14327 (sha256
14328 (base32
14329 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14330 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14331 (build-system python-build-system)
14332 (native-inputs
14333 `(("python-coverage" ,python-coverage)
14334 ("python-flake8" ,python-flake8)
14335 ("python-pexpect" ,python-pexpect)
14336 ("python-wheel" ,python-wheel)
14337 ("tcsh" ,tcsh)
14338 ("fish" ,fish)
14339 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14340 (home-page "https://github.com/kislyuk/argcomplete")
14341 (synopsis "Shell tab completion for Python argparse")
14342 (description "argcomplete provides extensible command line tab completion
14343 of arguments and options for Python scripts using @code{argparse}. It's
14344 particularly useful for programs with many options or sub-parsers that can
14345 dynamically suggest completions; for example, when browsing resources over the
14346 network.")
14347 (license license:asl2.0)))
14348
14349 (define-public python2-argcomplete
14350 (package-with-python2 python-argcomplete))
14351
14352 (define-public python-csscompressor
14353 (package
14354 (name "python-csscompressor")
14355 (version "0.9.5")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "csscompressor" version))
14360 (sha256
14361 (base32
14362 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14363 (build-system python-build-system)
14364 (arguments
14365 '(#:phases
14366 (modify-phases %standard-phases
14367 (replace 'check
14368 (lambda _
14369 (invoke "py.test"))))))
14370 (native-inputs
14371 `(("python-pytest" ,python-pytest)))
14372 (home-page "https://github.com/sprymix/csscompressor")
14373 (synopsis "Python port of YUI CSS Compressor")
14374 (description
14375 "This package provides a python port of YUI CSS Compressor.")
14376 (license license:bsd-3)))
14377
14378 (define-public python-rcssmin
14379 (package
14380 (name "python-rcssmin")
14381 (version "1.0.6")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "rcssmin" version))
14386 (sha256
14387 (base32
14388 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14389 (build-system python-build-system)
14390 (arguments
14391 '(#:phases
14392 (modify-phases %standard-phases
14393 (replace 'check
14394 (lambda _
14395 (invoke "python" "run_tests.py" "tests"))))))
14396 (home-page "http://opensource.perlig.de/rcssmin/")
14397 (synopsis "CSS Minifier")
14398 (description "The minifier is based on the semantics of the YUI compressor,
14399 which itself is based on the rule list by Isaac Schlueter.")
14400 (license license:asl2.0)))
14401
14402 (define-public python-rjsmin
14403 (package
14404 (name "python-rjsmin")
14405 (version "1.1.0")
14406 (source
14407 (origin
14408 (method url-fetch)
14409 (uri (pypi-uri "rjsmin" version))
14410 (sha256
14411 (base32
14412 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14413 (modules '((guix build utils)))
14414 (snippet
14415 '(begin
14416 (for-each delete-file (find-files "bench" "\\.js$"))
14417 #t))))
14418 (build-system python-build-system)
14419 (arguments
14420 '(#:tests? #f ; Not all test files included.
14421 #:phases
14422 (modify-phases %standard-phases
14423 (replace 'check
14424 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14425 (add-installed-pythonpath inputs outputs)
14426 (if tests?
14427 (invoke "py.test" "-vv" "tests")
14428 #t))))))
14429 (native-inputs
14430 `(("python-pytest" ,python-pytest)))
14431 (home-page "http://opensource.perlig.de/rjsmin/")
14432 (synopsis "Javascript Minifier")
14433 (description "@code{rJSmin} is a javascript minifier written in Python. The
14434 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14435 is a re-implementation aiming for speed, so it can be used at runtime (rather
14436 than during a preprocessing step).")
14437 (license license:asl2.0)))
14438
14439 (define-public python-xopen
14440 (package
14441 (name "python-xopen")
14442 (version "0.5.0")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "xopen" version))
14447 (sha256
14448 (base32
14449 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14450 (build-system python-build-system)
14451 (propagated-inputs
14452 `(("python-setuptools-scm" ,python-setuptools-scm)))
14453 (home-page "https://github.com/marcelm/xopen/")
14454 (synopsis "Open compressed files transparently")
14455 (description "This module provides an @code{xopen} function that works like
14456 Python's built-in @code{open} function, but can also deal with compressed files.
14457 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14458 recognized by their file extensions. The focus is on being as efficient as
14459 possible on all supported Python versions.")
14460 (license license:expat)))
14461
14462 (define-public python2-xopen
14463 (let ((base (package-with-python2
14464 (strip-python2-variant python-xopen))))
14465 (package
14466 (inherit base)
14467 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14468 ,@(package-propagated-inputs base))))))
14469
14470 (define-public python-cheetah
14471 (package
14472 (name "python-cheetah")
14473 (version "3.2.4")
14474 (source
14475 (origin
14476 (method url-fetch)
14477 (uri (pypi-uri "Cheetah3" version))
14478 (sha256
14479 (base32
14480 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14481 (build-system python-build-system)
14482 (arguments
14483 `(#:modules ((guix build utils)
14484 (guix build python-build-system)
14485 (ice-9 ftw)
14486 (srfi srfi-1)
14487 (srfi srfi-26))
14488 #:phases (modify-phases %standard-phases
14489 (add-after 'unpack 'use-absolute-python
14490 (lambda _
14491 (substitute* "Cheetah/CheetahWrapper.py"
14492 (("#!/usr/bin/env python")
14493 (string-append "#!" (which "python"))))
14494 #t))
14495 (add-after 'unpack 'fix-tests
14496 (lambda _
14497 (substitute* "Cheetah/Tests/ImportHooks.py"
14498 (("os.path.dirname\\(__file__\\)")
14499 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14500 #t))
14501 (replace 'check
14502 (lambda _
14503 (let ((cwd (getcwd)))
14504 (setenv "PYTHONPATH"
14505 (string-append
14506 cwd "/build/"
14507 (find (cut string-prefix? "lib" <>)
14508 (scandir (string-append cwd "/build")))
14509 ":" (getenv "PYTHONPATH")))
14510 (setenv "PATH"
14511 (string-append (getenv "PATH")
14512 ":" cwd "/bin"))
14513 (setenv "TMPDIR" "/tmp")
14514
14515 (substitute* "Cheetah/Tests/Test.py"
14516 (("unittest.TextTestRunner\\(\\)")
14517 "unittest.TextTestRunner(verbosity=2)"))
14518
14519 (invoke "python" "Cheetah/Tests/Test.py")))))))
14520 (propagated-inputs
14521 `(("python-markdown" ,python-markdown))) ;optional
14522 (home-page "https://cheetahtemplate.org/")
14523 (synopsis "Template engine")
14524 (description "Cheetah is a text-based template engine and Python code
14525 generator.
14526
14527 Cheetah can be used as a standalone templating utility or referenced as
14528 a library from other Python applications. It has many potential uses,
14529 but web developers looking for a viable alternative to ASP, JSP, PHP and
14530 PSP are expected to be its principle user group.
14531
14532 Features:
14533 @enumerate
14534 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14535 text-based format.
14536 @item Cleanly separates content, graphic design, and program code.
14537 @item Blends the power and flexibility of Python with a simple template language
14538 that non-programmers can understand.
14539 @item Gives template writers full access to any Python data structure, module,
14540 function, object, or method in their templates.
14541 @item Makes code reuse easy by providing an object-orientated interface to
14542 templates that is accessible from Python code or other Cheetah templates.
14543 One template can subclass another and selectively reimplement sections of it.
14544 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14545 improve the performance of a dynamic website.
14546 @item Compiles templates into optimized, yet readable, Python code.
14547 @end enumerate")
14548 (license (license:x11-style "file://LICENSE"))))
14549
14550 (define-public python2-cheetah
14551 (package-with-python2 python-cheetah))
14552
14553 (define-public python-dulwich
14554 (package
14555 (name "python-dulwich")
14556 (version "0.19.16")
14557 (source
14558 (origin
14559 (method url-fetch)
14560 (uri (list (string-append "https://www.dulwich.io/releases/"
14561 "dulwich-" version ".tar.gz")
14562 (pypi-uri "dulwich" version)))
14563 (sha256
14564 (base32
14565 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14566 (build-system python-build-system)
14567 (arguments
14568 `(#:phases
14569 (modify-phases %standard-phases
14570 (add-before 'check 'fix-tests
14571 (lambda* (#:key inputs #:allow-other-keys)
14572 ;; The tests use Popen with a custom environment which doesn't
14573 ;; include PATH.
14574 (substitute* "dulwich/tests/compat/utils.py"
14575 (("'git'") (string-append "'"
14576 (which "git")
14577 "'")))
14578 (substitute* '("dulwich/tests/test_repository.py"
14579 "dulwich/tests/test_hooks.py")
14580 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14581 (setenv "TEST_RUNNER" "unittest")
14582 (setenv "PYTHONHASHSEED" "random")
14583 #t)))))
14584 (propagated-inputs
14585 `(("python-fastimport" ,python-fastimport)
14586 ("python-urllib3" ,python-urllib3)))
14587 (native-inputs
14588 `(("python-mock" ,python-mock)
14589 ("python-geventhttpclient" ,python-geventhttpclient)
14590 ("git" ,git)))
14591 (home-page "https://www.dulwich.io/")
14592 (synopsis "Git implementation in Python")
14593 (description "Dulwich is an implementation of the Git file formats and
14594 protocols written in pure Python.")
14595 ;; Can be used with either license.
14596 (license (list license:asl2.0 license:gpl2+))))
14597
14598 (define-public python2-dulwich
14599 (package-with-python2 python-dulwich))
14600
14601 (define-public python-pbkdf2
14602 (package
14603 (name "python-pbkdf2")
14604 (version "1.3")
14605 (source
14606 (origin
14607 (method url-fetch)
14608 (uri (pypi-uri "pbkdf2" version))
14609 (sha256
14610 (base32
14611 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14612 (build-system python-build-system)
14613 (arguments
14614 '(#:phases
14615 (modify-phases %standard-phases
14616 (replace 'check
14617 (lambda _
14618 (setenv "PYTHONPATH"
14619 (string-append (getcwd) "/build/lib:"
14620 (getenv "PYTHONPATH")))
14621 (invoke "python" "test/test_pbkdf2.py"))))))
14622 (propagated-inputs
14623 `(("python-pycrypto" ,python-pycrypto))) ; optional
14624 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14625 (synopsis "Password-based key derivation")
14626 (description "This module implements the password-based key derivation
14627 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14628
14629 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14630 is part of the RSA Public Key Cryptography Standards series. The provided
14631 implementation takes a password or a passphrase and a salt value (and
14632 optionally a iteration count, a digest module, and a MAC module) and provides
14633 a file-like object from which an arbitrarily-sized key can be read.")
14634 (license license:expat)))
14635
14636 (define-public python2-pbkdf2
14637 (package-with-python2 python-pbkdf2))
14638
14639 (define-public python-qrcode
14640 (package
14641 (name "python-qrcode")
14642 (version "6.1")
14643 (source
14644 (origin
14645 (method url-fetch)
14646 (uri (pypi-uri "qrcode" version))
14647 (sha256
14648 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14649 (build-system python-build-system)
14650 (arguments
14651 ;; FIXME: Tests require packaging 'pymaging'.
14652 '(#:tests? #f))
14653 (propagated-inputs
14654 `(("python-lxml" ,python-lxml) ; for SVG output
14655 ("python-pillow" ,python-pillow) ; for PNG output
14656 ("python-six" ,python-six)))
14657 (home-page "https://github.com/lincolnloop/python-qrcode")
14658 (synopsis "QR Code image generator")
14659 (description "This package provides a pure Python QR Code generator
14660 module. It uses the Python Imaging Library (PIL) to allow for the generation
14661 of QR Codes.
14662
14663 In addition this package provides a command line tool to generate QR codes and
14664 either write these QR codes to a file or do the output as ascii art at the
14665 console.")
14666 (license license:bsd-3)))
14667
14668 (define-public python2-qrcode
14669 (package-with-python2 python-qrcode))
14670
14671 (define-public python-rst2ansi
14672 (package
14673 (name "python-rst2ansi")
14674 (version "0.1.5")
14675 (source
14676 (origin
14677 (method url-fetch)
14678 (uri (pypi-uri "rst2ansi" version))
14679 (sha256
14680 (base32
14681 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14682 (build-system python-build-system)
14683 (propagated-inputs
14684 `(("python-docutils" ,python-docutils)))
14685 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14686 (synopsis "Convert RST to ANSI-decorated console output")
14687 (description
14688 "Python module dedicated to rendering RST (reStructuredText) documents
14689 to ansi-escaped strings suitable for display in a terminal.")
14690 (license license:expat)))
14691
14692 (define-public python-ansi2html
14693 (package
14694 (name "python-ansi2html")
14695 (version "1.2.0")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "ansi2html" version))
14700 (sha256
14701 (base32
14702 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14703 (build-system python-build-system)
14704 (native-inputs
14705 `(("python-mock" ,python-mock)
14706 ("python-nose" ,python-nose)))
14707 (propagated-inputs
14708 `(("python-six" ,python-six)))
14709 (home-page "https://github.com/ralphbean/ansi2html")
14710 (synopsis "Convert ANSI-decorated console output to HTML")
14711 (description
14712 "@command{ansi2html} is a Python library and command line utility for
14713 converting text with ANSI color codes to HTML or LaTeX.")
14714 (license license:gpl3+)))
14715
14716 (define-public python2-ansi2html
14717 (package-with-python2 python-ansi2html))
14718
14719 (define-public python-ddt
14720 (package
14721 (name "python-ddt")
14722 (version "1.1.3")
14723 (source
14724 (origin
14725 (method url-fetch)
14726 (uri (pypi-uri "ddt" version))
14727 (sha256
14728 (base32
14729 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14730 (build-system python-build-system)
14731 (native-inputs
14732 `(("python-mock" ,python-mock)
14733 ("python-nose" ,python-nose)))
14734 (propagated-inputs
14735 `(("python-six" ,python-six)
14736 ("python-pyyaml" ,python-pyyaml)))
14737 (home-page "https://github.com/txels/ddt")
14738 (synopsis "Data-Driven Tests")
14739 (description
14740 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14741 running it with different test data, and make it appear as multiple test
14742 cases.")
14743 (license license:expat)))
14744
14745 (define-public python2-ddt
14746 (package-with-python2 python-ddt))
14747
14748 (define-public python-pycountry
14749 (package
14750 (name "python-pycountry")
14751 (version "18.5.26")
14752 (source
14753 (origin
14754 (method url-fetch)
14755 (uri (pypi-uri "pycountry" version))
14756 (sha256
14757 (base32
14758 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14759 (build-system python-build-system)
14760 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14761 (synopsis "ISO databases for languages, countries, currencies, etc.")
14762 (description
14763 "@code{pycountry} provides the ISO databases for the standards:
14764 @enumerate
14765 @item 639-3 (Languages)
14766 @item 3166 (Countries)
14767 @item 3166-3 (Deleted Countries)
14768 @item 3166-2 (Subdivisions of countries)
14769 @item 4217 (Currencies)
14770 @item 15924 (Scripts)
14771 @end enumerate
14772 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14773 through a Python API.")
14774 (license license:lgpl2.1+)))
14775
14776 (define-public python2-pycountry
14777 (package-with-python2 python-pycountry))
14778
14779 (define-public python-pycosat
14780 (package
14781 (name "python-pycosat")
14782 (version "0.6.3")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (pypi-uri "pycosat" version ".zip"))
14787 (sha256
14788 (base32
14789 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14790 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14791 (build-system python-build-system)
14792 (native-inputs
14793 `(("unzip" ,unzip)))
14794 (home-page "https://github.com/ContinuumIO/pycosat")
14795 (synopsis "Bindings to picosat (a SAT solver)")
14796 (description
14797 "This package provides efficient Python bindings to @code{picosat} on
14798 the C level. When importing pycosat, the @code{picosat} solver becomes part
14799 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14800 Problem} (SAT) solver.")
14801 (license license:expat)))
14802
14803 (define-public python2-pycosat
14804 (package-with-python2 python-pycosat))
14805
14806 (define-public python2-ruamel.ordereddict
14807 (package
14808 (name "python2-ruamel.ordereddict")
14809 (version "0.4.9")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "ruamel.ordereddict" version))
14814 (sha256
14815 (base32
14816 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14817 (build-system python-build-system)
14818 (arguments
14819 `(#:python ,python-2
14820 #:phases
14821 (modify-phases %standard-phases
14822 (delete 'check)
14823 (add-after 'install 'check
14824 (lambda* (#:key inputs outputs #:allow-other-keys)
14825 (add-installed-pythonpath inputs outputs)
14826 (invoke "python" "test/testordereddict.py"))))))
14827 (home-page "https://bitbucket.org/ruamel/ordereddict")
14828 (synopsis "Version of dict that keeps keys in insertion order")
14829 (description
14830 "This is an implementation of an ordered dictionary with @dfn{Key
14831 Insertion Order} (KIO: updates of values do not affect the position of the
14832 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14833 removed and put at the back). The standard library module @code{OrderedDict},
14834 implemented later, implements a subset of @code{ordereddict} functionality.
14835 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14836 Order} (KSO, no sorting function can be specified, but a transform can be
14837 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14838 (license license:expat)))
14839
14840 (define-public python-pypeg2
14841 (package
14842 (name "python-pypeg2")
14843 (version "2.15.2")
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (pypi-uri "pyPEG2" version))
14848 (sha256
14849 (base32
14850 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14851 (build-system python-build-system)
14852 (propagated-inputs `(("python-lxml" ,python-lxml)))
14853 (arguments
14854 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14855 '(#:tests? #f))
14856 (home-page "https://fdik.org/pyPEG/")
14857 (synopsis "Parsering Expression Grammars in Python")
14858 (description "PyPEG is an intrinsic parser interpreter framework for
14859 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14860 parse many formal languages.")
14861 (license license:gpl2)))
14862
14863 (define-public python-incremental
14864 (package
14865 (name "python-incremental")
14866 (version "17.5.0")
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "incremental" version))
14871 (sha256
14872 (base32
14873 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14874 (build-system python-build-system)
14875 (home-page "https://github.com/hawkowl/incremental")
14876 (synopsis "Library for versioning Python projects")
14877 (description "Incremental is a small library that versions your Python
14878 projects.")
14879 (license license:expat)))
14880
14881 (define-public python2-incremental
14882 (package-with-python2 python-incremental))
14883
14884 (define-public python-invoke
14885 (package
14886 (name "python-invoke")
14887 (home-page "https://www.pyinvoke.org/")
14888 (version "1.4.1")
14889 (source (origin
14890 (method url-fetch)
14891 (uri (pypi-uri "invoke" version))
14892 (sha256
14893 (base32
14894 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14895 (build-system python-build-system)
14896 (arguments
14897 ;; XXX: Requires many dependencies that are not yet in Guix.
14898 `(#:tests? #f))
14899 (synopsis "Pythonic task execution")
14900 (description
14901 "Invoke is a Python task execution tool and library, drawing inspiration
14902 from various sources to arrive at a powerful and clean feature set. It is
14903 evolved from the Fabric project, but focuses on local and abstract concerns
14904 instead of servers and network commands.")
14905 (license license:bsd-3)))
14906
14907 (define-public python2-invoke
14908 (package-with-python2 python-invoke))
14909
14910 (define-public python-automat
14911 (package
14912 (name "python-automat")
14913 (version "20.2.0")
14914 (source (origin
14915 (method url-fetch)
14916 (uri (pypi-uri "Automat" version))
14917 (sha256
14918 (base32
14919 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14920 (build-system python-build-system)
14921 ;; We disable the tests because they require python-twisted, while
14922 ;; python-twisted depends on python-automat. Twisted is optional, but the
14923 ;; tests fail if it is not available. Also see
14924 ;; <https://github.com/glyph/automat/issues/71>.
14925 (arguments '(#:tests? #f))
14926 (native-inputs
14927 `(("python-m2r" ,python-m2r)
14928 ("python-setuptools-scm" ,python-setuptools-scm)
14929 ("python-graphviz" ,python-graphviz)))
14930 (propagated-inputs
14931 `(("python-six" ,python-six)
14932 ("python-attrs" ,python-attrs)))
14933 (home-page "https://github.com/glyph/Automat")
14934 (synopsis "Self-service finite-state machines")
14935 (description "Automat is a library for concise, idiomatic Python
14936 expression of finite-state automata (particularly deterministic finite-state
14937 transducers).")
14938 (license license:expat)))
14939
14940 (define-public python2-automat
14941 (package-with-python2 python-automat))
14942
14943 (define-public python-m2r
14944 (package
14945 (name "python-m2r")
14946 (version "0.2.1")
14947 (source (origin
14948 (method url-fetch)
14949 (uri (pypi-uri "m2r" version))
14950 (sha256
14951 (base32
14952 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14953 (build-system python-build-system)
14954 (propagated-inputs
14955 `(("python-docutils" ,python-docutils)
14956 ("python-mistune" ,python-mistune)))
14957 (native-inputs
14958 `(("python-pygments" ,python-pygments)
14959 ("python-mock" ,python-mock)))
14960 (home-page "https://github.com/miyakogi/m2r")
14961 (synopsis "Markdown to reStructuredText converter")
14962 (description "M2R converts a markdown file including reST markups to valid
14963 reST format.")
14964 (license license:expat)))
14965
14966 (define-public python2-m2r
14967 (package-with-python2 python-m2r))
14968
14969 (define-public python-constantly
14970 (package
14971 (name "python-constantly")
14972 (version "15.1.0")
14973 (source (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "constantly" version))
14976 (sha256
14977 (base32
14978 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14979 (build-system python-build-system)
14980 (home-page "https://github.com/twisted/constantly")
14981 (synopsis "Symbolic constants in Python")
14982 (description "Constantly is a Python library that provides symbolic
14983 constant support. It includes collections and constants with text, numeric,
14984 and bit flag values.")
14985 (license license:expat)))
14986
14987 (define-public python2-constantly
14988 (package-with-python2 python-constantly))
14989
14990 (define-public python-attrs
14991 (package
14992 (name "python-attrs")
14993 (version "19.3.0")
14994 (source (origin
14995 (method url-fetch)
14996 (uri (pypi-uri "attrs" version))
14997 (sha256
14998 (base32
14999 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15000 (build-system python-build-system)
15001 (arguments
15002 `(#:modules ((guix build utils)
15003 (guix build python-build-system)
15004 (ice-9 ftw)
15005 (srfi srfi-1)
15006 (srfi srfi-26))
15007 #:phases (modify-phases %standard-phases
15008 (replace 'check
15009 (lambda _
15010 (let ((cwd (getcwd)))
15011 (setenv "PYTHONPATH"
15012 (string-append
15013 cwd "/build/"
15014 (find (cut string-prefix? "lib" <>)
15015 (scandir (string-append cwd "/build")))
15016 ":"
15017 (getenv "PYTHONPATH")))
15018 (invoke "python" "-m" "pytest")))))))
15019 (native-inputs
15020 `(("python-coverage" ,python-coverage)
15021 ("python-hypothesis" ,python-hypothesis)
15022 ("python-pympler" ,python-pympler)
15023 ("python-pytest" ,python-pytest)
15024 ("python-six" ,python-six)
15025 ("python-sphinx" ,python-sphinx)
15026 ("python-zope-interface" ,python-zope-interface)))
15027 (home-page "https://github.com/python-attrs/attrs/")
15028 (synopsis "Attributes without boilerplate")
15029 (description "@code{attrs} is a Python package with class decorators that
15030 ease the chores of implementing the most common attribute-related object
15031 protocols.")
15032 (license license:expat)))
15033
15034 (define-public python2-attrs
15035 (package-with-python2 python-attrs))
15036
15037 (define-public python-attrs-bootstrap
15038 (package
15039 (inherit python-attrs)
15040 (name "python-attrs-bootstrap")
15041 (native-inputs `())
15042 (arguments `(#:tests? #f))))
15043
15044 (define-public python2-attrs-bootstrap
15045 (package-with-python2 python-attrs-bootstrap))
15046
15047 (define-public python2-cliapp
15048 (package
15049 (name "python2-cliapp")
15050 (version "1.20180812.1")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (string-append
15055 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15056 version ".tar.gz"))
15057 (sha256
15058 (base32
15059 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15060 (build-system python-build-system)
15061 (arguments
15062 `(#:python ,python-2
15063 #:phases
15064 (modify-phases %standard-phases
15065 ;; check phase needs to be run before the build phase. If not,
15066 ;; coverage-test-runner looks for tests for the built source files,
15067 ;; and fails.
15068 (delete 'check)
15069 (add-before 'build 'check
15070 (lambda _
15071 ;; Disable python3 tests
15072 (substitute* "check"
15073 (("python3") "# python3"))
15074 (invoke "./check"))))))
15075 (native-inputs
15076 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15077 ("python2-pep8" ,python2-pep8)))
15078 (propagated-inputs
15079 `(("python2-pyaml" ,python2-pyaml)))
15080 (home-page "https://liw.fi/cliapp/")
15081 (synopsis "Python framework for command line programs")
15082 (description "@code{python2-cliapp} is a python framework for
15083 command line programs. It contains the typical stuff such programs
15084 need to do, such as parsing the command line for options, and
15085 iterating over input files.")
15086 (license license:gpl2+)))
15087
15088 (define-public python2-ttystatus
15089 (package
15090 (name "python2-ttystatus")
15091 (version "0.38")
15092 (source
15093 (origin
15094 (method git-fetch)
15095 (uri (git-reference
15096 (url "http://git.liw.fi/ttystatus")
15097 ;; There are no tags after ttystatus-0.36.
15098 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15099 (sha256
15100 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15101 (file-name (git-file-name name version))))
15102 (build-system python-build-system)
15103 (native-inputs
15104 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15105 ("python2-pep8" ,python2-pep8)))
15106 (arguments
15107 `(#:python ,python-2
15108 #:phases
15109 (modify-phases %standard-phases
15110 ;; check phase needs to be run before the build phase. If not,
15111 ;; coverage-test-runner looks for tests for the built source files,
15112 ;; and fails.
15113 (delete 'check)
15114 (add-before 'build 'check
15115 (lambda _ (invoke "make" "check"))))))
15116 (home-page "https://liw.fi/ttystatus/")
15117 (synopsis "Python library for showing progress reporting and
15118 status updates on terminals")
15119 (description "@code{python2-ttystatus} is a python library for
15120 showing progress reporting and status updates on terminals, for
15121 command line programs. Output is automatically adapted to the width
15122 of the terminal: truncated if it does not fit, and resized if the
15123 terminal size changes.")
15124 (license license:gpl3+)))
15125
15126 (define-public python2-tracing
15127 (package
15128 (name "python2-tracing")
15129 (version "0.10")
15130 (source
15131 (origin
15132 (method url-fetch)
15133 (uri (string-append
15134 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15135 version ".tar.gz"))
15136 (sha256
15137 (base32
15138 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15139 (build-system python-build-system)
15140 (arguments
15141 `(#:python ,python-2))
15142 (home-page "https://liw.fi/tracing/")
15143 (synopsis "Python debug logging helper")
15144 (description "@code{python2-tracing} is a python library for
15145 logging debug messages. It provides a way to turn debugging messages
15146 on and off, based on the filename they occur in. It is much faster
15147 than using @code{logging.Filter} to accomplish the same thing, which
15148 matters when code is run in production mode. The actual logging still
15149 happens using the @code{logging} library.")
15150 (license license:gpl3+)))
15151
15152 (define-public python2-larch
15153 (package
15154 (name "python2-larch")
15155 (version "1.20151025")
15156 (source
15157 (origin
15158 (method url-fetch)
15159 (uri (string-append
15160 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15161 version ".tar.gz"))
15162 (patches (search-patches
15163 "python2-larch-coverage-4.0a6-compatibility.patch"))
15164 (sha256
15165 (base32
15166 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15167 (build-system python-build-system)
15168 (arguments
15169 `(#:python ,python-2
15170 #:phases
15171 (modify-phases %standard-phases
15172 ;; check phase needs to be run before the build phase. If not,
15173 ;; coverage-test-runner looks for tests for the built source files,
15174 ;; and fails.
15175 (delete 'check)
15176 (add-before 'build 'check
15177 (lambda _ (invoke "make" "check"))))))
15178 (native-inputs
15179 `(("cmdtest" ,cmdtest)
15180 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15181 (propagated-inputs
15182 `(("python2-tracing" ,python2-tracing)))
15183 (home-page "https://liw.fi/larch/")
15184 (synopsis "Python copy-on-write B-tree library")
15185 (description "@code{python2-larch} is an implementation of
15186 particular kind of B-tree, based on research by Ohad Rodeh. See
15187 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15188 on the data structure.
15189
15190 The distinctive feature of this B-tree is that a node is never
15191 (conceptually) modified. Instead, all updates are done by
15192 copy-on-write. This makes it easy to clone a tree, and modify only the
15193 clone, while other processes access the original tree.")
15194 (license license:gpl3+)))
15195
15196 (define-public python-astroid
15197 (package
15198 (name "python-astroid")
15199 (version "2.4.2")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (pypi-uri "astroid" version))
15204 (sha256
15205 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15206 (modules '((guix build utils)))
15207 (snippet
15208 '(begin
15209 ;; Check to see if the version pinning has been removed.
15210 (substitute* "astroid/__pkginfo__.py"
15211 (("==1\\.4\\.\\*") ">=1.4.0"))
15212 #t))))
15213 (build-system python-build-system)
15214 (propagated-inputs
15215 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15216 ("python-six" ,python-six)
15217 ("python-wrapt" ,python-wrapt)))
15218 (native-inputs
15219 `(("python-dateutil" ,python-dateutil)
15220 ("python-pytest" ,python-pytest)
15221 ("python-pytest-runner" ,python-pytest-runner)))
15222 (home-page "https://github.com/PyCQA/astroid")
15223 (synopsis "Common base representation of python source code for pylint and
15224 other projects")
15225 (description "@code{python-astroid} provides a common base representation
15226 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15227
15228 It provides a compatible representation which comes from the _ast module. It
15229 rebuilds the tree generated by the builtin _ast module by recursively walking
15230 down the AST and building an extended ast. The new node classes have
15231 additional methods and attributes for different usages. They include some
15232 support for static inference and local name scopes. Furthermore, astroid
15233 builds partial trees by inspecting living objects.")
15234 (license license:lgpl2.1+)
15235 (properties `((python2-variant . ,(delay python2-astroid))))))
15236
15237 (define-public python2-astroid
15238 (let ((base (package-with-python2
15239 (strip-python2-variant python-astroid))))
15240 (package (inherit base)
15241 ;; Version 2.x removes python2 support.
15242 (version "1.6.5")
15243 (source
15244 (origin
15245 (method url-fetch)
15246 (uri (pypi-uri "astroid" version))
15247 (sha256
15248 (base32
15249 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15250 (arguments
15251 (substitute-keyword-arguments (package-arguments base)
15252 ((#:phases phases)
15253 `(modify-phases ,phases
15254 (add-after 'unpack 'remove-spurious-test
15255 (lambda _
15256 ;; https://github.com/PyCQA/astroid/issues/276
15257 (delete-file "astroid/tests/unittest_brain.py")
15258 #t))
15259 (replace 'check
15260 (lambda _
15261 (invoke"python" "-m" "unittest" "discover"
15262 "-p" "unittest*.py")))))))
15263 (native-inputs `())
15264 (propagated-inputs
15265 `(("python2-backports-functools-lru-cache"
15266 ,python2-backports-functools-lru-cache)
15267 ("python2-enum34" ,python2-enum34)
15268 ("python2-singledispatch" ,python2-singledispatch)
15269 ,@(alist-delete "python-typed-ast"
15270 (package-propagated-inputs base)))))))
15271
15272 (define-public python-isbnlib
15273 (package
15274 (name "python-isbnlib")
15275 (version "3.10.3")
15276 (source
15277 (origin
15278 (method url-fetch)
15279 (uri (pypi-uri "isbnlib" version))
15280 (sha256
15281 (base32
15282 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15283 (build-system python-build-system)
15284 (arguments '(#:tests? #f)) ; No test
15285 (home-page "https://github.com/xlcnd/isbnlib")
15286 (synopsis "Python library to work with ISBN strings")
15287 (description "@code{python-isbnlib} is a (pure) python library that provides
15288 several useful methods and functions to validate, clean, transform, hyphenate and
15289 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15290 version, is suitable to be include as a dependency in other projects.")
15291 (license license:lgpl3+)))
15292
15293 (define-public python-isort
15294 (package
15295 (name "python-isort")
15296 (version "4.3.4")
15297 (source
15298 (origin
15299 (method git-fetch)
15300 (uri (git-reference
15301 ;; Tests pass only from the Github sources
15302 (url "https://github.com/timothycrosley/isort")
15303 (commit version)))
15304 (file-name (git-file-name name version))
15305 (sha256
15306 (base32
15307 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15308 (build-system python-build-system)
15309 (native-inputs
15310 `(("python-mock" ,python-mock)
15311 ("python-pytest" ,python-pytest)))
15312 (home-page "https://github.com/timothycrosley/isort")
15313 (synopsis "Python utility/library to sort python imports")
15314 (description "@code{python-isort} is a python utility/library to sort
15315 imports alphabetically, and automatically separated into sections. It
15316 provides a command line utility, a python library and plugins for various
15317 editors.")
15318 (license license:expat)
15319 (properties `((python2-variant . ,(delay python2-isort))))))
15320
15321 (define-public python2-isort
15322 (let ((base (package-with-python2
15323 (strip-python2-variant python-isort))))
15324 (package (inherit base)
15325 (native-inputs
15326 `(("python2-futures" ,python2-futures)
15327 ,@(package-native-inputs base))))))
15328
15329 (define-public python2-backports-functools-lru-cache
15330 (package
15331 (name "python2-backports-functools-lru-cache")
15332 (version "1.6.1")
15333 (source
15334 (origin
15335 (method url-fetch)
15336 ;; only the pypi tarballs contain the necessary metadata
15337 (uri (pypi-uri "backports.functools_lru_cache" version))
15338 (sha256
15339 (base32
15340 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15341 (build-system python-build-system)
15342 (native-inputs
15343 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15344 (arguments
15345 `(#:python ,python-2))
15346 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15347 (synopsis "Backport of functools.lru_cache from Python 3.3")
15348 (description "@code{python2-backports-functools-lru-cache} is a backport
15349 of @code{functools.lru_cache} from python 3.3.")
15350 (license license:expat)))
15351
15352 (define-public python-configparser
15353 (package
15354 (name "python-configparser")
15355 (version "4.0.2")
15356 (source
15357 (origin
15358 (method url-fetch)
15359 (uri (pypi-uri "configparser" version))
15360 (sha256
15361 (base32
15362 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15363 (native-inputs
15364 `(("python-setuptools_scm" ,python-setuptools-scm)))
15365 (build-system python-build-system)
15366 (home-page "https://github.com/jaraco/configparser/")
15367 (synopsis "Backport of configparser from python 3.5")
15368 (description "@code{python-configparser} is a backport of
15369 @code{configparser} from Python 3.5 so that it can be used directly
15370 in other versions.")
15371 (license license:expat)))
15372
15373 (define-public python2-configparser
15374 (package-with-python2 python-configparser))
15375
15376 (define-public python-mamba
15377 (package
15378 (name "python-mamba")
15379 (version "0.11.1")
15380 (source (origin
15381 (method url-fetch)
15382 (uri (pypi-uri "mamba" version))
15383 (sha256
15384 (base32
15385 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15386 (build-system python-build-system)
15387 (arguments `(#:tests? #f)) ; No test
15388 (propagated-inputs
15389 `(("python-clint" ,python-clint)
15390 ("python-coverage" ,python-coverage)))
15391 (home-page "https://nestorsalceda.com/mamba/")
15392 (synopsis "Test runner for Python")
15393 (description
15394 "Mamba is a Behaviour-Driven Development tool for Python developers.
15395 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15396 (license license:expat)))
15397
15398 (define-public python-mando
15399 (package
15400 (name "python-mando")
15401 (version "0.6.4")
15402 (source (origin
15403 (method url-fetch)
15404 (uri (pypi-uri "mando" version))
15405 (sha256
15406 (base32
15407 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15408 (build-system python-build-system)
15409 (propagated-inputs
15410 `(("python-rst2ansi" ,python-rst2ansi)
15411 ("python-six" ,python-six)))
15412 (native-inputs
15413 `(("python-pytest" ,python-pytest)))
15414 (home-page "https://mando.readthedocs.org/")
15415 (synopsis
15416 "Wrapper around argparse, allowing creation of complete CLI applications")
15417 (description
15418 "This package is a wrapper around argparse, allowing you to write complete CLI
15419 applications in seconds while maintaining all the flexibility.")
15420 (license license:expat)))
15421
15422 (define-public python2-mando
15423 (package-with-python2 python-mando))
15424
15425 (define-public python2-argparse
15426 (package
15427 (name "python2-argparse")
15428 (version "1.4.0")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "argparse" version))
15433 (sha256
15434 (base32
15435 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15436 (build-system python-build-system)
15437 (arguments
15438 `(#:python ,python-2))
15439 (home-page "https://github.com/ThomasWaldmann/argparse/")
15440 (synopsis "Python command-line parsing library")
15441 (description
15442 "This package is mostly for people who want to have @code{argparse} on
15443 older Pythons because it was not part of the standard library back then.")
15444 (license license:psfl)))
15445
15446 (define-public python-fudge
15447 (package
15448 (name "python-fudge")
15449 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15450 ;; package, which is currently the only use of this package.
15451 (version "0.9.6")
15452 (source
15453 (origin
15454 (method url-fetch)
15455 (uri (pypi-uri "fudge" version))
15456 (sha256
15457 (base32
15458 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15459 (build-system python-build-system)
15460 (arguments
15461 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15462 (home-page "https://github.com/fudge-py/fudge")
15463 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15464 (description
15465 "Fudge is a Python module for using fake objects (mocks and stubs) to
15466 test real ones.
15467
15468 In readable Python code, you declare the methods available on your fake object
15469 and how they should be called. Then you inject that into your application and
15470 start testing. This declarative approach means you don’t have to record and
15471 playback actions and you don’t have to inspect your fakes after running code.
15472 If the fake object was used incorrectly then you’ll see an informative
15473 exception message with a traceback that points to the culprit.")
15474 (license license:expat)))
15475
15476 (define-public python2-fudge
15477 (package-with-python2 python-fudge))
15478
15479 (define-public python-mwclient
15480 (package
15481 (name "python-mwclient")
15482 (version "0.10.1")
15483 (source
15484 (origin
15485 (method git-fetch)
15486 ;; The PyPI version wouldn't contain tests.
15487 (uri (git-reference
15488 (url "https://github.com/mwclient/mwclient")
15489 (commit (string-append "v" version))))
15490 (file-name (git-file-name name version))
15491 (sha256
15492 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15493 (build-system python-build-system)
15494 (propagated-inputs
15495 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15496 ("python-six" ,python-six)))
15497 (native-inputs
15498 `(("python-mock" ,python-mock)
15499 ("python-pytest" ,python-pytest)
15500 ("python-pytest-cov" ,python-pytest-cov)
15501 ("python-pytest-runner" ,python-pytest-runner)
15502 ("python-responses" ,python-responses)))
15503 (home-page "https://github.com/btongminh/mwclient")
15504 (synopsis "MediaWiki API client")
15505 (description "This package provides a MediaWiki API client.")
15506 (license license:expat)))
15507
15508 (define-public python2-mwclient
15509 (package-with-python2 python-mwclient))
15510
15511 (define-public python-utils
15512 (package
15513 (name "python-utils")
15514 (version "2.4.0")
15515 (source (origin
15516 (method url-fetch)
15517 (uri (pypi-uri "python-utils" version))
15518 (sha256
15519 (base32
15520 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15521 (build-system python-build-system)
15522 (arguments
15523 `(#:phases
15524 (modify-phases %standard-phases
15525 (replace 'check
15526 (lambda* (#:key inputs outputs #:allow-other-keys)
15527 (add-installed-pythonpath inputs outputs)
15528 (delete-file "pytest.ini")
15529 (invoke "pytest" "-vv"))))))
15530 (native-inputs
15531 `(("pytest-runner" ,python-pytest-runner)
15532 ("pytest" ,python-pytest)
15533 ("six" ,python-six)))
15534 (home-page "https://github.com/WoLpH/python-utils")
15535 (synopsis "Convenient utilities not included with the standard Python install")
15536 (description
15537 "Python Utils is a collection of small Python functions and classes which
15538 make common patterns shorter and easier.")
15539 (license license:bsd-2)))
15540
15541 (define-public python2-utils
15542 (package-with-python2 python-utils))
15543
15544 (define-public python-diff-match-patch
15545 (package
15546 (name "python-diff-match-patch")
15547 (version "20121119")
15548 (source
15549 (origin
15550 (method url-fetch)
15551 (uri (pypi-uri "diff-match-patch" version))
15552 (sha256
15553 (base32
15554 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15555 (build-system python-build-system)
15556 (home-page "https://code.google.com/p/google-diff-match-patch")
15557 (synopsis "Synchronize plain text")
15558 (description "Diff Match and Patch libraries offer robust algorithms to
15559 perform the operations required for synchronizing plain text.")
15560 (license license:asl2.0)))
15561
15562 (define-public python2-diff-match-patch
15563 (package-with-python2 python-diff-match-patch))
15564
15565 (define-public python-dirsync
15566 (package
15567 (name "python-dirsync")
15568 (version "2.2.5")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "dirsync" version))
15573 (sha256
15574 (base32
15575 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15576 (build-system python-build-system)
15577 (propagated-inputs
15578 `(("six" ,python-six)))
15579 (home-page "https://github.com/tkhyn/dirsync")
15580 (synopsis "Advanced directory tree synchronisation tool")
15581 (description "Advanced directory tree synchronisation tool.")
15582 (license license:expat)))
15583
15584 (define-public python2-dirsync
15585 (package-with-python2 python-dirsync))
15586
15587 (define-public python-levenshtein
15588 (package
15589 (name "python-levenshtein")
15590 (version "0.12.0")
15591 (source
15592 (origin
15593 (method url-fetch)
15594 (uri (pypi-uri "python-Levenshtein" version))
15595 (sha256
15596 (base32
15597 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15598 (build-system python-build-system)
15599 (home-page "https://github.com/ztane/python-Levenshtein")
15600 (synopsis "Fast computation of Levenshtein distance and string similarity")
15601 (description
15602 "The Levenshtein Python C extension module contains functions for fast computation of
15603 @enumerate
15604 @item Levenshtein (edit) distance, and edit operations
15605 @item string similarity
15606 @item approximate median strings, and generally string averaging
15607 @item string sequence and set similarity
15608 @end enumerate
15609 It supports both normal and Unicode strings.")
15610 (license license:gpl2+)))
15611
15612 (define-public python2-levenshtein
15613 (package-with-python2 python-levenshtein))
15614
15615 (define-public python-scandir
15616 (package
15617 (name "python-scandir")
15618 (version "1.10.0")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "scandir" version))
15623 (sha256
15624 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15625 (build-system python-build-system)
15626 (arguments
15627 `(#:phases (modify-phases %standard-phases
15628 (replace 'check
15629 (lambda _
15630 (invoke "python" "test/run_tests.py"))))))
15631 (home-page "https://github.com/benhoyt/scandir")
15632 (synopsis "Directory iteration function")
15633 (description
15634 "Directory iteration function like os.listdir(), except that instead of
15635 returning a list of bare filenames, it yields DirEntry objects that include
15636 file type and stat information along with the name. Using scandir() increases
15637 the speed of os.walk() by 2-20 times (depending on the platform and file
15638 system) by avoiding unnecessary calls to os.stat() in most cases.
15639
15640 This package is part of the Python standard library since version 3.5.")
15641 (license license:bsd-3)))
15642
15643 (define-public python2-scandir
15644 (package-with-python2 python-scandir))
15645
15646 (define-public python2-stemming
15647 (package
15648 (name "python2-stemming")
15649 (version "1.0.1")
15650 (source
15651 (origin
15652 (method url-fetch)
15653 (uri (pypi-uri "stemming" version))
15654 (sha256
15655 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15656 (build-system python-build-system)
15657 (arguments
15658 `(#:python ,python-2))
15659 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15660 (synopsis "Python implementations of various stemming algorithms")
15661 (description
15662 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15663 stemming algorithms for English. These implementations are straightforward and
15664 efficient, unlike some Python versions of the same algorithms available on the
15665 Web. This package is an extraction of the stemming code included in the Whoosh
15666 search engine.")
15667 (license license:public-domain)))
15668
15669 (define-public python-factory-boy
15670 (package
15671 (name "python-factory-boy")
15672 (version "2.8.1")
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "factory_boy" version))
15677 (sha256
15678 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15679 (build-system python-build-system)
15680 (arguments
15681 ;; Tests are not included in the tarball.
15682 `(#:tests? #f))
15683 (propagated-inputs
15684 `(("faker" ,python-faker)))
15685 (home-page "https://github.com/benhoyt/scandir")
15686 (synopsis "Versatile test fixtures replacement")
15687 (description
15688 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15689
15690 As a fixtures replacement tool, it aims to replace static, hard to maintain
15691 fixtures with easy-to-use factories for complex object.
15692
15693 Instead of building an exhaustive test setup with every possible combination
15694 of corner cases, factory_boy allows you to use objects customized for the
15695 current test, while only declaring the test-specific fields")
15696 (license license:expat)))
15697
15698 (define-public python2-factory-boy
15699 (package-with-python2 python-factory-boy))
15700
15701 (define-public python-translate-toolkit
15702 (package
15703 (name "python-translate-toolkit")
15704 (version "2.1.0")
15705 (source
15706 (origin
15707 (method url-fetch)
15708 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15709 (sha256
15710 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15711 (build-system python-build-system)
15712 (native-inputs
15713 `(("python-pytest" ,python-pytest)
15714 ("python-sphinx" ,python-sphinx)))
15715 (propagated-inputs
15716 `(("python-babel" ,python-babel)
15717 ("python-beautifulsoup4" ,python-beautifulsoup4)
15718 ("python-chardet" ,python-chardet)
15719 ("python-diff-match-patch" ,python-diff-match-patch)
15720 ("python-levenshtein" ,python-levenshtein)
15721 ("python-lxml" ,python-lxml)
15722 ("python-six" ,python-six)
15723 ("python-vobject" ,python-vobject)
15724 ("python-pyyaml" ,python-pyyaml)))
15725 (arguments
15726 ;; TODO: tests are not run, because they end with
15727 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15728 ;; 'parse_funcs'
15729 ;; during test setup.
15730 `(#:tests? #f))
15731 (home-page "https://toolkit.translatehouse.org")
15732 (synopsis "Tools and API for translation and localization engineering")
15733 (description
15734 "Tools and API for translation and localization engineering. It contains
15735 several utilities, as well as an API for building localization tools.")
15736 (license license:gpl2+)))
15737
15738 (define-public python2-translate-toolkit
15739 (package-with-python2 python-translate-toolkit))
15740
15741 (define-public python-packaging
15742 (package
15743 (name "python-packaging")
15744 (version "20.0")
15745 (source
15746 (origin
15747 (method url-fetch)
15748 (uri (pypi-uri "packaging" version))
15749 ;; XXX: The URL in the patch file is wrong, it should be
15750 ;; <https://github.com/pypa/packaging/pull/256>.
15751 (patches (search-patches "python-packaging-test-arch.patch"))
15752 (sha256
15753 (base32
15754 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15755 (build-system python-build-system)
15756 (arguments
15757 `(#:phases (modify-phases %standard-phases
15758 (replace 'check
15759 (lambda* (#:key tests? #:allow-other-keys)
15760 (if tests?
15761 (invoke "py.test" "-vv")
15762 (format #t "test suite not run~%"))
15763 #t)))))
15764 (native-inputs
15765 `(("python-pretend" ,python-pretend)
15766 ("python-pytest" ,python-pytest)))
15767 (propagated-inputs
15768 `(("python-pyparsing" ,python-pyparsing)
15769 ("python-six" ,python-six)))
15770 (home-page "https://github.com/pypa/packaging")
15771 (synopsis "Core utilities for Python packages")
15772 (description "Packaging is a Python module for dealing with Python packages.
15773 It offers an interface for working with package versions, names, and dependency
15774 information.")
15775 ;; From 'LICENSE': This software is made available under the terms of
15776 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15777 ;; Contributions to this software is made under the terms of *both* these
15778 ;; licenses.
15779 (license (list license:asl2.0 license:bsd-2))))
15780
15781 (define-public python2-packaging
15782 (package-with-python2 python-packaging))
15783
15784 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15785 (define-public python-packaging-bootstrap
15786 (hidden-package
15787 (package/inherit
15788 python-packaging
15789 (name "python-packaging-bootstrap")
15790 (native-inputs '())
15791 (propagated-inputs
15792 `(("python-pyparsing" ,python-pyparsing)))
15793 (arguments '(#:tests? #f)))))
15794
15795 (define-public python2-packaging-bootstrap
15796 (hidden-package
15797 (package/inherit
15798 python2-packaging
15799 (name "python2-packaging-bootstrap")
15800 (native-inputs '())
15801 (propagated-inputs
15802 `(("python-pyparsing" ,python2-pyparsing)))
15803 (arguments
15804 `(#:tests? #f
15805 ,@(package-arguments python2-packaging))))))
15806
15807 (define-public python-relatorio
15808 (package
15809 (name "python-relatorio")
15810 (version "0.8.0")
15811 (source
15812 (origin
15813 (method url-fetch)
15814 (uri (pypi-uri "relatorio" version))
15815 (sha256
15816 (base32
15817 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15818 (build-system python-build-system)
15819 (propagated-inputs
15820 `(("python-lxml" ,python-lxml)
15821 ("python-genshi" ,python-genshi)))
15822 (native-inputs
15823 `(("python-magic" ,python-magic)))
15824 (home-page "https://relatorio.tryton.org/")
15825 (synopsis "Templating library able to output ODT and PDF files")
15826 (description "Relatorio is a templating library which provides a way to
15827 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15828 for more filetypes can be easily added by creating plugins for them.")
15829 (license license:gpl3+)))
15830
15831 (define-public python2-relatorio
15832 (package-with-python2 python-relatorio))
15833
15834 (define-public python-radon
15835 (package
15836 (name "python-radon")
15837 (version "4.1.0")
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "radon" version))
15842 (sha256
15843 (base32
15844 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15845 (build-system python-build-system)
15846 (arguments
15847 `(#:phases (modify-phases %standard-phases
15848 (replace 'check
15849 (lambda _
15850 (invoke "python" "radon/tests/run.py"))))))
15851 (propagated-inputs
15852 `(("python-colorama" ,python-colorama)
15853 ("python-flake8-polyfill" ,python-flake8-polyfill)
15854 ("python-mando" ,python-mando)))
15855 (native-inputs
15856 `(("python-pytest" ,python-pytest)
15857 ("python-pytest-mock" ,python-pytest-mock)))
15858 (home-page "https://radon.readthedocs.org/")
15859 (synopsis "Code Metrics in Python")
15860 (description "Radon is a Python tool which computes various code metrics.
15861 Supported metrics are:
15862 @itemize @bullet
15863 @item raw metrics: SLOC, comment lines, blank lines, &c.
15864 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15865 @item Halstead metrics (all of them)
15866 @item the Maintainability Index (a Visual Studio metric)
15867 @end itemize")
15868 (properties `((python2-variant . ,(delay python2-radon))))
15869 (license license:expat)))
15870
15871 (define-public python2-radon
15872 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15873 (package
15874 (inherit base)
15875 (propagated-inputs
15876 `(("python-configparser" ,python2-configparser)
15877 ("python-future" ,python2-future)
15878 ,@(package-propagated-inputs base))))))
15879
15880 (define-public python-sure
15881 (package
15882 (name "python-sure")
15883 (version "1.4.11")
15884 (source
15885 (origin
15886 (method url-fetch)
15887 (uri (pypi-uri "sure" version))
15888 (sha256
15889 (base32
15890 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15891 (build-system python-build-system)
15892 (propagated-inputs
15893 `(("python-mock" ,python-mock)
15894 ("python-six" ,python-six)))
15895 (native-inputs
15896 `(("python-nose" ,python-nose)))
15897 (home-page "https://github.com/gabrielfalcao/sure")
15898 (synopsis "Automated testing library in python for python")
15899 (description
15900 "Sure is a python library that leverages a DSL for writing assertions.
15901 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15902 (license license:gpl3+)))
15903
15904 (define-public python2-sure
15905 (package-with-python2 python-sure))
15906
15907 (define-public python2-couleur
15908 ;; This package does not seem to support python3 at all, hence,
15909 ;; only the python2 variant definition is provided.
15910 (package
15911 (name "python2-couleur")
15912 (version "0.6.2")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "couleur" version))
15917 (sha256
15918 (base32
15919 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15920 (build-system python-build-system)
15921 (arguments
15922 `(#:python ,python-2))
15923 (home-page "https://github.com/gabrielfalcao/couleur")
15924 (synopsis
15925 "ANSI terminal tool for python, colored shell and other handy fancy features")
15926 (description
15927 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15928 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15929 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15930 ;; https://github.com/gabrielfalcao/couleur/issues/11
15931 (license license:lgpl3+)))
15932
15933 (define-public python-misaka
15934 (package
15935 (name "python-misaka")
15936 (version "2.1.1")
15937 (source
15938 (origin
15939 (method url-fetch)
15940 (uri (pypi-uri "misaka" version))
15941 (sha256
15942 (base32
15943 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15944 (build-system python-build-system)
15945 (arguments
15946 `(;; Line 37 of setup.py calls self.run_command('develop')
15947 ;; in the 'check' phase. This command seems to be trying
15948 ;; to write to
15949 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15950 ;; for which it does not have the permission to write.
15951 #:tests? #f))
15952 (propagated-inputs
15953 `(("python-cffi" ,python-cffi)))
15954 (home-page "https://github.com/FSX/misaka")
15955 (synopsis "Python binding for Hoedown")
15956 (description
15957 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15958 library written in C. It features a fast HTML renderer and functionality to make custom
15959 renderers (e.g. man pages or LaTeX).")
15960 (license license:expat)))
15961
15962 (define-public python2-misaka
15963 (package-with-python2 python-misaka))
15964
15965 (define-public python2-steadymark
15966 ;; This is forced into being a python2 only variant
15967 ;; due to its dependence on couleur that has no support
15968 ;; for python3
15969 (package
15970 (name "python2-steadymark")
15971 (version "0.7.3")
15972 (source
15973 (origin
15974 (method url-fetch)
15975 (uri (pypi-uri "steadymark" version))
15976 (sha256
15977 (base32
15978 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15979 (build-system python-build-system)
15980 (native-inputs
15981 `(("python-couleur" ,python2-couleur)
15982 ("python-sure" ,python2-sure)
15983 ("python-misaka" ,python2-misaka)))
15984 (arguments
15985 `(#:python ,python-2
15986 #:phases
15987 (modify-phases %standard-phases
15988 (add-before 'build 'patch-setup-py
15989 (lambda _
15990 ;; Update requirements from dependency==version
15991 ;; to dependency>=version
15992 (substitute* "setup.py"
15993 (("==") ">="))
15994 #t)))))
15995 (home-page "https://github.com/gabrielfalcao/steadymark")
15996 (synopsis "Markdown-based test runner for python")
15997 (description
15998 "@code{Steadymark} allows documentation to be written in github-flavoured
15999 markdown. The documentation may contain snippets of code surrounded by python
16000 code blocks and @code{Steadymark} will find these snippets and run them, making
16001 sure that there are no old malfunctional examples in the documentation examples.")
16002 (license license:expat)))
16003
16004 (define-public python-jsonpointer
16005 (package
16006 (name "python-jsonpointer")
16007 (version "1.10")
16008 (source
16009 (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "jsonpointer" version))
16012 (sha256
16013 (base32
16014 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16015 (build-system python-build-system)
16016 (home-page "https://github.com/stefankoegl/python-json-pointer")
16017 (synopsis "Identify specific nodes in a JSON document")
16018 (description "@code{jsonpointer} allows you to access specific nodes
16019 by path in a JSON document (see RFC 6901).")
16020 (license license:bsd-3)))
16021
16022 (define-public python2-jsonpointer
16023 (package-with-python2 python-jsonpointer))
16024
16025 (define-public python-jsonpatch
16026 (package
16027 (name "python-jsonpatch")
16028 (version "1.16")
16029 (source
16030 (origin
16031 (method git-fetch)
16032 ;; pypi version lacks tests.js
16033 (uri (git-reference
16034 (url "https://github.com/stefankoegl/python-json-patch")
16035 (commit (string-append "v" version))))
16036 (file-name (git-file-name name version))
16037 (sha256
16038 (base32
16039 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16040 (build-system python-build-system)
16041 (native-inputs
16042 `(("python-jsonpointer" ,python-jsonpointer)))
16043 (home-page "https://github.com/stefankoegl/python-json-patch")
16044 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16045 (description "@code{jsonpatch} is a library and program that allows
16046 applying JSON Patches according to RFC 6902.")
16047 (license license:bsd-3)))
16048
16049 (define-public python2-jsonpatch
16050 (package-with-python2 python-jsonpatch))
16051
16052 (define-public python-jsonpatch-0.4
16053 (package (inherit python-jsonpatch)
16054 (name "python-jsonpatch")
16055 (version "0.4")
16056 (source
16057 (origin
16058 (method git-fetch)
16059 (uri (git-reference
16060 (url "https://github.com/stefankoegl/python-json-patch")
16061 (commit (string-append "v" version))))
16062 (file-name (git-file-name name version))
16063 (sha256
16064 (base32
16065 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16066
16067 (define-public python2-jsonpatch-0.4
16068 (package-with-python2 python-jsonpatch-0.4))
16069
16070 (define-public python-rfc3986
16071 (package
16072 (name "python-rfc3986")
16073 (version "1.4.0")
16074 (source (origin
16075 (method url-fetch)
16076 (uri (pypi-uri "rfc3986" version))
16077 (sha256
16078 (base32
16079 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16080 (build-system python-build-system)
16081 (arguments
16082 `(#:modules ((guix build utils)
16083 (guix build python-build-system)
16084 (ice-9 ftw)
16085 (srfi srfi-1)
16086 (srfi srfi-26))
16087 #:phases
16088 (modify-phases %standard-phases
16089 (replace 'check
16090 (lambda _
16091 (let ((cwd (getcwd)))
16092 (setenv "PYTHONPATH"
16093 (string-append cwd "/build/"
16094 (find (cut string-prefix? "lib" <>)
16095 (scandir (string-append cwd "/build")))
16096 ":"
16097 (getenv "PYTHONPATH")))
16098 (invoke "pytest" "-v")))))))
16099 (native-inputs
16100 `(("python-pytest" ,python-pytest)))
16101 (home-page "https://rfc3986.readthedocs.io/")
16102 (synopsis "Parse and validate URI references")
16103 (description
16104 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16105 validation and authority parsing. This module also supports RFC@tie{}6874
16106 which adds support for zone identifiers to IPv6 addresses.")
16107 (license license:asl2.0)))
16108
16109 (define-public python2-rfc3986
16110 (package-with-python2 python-rfc3986))
16111
16112 (define-public python-rfc3987
16113 (package
16114 (name "python-rfc3987")
16115 (version "1.3.7")
16116 (source
16117 (origin
16118 (method url-fetch)
16119 (uri (pypi-uri "rfc3987" version))
16120 (sha256
16121 (base32
16122 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16123 (build-system python-build-system)
16124 (home-page "https://pypi.org/project/rfc3987/")
16125 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16126 (description "@code{rfc3987} provides routines for parsing and
16127 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16128 (license license:gpl3+)))
16129
16130 (define-public python2-rfc3987
16131 (package-with-python2 python-rfc3987))
16132
16133 ;; The latest commit contains fixes for building with both python3 and python2.
16134 (define-public python-rfc6555
16135 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16136 (revision "1"))
16137 (package
16138 (name "python-rfc6555")
16139 (version (git-version "0.0.0" revision commit))
16140 (source (origin
16141 (method git-fetch)
16142 (uri (git-reference
16143 (url "https://github.com/sethmlarson/rfc6555")
16144 (commit commit)))
16145 (file-name (git-file-name name version))
16146 (sha256
16147 (base32
16148 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16149 (build-system python-build-system)
16150 (arguments
16151 '(#:phases
16152 (modify-phases %standard-phases
16153 (replace 'check
16154 (lambda* (#:key tests? #:allow-other-keys)
16155 (if tests?
16156 ;; Other tests require network access.
16157 (invoke "pytest" "tests/test_ipv6.py")
16158 #t))))))
16159 (native-inputs
16160 `(("python-pytest" ,python-pytest)))
16161 (home-page "https://pypi.org/project/rfc6555/")
16162 (synopsis "Python implementation of RFC 6555")
16163 (description
16164 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16165 6555. Provided with a single file and dead-simple API to allow easy vendoring
16166 and integration into other projects.")
16167 (properties `((python2-variant . ,(delay python2-rfc6555))))
16168 (license license:asl2.0))))
16169
16170 (define-public python2-rfc6555
16171 (let ((base (package-with-python2
16172 (strip-python2-variant python-rfc6555))))
16173 (package
16174 (inherit base)
16175 (propagated-inputs
16176 `(("python2-selectors2" ,python2-selectors2))))))
16177
16178 (define-public python-validators
16179 (package
16180 (name "python-validators")
16181 (version "0.14.2")
16182 (source (origin
16183 (method url-fetch)
16184 (uri (pypi-uri "validators" version))
16185 (sha256
16186 (base32
16187 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16188 (build-system python-build-system)
16189 (arguments
16190 '(#:phases (modify-phases %standard-phases
16191 (replace 'check
16192 (lambda _
16193 (invoke "pytest" "-vv"))))))
16194 (propagated-inputs
16195 `(("python-decorator" ,python-decorator)
16196 ("python-six" ,python-six)))
16197 (native-inputs
16198 `(("python-flake8" ,python-flake8)
16199 ("python-isort" ,python-isort)
16200 ("python-pytest" ,python-pytest)))
16201 (home-page "https://github.com/kvesteri/validators")
16202 (synopsis "Data validation library")
16203 (description
16204 "This package contains validators for different things such as email
16205 addresses, IP addresses, URLs, hashes and more. It has been designed to
16206 be easy to use and not require defining a schema or form just to validate
16207 some input.")
16208 (license license:expat)))
16209
16210 (define-public python2-validators
16211 (package-with-python2 python-validators))
16212
16213 (define-public python-validate-email
16214 (package
16215 (name "python-validate-email")
16216 (version "1.3")
16217 (source
16218 (origin
16219 (method url-fetch)
16220 (uri (pypi-uri "validate_email" version))
16221 (sha256
16222 (base32
16223 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16224 (build-system python-build-system)
16225 (home-page "https://github.com/syrusakbary/validate_email")
16226 (synopsis "Verifies if an email address is valid and really exists")
16227 (description "@code{validate_email} can be used to verify if an email
16228 address is valid and really exists.")
16229 (license license:lgpl3+)))
16230
16231 (define-public python2-validate-email
16232 (package-with-python2 python-validate-email))
16233
16234 (define-public python-flex
16235 (package
16236 (name "python-flex")
16237 (version "6.10.0")
16238 (source
16239 (origin
16240 (method url-fetch)
16241 (uri (pypi-uri "flex" version))
16242 (sha256
16243 (base32
16244 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16245 (build-system python-build-system)
16246 (propagated-inputs
16247 `(("python-click" ,python-click)
16248 ("python-iso8601" ,python-iso8601)
16249 ("python-jsonpointer" ,python-jsonpointer)
16250 ("python-pyyaml" ,python-pyyaml)
16251 ("python-requests" ,python-requests)
16252 ("python-rfc3987" ,python-rfc3987)
16253 ("python-six" ,python-six)
16254 ("python-validate-email" ,python-validate-email)))
16255 (home-page "https://github.com/pipermerriam/flex")
16256 (synopsis "Validates Swagger schemata")
16257 (description "@code{flex} can be used to validate Swagger schemata.")
16258 (license license:bsd-3)))
16259
16260 (define-public python2-flex
16261 (package-with-python2 python-flex))
16262
16263 (define-public python-marshmallow
16264 (package
16265 (name "python-marshmallow")
16266 (version "3.0.0b14")
16267 (source
16268 (origin
16269 (method url-fetch)
16270 (uri (pypi-uri "marshmallow" version))
16271 (sha256
16272 (base32
16273 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16274 (build-system python-build-system)
16275 (propagated-inputs
16276 `(("python-dateutil" ,python-dateutil)
16277 ("python-simplejson" ,python-simplejson)))
16278 (native-inputs
16279 `(("python-pytest" ,python-pytest)
16280 ("python-pytz" ,python-pytz)))
16281 (home-page "https://github.com/marshmallow-code/marshmallow")
16282 (synopsis "Convert complex datatypes to and from native
16283 Python datatypes.")
16284 (description "@code{marshmallow} provides a library for converting
16285 complex datatypes to and from native Python datatypes.")
16286 (license license:expat)))
16287
16288 (define-public python2-marshmallow
16289 (package-with-python2 python-marshmallow))
16290
16291 (define-public python-apispec
16292 (package
16293 (name "python-apispec")
16294 (version "0.25.3")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "apispec" version))
16299 (sha256
16300 (base32
16301 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16302 (build-system python-build-system)
16303 (propagated-inputs
16304 `(("python-pyyaml" ,python-pyyaml)))
16305 (native-inputs
16306 `(("python-pytest" ,python-pytest)
16307 ("python-flask" ,python-flask)
16308 ("python-marshmallow" ,python-marshmallow)
16309 ("python-tornado" ,python-tornado)
16310 ("python-bottle" ,python-bottle)
16311 ("python-mock" ,python-mock)))
16312 (home-page "https://github.com/marshmallow-code/apispec")
16313 (synopsis "Swagger 2.0 API specification generator")
16314 (description "@code{python-apispec} is a pluggable API specification
16315 generator. Currently supports the OpenAPI specification (f.k.a.
16316 Swagger 2.0).")
16317 (license license:expat)))
16318
16319 (define-public python2-apispec
16320 (package-with-python2 python-apispec))
16321
16322 (define-public python-flasgger
16323 (package
16324 (name "python-flasgger")
16325 (version "0.6.3")
16326 (source
16327 (origin
16328 (method git-fetch)
16329 (uri (git-reference
16330 (url "https://github.com/rochacbruno/flasgger")
16331 (commit version)))
16332 (file-name (git-file-name name version))
16333 (sha256
16334 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16335 (build-system python-build-system)
16336 (arguments
16337 `(#:phases
16338 (modify-phases %standard-phases
16339 (replace 'check
16340 (lambda* (#:key inputs outputs #:allow-other-keys)
16341 (substitute* "Makefile"
16342 (("flake8 flasgger --ignore=F403")
16343 "flake8 flasgger --ignore=E731,F403"))
16344 (setenv "PYTHONPATH" (string-append (getcwd)
16345 ":"
16346 (getenv "PYTHONPATH")))
16347 (invoke "py.test"))))))
16348 (propagated-inputs
16349 `(("python-flask" ,python-flask)
16350 ("python-pyyaml" ,python-pyyaml)
16351 ("python-jsonschema" ,python-jsonschema)
16352 ("python-mistune" ,python-mistune)
16353 ("python-six" ,python-six)))
16354 (native-inputs
16355 `(("python-decorator" ,python-decorator)
16356 ("python-flake8" ,python-flake8)
16357 ("python-flask-restful" ,python-flask-restful)
16358 ("python-flex" ,python-flex)
16359 ("python-pytest" ,python-pytest)
16360 ("python-pytest-cov" ,python-pytest-cov)
16361 ("python-marshmallow" ,python-marshmallow)
16362 ("python-apispec" ,python-apispec)))
16363 (home-page "https://github.com/rochacbruno/flasgger/")
16364 (synopsis "Extract Swagger specs from your Flask project")
16365 (description "@code{python-flasgger} allows extracting Swagger specs
16366 from your Flask project. It is a fork of Flask-Swagger.")
16367 (license license:expat)))
16368
16369 (define-public python2-flasgger
16370 (package-with-python2 python-flasgger))
16371
16372 (define-public python-swagger-spec-validator
16373 (package
16374 (name "python-swagger-spec-validator")
16375 (version "2.4.3")
16376 (source
16377 (origin
16378 (method url-fetch)
16379 (uri (pypi-uri "swagger-spec-validator" version))
16380 (sha256
16381 (base32
16382 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16383 (build-system python-build-system)
16384 (propagated-inputs
16385 `(("python-jsonschema" ,python-jsonschema)
16386 ("python-pyyaml" ,python-pyyaml)
16387 ("python-six" ,python-six)))
16388 (home-page
16389 "https://github.com/Yelp/swagger_spec_validator")
16390 (synopsis "Validation of Swagger specifications")
16391 (description "@code{swagger_spec_validator} provides a library for
16392 validating Swagger API specifications.")
16393 (license license:asl2.0)))
16394
16395 (define-public python2-swagger-spec-validator
16396 (package-with-python2 python-swagger-spec-validator))
16397
16398 (define-public python-apache-libcloud
16399 (package
16400 (name "python-apache-libcloud")
16401 (version "3.1.0")
16402 (source
16403 (origin
16404 (method url-fetch)
16405 (uri (pypi-uri "apache-libcloud" version))
16406 (sha256
16407 (base32
16408 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16409 (build-system python-build-system)
16410 (arguments
16411 `(#:phases
16412 (modify-phases %standard-phases
16413 (add-after 'unpack 'patch-ssh
16414 (lambda* (#:key inputs #:allow-other-keys)
16415 (substitute* "libcloud/compute/ssh.py"
16416 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16417 "/bin/ssh" "'")))
16418 #t))
16419 (add-after 'unpack 'patch-tests
16420 (lambda _
16421 (substitute* "libcloud/test/compute/test_ssh_client.py"
16422 (("class ShellOutSSHClientTests")
16423 "@unittest.skip(\"Guix container doesn't have ssh service\")
16424 class ShellOutSSHClientTests"))
16425 #t))
16426 (add-before 'check 'copy-secret
16427 (lambda _
16428 (copy-file "libcloud/test/secrets.py-dist"
16429 "libcloud/test/secrets.py")
16430 #t)))))
16431 (inputs
16432 `(("openssh" ,openssh)))
16433 (propagated-inputs
16434 `(("python-paramiko" ,python-paramiko)
16435 ("python-requests" ,python-requests)))
16436 (native-inputs
16437 `(("python-lockfile" ,python-lockfile)
16438 ("python-mock" ,python-mock)
16439 ("python-pytest" ,python-pytest)
16440 ("python-pytest-runner" ,python-pytest-runner)
16441 ("python-requests-mock" ,python-requests-mock)))
16442 (home-page "https://libcloud.apache.org/")
16443 (synopsis "Unified Cloud API")
16444 (description "@code{libcloud} is a Python library for interacting with
16445 many of the popular cloud service providers using a unified API.")
16446 (license license:asl2.0)))
16447
16448 (define-public python2-apache-libcloud
16449 (package-with-python2 python-apache-libcloud))
16450
16451 (define-public python-smmap
16452 (package
16453 (name "python-smmap")
16454 (version "3.0.1")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "smmap" version))
16459 (sha256
16460 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16461 (build-system python-build-system)
16462 (native-inputs
16463 `(("python-nosexcover" ,python-nosexcover)))
16464 (home-page "https://github.com/Byron/smmap")
16465 (synopsis "Python sliding window memory map manager")
16466 (description "@code{smmap} is a pure Python implementation of a sliding
16467 window memory map manager.")
16468 (license license:bsd-3)))
16469
16470 (define-public python-smmap2
16471 (deprecated-package "python-smmap2" python-smmap))
16472
16473 (define-public python2-smmap
16474 (package-with-python2 python-smmap))
16475
16476 (define-public python2-smmap2
16477 (deprecated-package "python2-smmap2" python2-smmap))
16478
16479 (define-public python-regex
16480 (package
16481 (name "python-regex")
16482 (version "2020.6.8")
16483 (source (origin
16484 (method url-fetch)
16485 (uri (pypi-uri "regex" version))
16486 (sha256
16487 (base32
16488 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16489 (build-system python-build-system)
16490 (arguments
16491 '(#:phases
16492 (modify-phases %standard-phases
16493 (replace 'check
16494 (lambda* (#:key inputs outputs #:allow-other-keys)
16495 (add-installed-pythonpath inputs outputs)
16496 (invoke "python" "-c"
16497 "from regex.test_regex import test_main; test_main()"))))))
16498 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16499 (synopsis "Alternative regular expression module")
16500 (description "This regular expression implementation is backwards-
16501 compatible with the standard @code{re} module, but offers additional
16502 functionality like full case-folding for case-insensitive matches in Unicode.")
16503 (license license:psfl)))
16504
16505 (define-public python2-regex
16506 (package-with-python2 python-regex))
16507
16508 (define-public python-pyopengl
16509 (package
16510 (name "python-pyopengl")
16511 (version "3.1.5")
16512 (source
16513 (origin
16514 (method url-fetch)
16515 (uri (pypi-uri "PyOpenGL" version))
16516 (sha256
16517 (base32
16518 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16519 (build-system python-build-system)
16520 (inputs
16521 `(("mesa" ,mesa)
16522 ("freeglut" ,freeglut)
16523 ("glu" ,glu)))
16524 (arguments
16525 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16526 ;attribute 'OSMesa'
16527 #:phases
16528 (modify-phases %standard-phases
16529 (add-before 'build 'fix-paths
16530 (lambda* (#:key inputs outputs #:allow-other-keys)
16531 (substitute* '("OpenGL/platform/ctypesloader.py")
16532 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16533 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16534 (("'GL'")
16535 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16536 (("'GLU'")
16537 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16538 (("'glut',")
16539 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16540 (("'GLESv1_CM'")
16541 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16542 (("'GLESv2'")
16543 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16544 ;; Not providing libgle. It seems to be very old.
16545 #t)))))
16546 (home-page "http://pyopengl.sourceforge.net")
16547 (synopsis "Standard OpenGL bindings for Python")
16548 (description
16549 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16550 related APIs. The binding is created using the standard @code{ctypes}
16551 library.")
16552 (license license:bsd-3)))
16553
16554 (define-public python-pyopengl-accelerate
16555 (package
16556 (inherit python-pyopengl)
16557 (name "python-pyopengl-accelerate")
16558 (version "3.1.5")
16559 (source
16560 (origin
16561 (method url-fetch)
16562 (uri (pypi-uri "PyOpenGL-accelerate" version))
16563 (sha256
16564 (base32
16565 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16566 (inputs
16567 `(("mesa" ,mesa)
16568 ("python-numpy" ,python-numpy))) ; for cython module
16569 ; numpy_formathandler, thus not propagated
16570 (arguments
16571 `(#:tests? #f
16572 #:phases
16573 (modify-phases %standard-phases
16574 (delete 'fix-paths))))
16575 (synopsis "Acceleration code for PyOpenGL")
16576 (description
16577 "This is the Cython-coded accelerator module for PyOpenGL.")))
16578
16579 (define-public python-rencode
16580 (package
16581 (name "python-rencode")
16582 (version "1.0.5")
16583 (source
16584 (origin
16585 (method url-fetch)
16586 (uri (pypi-uri "rencode" version))
16587 (sha256
16588 (base32
16589 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16590 (build-system python-build-system)
16591 (arguments
16592 `(#:phases
16593 (modify-phases %standard-phases
16594 (add-before 'check 'delete-bogus-test
16595 ;; This test requires /home/aresch/Downloads, which is not provided by
16596 ;; the build environment.
16597 (lambda _
16598 (delete-file "rencode/t.py")
16599 #t)))))
16600 (native-inputs `(("pkg-config" ,pkg-config)
16601 ("python-cython" ,python-cython)))
16602 (home-page "https://github.com/aresch/rencode")
16603 (synopsis "Serialization of heterogeneous data structures")
16604 (description
16605 "The @code{rencode} module is a data structure serialization library,
16606 similar to @code{bencode} from the BitTorrent project. For complex,
16607 heterogeneous data structures with many small elements, r-encoding stake up
16608 significantly less space than b-encodings. This version of rencode is a
16609 complete rewrite in Cython to attempt to increase the performance over the
16610 pure Python module.")
16611 (license license:bsd-3)))
16612
16613 (define-public python2-rencode
16614 (package-with-python2 python-rencode))
16615
16616 (define-public python-xenon
16617 (package
16618 (name "python-xenon")
16619 (version "0.7.0")
16620 (source
16621 (origin
16622 (method url-fetch)
16623 (uri (pypi-uri "xenon" version))
16624 (sha256
16625 (base32
16626 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16627 (build-system python-build-system)
16628 (native-inputs
16629 `(("python-pyyaml" ,python-pyyaml)
16630 ("python-radon" ,python-radon)
16631 ("python-requests" ,python-requests)
16632 ("python-flake8" ,python-flake8)
16633 ("python-tox" ,python-tox)))
16634 (arguments
16635 `(#:tests? #f ;test suite not shipped with the PyPI archive
16636 #:phases
16637 (modify-phases %standard-phases
16638 (add-before 'build 'patch-test-requirements
16639 (lambda _
16640 ;; Remove httpretty dependency for tests.
16641 (substitute* "setup.py"
16642 (("httpretty") ""))
16643 #t)))))
16644 (home-page "https://xenon.readthedocs.org/")
16645 (synopsis "Monitor code metrics for Python on your CI server")
16646 (description
16647 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16648 Ideally, @code{xenon} is run every time code is committed. Through command
16649 line options, various thresholds can be set for the complexity of code. It
16650 will fail (i.e. it will exit with a non-zero exit code) when any of these
16651 requirements is not met.")
16652 (license license:expat)))
16653
16654 (define-public python2-xenon
16655 (package-with-python2 python-xenon))
16656
16657 (define-public python-pysocks
16658 (package
16659 (name "python-pysocks")
16660 (version "1.7.1")
16661 (source
16662 (origin
16663 (method url-fetch)
16664 (uri (pypi-uri "PySocks" version))
16665 (sha256
16666 (base32
16667 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
16668 (build-system python-build-system)
16669 (arguments `(#:tests? #f))
16670 (home-page "https://github.com/Anorov/PySocks")
16671 (synopsis "SOCKS client module")
16672 (description "@code{pysocks} is an updated and semi-actively maintained
16673 version of @code{SocksiPy} with bug fixes and extra features.")
16674 (license license:bsd-3)))
16675
16676 (define-public python2-pysocks
16677 (package-with-python2 python-pysocks))
16678
16679 (define-public python-pydiff
16680 (package
16681 (name "python-pydiff")
16682 (version "0.2")
16683 (source
16684 (origin
16685 (method url-fetch)
16686 (uri (pypi-uri "pydiff" version))
16687 (sha256
16688 (base32
16689 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16690 (build-system python-build-system)
16691 (home-page "https://github.com/myint/pydiff")
16692 (synopsis "Library to diff two Python files at the bytecode level")
16693 (description
16694 "@code{pydiff} makes it easy to look for actual code changes while
16695 ignoring formatting changes.")
16696 (license license:expat)))
16697
16698 (define-public python2-pydiff
16699 (package-with-python2 python-pydiff))
16700
16701 (define-public python-pydub
16702 (package
16703 (name "python-pydub")
16704 (version "0.24.1")
16705 (source
16706 (origin
16707 (method url-fetch)
16708 (uri (pypi-uri "pydub" version))
16709 (sha256
16710 (base32
16711 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16712 (build-system python-build-system)
16713 (arguments
16714 `(#:phases
16715 (modify-phases %standard-phases
16716 (add-after 'unpack 'fix-ffmpeg-path
16717 (lambda* (#:key inputs #:allow-other-keys)
16718 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16719 (substitute* '("pydub/utils.py")
16720 (("return \"ffmpeg\"")
16721 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16722 (("return \"ffplay\"")
16723 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16724 (("return \"ffprobe\"")
16725 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16726 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16727 #t))))))
16728 (home-page "https://pydub.com")
16729 (inputs
16730 `(("ffmpeg" ,ffmpeg)))
16731 (propagated-inputs
16732 `(("python-scipy" ,python-scipy)))
16733 (synopsis "Manipulate audio with a high level interface in Python")
16734 (description
16735 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
16736 @code{ffmpeg} to open various audio formats.")
16737 (license license:expat))) ; MIT license
16738
16739 (define-public python-tqdm
16740 (package
16741 (name "python-tqdm")
16742 (version "4.43.0")
16743 (source
16744 (origin
16745 (method url-fetch)
16746 (uri (pypi-uri "tqdm" version))
16747 (sha256
16748 (base32
16749 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16750 (build-system python-build-system)
16751 (arguments
16752 '(#:phases (modify-phases %standard-phases
16753 (replace 'check
16754 (lambda* (#:key inputs outputs #:allow-other-keys)
16755 (add-installed-pythonpath inputs outputs)
16756 ;; This invokation is taken from tox.ini.
16757 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16758 "-d" "-v" "tqdm/"))))))
16759 (native-inputs
16760 `(("python-nose" ,python-nose)))
16761 (home-page "https://github.com/tqdm/tqdm")
16762 (synopsis "Fast, extensible progress meter")
16763 (description
16764 "Make loops show a progress bar on the console by just wrapping any
16765 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16766 design and layout.")
16767 (license (list license:mpl2.0 license:expat))))
16768
16769 (define-public python2-tqdm
16770 (package-with-python2 python-tqdm))
16771
16772 (define-public python-pkginfo
16773 (package
16774 (name "python-pkginfo")
16775 (version "1.4.2")
16776 (source
16777 (origin
16778 (method url-fetch)
16779 (uri (pypi-uri "pkginfo" version))
16780 (sha256
16781 (base32
16782 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16783 (build-system python-build-system)
16784 (arguments
16785 ;; The tests are broken upstream.
16786 '(#:tests? #f))
16787 (home-page
16788 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16789 (synopsis
16790 "Query metadatdata from sdists, bdists, and installed packages")
16791 (description
16792 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16793 source distriubtion (an sdist) or a binary distribution (e.g., created by
16794 running bdist_egg). It can also query the EGG-INFO directory of an installed
16795 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16796 created by running @code{python setup.py develop}).")
16797 (license license:expat)))
16798
16799 (define-public python2-pkginfo
16800 (package-with-python2 python-pkginfo))
16801
16802 (define-public python-twine
16803 (package
16804 (name "python-twine")
16805 (version "1.15.0")
16806 (source
16807 (origin
16808 (method url-fetch)
16809 (uri (pypi-uri "twine" version))
16810 (sha256
16811 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16812 (build-system python-build-system)
16813 (propagated-inputs
16814 `(("python-tqdm" ,python-tqdm)
16815 ("python-packaging" ,python-packaging)
16816 ("python-pkginfo" ,python-pkginfo)
16817 ("python-readme-renderer" ,python-readme-renderer)
16818 ("python-requests" ,python-requests)
16819 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16820 (home-page "https://github.com/pypa/twine")
16821 (synopsis "Collection of utilities for interacting with PyPI")
16822 (description
16823 "@code{twine} currently supports registering projects and uploading
16824 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16825 their files and supports any packaging format (including wheels).")
16826 (license license:asl2.0)))
16827
16828 (define-public python2-twine
16829 (package-with-python2 python-twine))
16830
16831 (define-public python-linecache2
16832 (package
16833 (name "python-linecache2")
16834 (version "1.0.0")
16835 (source
16836 (origin
16837 (method url-fetch)
16838 (uri (pypi-uri "linecache2" version))
16839 (sha256
16840 (base32
16841 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16842 (build-system python-build-system)
16843 (arguments
16844 `(;; The tests depend on unittest2, and our version is a bit too old.
16845 #:tests? #f))
16846 (native-inputs
16847 `(("python-pbr" ,python-pbr-minimal)))
16848 (home-page
16849 "https://github.com/testing-cabal/linecache2")
16850 (synopsis "Backports of the linecache module")
16851 (description
16852 "The linecache module allows one to get any line from any file, while
16853 attempting to optimize internally, using a cache, the common case where many
16854 lines are read from a single file.")
16855 (license license:psfl)))
16856
16857 (define-public python2-linecache2
16858 (package-with-python2 python-linecache2))
16859
16860 (define-public python-traceback2
16861 (package
16862 (name "python-traceback2")
16863 (version "1.4.0")
16864 (source
16865 (origin
16866 (method url-fetch)
16867 (uri (pypi-uri "traceback2" version))
16868 (sha256
16869 (base32
16870 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16871 (build-system python-build-system)
16872 (arguments
16873 `(;; python-traceback2 and python-unittest2 depend on one another.
16874 #:tests? #f))
16875 (native-inputs
16876 `(("python-pbr" ,python-pbr-minimal)))
16877 (propagated-inputs
16878 `(("python-linecache2" ,python-linecache2)))
16879 (home-page
16880 "https://github.com/testing-cabal/traceback2")
16881 (synopsis "Backports of the traceback module")
16882 (description
16883 "This module provides a standard interface to extract, format and print
16884 stack traces of Python programs. It exactly mimics the behavior of the Python
16885 interpreter when it prints a stack trace.")
16886 (license license:psfl)))
16887
16888 (define-public python2-traceback2
16889 (package-with-python2 python-traceback2))
16890
16891 (define-public python-ratelimiter
16892 (package
16893 (name "python-ratelimiter")
16894 (version "1.2.0")
16895 (source
16896 (origin
16897 (method url-fetch)
16898 (uri (pypi-uri "ratelimiter" version))
16899 (sha256
16900 (base32
16901 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16902 (build-system python-build-system)
16903 (arguments
16904 '(#:tests? #f)) ; There are no tests in the pypi archive.
16905 (home-page "https://github.com/RazerM/ratelimiter")
16906 (synopsis "Simple rate limiting object")
16907 (description
16908 "The @code{ratelimiter} module ensures that an operation will not be
16909 executed more than a given number of times during a given period.")
16910 (license license:asl2.0)))
16911
16912 (define-public python2-ratelimiter
16913 (package-with-python2 python-ratelimiter))
16914
16915 (define-public python-dukpy
16916 (package
16917 (name "python-dukpy")
16918 (version "0.3")
16919 (source
16920 (origin
16921 (method git-fetch)
16922 (uri (git-reference
16923 (url "https://github.com/kovidgoyal/dukpy")
16924 (commit (string-append "v" version))))
16925 (file-name (git-file-name name version))
16926 (sha256
16927 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16928 (build-system python-build-system)
16929 (home-page "https://github.com/kovidgoyal/dukpy")
16930 (synopsis "Run JavaScript in python")
16931 (description
16932 "dukpy is a JavaScript runtime environment for Python using the duktape
16933 embeddable JavaScript engine.")
16934 ;; Dukpy is licensed under MIT like the embedded duktape library,
16935 ;; with 'errors.c' as GPL3.
16936 (license (list license:expat license:gpl3))))
16937
16938 (define-public python2-dukpy
16939 (package-with-python2 python-dukpy))
16940
16941 (define-public python-jsonrpclib-pelix
16942 (package
16943 (name "python-jsonrpclib-pelix")
16944 (version "0.3.2")
16945 (source
16946 (origin
16947 (method url-fetch)
16948 (uri (pypi-uri "jsonrpclib-pelix" version))
16949 (sha256
16950 (base32
16951 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16952 (build-system python-build-system)
16953 (arguments
16954 `(#:tests? #f)) ; no tests in PyPI tarball
16955 (home-page "https://github.com/tcalmant/jsonrpclib/")
16956 (synopsis "JSON-RPC 2.0 client library for Python")
16957 (description
16958 "This library implements the JSON-RPC v2.0
16959 specification (backwards-compatible) as a client library for Python. This
16960 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16961 services.")
16962 (license license:asl2.0)))
16963
16964 (define-public python2-jsonrpclib-pelix
16965 (package-with-python2 python-jsonrpclib-pelix))
16966
16967 (define-public python-setuptools-scm-git-archive
16968 (package
16969 (name "python-setuptools-scm-git-archive")
16970 (version "1.0")
16971 (source
16972 (origin
16973 (method url-fetch)
16974 (uri (pypi-uri "setuptools_scm_git_archive" version))
16975 (sha256
16976 (base32
16977 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16978 (build-system python-build-system)
16979 (native-inputs
16980 `(("python-pytest" ,python-pytest)))
16981 (propagated-inputs
16982 `(("python-setuptools-scm" ,python-setuptools-scm)))
16983 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16984 (synopsis "Setuptools_scm plugin for git archives")
16985 (description
16986 "The setuptools_scm_git_archive package is a plugin to
16987 setuptools_scm, which supports obtaining versions from git archives that
16988 belong to tagged versions.")
16989 (license license:expat)))
16990
16991 (define-public python2-setuptools-scm-git-archive
16992 (package-with-python2 python-setuptools-scm-git-archive))
16993
16994 (define-public python-setuptools-git
16995 (package
16996 (name "python-setuptools-git")
16997 (version "1.2")
16998 (source
16999 (origin
17000 (method url-fetch)
17001 (uri (pypi-uri "setuptools-git" version))
17002 (sha256
17003 (base32
17004 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17005 (build-system python-build-system)
17006 (arguments
17007 `(#:phases
17008 (modify-phases %standard-phases
17009 ;; This is needed for tests.
17010 (add-after 'unpack 'configure-git
17011 (lambda _
17012 (setenv "HOME" "/tmp")
17013 (invoke "git" "config" "--global" "user.email" "guix")
17014 (invoke "git" "config" "--global" "user.name" "guix")
17015 #t)))))
17016 (native-inputs
17017 `(("git" ,git-minimal)))
17018 (home-page "https://github.com/msabramo/setuptools-git")
17019 (synopsis "Setuptools revision control system plugin for Git")
17020 (description
17021 "This package provides a plugin for Setuptools for revision control with
17022 Git.")
17023 (license license:bsd-3)))
17024
17025 (define-public python-pyclipper
17026 (package
17027 (name "python-pyclipper")
17028 (version "1.1.0.post3")
17029 (source
17030 (origin
17031 (method url-fetch)
17032 (uri (pypi-uri "pyclipper" version ".zip"))
17033 (sha256
17034 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17035 (modules '((guix build utils)))
17036 (snippet
17037 '(begin
17038 ;; This file is generated by Cython.
17039 (delete-file "pyclipper/pyclipper.cpp") #t))))
17040 (build-system python-build-system)
17041 (arguments
17042 `(#:phases
17043 (modify-phases %standard-phases
17044 (add-before 'build 'cythonize-sources
17045 (lambda _
17046 (with-directory-excursion "pyclipper"
17047 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17048 (propagated-inputs
17049 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17050 (native-inputs
17051 `(("python-cython" ,python-cython)
17052 ("python-pytest" ,python-pytest)
17053 ("python-pytest-runner" ,python-pytest-runner)
17054 ("python-unittest2" ,python-unittest2)
17055 ("unzip" ,unzip)))
17056 (home-page "https://github.com/greginvm/pyclipper")
17057 (synopsis "Wrapper for Angus Johnson's Clipper library")
17058 (description
17059 "Pyclipper is a Cython wrapper for the C++ translation of the
17060 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17061 (license license:expat)))
17062
17063 (define-public python2-pyclipper
17064 (package-with-python2 python-pyclipper))
17065
17066 (define-public python2-booleanoperations
17067 (package
17068 (name "python2-booleanoperations")
17069 (version "0.7.1")
17070 (source
17071 (origin
17072 (method url-fetch)
17073 (uri (pypi-uri "booleanOperations" version ".zip"))
17074 (sha256
17075 (base32
17076 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17077 (build-system python-build-system)
17078 (arguments
17079 `(#:python ,python-2))
17080 (native-inputs
17081 `(("unzip" ,unzip)
17082 ("python2-pytest" ,python2-pytest)
17083 ("python2-pytest-runner" ,python2-pytest-runner)))
17084 (propagated-inputs
17085 `(("python-fonttools" ,python2-fonttools)
17086 ("python-pyclipper" ,python2-pyclipper)
17087 ("python-ufolib" ,python2-ufolib)))
17088 (home-page "https://github.com/typemytype/booleanOperations")
17089 (synopsis "Boolean operations on paths")
17090 (description
17091 "BooleanOperations provides a Python library that enables
17092 boolean operations on paths.")
17093 (license license:expat)))
17094
17095 (define-public python-tempdir
17096 (package
17097 (name "python-tempdir")
17098 (version "0.7.1")
17099 (source
17100 (origin
17101 (method url-fetch)
17102 (uri (pypi-uri "tempdir" version))
17103 (sha256
17104 (base32
17105 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17106 (build-system python-build-system)
17107 (home-page "https://pypi.org/project/tempdir/")
17108 (arguments
17109 ;; the package has no tests
17110 '(#:tests? #f))
17111 (synopsis "Python library for managing temporary directories")
17112 (description
17113 "This library manages temporary directories that are automatically
17114 deleted with all their contents when they are no longer needed. It is
17115 particularly convenient for use in tests.")
17116 (license license:expat)))
17117
17118 (define-public python2-tempdir
17119 (package-with-python2 python-tempdir))
17120
17121 (define-public python-activepapers
17122 (package
17123 (name "python-activepapers")
17124 (version "0.2.2")
17125 (source
17126 (origin
17127 (method url-fetch)
17128 (uri (pypi-uri "ActivePapers.Py" version))
17129 (sha256
17130 (base32
17131 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17132 (build-system python-build-system)
17133 (arguments
17134 `(#:modules ((ice-9 ftw)
17135 (srfi srfi-1)
17136 (guix build utils)
17137 (guix build python-build-system))
17138
17139 #:phases
17140 (modify-phases %standard-phases
17141 (add-after 'unpack 'delete-python2-code
17142 (lambda _
17143 (for-each delete-file
17144 '("lib/activepapers/builtins2.py"
17145 "lib/activepapers/standardlib2.py"
17146 "lib/activepapers/utility2.py"))))
17147 (replace 'check
17148 (lambda _
17149 ;; Deactivate the test cases that download files
17150 (setenv "NO_NETWORK_ACCESS" "1")
17151 ;; For some strange reason, some tests fail if nosetests runs all
17152 ;; test modules in a single execution. They pass if each test
17153 ;; module is run individually.
17154 (for-each (lambda (filename)
17155 (invoke "nosetests"
17156 (string-append "tests/" filename)))
17157 (scandir "tests"
17158 (lambda (filename)
17159 (string-suffix? ".py" filename)))))))))
17160 (native-inputs
17161 `(("python-tempdir" ,python-tempdir)
17162 ("python-nose" ,python-nose)))
17163 (propagated-inputs
17164 `(("python-h5py" ,python-h5py)))
17165 (home-page "https://www.activepapers.org/")
17166 (synopsis "Executable papers for scientific computing")
17167 (description
17168 "ActivePapers is a tool for working with executable papers, which
17169 combine data, code, and documentation in single-file packages,
17170 suitable for publication as supplementary material or on repositories
17171 such as figshare or Zenodo.")
17172 (properties `((python2-variant . ,(delay python2-activepapers))))
17173 (license license:bsd-3)))
17174
17175 (define-public python2-activepapers
17176 (let ((base (package-with-python2
17177 (strip-python2-variant python-activepapers))))
17178 (package
17179 (inherit base)
17180 (arguments
17181 (substitute-keyword-arguments (package-arguments base)
17182 ((#:phases phases)
17183 `(modify-phases ,phases
17184 (delete 'delete-python2-code)
17185 (add-after 'unpack 'delete-python3-code
17186 (lambda _
17187 (for-each delete-file
17188 '("lib/activepapers/builtins3.py"
17189 "lib/activepapers/standardlib3.py"
17190 "lib/activepapers/utility3.py")))))))))))
17191
17192 (define-public python-semver
17193 (package
17194 (name "python-semver")
17195 (version "2.9.0")
17196 (source
17197 (origin
17198 (method url-fetch)
17199 (uri (pypi-uri "semver" version))
17200 (sha256
17201 (base32
17202 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17203 (build-system python-build-system)
17204 (arguments
17205 `(#:phases (modify-phases %standard-phases
17206 (replace 'check
17207 (lambda _
17208 (delete-file "setup.cfg")
17209 (invoke "py.test"))))))
17210 (native-inputs
17211 `(("python-pytest" ,python-pytest)))
17212 (home-page "https://github.com/k-bx/python-semver")
17213 (synopsis "Python helper for Semantic Versioning")
17214 (description "This package provides a Python library for
17215 @url{Semantic Versioning, http://semver.org/}.")
17216 (license license:bsd-3)))
17217
17218 (define-public python2-semver
17219 (package-with-python2 python-semver))
17220
17221 (define-public python-pyro4
17222 (package
17223 (name "python-pyro4")
17224 (version "4.77")
17225 (source
17226 (origin
17227 (method url-fetch)
17228 (uri (pypi-uri "Pyro4" version))
17229 (sha256
17230 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17231 (build-system python-build-system)
17232 (arguments
17233 '(#:tests? #f)) ;FIXME: Some tests require network access.
17234 (native-inputs
17235 `(("python-cloudpickle" ,python-cloudpickle)
17236 ("python-dill" ,python-dill)
17237 ("python-msgpack" ,python-msgpack)))
17238 (propagated-inputs
17239 `(("python-serpent" ,python-serpent)))
17240 (home-page "https://pyro4.readthedocs.io")
17241 (synopsis "Distributed object middleware for Python")
17242 (description
17243 "Pyro enables you to build applications in which objects can talk to each
17244 other over the network. You can just use normal Python method calls to call
17245 objects on other machines, also known as remote procedure calls (RPC).")
17246 (license license:expat)))
17247
17248 (define-public python2-pyro
17249 (package
17250 (name "python2-pyro")
17251 (version "3.16")
17252 (source
17253 (origin
17254 (method url-fetch)
17255 (uri (pypi-uri "Pyro" version))
17256 (file-name (string-append "Pyro-" version ".tar.gz"))
17257 (sha256
17258 (base32
17259 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17260 (build-system python-build-system)
17261 (arguments
17262 ;; Pyro is not compatible with Python 3
17263 `(#:python ,python-2
17264 ;; Pyro has no test cases for automatic execution
17265 #:tests? #f))
17266 (home-page "https://pythonhosted.org/Pyro/")
17267 (synopsis "Distributed object manager for Python")
17268 (description "Pyro is a Distributed Object Technology system
17269 written in Python that is designed to be easy to use. It resembles
17270 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17271 which is a system and language independent Distributed Object Technology
17272 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17273 longer maintained. New projects should use Pyro4 instead, which
17274 is the new Pyro version that is actively developed.")
17275 (license license:expat)))
17276
17277 (define-public python2-scientific
17278 (package
17279 (name "python2-scientific")
17280 (version "2.9.4")
17281 (source
17282 (origin
17283 (method git-fetch)
17284 (uri (git-reference
17285 (url "https://github.com/khinsen/ScientificPython")
17286 (commit (string-append "rel" version))))
17287 (file-name (git-file-name name version))
17288 (sha256
17289 (base32
17290 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17291 (build-system python-build-system)
17292 (inputs
17293 `(("netcdf" ,netcdf)))
17294 (propagated-inputs
17295 `(("python-numpy" ,python2-numpy-1.8)
17296 ("python-pyro" ,python2-pyro)))
17297 (arguments
17298 ;; ScientificPython is not compatible with Python 3
17299 `(#:python ,python-2
17300 #:tests? #f ; No test suite
17301 #:phases
17302 (modify-phases %standard-phases
17303 (replace 'build
17304 (lambda* (#:key inputs #:allow-other-keys)
17305 (invoke "python" "setup.py" "build"
17306 (string-append "--netcdf_prefix="
17307 (assoc-ref inputs "netcdf"))))))))
17308 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17309 (synopsis "Python modules for scientific computing")
17310 (description "ScientificPython is a collection of Python modules that are
17311 useful for scientific computing. Most modules are rather general (Geometry,
17312 physical units, automatic derivatives, ...) whereas others are more
17313 domain-specific (e.g. netCDF and PDB support). The library is currently
17314 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17315 (license license:cecill-c)))
17316
17317 (define-public python2-mmtk
17318 (package
17319 (name "python2-mmtk")
17320 (version "2.7.12")
17321 (source
17322 (origin
17323 (method git-fetch)
17324 (uri (git-reference
17325 (url "https://github.com/khinsen/MMTK")
17326 (commit (string-append "rel" version))))
17327 (file-name (git-file-name name version))
17328 (sha256
17329 (base32
17330 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17331 (build-system python-build-system)
17332 (native-inputs
17333 `(("netcdf" ,netcdf)))
17334 (propagated-inputs
17335 `(("python-scientific" ,python2-scientific)
17336 ("python-tkinter" ,python-2 "tk")))
17337 (arguments
17338 `(#:python ,python-2
17339 #:tests? #f
17340 #:phases
17341 (modify-phases %standard-phases
17342 (add-before 'build 'includes-from-scientific
17343 (lambda* (#:key inputs #:allow-other-keys)
17344 (mkdir-p "Include/Scientific")
17345 (copy-recursively
17346 (string-append
17347 (assoc-ref inputs "python-scientific")
17348 "/include/python2.7/Scientific")
17349 "Include/Scientific"))))))
17350 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17351 (synopsis "Python library for molecular simulation")
17352 (description "MMTK is a library for molecular simulations with an emphasis
17353 on biomolecules. It provides widely used methods such as Molecular Dynamics
17354 and normal mode analysis, but also basic routines for implementing new methods
17355 for simulation and analysis. The library is currently not actively maintained
17356 and works only with Python 2 and NumPy < 1.9.")
17357 (license license:cecill-c)))
17358
17359 (define-public python-phonenumbers
17360 (package
17361 (name "python-phonenumbers")
17362 (version "8.9.1")
17363 (source
17364 (origin
17365 (method url-fetch)
17366 (uri (pypi-uri "phonenumbers" version))
17367 (sha256
17368 (base32
17369 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17370 (build-system python-build-system)
17371 (home-page
17372 "https://github.com/daviddrysdale/python-phonenumbers")
17373 (synopsis
17374 "Python library for dealing with international phone numbers")
17375 (description
17376 "This package provides a Python port of Google's libphonenumber library.")
17377 (license license:asl2.0)))
17378
17379 (define-public python2-phonenumbers
17380 (package-with-python2 python-phonenumbers))
17381
17382 (define-public python-send2trash
17383 (package
17384 (name "python-send2trash")
17385 (version "1.5.0")
17386 (source
17387 (origin (method git-fetch)
17388 ;; Source tarball on PyPI doesn't include tests.
17389 (uri (git-reference
17390 (url "https://github.com/hsoft/send2trash")
17391 (commit version)))
17392 (file-name (git-file-name name version))
17393 (sha256
17394 (base32
17395 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17396 (build-system python-build-system)
17397 (arguments
17398 '(#:phases
17399 (modify-phases %standard-phases
17400 (add-before 'check 'pre-check
17401 (lambda _
17402 (mkdir-p "/tmp/foo")
17403 (setenv "HOME" "/tmp/foo")
17404 #t)))))
17405 (home-page "https://github.com/hsoft/send2trash")
17406 (synopsis "Send files to the user's @file{~/Trash} directory")
17407 (description "This package provides a Python library to send files to the
17408 user's @file{~/Trash} directory.")
17409 (properties `((python2-variant . ,(delay python2-send2trash))))
17410 (license license:bsd-3)))
17411
17412 (define-public python2-send2trash
17413 (package
17414 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17415 (arguments
17416 (substitute-keyword-arguments (package-arguments python-send2trash)
17417 ((#:phases phases)
17418 `(modify-phases ,phases
17419 (add-before 'check 'setenv
17420 (lambda _
17421 (setenv "PYTHONPATH"
17422 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17423 #t))))))))
17424
17425 (define-public python-pyfavicon
17426 (package
17427 (name "python-pyfavicon")
17428 (version "0.1.1")
17429 (source
17430 (origin
17431 (method url-fetch)
17432 (uri (pypi-uri "pyfavicon" version))
17433 (sha256
17434 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17435 (build-system python-build-system)
17436 (arguments
17437 ;; There are no tests in the PyPI tarball and the tests from the
17438 ;; repository require online data.
17439 '(#:tests? #f))
17440 (propagated-inputs
17441 `(("python-aiohttp" ,python-aiohttp)
17442 ("python-beautifulsoup4" ,python-beautifulsoup4)
17443 ("python-pillow" ,python-pillow)))
17444 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17445 (synopsis "Async favicon fetcher")
17446 (description
17447 "@code{pyfavicon} is an async favicon fetcher.")
17448 (license license:expat)))
17449
17450 (define-public python-yapf
17451 (package
17452 (name "python-yapf")
17453 (version "0.29.0")
17454 (source
17455 (origin
17456 (method url-fetch)
17457 (uri (pypi-uri "yapf" version))
17458 (sha256
17459 (base32
17460 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17461 (build-system python-build-system)
17462 (home-page "https://github.com/google/yapf")
17463 (synopsis "Formatter for Python code")
17464 (description "YAPF is a formatter for Python code. It's based off of
17465 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17466 takes the code and reformats it to the best formatting that conforms to the
17467 style guide, even if the original code didn't violate the style guide.")
17468 (license license:asl2.0)))
17469
17470 (define-public python2-yapf
17471 (package-with-python2 python-yapf))
17472
17473 (define-public python-yq
17474 (package
17475 (name "python-yq")
17476 (version "2.11.1")
17477 (source
17478 (origin
17479 (method url-fetch)
17480 (uri (pypi-uri "yq" version))
17481 (sha256
17482 (base32
17483 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17484 (build-system python-build-system)
17485 (arguments
17486 '(#:phases
17487 (modify-phases %standard-phases
17488 (add-after 'unpack 'patch
17489 (lambda* (#:key inputs #:allow-other-keys)
17490 (substitute* "yq/__init__.py"
17491 (("Popen\\(\\[\"jq")
17492 (string-append
17493 "Popen([\""
17494 (assoc-ref inputs "jq")
17495 "/bin/jq")))
17496 #t)))))
17497 (inputs
17498 `(("python-argcomplete" ,python-argcomplete)
17499 ("python-pyyaml" ,python-pyyaml)
17500 ("python-xmltodict" ,python-xmltodict)
17501 ("jq" ,jq)))
17502 (native-inputs
17503 `(("python-coverage" ,python-coverage)
17504 ("python-flake8" ,python-flake8)
17505 ("python-wheel" ,python-wheel)))
17506 (home-page "https://github.com/kislyuk/yq")
17507 (synopsis "Command-line YAML/XML processor")
17508 (description
17509 "This package provides @command{yq} and @command{xq} for processing YAML
17510 and XML respectively. The processing is done through @{jq}, @command{jq}
17511 filters can be used to process the data as it passes through.")
17512 (license license:asl2.0)))
17513
17514 (define-public python-gyp
17515 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17516 (revision "0"))
17517 (package
17518 (name "python-gyp")
17519 ;; Google does not release versions,
17520 ;; based on second most recent commit date.
17521 (version (git-version "0.0.0" revision commit))
17522 (source
17523 (origin
17524 ;; Google does not release tarballs,
17525 ;; git checkout is needed.
17526 (method git-fetch)
17527 (uri (git-reference
17528 (url "https://chromium.googlesource.com/external/gyp")
17529 (commit commit)))
17530 (file-name (git-file-name name version))
17531 (sha256
17532 (base32
17533 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17534 (build-system python-build-system)
17535 (home-page "https://gyp.gsrc.io/")
17536 (synopsis "GYP is a Meta-Build system")
17537 (description
17538 "GYP builds build systems for large, cross platform applications.
17539 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17540 files, and Makefiles.")
17541 (license license:bsd-3))))
17542
17543 (define-public python2-gyp
17544 (package-with-python2 python-gyp))
17545
17546 (define-public python-whatever
17547 (package
17548 (name "python-whatever")
17549 (version "0.6")
17550 (source
17551 (origin
17552 (method git-fetch)
17553 (uri (git-reference
17554 (url "https://github.com/Suor/whatever")
17555 (commit version)))
17556 (file-name (git-file-name name version))
17557 (sha256
17558 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17559 (build-system python-build-system)
17560 (arguments
17561 `(#:phases
17562 (modify-phases %standard-phases
17563 (replace 'check
17564 (lambda _
17565 (invoke "py.test"))))))
17566 (native-inputs
17567 `(("python-pytest" ,python-pytest)))
17568 (home-page "https://github.com/Suor/whatever")
17569 (synopsis "Make anonymous functions by partial application of operators")
17570 (description "@code{whatever} provides an easy way to make anonymous
17571 functions by partial application of operators.")
17572 (license license:bsd-3)))
17573
17574 (define-public python2-whatever
17575 (package-with-python2 python-whatever))
17576
17577 (define-public python-funcy
17578 (package
17579 (name "python-funcy")
17580 (version "1.11")
17581 (source
17582 (origin
17583 (method git-fetch)
17584 (uri (git-reference
17585 (url "https://github.com/Suor/funcy")
17586 (commit version)))
17587 (sha256
17588 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17589 (file-name (git-file-name name version))))
17590 (build-system python-build-system)
17591 (arguments
17592 `(#:phases
17593 (modify-phases %standard-phases
17594 (replace 'check
17595 (lambda _
17596 (invoke "py.test"))))))
17597 (native-inputs
17598 `(("python-pytest" ,python-pytest)
17599 ("python-whatever" ,python-whatever)))
17600 (home-page "https://github.com/Suor/funcy")
17601 (synopsis "Functional tools")
17602 (description "@code{funcy} is a library that provides functional tools.
17603 Examples are:
17604 @enumerate
17605 @item merge - Merges collections of the same type
17606 @item walk - Type-preserving map
17607 @item select - Selects a part of a collection
17608 @item take - Takes the first n items of a collection
17609 @item first - Takes the first item of a collection
17610 @item remove - Predicated-removes items of a collection
17611 @item concat - Concatenates two collections
17612 @item flatten - Flattens a collection with subcollections
17613 @item distinct - Returns only distinct items
17614 @item split - Predicated-splits a collection
17615 @item split_at - Splits a collection at a given item
17616 @item group_by - Groups items by group
17617 @item pairwise - Pairs off adjacent items
17618 @item partial - Partially-applies a function
17619 @item curry - Curries a function
17620 @item compose - Composes functions
17621 @item complement - Complements a predicate
17622 @item all_fn - \"all\" with predicate
17623 @end enumerate")
17624 (license license:bsd-3)))
17625
17626 (define-public python2-funcy
17627 (package-with-python2 python-funcy))
17628
17629 (define-public python-isoweek
17630 (package
17631 (name "python-isoweek")
17632 (version "1.3.3")
17633 (source
17634 (origin
17635 (method url-fetch)
17636 (uri (pypi-uri "isoweek" version))
17637 (sha256
17638 (base32
17639 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17640 (build-system python-build-system)
17641 (home-page "https://github.com/gisle/isoweek")
17642 (synopsis "Objects representing a week")
17643 (description "The @code{isoweek} module provide the class Week that
17644 implements the week definition of ISO 8601. This standard also defines
17645 a notation for identifying weeks; yyyyWww (where the W is a literal).
17646 Week instances stringify to this form.")
17647 (license license:bsd-3)))
17648
17649 (define-public python2-isoweek
17650 (package-with-python2 python-isoweek))
17651
17652 (define-public python-pyzbar
17653 (package
17654 (name "python-pyzbar")
17655 (version "0.1.8")
17656 (source
17657 (origin
17658 ;; There's no source tarball on PyPI.
17659 (method git-fetch)
17660 (uri (git-reference
17661 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17662 (commit (string-append "v" version))))
17663 (file-name (git-file-name name version))
17664 (sha256
17665 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17666 (build-system python-build-system)
17667 (arguments
17668 `(#:phases
17669 (modify-phases %standard-phases
17670 (add-after 'unpack 'remove-failing-test
17671 (lambda _
17672 ;; This tests if find_library was called once, but we remove
17673 ;; the call in the stage below to make the library find libzbar.
17674 (delete-file "pyzbar/tests/test_zbar_library.py")
17675 #t))
17676 (add-before 'build 'set-library-file-name
17677 (lambda* (#:key inputs #:allow-other-keys)
17678 (let ((libzbar (assoc-ref inputs "zbar")))
17679 (substitute* "pyzbar/zbar_library.py"
17680 (("find_library\\('zbar'\\)")
17681 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17682 #t))))))
17683 (native-inputs
17684 `(("pkg-config" ,pkg-config)
17685 ("python-numpy" ,python-numpy)
17686 ("python-pillow" ,python-pillow)))
17687 (inputs
17688 `(("zbar" ,zbar)))
17689 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17690 (synopsis "Read one-dimensional barcodes and QR codes")
17691 (description
17692 "Read one-dimensional barcodes and QR codes using the zbar library.
17693
17694 Features:
17695
17696 @itemize
17697 @item Pure python
17698 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17699 @item Decodes locations of barcodes
17700 @item No dependencies, other than the zbar library itself
17701 @end itemize")
17702 (license license:expat)))
17703
17704 (define-public python-tokenize-rt
17705 (package
17706 (name "python-tokenize-rt")
17707 (version "2.0.1")
17708 (source
17709 (origin
17710 (method url-fetch)
17711 (uri (pypi-uri "tokenize-rt" version))
17712 (sha256
17713 (base32
17714 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17715 (build-system python-build-system)
17716 (home-page "https://github.com/asottile/tokenize-rt")
17717 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17718 (description
17719 "This Python library is a wrapper around @code{tokenize} from the Python
17720 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17721 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17722 and @code{tokens_to_src} to roundtrip.")
17723 (license license:expat)))
17724
17725 (define-public python-future-fstrings
17726 (package
17727 (name "python-future-fstrings")
17728 (version "0.4.1")
17729 (source
17730 (origin
17731 (method url-fetch)
17732 (uri (pypi-uri "future_fstrings" version))
17733 (sha256
17734 (base32
17735 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17736 (build-system python-build-system)
17737 (propagated-inputs
17738 `(("python-tokenize-rt" ,python-tokenize-rt)))
17739 (home-page "https://github.com/asottile/future-fstrings")
17740 (synopsis "Backport of fstrings to Python < 3.6")
17741 (description
17742 "This package provides a UTF-8 compatible encoding
17743 @code{future_fstrings}, which performs source manipulation. It decodes the
17744 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17745 @code{f} strings.")
17746 (license license:expat)))
17747
17748 (define-public python-typed-ast
17749 (package
17750 (name "python-typed-ast")
17751 (version "1.4.0")
17752 (source
17753 (origin
17754 (method git-fetch)
17755 (uri (git-reference
17756 (url "https://github.com/python/typed_ast")
17757 (commit version)))
17758 (sha256
17759 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17760 (file-name (git-file-name name version))))
17761 (build-system python-build-system)
17762 (arguments
17763 `(#:modules ((guix build utils)
17764 (guix build python-build-system)
17765 (ice-9 ftw)
17766 (srfi srfi-1)
17767 (srfi srfi-26))
17768 #:phases
17769 (modify-phases %standard-phases
17770 (replace 'check
17771 (lambda _
17772 (let ((cwd (getcwd)))
17773 (setenv "PYTHONPATH"
17774 (string-append cwd "/build/"
17775 (find (cut string-prefix? "lib" <>)
17776 (scandir (string-append cwd "/build")))
17777 ":"
17778 (getenv "PYTHONPATH"))))
17779 (invoke "pytest")
17780 #t)))))
17781 (native-inputs `(("python-pytest" ,python-pytest)))
17782 (home-page "https://github.com/python/typed_ast")
17783 (synopsis "Fork of Python @code{ast} modules with type comment support")
17784 (description "This package provides a parser similar to the standard
17785 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17786 include PEP 484 type comments and are independent of the version of Python
17787 under which they are run. The @code{typed_ast} parsers produce the standard
17788 Python AST (plus type comments), and are both fast and correct, as they are
17789 based on the CPython 2.7 and 3.7 parsers.")
17790 ;; See the file "LICENSE" for the details.
17791 (license (list license:psfl
17792 license:asl2.0
17793 license:expat)))) ;ast27/Parser/spark.py
17794
17795 (define-public python-typing
17796 (package
17797 (name "python-typing")
17798 (version "3.7.4.3")
17799 (source
17800 (origin
17801 (method url-fetch)
17802 (uri (pypi-uri "typing" version))
17803 (sha256
17804 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17805 (build-system python-build-system)
17806 (home-page "https://docs.python.org/3/library/typing.html")
17807 (synopsis "Type hints for Python")
17808 (description "This is a backport of the standard library @code{typing}
17809 module to Python versions older than 3.5. Typing defines a standard notation
17810 for Python function and variable type annotations. The notation can be used
17811 for documenting code in a concise, standard format, and it has been designed
17812 to also be used by static and runtime type checkers, static analyzers, IDEs
17813 and other tools.")
17814 (license license:psfl)))
17815
17816 (define-public python2-typing
17817 (package-with-python2 python-typing))
17818
17819 (define-public python-typing-extensions
17820 (package
17821 (name "python-typing-extensions")
17822 (version "3.7.4.2")
17823 (source
17824 (origin
17825 (method url-fetch)
17826 (uri (pypi-uri "typing_extensions" version))
17827 (sha256
17828 (base32
17829 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17830 (build-system python-build-system)
17831 (home-page
17832 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17833 (synopsis "Experimental type hints for Python")
17834 (description
17835 "The typing_extensions module contains additional @code{typing} hints not
17836 yet present in the of the @code{typing} standard library.
17837 Included are implementations of:
17838 @enumerate
17839 @item ClassVar
17840 @item ContextManager
17841 @item Counter
17842 @item DefaultDict
17843 @item Deque
17844 @item NewType
17845 @item NoReturn
17846 @item overload
17847 @item Protocol
17848 @item runtime
17849 @item Text
17850 @item Type
17851 @item TYPE_CHECKING
17852 @item AsyncGenerator
17853 @end enumerate\n")
17854 (license license:psfl)))
17855
17856 (define-public bpython
17857 (package
17858 (name "bpython")
17859 (version "0.18")
17860 (source
17861 (origin
17862 (method url-fetch)
17863 (uri (pypi-uri "bpython" version))
17864 (sha256
17865 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17866 (build-system python-build-system)
17867 (arguments
17868 `(#:phases
17869 (modify-phases %standard-phases
17870 (add-after 'unpack 'remove-failing-test
17871 (lambda _
17872 ;; Remove failing test. FIXME: make it pass
17873 (delete-file "bpython/test/test_args.py")
17874 #t))
17875 (add-after 'wrap 'add-aliases
17876 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17877 (lambda* (#:key outputs #:allow-other-keys)
17878 (let ((out (assoc-ref outputs "out")))
17879 (for-each
17880 (lambda (old new)
17881 (symlink old (string-append out "/bin/" new)))
17882 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17883 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17884 #t)))))
17885 (propagated-inputs
17886 `(("python-pygments" ,python-pygments)
17887 ("python-requests" ,python-requests)
17888 ("python-babel" ,python-babel) ; optional, for internationalization
17889 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17890 ("python-greenlet" ,python-greenlet)
17891 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17892 ("python-six" ,python-six)))
17893 (native-inputs
17894 `(("python-sphinx" ,python-sphinx)
17895 ("python-mock" ,python-mock)))
17896 (home-page "https://bpython-interpreter.org/")
17897 (synopsis "Fancy interface to the Python interpreter")
17898 (description "Bpython is a fancy interface to the Python
17899 interpreter. bpython's main features are
17900
17901 @enumerate
17902 @item in-line syntax highlighting,
17903 @item readline-like autocomplete with suggestions displayed as you type,
17904 @item expected parameter list for any Python function,
17905 @item \"rewind\" function to pop the last line of code from memory and
17906 re-evaluate,
17907 @item send the code you've entered off to a pastebin,
17908 @item save the code you've entered to a file, and
17909 @item auto-indentation.
17910 @end enumerate")
17911 (license license:expat)))
17912
17913 (define-public bpython2
17914 (let ((base (package-with-python2
17915 (strip-python2-variant bpython))))
17916 (package (inherit base)
17917 (name "bpython2")
17918 (arguments
17919 `(#:python ,python-2
17920 #:phases
17921 (modify-phases %standard-phases
17922 (add-after 'unpack 'remove-failing-test
17923 (lambda _
17924 ;; Remove failing test. FIXME: make it pass
17925 (delete-file "bpython/test/test_args.py")
17926 ;; Disable failing test-cases (renaming inhibits they are
17927 ;; discovered)
17928 (substitute* "bpython/test/test_curtsies_repl.py"
17929 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17930 (string-append a "xxx_off_" b))
17931 (("^(\\s*def )(test_complex\\W)" _ a b)
17932 (string-append a "xxx_off_" b)))
17933 #t))
17934 (add-before 'build 'rename-scripts
17935 ;; rename the scripts to bypthon2, bpdb2, etc.
17936 (lambda _
17937 (substitute* "setup.py"
17938 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17939 (string-append name "2" rest "\n"))
17940 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17941 (string-append name "2" (or sub "") rest "\n")))
17942 #t))))))))
17943
17944 (define-public python-pyinotify
17945 (package
17946 (name "python-pyinotify")
17947 (version "0.9.6")
17948 (source (origin
17949 (method url-fetch)
17950 (uri (pypi-uri "pyinotify" version))
17951 (sha256
17952 (base32
17953 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17954 (build-system python-build-system)
17955 (arguments `(#:tests? #f)) ;no tests
17956 (home-page "https://github.com/seb-m/pyinotify")
17957 (synopsis "Python library for monitoring inotify events")
17958 (description
17959 "@code{pyinotify} provides a Python interface for monitoring
17960 file system events on Linux.")
17961 (license license:expat)))
17962
17963 (define-public python2-pyinotify
17964 (package-with-python2 python-pyinotify))
17965
17966 ;; Ada parser uses this version.
17967 (define-public python2-quex-0.67.3
17968 (package
17969 (name "python2-quex")
17970 (version "0.67.3")
17971 (source
17972 (origin
17973 (method url-fetch)
17974 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17975 (version-major+minor version)
17976 "/quex-" version ".zip"))
17977 (sha256
17978 (base32
17979 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17980 (build-system python-build-system)
17981 (native-inputs
17982 `(("unzip" ,unzip)))
17983 (arguments
17984 `(#:python ,python-2
17985 #:tests? #f
17986 #:phases
17987 (modify-phases %standard-phases
17988 (delete 'configure)
17989 (delete 'build)
17990 (replace 'install
17991 (lambda* (#:key outputs #:allow-other-keys)
17992 (let* ((out (assoc-ref outputs "out"))
17993 (share/quex (string-append out "/share/quex"))
17994 (bin (string-append out "/bin")))
17995 (copy-recursively "." share/quex)
17996 (mkdir-p bin)
17997 (symlink (string-append share/quex "/quex-exe.py")
17998 (string-append bin "/quex"))
17999 #t))))))
18000 (native-search-paths
18001 (list (search-path-specification
18002 (variable "QUEX_PATH")
18003 (files '("share/quex")))))
18004 (home-page "http://quex.sourceforge.net/")
18005 (synopsis "Lexical analyzer generator in Python")
18006 (description "@code{quex} is a lexical analyzer generator in Python.")
18007 (license license:lgpl2.1+))) ; Non-military
18008
18009 (define-public python2-quex
18010 (package (inherit python2-quex-0.67.3)
18011 (name "python2-quex")
18012 (version "0.68.1")
18013 (source
18014 (origin
18015 (method url-fetch)
18016 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18017 (sha256
18018 (base32
18019 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18020 (file-name (string-append name "-" version ".tar.gz"))))))
18021
18022 (define-public python-more-itertools
18023 (package
18024 (name "python-more-itertools")
18025 (version "8.2.0")
18026 (source
18027 (origin
18028 (method url-fetch)
18029 (uri (pypi-uri "more-itertools" version))
18030 (sha256
18031 (base32
18032 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18033 (build-system python-build-system)
18034 (home-page "https://github.com/erikrose/more-itertools")
18035 (synopsis "More routines for operating on iterables, beyond itertools")
18036 (description "Python's built-in @code{itertools} module implements a
18037 number of iterator building blocks inspired by constructs from APL, Haskell,
18038 and SML. @code{more-itertools} includes additional building blocks for
18039 working with iterables.")
18040 (properties `((python2-variant . ,(delay python2-more-itertools))))
18041 (license license:expat)))
18042
18043 ;; The 5.x series are the last versions supporting Python 2.7.
18044 (define-public python2-more-itertools
18045 (package
18046 (inherit python-more-itertools)
18047 (name "python2-more-itertools")
18048 (version "5.0.0")
18049 (source (origin
18050 (method url-fetch)
18051 (uri (pypi-uri "more-itertools" version))
18052 (sha256
18053 (base32
18054 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18055 (arguments
18056 `(#:python ,python-2))
18057 (propagated-inputs
18058 `(("python2-six" ,python2-six-bootstrap)))))
18059
18060 (define-public python-latexcodec
18061 (package
18062 (name "python-latexcodec")
18063 (version "1.0.7")
18064 (source
18065 (origin
18066 (method url-fetch)
18067 (uri (pypi-uri "latexcodec" version))
18068 (sha256
18069 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18070 (build-system python-build-system)
18071 (inputs
18072 `(("python-six" ,python-six)))
18073 (home-page "https://readthedocs.org/projects/latexcodec/")
18074 (synopsis "Work with LaTeX code in Python")
18075 (description "Lexer and codec to work with LaTeX code in Python.")
18076 (license license:expat)))
18077
18078 (define-public python-pybtex
18079 (package
18080 (name "python-pybtex")
18081 (version "0.22.2")
18082 (source
18083 (origin
18084 (method url-fetch)
18085 (uri (pypi-uri "pybtex" version))
18086 (sha256
18087 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18088 (build-system python-build-system)
18089 (native-inputs
18090 `(("python-nose" ,python-nose)))
18091 (inputs
18092 `(("python-latexcodec" ,python-latexcodec)
18093 ("python-pyyaml" ,python-pyyaml)
18094 ("python-six" ,python-six)))
18095 (arguments
18096 `(#:test-target "nosetests"))
18097 (home-page "https://pybtex.org/")
18098 (synopsis "BibTeX-compatible bibliography processor")
18099 (description "Pybtex is a BibTeX-compatible bibliography processor written
18100 in Python. You can simply type pybtex instead of bibtex.")
18101 (license license:expat)))
18102
18103 (define-public python-onetimepass
18104 (package
18105 (name "python-onetimepass")
18106 (version "1.0.1")
18107 (source
18108 (origin
18109 (method url-fetch)
18110 (uri (pypi-uri "onetimepass" version))
18111 (sha256
18112 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18113 (build-system python-build-system)
18114 (propagated-inputs `(("python-six" ,python-six)))
18115 (home-page "https://github.com/tadeck/onetimepass/")
18116 (synopsis "One-time password library")
18117 (description "Python one-time password library for HMAC-based (HOTP) and
18118 time-based (TOTP) passwords.")
18119 (license license:expat)))
18120
18121 (define-public python-parso
18122 (package
18123 (name "python-parso")
18124 (version "0.7.1")
18125 (source
18126 (origin
18127 (method url-fetch)
18128 (uri (pypi-uri "parso" version))
18129 (sha256
18130 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18131 (native-inputs
18132 `(("python-pytest" ,python-pytest)))
18133 (build-system python-build-system)
18134 (arguments
18135 `(#:phases (modify-phases %standard-phases
18136 (replace 'check
18137 (lambda _ (invoke "pytest" "-vv"))))))
18138 (home-page "https://github.com/davidhalter/parso")
18139 (synopsis "Python Parser")
18140 (description "Parso is a Python parser that supports error recovery and
18141 round-trip parsing for different Python versions (in multiple Python versions).
18142 Parso is also able to list multiple syntax errors in your Python file.")
18143 (license license:expat)))
18144
18145 (define-public python2-parso
18146 (package-with-python2 python-parso))
18147
18148 (define-public python-async-generator
18149 (package
18150 (name "python-async-generator")
18151 (version "1.10")
18152 (source
18153 (origin
18154 (method url-fetch)
18155 (uri (pypi-uri "async_generator" version))
18156 (sha256
18157 (base32
18158 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18159 (build-system python-build-system)
18160 (native-inputs
18161 `(("python-pytest" ,python-pytest)))
18162 (home-page "https://github.com/python-trio/async_generator")
18163 (synopsis "Async generators and context managers for Python 3.5+")
18164 (description "@code{async_generator} back-ports Python 3.6's native async
18165 generators and Python 3.7's context managers into Python 3.5.")
18166 ;; Dual licensed.
18167 (license (list license:expat license:asl2.0))))
18168
18169 (define-public python-async-timeout
18170 (package
18171 (name "python-async-timeout")
18172 (version "3.0.1")
18173 (source
18174 (origin
18175 (method url-fetch)
18176 (uri (pypi-uri "async-timeout" version))
18177 (sha256
18178 (base32
18179 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18180 (build-system python-build-system)
18181 (home-page "https://github.com/aio-libs/async_timeout/")
18182 (synopsis "Timeout context manager for asyncio programs")
18183 (description "@code{async-timeout} provides a timeout timeout context
18184 manager compatible with @code{asyncio}.")
18185 (license license:asl2.0)))
18186
18187 (define-public python-glob2
18188 (package
18189 (name "python-glob2")
18190 (version "0.7")
18191 (source
18192 (origin
18193 (method git-fetch)
18194 (uri (git-reference
18195 (url "https://github.com/miracle2k/python-glob2")
18196 (commit (string-append "v" version))))
18197 (file-name (git-file-name name version))
18198 (sha256
18199 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18200 (build-system python-build-system)
18201 (home-page "https://github.com/miracle2k/python-glob2/")
18202 (synopsis "Extended Version of the python buildin glob module")
18203 (description "This is an extended version of the Python
18204 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18205 adds:
18206
18207 @itemize
18208 @item The ability to capture the text matched by glob patterns, and return
18209 those matches alongside the file names.
18210 @item A recursive @code{**} globbing syntax, akin for example to the
18211 @code{globstar} option of Bash.
18212 @item The ability to replace the file system functions used, in order to glob
18213 on virtual file systems.
18214 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18215 @end itemize
18216
18217 Glob2 currently based on the glob code from Python 3.3.1.")
18218 (license license:bsd-2)))
18219
18220 (define-public python2-glob2
18221 (package-with-python2 python-glob2))
18222
18223 (define-public python-gipc
18224 (package
18225 (name "python-gipc")
18226 (version "0.6.0")
18227 (source
18228 (origin
18229 (method url-fetch)
18230 (uri (pypi-uri "gipc" version ".zip"))
18231 (sha256
18232 (base32
18233 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18234 (build-system python-build-system)
18235 (native-inputs
18236 `(("unzip" ,unzip)))
18237 (propagated-inputs
18238 `(("python-gevent" ,python-gevent)))
18239 (home-page "https://gehrcke.de/gipc/")
18240 (synopsis "Child process management in the context of gevent")
18241 (description "Usage of Python's multiprocessing package in a
18242 gevent-powered application may raise problems. With @code{gipc},
18243 process-based child processes can safely be created anywhere within a
18244 gevent-powered application.")
18245 (license license:expat)))
18246
18247 (define-public python2-gipc
18248 (package-with-python2 python-gipc))
18249
18250 (define-public python-beautifultable
18251 (package
18252 (name "python-beautifultable")
18253 (version "1.0.0")
18254 (source
18255 (origin
18256 (method url-fetch)
18257 (uri (pypi-uri "beautifultable" version))
18258 (sha256
18259 (base32
18260 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18261 (build-system python-build-system)
18262 (propagated-inputs
18263 `(("python-wcwidth" ,python-wcwidth)))
18264 (arguments
18265 `(#:phases
18266 (modify-phases %standard-phases
18267 (add-after 'unpack 'patch-setup.py
18268 (lambda _
18269 (substitute* "setup.py"
18270 (("setup\\(")
18271 "setup(\n test_suite=\"test\",")))))))
18272 (home-page "https://github.com/pri22296/beautifultable")
18273 (synopsis "Print ASCII tables for terminals")
18274 (description "@code{python-beautifultable} provides a class for easily
18275 printing tabular data in a visually appealing ASCII format to a terminal.
18276
18277 Features include, but are not limited to:
18278 @itemize
18279 @item Full customization of the look and feel of the table
18280 @item Row and column accessors.
18281 @item Full support for colors using ANSI sequences or any library.
18282 @item Plenty of predefined styles and option to create custom ones.
18283 @item Support for Unicode characters.
18284 @item Supports streaming table when data is slow to retrieve.
18285 @end itemize")
18286 (license license:expat)))
18287
18288 (define-public python-globber
18289 (package
18290 (name "python-globber")
18291 (version "0.2.1")
18292 (source
18293 (origin
18294 (method git-fetch)
18295 (uri (git-reference
18296 (url "https://github.com/asharov/globber")
18297 (commit version)))
18298 (file-name (git-file-name name version))
18299 (sha256
18300 (base32
18301 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18302 (build-system python-build-system)
18303 (home-page "https://github.com/asharov/globber")
18304 (synopsis "Library for string matching with glob patterns")
18305 (description
18306 "Globber is a Python library for matching file names against glob patterns.
18307 In contrast to other glob-matching libraries, it matches arbitrary strings and
18308 doesn't require the matched names to be existing files. In addition, it
18309 supports the globstar @code{**} operator to match an arbitrary number of
18310 path components.")
18311 (license license:asl2.0)))
18312
18313 (define-public python-git-hammer
18314 (package
18315 (name "python-git-hammer")
18316 (version "0.3.1")
18317 (source
18318 (origin
18319 (method git-fetch)
18320 (uri (git-reference
18321 (url "https://github.com/asharov/git-hammer")
18322 (commit version)))
18323 (file-name (git-file-name name version))
18324 (sha256
18325 (base32
18326 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18327 (build-system python-build-system)
18328 (arguments
18329 `(#:phases
18330 (modify-phases %standard-phases
18331 (add-after 'unpack 'patch-setup.py
18332 (lambda _
18333 (substitute* "setup.py"
18334 (("setup\\(")
18335 "setup(\n test_suite=\"test\",")))))))
18336 (propagated-inputs
18337 `(("python-beautifultable" ,python-beautifultable)
18338 ("python-dateutil" ,python-dateutil)
18339 ("python-gitpython" ,python-gitpython)
18340 ("python-globber" ,python-globber)
18341 ("python-matplotlib" ,python-matplotlib)
18342 ("python-sqlalchemy" ,python-sqlalchemy)
18343 ("python-sqlalchemy-utils"
18344 ,python-sqlalchemy-utils)))
18345 (home-page "https://github.com/asharov/git-hammer")
18346 (synopsis "Provide statistics for git repositories")
18347 (description
18348 "Git Hammer is a statistics tool for projects in git repositories.
18349 Its major feature is tracking the number of lines authored by each person for every
18350 commit, but it also includes some other useful statistics.")
18351 (license license:asl2.0)))
18352
18353 (define-public python-fusepy
18354 (package
18355 (name "python-fusepy")
18356 (version "2.0.4")
18357 (source
18358 (origin
18359 (method url-fetch)
18360 (uri (pypi-uri "fusepy" version))
18361 (sha256
18362 (base32
18363 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18364 (build-system python-build-system)
18365 (arguments
18366 `(#:phases
18367 (modify-phases %standard-phases
18368 (add-before 'build 'set-library-file-name
18369 (lambda* (#:key inputs #:allow-other-keys)
18370 (let ((fuse (assoc-ref inputs "fuse")))
18371 (substitute* "fuse.py"
18372 (("find_library\\('fuse'\\)")
18373 (string-append "'" fuse "/lib/libfuse.so'")))
18374 #t))))))
18375 (propagated-inputs
18376 `(("fuse" ,fuse)))
18377 (home-page "https://github.com/fusepy/fusepy")
18378 (synopsis "Simple ctypes bindings for FUSE")
18379 (description "Python module that provides a simple interface to FUSE and
18380 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18381 (license license:isc)))
18382
18383 (define-public python2-fusepy
18384 (package-with-python2 python-fusepy))
18385
18386 (define-public python-fusepyng
18387 (package
18388 (name "python-fusepyng")
18389 (version "1.0.7")
18390 (source
18391 (origin
18392 (method url-fetch)
18393 (uri (pypi-uri "fusepyng" version))
18394 (sha256
18395 (base32
18396 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18397 (build-system python-build-system)
18398 (arguments
18399 '(#:phases
18400 (modify-phases %standard-phases
18401 (add-after 'unpack 'set-libfuse-path
18402 (lambda* (#:key inputs #:allow-other-keys)
18403 (let ((fuse (assoc-ref inputs "fuse")))
18404 (substitute* "fusepyng.py"
18405 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18406 (string-append "\"" fuse "/lib/libfuse.so\""))))
18407 #t)))))
18408 (inputs
18409 `(("fuse" ,fuse)))
18410 (propagated-inputs
18411 `(("python-paramiko" ,python-paramiko)))
18412 (home-page "https://github.com/rianhunter/fusepyng")
18413 (synopsis "Simple ctypes bindings for FUSE")
18414 (description "@code{fusepyng} is a Python module that provides a simple
18415 interface to FUSE on various operating systems. It's just one file and is
18416 implemented using @code{ctypes}.")
18417 (license license:isc)))
18418
18419 (define-public python2-gdrivefs
18420 (package
18421 (name "python2-gdrivefs")
18422 (version "0.14.9")
18423 (source
18424 (origin
18425 (method url-fetch)
18426 (uri (pypi-uri "gdrivefs" version))
18427 (sha256
18428 (base32
18429 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18430 (build-system python-build-system)
18431 (arguments
18432 `(#:python ,python-2
18433 #:phases
18434 (modify-phases %standard-phases
18435 (add-before 'build 'patch-setup-py
18436 (lambda _
18437 ;; Update requirements from dependency==version
18438 ;; to dependency>=version
18439 (substitute* "gdrivefs/resources/requirements.txt"
18440 (("==") ">="))
18441 #t)))))
18442 (native-inputs
18443 `(("python2-gipc" ,python2-gipc)
18444 ("python2-gevent" ,python2-gevent)
18445 ("python2-greenlet" ,python2-greenlet)
18446 ("python2-httplib2" ,python2-httplib2)
18447 ("python2-uritemplate" ,python2-uritemplate)
18448 ("python2-oauth2client" ,python2-oauth2client)
18449 ("python2-six" ,python2-six)))
18450 (propagated-inputs
18451 `(("python2-dateutil" ,python2-dateutil)
18452 ("python2-fusepy" ,python2-fusepy)
18453 ("python2-google-api-client" ,python2-google-api-client)))
18454 (home-page "https://github.com/dsoprea/GDriveFS")
18455 (synopsis "Mount Google Drive as a local file system")
18456 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18457 under Python 2.7.")
18458 (license license:gpl2)))
18459
18460 (define-public python-userspacefs
18461 (package
18462 (name "python-userspacefs")
18463 (version "1.0.13")
18464 (source
18465 (origin
18466 (method url-fetch)
18467 (uri (pypi-uri "userspacefs" version))
18468 (sha256
18469 (base32
18470 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18471 (build-system python-build-system)
18472 (propagated-inputs
18473 `(("python-fusepyng" ,python-fusepyng)))
18474 (home-page "https://github.com/rianhunter/userspacefs")
18475 (synopsis "User-space file systems for Python")
18476 (description
18477 "@code{userspacefs} is a library that allows you to easily write
18478 user-space file systems in Python.")
18479 (license license:gpl3+)))
18480
18481 (define-public pybind11
18482 (package
18483 (name "pybind11")
18484 (version "2.4.3")
18485 (source (origin
18486 (method git-fetch)
18487 (uri (git-reference
18488 (url "https://github.com/pybind/pybind11")
18489 (commit (string-append "v" version))))
18490 (sha256
18491 (base32
18492 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18493 (file-name (git-file-name name version))))
18494 (build-system cmake-build-system)
18495 (native-inputs
18496 `(("python" ,python-wrapper)
18497
18498 ;; The following dependencies are used for tests.
18499 ("python-pytest" ,python-pytest)
18500 ("catch" ,catch-framework2-1)
18501 ("eigen" ,eigen)))
18502 (arguments
18503 `(#:configure-flags
18504 (list (string-append "-DCATCH_INCLUDE_DIR="
18505 (assoc-ref %build-inputs "catch")
18506 "/include/catch"))
18507
18508 #:phases (modify-phases %standard-phases
18509 (add-after 'install 'install-python
18510 (lambda* (#:key outputs #:allow-other-keys)
18511 (let ((out (assoc-ref outputs "out")))
18512 (with-directory-excursion "../source"
18513 (setenv "PYBIND11_USE_CMAKE" "yes")
18514 (invoke "python" "setup.py" "install"
18515 "--single-version-externally-managed"
18516 "--root=/"
18517 (string-append "--prefix=" out)))))))
18518
18519 #:test-target "check"))
18520 (home-page "https://github.com/pybind/pybind11/")
18521 (synopsis "Seamless operability between C++11 and Python")
18522 (description
18523 "@code{pybind11} is a lightweight header-only library that exposes C++
18524 types in Python and vice versa, mainly to create Python bindings of existing
18525 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18526 library: to minimize boilerplate code in traditional extension modules by
18527 inferring type information using compile-time introspection.")
18528 (license license:bsd-3)))
18529
18530 (define-public python-fasteners
18531 (package
18532 (name "python-fasteners")
18533 (version "0.15")
18534 (source
18535 (origin
18536 (method url-fetch)
18537 (uri (pypi-uri "fasteners" version))
18538 (sha256
18539 (base32
18540 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18541 (build-system python-build-system)
18542 (propagated-inputs
18543 `(("python-monotonic" ,python-monotonic)
18544 ("python-six" ,python-six)))
18545 (native-inputs
18546 `(("python-testtools" ,python-testtools)))
18547 (home-page "https://github.com/harlowja/fasteners")
18548 (synopsis "Python package that provides useful locks")
18549 (description
18550 "This package provides a Python program that provides following locks:
18551
18552 @itemize
18553 @item Locking decorator
18554 @item Reader-writer locks
18555 @item Inter-process locks
18556 @item Generic helpers
18557 @end itemize\n")
18558 (properties `((python2-variant . ,(delay python2-fasteners))))
18559 (license license:asl2.0)))
18560
18561 (define-public python2-fasteners
18562 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18563 (package
18564 (inherit base)
18565 (propagated-inputs
18566 `(("python2-futures" ,python2-futures)
18567 ,@(package-propagated-inputs base))))))
18568
18569 (define-public python-requests-file
18570 (package
18571 (name "python-requests-file")
18572 (version "1.4.3")
18573 (source
18574 (origin
18575 (method url-fetch)
18576 (uri (pypi-uri "requests-file" version))
18577 (sha256
18578 (base32
18579 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18580 (build-system python-build-system)
18581 (propagated-inputs
18582 `(("python-requests" ,python-requests)
18583 ("python-six" ,python-six)))
18584 (home-page
18585 "https://github.com/dashea/requests-file")
18586 (synopsis "File transport adapter for Requests")
18587 (description
18588 "Requests-File is a transport adapter for use with the Requests Python
18589 library to allow local file system access via @code{file://} URLs.")
18590 (license license:asl2.0)))
18591
18592 (define-public python2-requests-file
18593 (package-with-python2 python-requests-file))
18594
18595 (define-public python-identify
18596 (package
18597 (name "python-identify")
18598 (version "1.4.25")
18599 (source
18600 (origin
18601 ;; There are no tests in the PyPI tarball.
18602 (method git-fetch)
18603 (uri (git-reference
18604 (url "https://github.com/chriskuehl/identify")
18605 (commit (string-append "v" version))))
18606 (file-name (git-file-name name version))
18607 (sha256
18608 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18609 (build-system python-build-system)
18610 (arguments
18611 `(#:phases
18612 (modify-phases %standard-phases
18613 (replace 'check
18614 (lambda _
18615 (invoke "pytest" "-vv"))))))
18616 (native-inputs
18617 `(("python-coverage" ,python-coverage)
18618 ("python-pytest" ,python-pytest)))
18619 (propagated-inputs
18620 `(("python-editdistance" ,python-editdistance)))
18621 (home-page "https://github.com/chriskuehl/identify")
18622 (synopsis "File identification library for Python")
18623 (description
18624 "@code{identify} is a file identification library for Python. Given
18625 a file (or some information about a file), return a set of standardized tags
18626 identifying what the file is.")
18627 (license license:expat)))
18628
18629 (define-public python-tldextract
18630 (package
18631 (name "python-tldextract")
18632 (version "2.2.0")
18633 (source
18634 (origin
18635 (method url-fetch)
18636 (uri (pypi-uri "tldextract" version))
18637 (sha256
18638 (base32
18639 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18640 (build-system python-build-system)
18641 (native-inputs
18642 `(("python-pytest" ,python-pytest)
18643 ("python-responses" ,python-responses)))
18644 (propagated-inputs
18645 `(("python-idna" ,python-idna)
18646 ("python-requests" ,python-requests)
18647 ("python-requests-file" ,python-requests-file)))
18648 (home-page
18649 "https://github.com/john-kurkowski/tldextract")
18650 (synopsis
18651 "Separate the TLD from the registered domain and subdomains of a URL")
18652 (description
18653 "TLDExtract accurately separates the TLD from the registered domain and
18654 subdomains of a URL, using the Public Suffix List. By default, this includes
18655 the public ICANN TLDs and their exceptions. It can optionally support the
18656 Public Suffix List's private domains as well.")
18657 (license license:bsd-3)))
18658
18659 (define-public python2-tldextract
18660 (package-with-python2 python-tldextract))
18661
18662 (define-public python-nodeenv
18663 (package
18664 (name "python-nodeenv")
18665 (version "1.4.0")
18666 (source
18667 (origin
18668 ;; There's no tarball in PyPI.
18669 (method git-fetch)
18670 (uri (git-reference
18671 (url "https://github.com/ekalinin/nodeenv")
18672 (commit version)))
18673 (file-name (git-file-name name version))
18674 (sha256
18675 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18676 (build-system python-build-system)
18677 (arguments
18678 `(#:phases
18679 (modify-phases %standard-phases
18680 (replace 'check
18681 (lambda _
18682 ;; This test fails. It tries to open a network socket.
18683 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18684 (native-inputs
18685 `(("python-coverage" ,python-coverage)
18686 ("python-mock" ,python-mock)
18687 ("python-pytest" ,python-pytest)))
18688 (home-page "https://ekalinin.github.io/nodeenv/")
18689 (synopsis "Create isolated node.js environments")
18690 (description
18691 "Nodeenv (node.js virtual environment) is a tool to create isolated
18692 node.js environments. It creates an environment that has its own installation
18693 directories, that doesn't share libraries with other node.js virtual
18694 environments.")
18695 (license license:bsd-3)))
18696
18697 (define-public python-pynamecheap
18698 (package
18699 (name "python-pynamecheap")
18700 (version "0.0.3")
18701 (source
18702 (origin
18703 (method url-fetch)
18704 (uri (pypi-uri "PyNamecheap" version))
18705 (sha256
18706 (base32
18707 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18708 (build-system python-build-system)
18709 (propagated-inputs
18710 `(("python-requests" ,python-requests)))
18711 (home-page
18712 "https://github.com/Bemmu/PyNamecheap")
18713 (synopsis
18714 "Namecheap API client in Python")
18715 (description
18716 "PyNamecheap is a Namecheap API client in Python.")
18717 (license license:expat)))
18718
18719 (define-public python2-pynamecheap
18720 (package-with-python2 python-pynamecheap))
18721
18722 (define-public python-dns-lexicon
18723 (package
18724 (name "python-dns-lexicon")
18725 (version "2.4.0")
18726 (source
18727 (origin
18728 (method url-fetch)
18729 (uri (pypi-uri "dns-lexicon" version))
18730 (sha256
18731 (base32
18732 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18733 (build-system python-build-system)
18734 (arguments
18735 `(#:tests? #f)) ;requires internet access
18736 (propagated-inputs
18737 `(("python-future" ,python-future)
18738 ("python-pynamecheap" ,python-pynamecheap)
18739 ("python-requests" ,python-requests)
18740 ("python-tldextract" ,python-tldextract)
18741 ("python-urllib3" ,python-urllib3)))
18742 (home-page "https://github.com/AnalogJ/lexicon")
18743 (synopsis
18744 "Manipulate DNS records on various DNS providers")
18745 (description
18746 "Lexicon provides a way to manipulate DNS records on multiple DNS
18747 providers in a standardized way. It has a CLI but it can also be used as a
18748 Python library. It was designed to be used in automation, specifically with
18749 Let's Encrypt.")
18750 (license license:expat)))
18751
18752 (define-public python2-dns-lexicon
18753 (package-with-python2 python-dns-lexicon))
18754
18755 (define-public python-cfgv
18756 (package
18757 (name "python-cfgv")
18758 (version "3.1.0")
18759 (source
18760 (origin
18761 ;; There are no tests in the PyPI tarball.
18762 (method git-fetch)
18763 (uri (git-reference
18764 (url "https://github.com/asottile/cfgv")
18765 (commit (string-append "v" version))))
18766 (file-name (git-file-name name version))
18767 (sha256
18768 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18769 (build-system python-build-system)
18770 (arguments
18771 `(#:phases
18772 (modify-phases %standard-phases
18773 (replace 'check
18774 (lambda _
18775 (invoke "pytest" "-vv"))))))
18776 (native-inputs
18777 `(("python-covdefaults" ,python-covdefaults)
18778 ("python-coverage" ,python-coverage)
18779 ("python-pytest" ,python-pytest)))
18780 (home-page "https://github.com/asottile/cfgv")
18781 (synopsis "Configuration validation library")
18782 (description
18783 "This library helps to validate configuration files and produce human
18784 readable error messages.")
18785 (license license:expat)))
18786
18787 (define-public python-commandlines
18788 (package
18789 (name "python-commandlines")
18790 (version "0.4.1")
18791 (source
18792 (origin
18793 (method url-fetch)
18794 (uri (pypi-uri "commandlines" version))
18795 (sha256
18796 (base32
18797 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18798 (build-system python-build-system)
18799 (home-page "https://github.com/chrissimpkins/commandlines")
18800 (synopsis "Command line argument to object parsing library")
18801 (description
18802 "@code{Commandlines} is a Python library for command line application
18803 development that supports command line argument parsing, command string
18804 validation testing and application logic.")
18805 (license license:expat)))
18806
18807 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18808 ;; python-numba. They have a very unflexible relationship.
18809 (define-public python-numba
18810 (package
18811 (name "python-numba")
18812 (version "0.51.2")
18813 (source
18814 (origin
18815 (method url-fetch)
18816 (uri (pypi-uri "numba" version))
18817 (sha256
18818 (base32
18819 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
18820 (build-system python-build-system)
18821 (arguments
18822 `(#:phases
18823 (modify-phases %standard-phases
18824 (add-after 'unpack 'disable-proprietary-features
18825 (lambda _
18826 (setenv "NUMBA_DISABLE_HSA" "1")
18827 (setenv "NUMBA_DISABLE_CUDA" "1")
18828 #t))
18829 (replace 'check
18830 (lambda* (#:key inputs outputs #:allow-other-keys)
18831 (add-installed-pythonpath inputs outputs)
18832 ;; Something is wrong with the PYTHONPATH when running the
18833 ;; tests from the build directory, as it complains about not being
18834 ;; able to import certain modules.
18835 (with-directory-excursion "/tmp"
18836 (setenv "HOME" (getcwd))
18837 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
18838 (propagated-inputs
18839 `(("python-llvmlite" ,python-llvmlite)
18840 ("python-numpy" ,python-numpy)
18841 ("python-singledispatch" ,python-singledispatch)))
18842 (native-inputs ;for tests
18843 `(("python-jinja2" ,python-jinja2)
18844 ("python-pygments" ,python-pygments)))
18845 (home-page "https://numba.pydata.org")
18846 (synopsis "Compile Python code using LLVM")
18847 (description "Numba gives you the power to speed up your applications with
18848 high performance functions written directly in Python. With a few
18849 annotations, array-oriented and math-heavy Python code can be just-in-time
18850 compiled to native machine instructions, similar in performance to C, C++ and
18851 Fortran, without having to switch languages or Python interpreters.
18852
18853 Numba works by generating optimized machine code using the LLVM compiler
18854 infrastructure at import time, runtime, or statically (using the included pycc
18855 tool).")
18856 (license license:bsd-3)))
18857
18858 (define-public python-numcodecs
18859 (package
18860 (name "python-numcodecs")
18861 (version "0.6.4")
18862 (source
18863 (origin
18864 (method url-fetch)
18865 (uri (pypi-uri "numcodecs" version))
18866 (sha256
18867 (base32
18868 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18869 (build-system python-build-system)
18870 (propagated-inputs
18871 `(("python-numpy" ,python-numpy)
18872 ("python-msgpack" ,python-msgpack)))
18873 (native-inputs
18874 `(("python-pytest" ,python-pytest)
18875 ("python-setuptools-scm" ,python-setuptools-scm)))
18876 (home-page "https://github.com/zarr-developers/numcodecs")
18877 (synopsis "Buffer compression and transformation codecs")
18878 (description
18879 "This Python package provides buffer compression and transformation
18880 codecs for use in data storage and communication applications.")
18881 (license license:expat)))
18882
18883 (define-public python-asciitree
18884 (package
18885 (name "python-asciitree")
18886 (version "0.3.3")
18887 (source
18888 (origin
18889 (method url-fetch)
18890 (uri (pypi-uri "asciitree" version))
18891 (sha256
18892 (base32
18893 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18894 (build-system python-build-system)
18895 (home-page "https://github.com/mbr/asciitree")
18896 (synopsis "Draws ASCII trees")
18897 (description "This package draws tree structures using characters.")
18898 (license license:expat)))
18899
18900 (define-public python-zarr
18901 (package
18902 (name "python-zarr")
18903 (version "2.4.0")
18904 (source
18905 (origin
18906 (method url-fetch)
18907 (uri (pypi-uri "zarr" version))
18908 (sha256
18909 (base32
18910 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18911 (build-system python-build-system)
18912 (arguments
18913 `(#:phases
18914 (modify-phases %standard-phases
18915 (add-after 'unpack 'disable-service-tests
18916 (lambda _
18917 (setenv "ZARR_TEST_ABS" "0")
18918 (setenv "ZARR_TEST_MONGO" "0")
18919 (setenv "ZARR_TEST_REDIS" "0")
18920 #t))
18921 (replace 'check
18922 (lambda _
18923 (invoke "pytest" "-vv" "-k" "not lmdb")
18924 #t)))))
18925 (propagated-inputs
18926 `(("python-asciitree" ,python-asciitree)
18927 ("python-fasteners" ,python-fasteners)
18928 ("python-numcodecs" ,python-numcodecs)
18929 ("python-numpy" ,python-numpy)))
18930 (native-inputs
18931 `(("python-pytest" ,python-pytest)
18932 ("python-setuptools-scm" ,python-setuptools-scm)))
18933 (home-page "https://github.com/zarr-developers/zarr-python")
18934 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18935 (description
18936 "This package provides an implementation of chunked, compressed,
18937 N-dimensional arrays for Python.")
18938 (license license:expat)))
18939
18940 (define-public python-anndata
18941 (package
18942 (name "python-anndata")
18943 (version "0.7.1")
18944 (source
18945 (origin
18946 (method url-fetch)
18947 (uri (pypi-uri "anndata" version))
18948 (sha256
18949 (base32
18950 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18951 (build-system python-build-system)
18952 (arguments
18953 `(#:phases
18954 (modify-phases %standard-phases
18955 (add-after 'unpack 'delete-inconvenient-tests
18956 (lambda _
18957 ;; This test depends on python-scikit-learn.
18958 (delete-file "anndata/tests/test_inplace_subset.py")
18959 #t))
18960 (delete 'check)
18961 (add-after 'install 'check
18962 (lambda* (#:key inputs outputs #:allow-other-keys)
18963 (add-installed-pythonpath inputs outputs)
18964 (invoke "pytest" "-vv"))))))
18965 (propagated-inputs
18966 `(("python-h5py" ,python-h5py)
18967 ("python-importlib-metadata" ,python-importlib-metadata)
18968 ("python-natsort" ,python-natsort)
18969 ("python-numcodecs" ,python-numcodecs)
18970 ("python-packaging" ,python-packaging)
18971 ("python-pandas" ,python-pandas)
18972 ("python-scipy" ,python-scipy)
18973 ("python-zarr" ,python-zarr)))
18974 (native-inputs
18975 `(("python-joblib" ,python-joblib)
18976 ("python-pytest" ,python-pytest)
18977 ("python-setuptools-scm" ,python-setuptools-scm)))
18978 (home-page "https://github.com/theislab/anndata")
18979 (synopsis "Annotated data for data analysis pipelines")
18980 (description "Anndata is a package for simple (functional) high-level APIs
18981 for data analysis pipelines. In this context, it provides an efficient,
18982 scalable way of keeping track of data together with learned annotations and
18983 reduces the code overhead typically encountered when using a mostly
18984 object-oriented library such as @code{scikit-learn}.")
18985 (license license:bsd-3)))
18986
18987 (define-public python-dill
18988 (package
18989 (name "python-dill")
18990 (version "0.3.1.1")
18991 (source
18992 (origin
18993 (method url-fetch)
18994 (uri (pypi-uri "dill" version))
18995 (sha256
18996 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18997 (build-system python-build-system)
18998 (arguments
18999 `(#:phases
19000 (modify-phases %standard-phases
19001 (replace 'check
19002 (lambda _
19003 (with-directory-excursion "/tmp"
19004 (invoke "nosetests" "-v"))
19005 #t)))))
19006 (native-inputs
19007 `(("python-nose" ,python-nose)))
19008 (home-page "https://pypi.org/project/dill/")
19009 (synopsis "Serialize all of Python")
19010 (description "Dill extends Python's @code{pickle} module for serializing
19011 and de-serializing Python objects to the majority of the built-in Python
19012 types. Dill provides the user the same interface as the @code{pickle} module,
19013 and also includes some additional features. In addition to pickling Python
19014 objects, @code{dill} provides the ability to save the state of an interpreter
19015 session in a single command. Hence, it would be feasible to save a
19016 interpreter session, close the interpreter, ship the pickled file to another
19017 computer, open a new interpreter, unpickle the session and thus continue from
19018 the saved state of the original interpreter session.")
19019 (license license:bsd-3)))
19020
19021 (define-public python-multiprocess
19022 (package
19023 (name "python-multiprocess")
19024 (version "0.70.9")
19025 (source
19026 (origin
19027 (method url-fetch)
19028 (uri (pypi-uri "multiprocess" version))
19029 (sha256
19030 (base32
19031 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19032 (build-system python-build-system)
19033 (arguments
19034 `(#:phases
19035 (modify-phases %standard-phases
19036 (add-after 'unpack 'disable-broken-tests
19037 (lambda _
19038 ;; This test is broken as there is no keyboard interrupt.
19039 (substitute* "py3.7/multiprocess/tests/__init__.py"
19040 (("^(.*)def test_wait_result"
19041 line indent)
19042 (string-append indent
19043 "@unittest.skip(\"Disabled by Guix\")\n"
19044 line)))
19045 #t))
19046 ;; Tests must be run after installation.
19047 (delete 'check)
19048 (add-after 'install 'check
19049 (lambda* (#:key inputs outputs #:allow-other-keys)
19050 (add-installed-pythonpath inputs outputs)
19051 (invoke "python" "-m" "multiprocess.tests")
19052 #t)))))
19053 (propagated-inputs
19054 `(("python-dill" ,python-dill)))
19055 (home-page "https://pypi.org/project/multiprocess/")
19056 (synopsis "Multiprocessing and multithreading in Python")
19057 (description
19058 "This package is a fork of the multiprocessing Python package, a package
19059 which supports the spawning of processes using the API of the standard
19060 library's @code{threading} module.")
19061 (license license:bsd-3)))
19062
19063 (define-public python-toolz
19064 (package
19065 (name "python-toolz")
19066 (version "0.9.0")
19067 (source
19068 (origin
19069 (method url-fetch)
19070 (uri (pypi-uri "toolz" version))
19071 (sha256
19072 (base32
19073 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19074 (build-system python-build-system)
19075 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19076 ;; unregistered loader type"
19077 (arguments '(#:tests? #f))
19078 (home-page "https://github.com/pytoolz/toolz/")
19079 (synopsis "List processing tools and functional utilities")
19080 (description
19081 "This package provides a set of utility functions for iterators,
19082 functions, and dictionaries.")
19083 (license license:bsd-3)))
19084
19085 (define-public python2-toolz
19086 (package-with-python2 python-toolz))
19087
19088 (define-public python-cytoolz
19089 (package
19090 (name "python-cytoolz")
19091 (version "0.9.0.1")
19092 (source
19093 (origin
19094 (method url-fetch)
19095 (uri (pypi-uri "cytoolz" version))
19096 (sha256
19097 (base32
19098 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19099 (build-system python-build-system)
19100 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19101 ;; 'exceptions'"
19102 (arguments '(#:tests? #f))
19103 (propagated-inputs
19104 `(("python-toolz" ,python-toolz)))
19105 (native-inputs
19106 `(("python-cython" ,python-cython)))
19107 (home-page "https://github.com/pytoolz/cytoolz")
19108 (synopsis "High performance functional utilities")
19109 (description
19110 "The cytoolz package implements the same API as provided by toolz. The
19111 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19112 that is accessible to other projects developed in Cython.")
19113 (license license:bsd-3)))
19114
19115 (define-public python-sortedcontainers
19116 (package
19117 (name "python-sortedcontainers")
19118 (version "2.1.0")
19119 (source
19120 (origin
19121 (method url-fetch)
19122 (uri (pypi-uri "sortedcontainers" version))
19123 (sha256
19124 (base32
19125 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19126 (build-system python-build-system)
19127 (arguments
19128 ;; FIXME: Tests require many extra dependencies, and would introduce
19129 ;; a circular dependency on hypothesis, which uses this package.
19130 '(#:tests? #f))
19131 (propagated-inputs
19132 `(("python-appdirs" ,python-appdirs)
19133 ("python-distlib" ,python-distlib)
19134 ("python-filelock" ,python-filelock)
19135 ("python-six" ,python-six-bootstrap)))
19136 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19137 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19138 (description
19139 "This package provides a sorted collections library, written in
19140 pure-Python.")
19141 (license license:asl2.0)))
19142
19143 (define-public python2-sortedcontainers
19144 (package-with-python2 python-sortedcontainers))
19145
19146 (define-public python-cloudpickle
19147 (package
19148 (name "python-cloudpickle")
19149 (version "1.3.0")
19150 (source
19151 (origin
19152 (method url-fetch)
19153 (uri (pypi-uri "cloudpickle" version))
19154 (sha256
19155 (base32
19156 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19157 (build-system python-build-system)
19158 (arguments
19159 '(#:phases (modify-phases %standard-phases
19160 (add-before 'check 'do-not-override-PYTHONPATH
19161 (lambda _
19162 ;; Append to PYTHONPATH instead of overriding it so
19163 ;; that dependencies from Guix can be found.
19164 (substitute* "tests/testutils.py"
19165 (("env\\['PYTHONPATH'\\] = pythonpath")
19166 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19167 #t))
19168 (replace 'check
19169 (lambda* (#:key tests? #:allow-other-keys)
19170 (if tests?
19171 (invoke "pytest" "-s" "-vv")
19172 (format #t "test suite not run~%"))
19173 #t)))))
19174 (native-inputs
19175 `(;; For tests.
19176 ("python-psutil" ,python-psutil)
19177 ("python-pytest" ,python-pytest)
19178 ("python-tornado" ,python-tornado)))
19179 (home-page "https://github.com/cloudpipe/cloudpickle")
19180 (synopsis "Extended pickling support for Python objects")
19181 (description
19182 "Cloudpickle makes it possible to serialize Python constructs not
19183 supported by the default pickle module from the Python standard library. It
19184 is especially useful for cluster computing where Python expressions are
19185 shipped over the network to execute on remote hosts, possibly close to the
19186 data.")
19187 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19188 (license license:bsd-3)))
19189
19190 (define-public python2-cloudpickle
19191 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19192 (package
19193 (inherit base)
19194 (native-inputs
19195 `(("python-mock" ,python2-mock)
19196 ,@(package-native-inputs base)))
19197 (propagated-inputs
19198 `(("python-futures" ,python2-futures)
19199 ,@(package-propagated-inputs base))))))
19200
19201 (define-public python-locket
19202 (package
19203 (name "python-locket")
19204 (version "0.2.0")
19205 (source
19206 (origin
19207 (method url-fetch)
19208 (uri (pypi-uri "locket" version))
19209 (sha256
19210 (base32
19211 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19212 (build-system python-build-system)
19213 (home-page "https://github.com/mwilliamson/locket.py")
19214 (synopsis "File-based locks for Python")
19215 (description
19216 "Locket implements a lock that can be used by multiple processes provided
19217 they use the same path.")
19218 (license license:bsd-2)))
19219
19220 (define-public python2-locket
19221 (package-with-python2 python-locket))
19222
19223 (define-public python-blosc
19224 (package
19225 (name "python-blosc")
19226 (version "1.5.1")
19227 (source
19228 (origin
19229 (method url-fetch)
19230 (uri (pypi-uri "blosc" version))
19231 (sha256
19232 (base32
19233 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19234 (build-system python-build-system)
19235 ;; FIXME: all tests pass, but then this error is printed:
19236 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19237 (arguments '(#:tests? #f))
19238 (propagated-inputs
19239 `(("python-numpy" ,python-numpy)))
19240 (home-page "https://github.com/blosc/python-blosc")
19241 (synopsis "Python wrapper for the Blosc data compressor library")
19242 (description "Blosc is a high performance compressor optimized for binary
19243 data. It has been designed to transmit data to the processor cache faster
19244 than the traditional, non-compressed, direct memory fetch approach via a
19245 @code{memcpy()} system call.
19246
19247 Blosc works well for compressing numerical arrays that contains data with
19248 relatively low entropy, like sparse data, time series, grids with
19249 regular-spaced values, etc.
19250
19251 This Python package wraps the Blosc library.")
19252 (license license:bsd-3)))
19253
19254 (define-public python2-blosc
19255 (package-with-python2 python-blosc))
19256
19257 (define-public python-partd
19258 (package
19259 (name "python-partd")
19260 (version "0.3.9")
19261 (source
19262 (origin
19263 (method url-fetch)
19264 (uri (pypi-uri "partd" version))
19265 (sha256
19266 (base32
19267 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19268 (build-system python-build-system)
19269 (propagated-inputs
19270 `(("python-blosc" ,python-blosc)
19271 ("python-locket" ,python-locket)
19272 ("python-numpy" ,python-numpy)
19273 ("python-pandas" ,python-pandas)
19274 ("python-pyzmq" ,python-pyzmq)
19275 ("python-toolz" ,python-toolz)))
19276 (home-page "https://github.com/dask/partd/")
19277 (synopsis "Appendable key-value storage")
19278 (description "Partd stores key-value pairs. Values are raw bytes. We
19279 append on old values. Partd excels at shuffling operations.")
19280 (license license:bsd-3)))
19281
19282 (define-public python2-partd
19283 (package-with-python2 python-partd))
19284
19285 (define-public python-fsspec
19286 (package
19287 (name "python-fsspec")
19288 (version "0.6.1")
19289 (source
19290 (origin
19291 (method url-fetch)
19292 (uri (pypi-uri "fsspec" version))
19293 (sha256
19294 (base32
19295 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19296 (build-system python-build-system)
19297 (arguments '(#:tests? #f)) ; there are none
19298 (home-page "https://github.com/intake/filesystem_spec")
19299 (synopsis "File-system specification")
19300 (description "The purpose of this package is to produce a template or
19301 specification for a file-system interface, that specific implementations
19302 should follow, so that applications making use of them can rely on a common
19303 behavior and not have to worry about the specific internal implementation
19304 decisions with any given backend.")
19305 (license license:bsd-3)))
19306
19307 (define-public python-dask
19308 (package
19309 (name "python-dask")
19310 (version "2.14.0")
19311 (source
19312 (origin
19313 (method url-fetch)
19314 (uri (pypi-uri "dask" version))
19315 (sha256
19316 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19317 (build-system python-build-system)
19318 (arguments
19319 `(#:phases
19320 (modify-phases %standard-phases
19321 (add-after 'unpack 'disable-broken-tests
19322 (lambda _
19323 ;; This test is marked as xfail when pytest-xdist is used.
19324 (substitute* "dask/tests/test_threaded.py"
19325 (("def test_interrupt\\(\\)" m)
19326 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19327 m)))
19328 ;; This one fails with a type error:
19329 ;; TypeError: Already tz-aware, use tz_convert to convert.
19330 (substitute* "dask/dataframe/tests/test_shuffle.py"
19331 (("def test_set_index_timestamp\\(\\)" m)
19332 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19333 m)))
19334 #t))
19335 (replace 'check
19336 (lambda _ (invoke "pytest" "-vv"))))))
19337 (propagated-inputs
19338 `(("python-cloudpickle" ,python-cloudpickle)
19339 ("python-fsspec" ,python-fsspec)
19340 ("python-numpy" ,python-numpy)
19341 ("python-packaging" ,python-packaging)
19342 ("python-pandas" ,python-pandas)
19343 ("python-partd" ,python-partd)
19344 ("python-toolz" ,python-toolz)
19345 ("python-pyyaml" ,python-pyyaml)))
19346 (native-inputs
19347 `(("python-pytest" ,python-pytest)
19348 ("python-pytest-runner" ,python-pytest-runner)))
19349 (home-page "https://github.com/dask/dask/")
19350 (synopsis "Parallel computing with task scheduling")
19351 (description
19352 "Dask is a flexible parallel computing library for analytics. It
19353 consists of two components: dynamic task scheduling optimized for computation,
19354 and large data collections like parallel arrays, dataframes, and lists that
19355 extend common interfaces like NumPy, Pandas, or Python iterators to
19356 larger-than-memory or distributed environments. These parallel collections
19357 run on top of the dynamic task schedulers. ")
19358 (license license:bsd-3)))
19359
19360 (define-public python-ilinkedlist
19361 (package
19362 (name "python-ilinkedlist")
19363 (version "0.4.0")
19364 (source
19365 (origin
19366 (method url-fetch)
19367 (uri (pypi-uri "ilinkedlist" version))
19368 (sha256
19369 (base32
19370 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19371 (build-system python-build-system)
19372 (native-inputs `(("python-pytest" ,python-pytest)))
19373 (inputs `(("python" ,python)))
19374 (home-page "https://github.com/luther9/ilinkedlist-py")
19375 (synopsis "Immutable linked list library")
19376 (description
19377 "This is a implementation of immutable linked lists for Python. It
19378 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19379 Since a linked list is treated as immutable, it is hashable, and its length
19380 can be retrieved in constant time. Some of the terminology is inspired by
19381 LISP. It is possible to create an improper list by creating a @code{Pair}
19382 with a non-list @code{cdr}.")
19383 (license license:gpl3+)))
19384
19385 (define-public python-readlike
19386 (package
19387 (name "python-readlike")
19388 (version "0.1.3")
19389 (source
19390 (origin
19391 (method url-fetch)
19392 (uri (pypi-uri "readlike" version))
19393 (sha256
19394 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19395 (build-system python-build-system)
19396 (home-page "https://github.com/jangler/readlike")
19397 (synopsis "GNU Readline-like line editing module")
19398 (description
19399 "This Python module provides line editing functions similar to the default
19400 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19401 @code{readline} package, this one allows access to those capabilities in settings
19402 outside of a standard command-line interface. It is especially well-suited to
19403 interfacing with Urwid, due to a shared syntax for describing key inputs.
19404
19405 Currently, all stateless Readline commands are implemented. Yanking and history
19406 are not supported.")
19407 (license license:expat)))
19408
19409 (define-public python2-readlike
19410 (package-with-python2 python-readlike))
19411
19412 (define-public python-reparser
19413 (package
19414 (name "python-reparser")
19415 (version "1.4.3")
19416 (source
19417 (origin
19418 (method url-fetch)
19419 (uri (pypi-uri "ReParser" version))
19420 (sha256
19421 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19422 (build-system python-build-system)
19423 (home-page "https://github.com/xmikos/reparser")
19424 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19425 (description
19426 "This Python library provides a simple lexer/parser for inline markup based
19427 on regular expressions.")
19428 (license license:expat)))
19429
19430 (define-public python2-reparser
19431 (let ((reparser (package-with-python2
19432 (strip-python2-variant python-reparser))))
19433 (package (inherit reparser)
19434 (propagated-inputs
19435 `(("python2-enum34" ,python2-enum34)
19436 ,@(package-propagated-inputs reparser))))))
19437
19438 (define-public python-retrying
19439 (package
19440 (name "python-retrying")
19441 (version "1.3.3")
19442 (source
19443 (origin
19444 (method git-fetch)
19445 (uri (git-reference
19446 (url "https://github.com/rholder/retrying")
19447 (commit (string-append "v" version))))
19448 (file-name (git-file-name name version))
19449 (sha256
19450 (base32
19451 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19452 (build-system python-build-system)
19453 (propagated-inputs
19454 `(("python-six" ,python-six)))
19455 (home-page "https://github.com/rholder/retrying")
19456 (synopsis "Library for adding retry behavior")
19457 (description "Retrying is a general-purpose retrying library to simplify
19458 the task of adding retry behavior to just about anything.
19459
19460 Features:
19461
19462 @itemize
19463 @item Generic Decorator API.
19464 @item Specify stop condition (i.e. limit by number of attempts).
19465 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19466 @item Customize retrying on Exceptions.
19467 @item Customize retrying on expected returned result.
19468 @end itemize")
19469 (license license:asl2.0)))
19470
19471 (define-public python-precis-i18n
19472 (package
19473 (name "python-precis-i18n")
19474 (version "1.0.0")
19475 (source
19476 (origin
19477 (method url-fetch)
19478 (uri (pypi-uri "precis_i18n" version))
19479 (sha256
19480 (base32
19481 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19482 (build-system python-build-system)
19483 (home-page "https://github.com/byllyfish/precis_i18n")
19484 (synopsis "Implementation of the PRECIS framework")
19485 (description
19486 "This module implements the PRECIS Framework as described in RFC 8264,
19487 RFC 8265 and RFC 8266.")
19488 (license license:expat)))
19489
19490 (define-public python-absl-py
19491 (package
19492 (name "python-absl-py")
19493 (version "0.6.1")
19494 (source
19495 (origin
19496 (method url-fetch)
19497 (uri (pypi-uri "absl-py" version))
19498 (sha256
19499 (base32
19500 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19501 (build-system python-build-system)
19502 (propagated-inputs
19503 `(("python-six" ,python-six)))
19504 (home-page "https://github.com/abseil/abseil-py")
19505 (synopsis "Abseil Python common libraries")
19506 (description
19507 "This package provides the Abseil Python Common Libraries, a collection
19508 of Python libraries for building Python applications.")
19509 (license license:asl2.0)))
19510
19511 (define-public python-astor
19512 (package
19513 (name "python-astor")
19514 (version "0.7.1")
19515 (source
19516 (origin
19517 (method url-fetch)
19518 (uri (pypi-uri "astor" version))
19519 (sha256
19520 (base32
19521 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19522 (build-system python-build-system)
19523 ;; FIXME: There are two errors and two test failures.
19524 (arguments `(#:tests? #f))
19525 (home-page "https://github.com/berkerpeksag/astor")
19526 (synopsis "Read and write Python ASTs")
19527 (description "Astor is designed to allow easy manipulation of Python
19528 source via the Abstract Syntax Tree.")
19529 (license license:bsd-3)))
19530
19531 (define-public python2-astor
19532 (package-with-python2 python-astor))
19533
19534 (define-public python-astunparse
19535 (package
19536 (name "python-astunparse")
19537 (version "1.6.2")
19538 (source
19539 (origin
19540 (method url-fetch)
19541 (uri (pypi-uri "astunparse" version))
19542 (sha256
19543 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19544 (build-system python-build-system)
19545 (arguments '(#:tests? #f)) ; there are none
19546 (propagated-inputs
19547 `(("python-six" ,python-six)
19548 ("python-wheel" ,python-wheel)))
19549 (home-page "https://github.com/simonpercivall/astunparse")
19550 (synopsis "AST unparser for Python")
19551 (description "This package provides an AST unparser for Python. It is a
19552 factored out version of @code{unparse} found in the Python source
19553 distribution.")
19554 (license license:bsd-3)))
19555
19556 (define-public python-gast
19557 (package
19558 (name "python-gast")
19559 (version "0.3.3")
19560 (source
19561 (origin
19562 (method url-fetch)
19563 (uri (pypi-uri "gast" version))
19564 (sha256
19565 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19566 (build-system python-build-system)
19567 (propagated-inputs
19568 `(("python-astunparse" ,python-astunparse)))
19569 (home-page "https://pypi.org/project/gast/")
19570 (synopsis "Generic Python AST that abstracts the underlying Python version")
19571 (description
19572 "GAST provides a compatibility layer between the AST of various Python
19573 versions, as produced by @code{ast.parse} from the standard @code{ast}
19574 module.")
19575 (license license:bsd-3)))
19576
19577 (define-public python-wikidata
19578 (package
19579 (name "python-wikidata")
19580 (version "0.6.1")
19581 (source
19582 (origin
19583 (method url-fetch)
19584 (uri (pypi-uri "Wikidata" version))
19585 (sha256
19586 (base32
19587 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19588 (build-system python-build-system)
19589 (propagated-inputs
19590 `(("python-babel" ,python-babel)))
19591 (home-page "https://github.com/dahlia/wikidata")
19592 (synopsis "Wikidata client library")
19593 (description
19594 "This package provides a Python interface to
19595 @url{https://www.wikidata.org/, Wikidata}.")
19596 (properties '((upstream-name . "Wikidata")))
19597 (license license:gpl3+)))
19598
19599 (define-public python-doctest-ignore-unicode
19600 (package
19601 (name "python-doctest-ignore-unicode")
19602 (version "0.1.2")
19603 (source
19604 (origin
19605 (method url-fetch)
19606 (uri (pypi-uri "doctest-ignore-unicode" version))
19607 (sha256
19608 (base32
19609 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19610 (build-system python-build-system)
19611 (native-inputs
19612 `(("python-nose" ,python-nose)))
19613 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19614 (synopsis "Ignore Unicode literal prefixes in doctests")
19615 (description
19616 "This package adds support for a flag to ignore Unicode literal prefixes
19617 in doctests.")
19618 (license license:asl2.0)))
19619
19620 (define-public python-attr
19621 (package
19622 (name "python-attr")
19623 (version "0.3.1")
19624 (source
19625 (origin
19626 (method url-fetch)
19627 (uri (pypi-uri "attr" version))
19628 (sha256
19629 (base32
19630 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19631 (build-system python-build-system)
19632 (home-page "https://github.com/denis-ryzhkov/attr")
19633 (synopsis "Decorator for attributes of target function or class")
19634 (description "Simple decorator to set attributes of target function or
19635 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19636 (license license:expat)))
19637
19638 (define-public python-construct
19639 (package
19640 (name "python-construct")
19641 (version "2.10.56")
19642 (source
19643 (origin
19644 (method url-fetch)
19645 (uri (pypi-uri "construct" version))
19646 (sha256
19647 (base32
19648 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19649 (build-system python-build-system)
19650 (arguments
19651 `(#:tests? #f)) ; No tests exist.
19652 (propagated-inputs
19653 `(("python-extras" ,python-extras)
19654 ("python-arrow" ,python-arrow)
19655 ("python-numpy" ,python-numpy)
19656 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19657 (home-page "https://construct.readthedocs.io")
19658 (synopsis "Declarative and symmetrical parser and builder for binary data")
19659 (description
19660 "This package provides both simple, atomic constructs (such as
19661 integers of various sizes), as well as composite ones which allow you
19662 form hierarchical and sequential structures of increasing complexity.
19663 It features bit and byte granularity, easy debugging and testing, an
19664 easy-to-extend subclass system, and lots of primitive constructs to
19665 make your work easier.")
19666 (license license:expat)))
19667
19668 (define-public python-outcome
19669 (package
19670 (name "python-outcome")
19671 (version "1.0.1")
19672 (source
19673 (origin
19674 (method url-fetch)
19675 (uri (pypi-uri "outcome" version))
19676 (sha256
19677 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19678 (build-system python-build-system)
19679 (arguments
19680 `(#:phases
19681 (modify-phases %standard-phases
19682 (replace 'check
19683 (lambda* (#:key inputs outputs #:allow-other-keys)
19684 (add-installed-pythonpath inputs outputs)
19685 (invoke "pytest" "-vv"))))))
19686 (native-inputs
19687 `(("python-pytest" ,python-pytest)
19688 ("python-pytest-cov" ,python-pytest-cov)
19689 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19690 (propagated-inputs
19691 `(("python-async-generator" ,python-async-generator)
19692 ("python-attrs" ,python-attrs)))
19693 (home-page "https://github.com/python-trio/outcome")
19694 (synopsis "Capture the outcome of Python function calls")
19695 (description
19696 "Capture the outcome of Python function calls. Extracted from the Trio
19697 project.")
19698 ;; Either license applies.
19699 (license (list license:expat license:asl2.0))))
19700
19701 (define-public python-trio
19702 (package
19703 (name "python-trio")
19704 (version "0.17.0")
19705 (source
19706 (origin
19707 (method url-fetch)
19708 (uri (pypi-uri "trio" version))
19709 (sha256
19710 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19711 (build-system python-build-system)
19712 (arguments
19713 `(#:phases
19714 (modify-phases %standard-phases
19715 (add-before 'check 'change-home
19716 (lambda _
19717 ;; Tests require a writable home.
19718 (setenv "HOME" "/tmp")
19719 #t))
19720 (replace 'check
19721 (lambda _
19722 (invoke "pytest" "-vv" "-k"
19723 (string-append
19724 ;; This test times out.
19725 "not test_ki_protection_works"
19726 ;; Assertion errors.
19727 " and not test_guest_mode_ki"
19728 " and not test_run_in_trio_thread_ki"
19729 ;; These try to raise KeyboardInterrupt which does not work
19730 ;; in the build environment.
19731 " and not test_ki_self"
19732 " and not test_ki_wakes_us_up"
19733 ;; Failure in name resolution.
19734 " and not test_getnameinfo"
19735 " and not test_SocketType_resolve"
19736 ;; OSError: protocol not found.
19737 " and not test_getprotobyname")))))))
19738 (native-inputs
19739 `(("python-astor" ,python-astor)
19740 ("python-ipython" ,python-ipython)
19741 ("python-jedi" ,python-jedi)
19742 ("python-pylint" ,python-pylint)
19743 ("python-pyopenssl" ,python-pyopenssl)
19744 ("python-pytest" ,python-pytest)
19745 ("python-pytest-cov" ,python-pytest-cov)
19746 ("python-trustme" ,python-trustme)))
19747 (propagated-inputs
19748 `(("python-attrs" ,python-attrs)
19749 ("python-idna" ,python-idna)
19750 ("python-outcome" ,python-outcome)
19751 ("python-sniffio" ,python-sniffio)
19752 ("python-sortedcontainers"
19753 ,python-sortedcontainers)))
19754 (home-page "https://github.com/python-trio/trio")
19755 (synopsis "Friendly Python library for async concurrency and I/O")
19756 (description
19757 "Trio strives to be a production-quality, async/await-native I/O library
19758 for Python. Like all async libraries, its main purpose is to help you write
19759 programs that do multiple things at the same time with parallelized I/O.")
19760 ;; Either license applies.
19761 (license (list license:expat license:asl2.0))))
19762
19763 (define-public python-trio-typing
19764 (package
19765 (name "python-trio-typing")
19766 (version "0.5.0")
19767 (source
19768 (origin
19769 (method url-fetch)
19770 (uri (pypi-uri "trio-typing" version))
19771 (sha256
19772 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19773 (build-system python-build-system)
19774 (arguments
19775 `(#:phases
19776 (modify-phases %standard-phases
19777 (replace 'check
19778 (lambda _
19779 (invoke "pytest" "-vv"))))))
19780 (native-inputs
19781 `(("python-attrs" ,python-attrs)
19782 ("python-pytest" ,python-pytest)))
19783 (propagated-inputs
19784 `(("python-mypy" ,python-mypy)
19785 ("python-mypy-extensions"
19786 ,python-mypy-extensions)
19787 ("python-trio" ,python-trio)
19788 ("python-typing-extensions"
19789 ,python-typing-extensions)))
19790 (home-page "https://github.com/python-trio/trio-typing")
19791 (synopsis "Static type checking support for Trio and related projects")
19792 (description
19793 "This package provides:
19794
19795 @itemize
19796 @item PEP 561 typing stubs packages for the Trio project packages:
19797
19798 @itemize
19799 @item trio (@code{trio-stubs})
19800 @item outcome (@code{outcome-stubs})
19801 @item async_generator (@code{async_generator-stubs})
19802 @end itemize
19803
19804 @item A package @code{trio_typing} containing types that Trio programs often
19805 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19806 a mypy plugin that smooths over some limitations in the basic type hints.
19807 @end itemize")
19808 ;; Either license applies.
19809 (license (list license:expat license:asl2.0))))
19810
19811 (define-public python-humanize
19812 (package
19813 (name "python-humanize")
19814 (version "0.5.1")
19815 (source
19816 (origin
19817 (method url-fetch)
19818 (uri (pypi-uri "humanize" version))
19819 (sha256
19820 (base32
19821 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19822 (arguments
19823 '(#:tests? #f)) ; tests not in pypi archive
19824 (build-system python-build-system)
19825 (home-page "https://github.com/jmoiron/humanize")
19826 (synopsis "Print numerical information in a human-readable form")
19827 (description "This package provides a Python module that displays numbers
19828 and dates in \"human readable\" forms. For example, it would display
19829 \"12345591313\" as \"12.3 billion\".")
19830 (license license:expat)))
19831
19832 (define-public python-txaio
19833 (package
19834 (name "python-txaio")
19835 (version "18.8.1")
19836 (source
19837 (origin
19838 (method url-fetch)
19839 (uri (pypi-uri "txaio" version))
19840 (sha256
19841 (base32
19842 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19843 (build-system python-build-system)
19844 (propagated-inputs
19845 `(("python-twisted" ,python-twisted)
19846 ("python-six" ,python-six)))
19847 (home-page "https://github.com/crossbario/txaio")
19848 (synopsis "Compatibility layer between Python asyncio and Twisted")
19849 (description "Txaio provides a compatibility layer between the Python
19850 @code{asyncio} module and @code{Twisted}.")
19851 (license license:expat)))
19852
19853 (define-public python-toolshed
19854 (package
19855 (name "python-toolshed")
19856 (version "0.4.6")
19857 (source
19858 (origin
19859 (method url-fetch)
19860 (uri (pypi-uri "toolshed" version))
19861 (sha256
19862 (base32
19863 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19864 (build-system python-build-system)
19865 (native-inputs
19866 `(("python-nose" ,python-nose)))
19867 (home-page "https://github.com/brentp/toolshed/")
19868 (synopsis "Collection of modules and functions for working with data")
19869 (description "This is a collection of well-tested, simple modules and
19870 functions that aim to reduce boilerplate when working with data.")
19871 (license license:bsd-2)))
19872
19873 (define-public python-annoy
19874 (package
19875 (name "python-annoy")
19876 (version "1.15.1")
19877 (source
19878 (origin
19879 (method url-fetch)
19880 (uri (pypi-uri "annoy" version))
19881 (sha256
19882 (base32
19883 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19884 (build-system python-build-system)
19885 (native-inputs
19886 `(("python-nose" ,python-nose)))
19887 (home-page "https://github.com/spotify/annoy/")
19888 (synopsis "Approximate nearest neighbors library")
19889 (description
19890 "Annoy is a C++ library with Python bindings to search for points in
19891 space that are close to a given query point. It also creates large read-only
19892 file-based data structures that are @code{mmap}ped into memory so that many
19893 processes may share the same data.")
19894 (license license:asl2.0)))
19895
19896 (define-public python-croniter
19897 (package
19898 (name "python-croniter")
19899 (version "0.3.34")
19900 (source (origin
19901 (method url-fetch)
19902 (uri (pypi-uri "croniter" version))
19903 (sha256
19904 (base32
19905 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
19906 (build-system python-build-system)
19907 (propagated-inputs
19908 `(("python-dateutil" ,python-dateutil)
19909 ("python-natsort" ,python-natsort)))
19910 (home-page "https://github.com/kiorky/croniter")
19911 (synopsis "Iterate datetime objects with cron-like syntax")
19912 (description
19913 "@code{croniter} provides iteration for datetime object with cron-like
19914 format.")
19915 (license license:expat)))
19916
19917 (define-public python-pylzma
19918 (package
19919 (name "python-pylzma")
19920 (version "0.5.0")
19921 (source
19922 (origin
19923 (method url-fetch)
19924 (uri (pypi-uri "pylzma" version))
19925 (sha256
19926 (base32
19927 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19928 (build-system python-build-system)
19929 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19930 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19931 (description "This package provides Python bindings for the LZMA library
19932 by Igor Pavlov.")
19933 (license license:lgpl2.1+)))
19934
19935 (define-public python2-pylzma
19936 (package-with-python2 python-pylzma))
19937
19938 (define-public python2-zeroconf
19939 (package
19940 (name "python2-zeroconf")
19941
19942 ;; This is the last version that supports Python 2.x.
19943 (version "0.19.1")
19944 (source
19945 (origin
19946 (method url-fetch)
19947 (uri (pypi-uri "zeroconf" version))
19948 (sha256
19949 (base32
19950 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19951 (build-system python-build-system)
19952 (arguments
19953 `(#:python ,python-2
19954 #:phases
19955 (modify-phases %standard-phases
19956 (add-after 'unpack 'patch-requires
19957 (lambda* (#:key inputs #:allow-other-keys)
19958 (substitute* "setup.py"
19959 (("enum-compat")
19960 "enum34"))
19961 #t)))))
19962 (native-inputs
19963 `(("python2-six" ,python2-six)
19964 ("python2-enum32" ,python2-enum34)
19965 ("python2-netifaces" ,python2-netifaces)
19966 ("python2-typing" ,python2-typing)))
19967 (home-page "https://github.com/jstasiak/python-zeroconf")
19968 (synopsis "Pure Python mDNS service discovery")
19969 (description
19970 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19971 compatible).")
19972 (license license:lgpl2.1+)))
19973
19974 (define-public python-bsddb3
19975 (package
19976 (name "python-bsddb3")
19977 (version "6.2.6")
19978 (source
19979 (origin
19980 (method url-fetch)
19981 (uri (pypi-uri "bsddb3" version))
19982 (sha256
19983 (base32
19984 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19985 (build-system python-build-system)
19986 (inputs
19987 `(("bdb" ,bdb)))
19988 (arguments
19989 '(#:phases
19990 (modify-phases %standard-phases
19991 (add-after 'unpack 'configure-locations
19992 (lambda* (#:key inputs #:allow-other-keys)
19993 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19994 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19995 #t))
19996 (replace 'check
19997 (lambda _
19998 (invoke "python3" "test3.py" "-v"))))))
19999 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20000 (synopsis "Python bindings for Oracle Berkeley DB")
20001 (description
20002 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20003 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20004 Transaction objects, and each of these is exposed as a Python type in the
20005 bsddb3.db module. The database objects can use various access methods: btree,
20006 hash, recno, and queue. Complete support of Berkeley DB distributed
20007 transactions. Complete support for Berkeley DB Replication Manager.
20008 Complete support for Berkeley DB Base Replication. Support for RPC.")
20009 (license license:bsd-3)))
20010
20011 (define-public python-dbfread
20012 (package
20013 (name "python-dbfread")
20014 (version "2.0.7")
20015 (source (origin
20016 (method url-fetch)
20017 (uri (pypi-uri "dbfread" version))
20018 (sha256
20019 (base32
20020 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20021 (build-system python-build-system)
20022 (native-inputs
20023 `(("python-pytest" ,python-pytest)))
20024 (home-page "https://dbfread.readthedocs.io")
20025 (synopsis "Read DBF Files with Python")
20026 (description
20027 "This library reads DBF files and returns the data as native Python data
20028 types for further processing. It is primarily intended for batch jobs and
20029 one-off scripts.")
20030 (license license:expat)))
20031
20032 (define-public python-cached-property
20033 (package
20034 (name "python-cached-property")
20035 (version "1.5.1")
20036 (source
20037 (origin
20038 (method url-fetch)
20039 (uri (pypi-uri "cached-property" version))
20040 (sha256
20041 (base32
20042 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20043 (build-system python-build-system)
20044 (arguments
20045 `(#:phases
20046 (modify-phases %standard-phases
20047 ;; https://github.com/pydanny/cached-property/issues/131
20048 ;; recent versions of freezegun break one test
20049 (add-after 'unpack 'disable-broken-test
20050 (lambda _
20051 (substitute* "tests/test_cached_property.py"
20052 (("def test_threads_ttl_expiry\\(self\\)" m)
20053 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20054 " " m)))
20055 #t)))))
20056 (native-inputs
20057 `(("python-freezegun" ,python-freezegun)))
20058 (home-page
20059 "https://github.com/pydanny/cached-property")
20060 (synopsis
20061 "Decorator for caching properties in classes")
20062 (description
20063 "This package provides a decorator which makes caching
20064 time-or-computationally-expensive properties quick and easy and works in Python
20065 2 or 3.")
20066 (license license:bsd-3)))
20067
20068 (define-public python-folium
20069 (package
20070 (name "python-folium")
20071 (version "0.11.0")
20072 (source
20073 (origin
20074 (method url-fetch)
20075 (uri (pypi-uri "folium" version))
20076 (sha256
20077 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20078 (build-system python-build-system)
20079 (propagated-inputs
20080 `(("python-branca" ,python-branca)
20081 ("python-jinja2" ,python-jinja2)
20082 ("python-numpy" ,python-numpy)
20083 ("python-requests" ,python-requests)))
20084 (native-inputs
20085 `(("python-pytest" ,python-pytest)))
20086 (home-page "https://github.com/python-visualization/folium")
20087 (synopsis "Make beautiful maps with Leaflet.js & Python")
20088 (description "@code{folium} makes it easy to visualize data that’s been
20089 manipulated in Python on an interactive leaflet map. It enables both the
20090 binding of data to a map for @code{choropleth} visualizations as well as
20091 passing rich vector/raster/HTML visualizations as markers on the map.
20092
20093 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20094 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20095 supports Image, Video, GeoJSON and TopoJSON overlays.")
20096 (license license:expat)))
20097
20098 (define-public jube
20099 (package
20100 ;; This is a command-line tool, so no "python-" prefix.
20101 (name "jube")
20102 (version "2.2.2")
20103 (source (origin
20104 (method url-fetch)
20105 (uri (string-append
20106 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20107 version))
20108 (sha256
20109 (base32
20110 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20111 (file-name (string-append "jube-" version ".tar.gz"))))
20112 (build-system python-build-system)
20113 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20114 (synopsis "Benchmarking environment")
20115 (description
20116 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20117 benchmarked application, benchmark data is stored in a format that allows JUBE
20118 to deduct the desired information. This data can be parsed by automatic pre-
20119 and post-processing scripts that draw information and store it more densely
20120 for manual interpretation.")
20121 (license license:gpl3+)))
20122
20123 (define-public python-pyroutelib3
20124 (package
20125 (name "python-pyroutelib3")
20126 (version "1.3.post1")
20127 (source
20128 (origin
20129 (method url-fetch)
20130 (uri (pypi-uri "pyroutelib3" version))
20131 (sha256
20132 (base32
20133 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20134 (build-system python-build-system)
20135 (propagated-inputs
20136 `(("python-dateutil" ,python-dateutil)))
20137 (home-page "https://github.com/MKuranowski/pyroutelib3")
20138 (synopsis "Library for simple routing on OSM data")
20139 (description "Library for simple routing on OSM data")
20140 (license license:gpl3+)))
20141
20142 (define-public python-bibtexparser
20143 (package
20144 (name "python-bibtexparser")
20145 (version "1.1.0")
20146 (source
20147 (origin
20148 (method url-fetch)
20149 (uri (pypi-uri "bibtexparser" version))
20150 (sha256
20151 (base32
20152 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20153 (build-system python-build-system)
20154 (propagated-inputs
20155 `(("python-pyparsing" ,python-pyparsing)))
20156 (native-inputs
20157 `(("python-future" ,python-future)))
20158 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20159 (synopsis "Python library to parse BibTeX files")
20160 (description "BibtexParser is a Python library to parse BibTeX files.")
20161 (license (list license:bsd-3 license:lgpl3))))
20162
20163 (define-public python-distro
20164 (package
20165 (name "python-distro")
20166 (version "1.4.0")
20167 (source
20168 (origin
20169 (method url-fetch)
20170 (uri (pypi-uri "distro" version))
20171 (sha256
20172 (base32
20173 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20174 (build-system python-build-system)
20175 (native-inputs
20176 `(("python-pytest" ,python-pytest)))
20177 (home-page "https://github.com/nir0s/distro")
20178 (synopsis
20179 "OS platform information API")
20180 (description
20181 "@code{distro} provides information about the OS distribution it runs on,
20182 such as a reliable machine-readable ID, or version information.
20183
20184 It is the recommended replacement for Python's original
20185 `platform.linux_distribution` function (which will be removed in Python 3.8).
20186 @code{distro} also provides a command-line interface to output the platform
20187 information in various formats.")
20188 (license license:asl2.0)))
20189
20190 (define-public python-cairosvg
20191 (package
20192 (name "python-cairosvg")
20193 (version "2.4.2")
20194 (source
20195 (origin
20196 (method url-fetch)
20197 (uri (pypi-uri "CairoSVG" version))
20198 (sha256
20199 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20200 (build-system python-build-system)
20201 (arguments
20202 `(#:phases
20203 (modify-phases %standard-phases
20204 (replace 'check
20205 (lambda _ (invoke "pytest"))))))
20206 (propagated-inputs
20207 `(("python-cairocffi" ,python-cairocffi)
20208 ("python-cssselect2" ,python-cssselect2)
20209 ("python-defusedxml" ,python-defusedxml)
20210 ("python-pillow" ,python-pillow)
20211 ("python-tinycss2" ,python-tinycss2)))
20212 (native-inputs
20213 `(("python-pytest-flake8" ,python-pytest-flake8)
20214 ("python-pytest-isort" ,python-pytest-isort)
20215 ("python-pytest-runner" ,python-pytest-runner)))
20216 (home-page "https://cairosvg.org/")
20217 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20218 (description "CairoSVG is a SVG converter based on Cairo. It can export
20219 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20220 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20221 parsed, the result is drawn to a Cairo surface that can be exported to
20222 qvarious formats: PDF, PostScript, PNG and even SVG.")
20223 (license license:lgpl3+)))
20224
20225 (define-public python-pyphen
20226 (package
20227 (name "python-pyphen")
20228 (version "0.9.5")
20229 (source
20230 (origin
20231 (method url-fetch)
20232 (uri (pypi-uri "Pyphen" version))
20233 (sha256
20234 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20235 (build-system python-build-system)
20236 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20237 ;; embedded set provided by upstream - like Debian does.
20238 (home-page "https://github.com/Kozea/Pyphen")
20239 (synopsis "Pure Python module to hyphenate text")
20240 (description "Pyphen is a pure Python module to hyphenate text using
20241 existing Hunspell hyphenation dictionaries.")
20242 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20243
20244 (define-public python-intelhex
20245 (package
20246 (name "python-intelhex")
20247 (version "2.2.1")
20248 (source
20249 (origin
20250 (method url-fetch)
20251 (uri (pypi-uri "intelhex" version))
20252 (sha256
20253 (base32
20254 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20255 (build-system python-build-system)
20256 (arguments '(#:tests? #f)) ;issue with version
20257 (home-page "https://pypi.org/project/IntelHex/")
20258 (synopsis "Python library for Intel HEX files manipulations")
20259 (description "The Intel HEX file format is widely used in microprocessors
20260 and microcontrollers area (embedded systems etc.) as the de facto standard for
20261 representation of code to be programmed into microelectronic devices. This
20262 package provides an intelhex Python library to read, write, create from
20263 scratch and manipulate data from Intel HEX file format. It also includes
20264 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20265 converters and more, those based on the library itself.")
20266 (license license:bsd-3)))
20267
20268 (define-public python-pykwalify
20269 (package
20270 (name "python-pykwalify")
20271 (version "1.7.0")
20272 (source
20273 (origin
20274 (method url-fetch)
20275 (uri (pypi-uri "pykwalify" version))
20276 (sha256
20277 (base32
20278 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20279 (build-system python-build-system)
20280 (arguments '(#:tests? #f)) ;missing dependencies
20281 (propagated-inputs
20282 `(("python-dateutil" ,python-dateutil)
20283 ("python-docopt" ,python-docopt)
20284 ("python-pyyaml" ,python-pyyaml)))
20285 (home-page "https://github.com/grokzen/pykwalify")
20286 (synopsis
20287 "Python lib/cli for JSON/YAML schema validation")
20288 (description
20289 "This package provides a parser, schema validator, and data binding tool
20290 for YAML and JSON.")
20291 (license license:expat)))
20292
20293 (define-public python-dbusmock
20294 (package
20295 (name "python-dbusmock")
20296 (version "0.18.3")
20297 (source
20298 (origin
20299 (method url-fetch)
20300 (uri (pypi-uri "python-dbusmock" version))
20301 (sha256
20302 (base32
20303 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20304 (build-system python-build-system)
20305 (arguments
20306 '(#:phases
20307 (modify-phases %standard-phases
20308 (add-after 'unpack 'patch-shell-path
20309 (lambda _
20310 (substitute* "tests/test_code.py"
20311 (("/bin/bash") (which "bash")))
20312 #t)))))
20313 (native-inputs
20314 `(;; For tests.
20315 ("dbus" ,dbus) ; for dbus-daemon
20316 ("python-nose" ,python-nose)
20317 ("which" ,which)))
20318 (propagated-inputs
20319 `(("python-dbus" ,python-dbus)
20320 ("python-pygobject" ,python-pygobject)))
20321 (home-page "https://github.com/martinpitt/python-dbusmock")
20322 (synopsis "Python library for mock D-Bus objects")
20323 (description "python-dbusmock allows for the easy creation of mock objects on
20324 D-Bus. This is useful for writing tests for software which talks to D-Bus
20325 services such as upower, systemd, logind, gnome-session or others, and it is
20326 hard (or impossible without root privileges) to set the state of the real
20327 services to what you expect in your tests.")
20328 (license license:lgpl3+)))
20329
20330 (define-public python-jsonplus
20331 (package
20332 (name "python-jsonplus")
20333 (version "0.8.0")
20334 (home-page "https://github.com/randomir/jsonplus")
20335 (source (origin
20336 (method url-fetch)
20337 (uri (pypi-uri "jsonplus" version))
20338 (sha256
20339 (base32
20340 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20341 (build-system python-build-system)
20342 ;; XXX: No tests on PyPI, and the repository has no tags.
20343 (arguments '(#:tests? #f))
20344 (propagated-inputs
20345 `(("python-dateutil" ,python-dateutil)
20346 ("python-simplejson" ,python-simplejson)
20347 ("python-sortedcontainers" ,python-sortedcontainers)))
20348 (synopsis "Serialize Python types to/from JSON")
20349 (description
20350 "This package provides functionality to serialize arbitrary data types
20351 to and from JSON. Common data types are implemented and it is easy to
20352 register custom encoders and decoders.")
20353 (license license:expat)))
20354
20355 (define-public python-ujson
20356 (package
20357 (name "python-ujson")
20358 (version "2.0.3")
20359 (source
20360 (origin
20361 (method url-fetch)
20362 (uri (pypi-uri "ujson" version))
20363 (sha256
20364 (base32
20365 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20366 (modules '((guix build utils)))
20367 (snippet
20368 '(begin (delete-file-recursively "deps") #t))))
20369 (build-system python-build-system)
20370 (arguments
20371 `(#:phases
20372 (modify-phases %standard-phases
20373 (add-after 'unpack 'link-to-system-double-conversion
20374 (lambda* (#:key inputs #:allow-other-keys)
20375 (let ((d-c (assoc-ref inputs "double-conversion")))
20376 (substitute* "setup.py"
20377 (("./deps/double-conversion/double-conversion\"")
20378 (string-append d-c "/include/double-conversion\""))
20379 (("-lstdc++" stdc)
20380 (string-append "-L" d-c "/lib\","
20381 " \"-ldouble-conversion\","
20382 " \"" stdc)))
20383 #t)))
20384 (replace 'check
20385 (lambda* (#:key inputs outputs #:allow-other-keys)
20386 (add-installed-pythonpath inputs outputs)
20387 (invoke "pytest"))))))
20388 (native-inputs
20389 `(("double-conversion" ,double-conversion)
20390 ("python-setuptools-scm" ,python-setuptools-scm)
20391 ("python-pytest" ,python-pytest)))
20392 (home-page "https://github.com/ultrajson/ultrajson")
20393 (synopsis "Ultra fast JSON encoder and decoder for Python")
20394 (description
20395 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20396 bindings for Python 3.")
20397 (license license:bsd-3)))
20398
20399 (define-public python-ujson-1
20400 (package
20401 (inherit python-ujson)
20402 (version "1.35")
20403 (source
20404 (origin
20405 (method url-fetch)
20406 (uri (pypi-uri "ujson" version))
20407 (sha256
20408 (base32
20409 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20410 (arguments
20411 '(#:phases %standard-phases))
20412 (native-inputs '())
20413 (home-page "http://www.esn.me")
20414 (description
20415 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20416 bindings for Python 2.5+ and 3.")))
20417
20418 (define-public python2-ujson-1
20419 (package-with-python2 python-ujson-1))
20420
20421 (define-public python-iocapture
20422 ;; The latest release is more than a year older than this commit.
20423 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20424 (revision "1"))
20425 (package
20426 (name "python-iocapture")
20427 (version "0.1.2")
20428 (source
20429 (origin
20430 (method git-fetch)
20431 (uri (git-reference
20432 (url "https://github.com/oinume/iocapture")
20433 (commit commit)))
20434 (file-name (git-file-name name version))
20435 (sha256
20436 (base32
20437 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20438 (build-system python-build-system)
20439 (arguments
20440 `(#:phases
20441 (modify-phases %standard-phases
20442 (delete 'check)
20443 (add-after 'install 'check
20444 (lambda* (#:key inputs outputs #:allow-other-keys)
20445 (add-installed-pythonpath inputs outputs)
20446 (invoke "py.test" "-v" "tests")
20447 #t)))))
20448 (propagated-inputs
20449 `(("python-flexmock" ,python-flexmock)
20450 ("python-pytest" ,python-pytest)
20451 ("python-pytest-cov" ,python-pytest-cov)
20452 ("python-six" ,python-six)))
20453 (home-page "https://github.com/oinume/iocapture")
20454 (synopsis "Python capturing tool for stdout and stderr")
20455 (description
20456 "This package helps you to capture the standard out (stdout) and the
20457 standard error channel (stderr) in your program.")
20458 (license license:expat))))
20459
20460 (define-public python-argh
20461 ;; There are 21 commits since the latest release containing important
20462 ;; improvements.
20463 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20464 (revision "1"))
20465 (package
20466 (name "python-argh")
20467 (version (git-version "0.26.2" revision commit))
20468 (source
20469 (origin
20470 (method git-fetch)
20471 (uri (git-reference
20472 (url "https://github.com/neithere/argh")
20473 (commit commit)))
20474 (file-name (git-file-name name version))
20475 (sha256
20476 (base32
20477 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20478 (build-system python-build-system)
20479 (propagated-inputs
20480 `(("python-iocapture" ,python-iocapture)
20481 ("python-mock" ,python-mock)
20482 ("python-pytest" ,python-pytest)
20483 ("python-pytest-cov" ,python-pytest-cov)
20484 ("python-pytest-xdist" ,python-pytest-xdist)
20485 ("python-tox" ,python-tox)))
20486 (home-page "https://github.com/neithere/argh/")
20487 (synopsis "Argparse wrapper with natural syntax")
20488 (description
20489 "python-argh is a small library that provides several layers of
20490 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20491 always possible to declare a command with the highest possible (and least
20492 flexible) layer and then tune the behaviour with any of the lower layers
20493 including the native API of @code{python-argparse}.")
20494 (license license:lgpl3+))))
20495
20496 (define-public python-ppft
20497 (package
20498 (name "python-ppft")
20499 (version "1.6.6.1")
20500 (source
20501 (origin
20502 (method url-fetch)
20503 (uri (pypi-uri "ppft" version))
20504 (sha256
20505 (base32
20506 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20507 (build-system python-build-system)
20508 (arguments '(#:tests? #f)) ; there are none
20509 (propagated-inputs
20510 `(("python-six" ,python-six)))
20511 (home-page "https://pypi.org/project/ppft/")
20512 (synopsis "Fork of Parallel Python")
20513 (description
20514 "This package is a fork of Parallel Python. The Parallel Python
20515 module (@code{pp}) provides an easy and efficient way to create
20516 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20517 computers and clusters. It features cross-platform portability and dynamic
20518 load balancing.")
20519 (license license:bsd-3)))
20520
20521 (define-public python-pox
20522 (package
20523 (name "python-pox")
20524 (version "0.2.7")
20525 (source
20526 (origin
20527 (method url-fetch)
20528 (uri (pypi-uri "pox" version))
20529 (sha256
20530 (base32
20531 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20532 (build-system python-build-system)
20533 (arguments
20534 `(#:phases
20535 (modify-phases %standard-phases
20536 (replace 'check
20537 (lambda _
20538 (mkdir-p "/tmp/guix")
20539 (setenv "SHELL" "bash")
20540 (setenv "USERNAME" "guix")
20541 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20542 (invoke "py.test" "-vv")
20543 #t)))))
20544 (native-inputs
20545 `(("python-pytest" ,python-pytest)
20546 ("which" ,which)))
20547 (home-page "https://pypi.org/project/pox/")
20548 (synopsis "Python utilities for file system exploration and automated builds")
20549 (description
20550 "Pox provides a collection of utilities for navigating and manipulating
20551 file systems. This module is designed to facilitate some of the low-level
20552 operating system interactions that are useful when exploring a file system on a
20553 remote host. Pox provides Python equivalents of several shell commands such
20554 as @command{which} and @command{find}. These commands allow automated
20555 discovery of what has been installed on an operating system, and where the
20556 essential tools are located.")
20557 (license license:bsd-3)))
20558
20559 (define-public python-pathos
20560 (package
20561 (name "python-pathos")
20562 (version "0.2.5")
20563 (source
20564 (origin
20565 (method url-fetch)
20566 (uri (pypi-uri "pathos" version))
20567 (sha256
20568 (base32
20569 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20570 (build-system python-build-system)
20571 (arguments
20572 '(#:phases
20573 (modify-phases %standard-phases
20574 (replace 'check
20575 (lambda _
20576 (setenv "PYTHONPATH"
20577 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20578 (invoke "python" "./tests/__main__.py"))))))
20579 (propagated-inputs
20580 `(("python-dill" ,python-dill)
20581 ("python-multiprocess" ,python-multiprocess)
20582 ("python-pox" ,python-pox)
20583 ("python-ppft" ,python-ppft)))
20584 (native-inputs
20585 `(("python-pytest" ,python-pytest)))
20586 (home-page "https://pypi.org/project/pathos/")
20587 (synopsis
20588 "Parallel graph management and execution in heterogeneous computing")
20589 (description
20590 "Python-pathos is a framework for heterogeneous computing. It provides a
20591 consistent high-level interface for configuring and launching parallel
20592 computations across heterogeneous resources. Python-pathos provides configurable
20593 launchers for parallel and distributed computing, where each launcher contains
20594 the syntactic logic to configure and launch jobs in an execution environment.")
20595 (license license:bsd-3)))
20596
20597 (define-public python-flit
20598 (package
20599 (name "python-flit")
20600 (version "2.1.0")
20601 (source
20602 (origin
20603 (method url-fetch)
20604 (uri (pypi-uri "flit" version))
20605 (sha256
20606 (base32
20607 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20608 (build-system python-build-system)
20609 (arguments
20610 `(#:tests? #f)) ; XXX: Check requires network access.
20611 (home-page "https://flit.readthedocs.io/")
20612 (synopsis
20613 "Simple packaging tool for simple packages")
20614 (description
20615 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20616 packages a single importable module or package at a time, using the import
20617 name as the name on PyPI. All subpackages and data files within a package
20618 are included automatically.")
20619 (license license:bsd-3)))
20620
20621 (define-public python-pathtools
20622 (package
20623 (name "python-pathtools")
20624 (version "0.1.2")
20625 (source
20626 (origin
20627 (method url-fetch)
20628 (uri (pypi-uri "pathtools" version))
20629 (sha256
20630 (base32
20631 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20632 (build-system python-build-system)
20633 (home-page
20634 "https://github.com/gorakhargosh/pathtools")
20635 (synopsis "Path utilities for Python")
20636 (description "Pattern matching and various utilities for file systems
20637 paths.")
20638 (license license:expat)))
20639
20640 (define-public python-fastentrypoints
20641 (package
20642 (name "python-fastentrypoints")
20643 (version "0.12")
20644 (source
20645 (origin
20646 (method url-fetch)
20647 (uri (pypi-uri "fastentrypoints" version))
20648 (sha256
20649 (base32
20650 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20651 (build-system python-build-system)
20652 (home-page
20653 "https://github.com/ninjaaron/fast-entry_points")
20654 (synopsis
20655 "Makes entry_points specified in setup.py load more quickly")
20656 (description
20657 "Using entry_points in your setup.py makes scripts that start really
20658 slowly because it imports pkg_resources. This package allows such setup
20659 scripts to load entry points more quickly.")
20660 (license license:bsd-3)))
20661
20662 (define-public python-funcparserlib
20663 (package
20664 (name "python-funcparserlib")
20665 (version "0.3.6")
20666 (source
20667 (origin
20668 (method url-fetch)
20669 (uri (pypi-uri "funcparserlib" version))
20670 (sha256
20671 (base32
20672 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20673 (native-inputs
20674 `(("python-tox" ,python-tox)))
20675 (arguments
20676 `(#:phases
20677 (modify-phases %standard-phases
20678 (replace 'check
20679 (lambda _
20680 (invoke "tox"))))))
20681 (build-system python-build-system)
20682 (home-page
20683 "https://github.com/vlasovskikh/funcparserlib")
20684 (synopsis
20685 "Recursive descent parsing library based on functional combinators")
20686 (description
20687 "This package is a recursive descent parsing library for Python based on
20688 functional combinators. Parser combinators are just higher-order functions
20689 that take parsers as their arguments and return them as result values.")
20690 (license license:expat)))
20691
20692 (define-public python-speg
20693 (package
20694 (name "python-speg")
20695 (version "0.3")
20696 (source
20697 (origin
20698 (method url-fetch)
20699 (uri (pypi-uri "speg" version ".zip"))
20700 (sha256
20701 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20702 (arguments
20703 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20704 (native-inputs
20705 `(("unzip" ,unzip)))
20706 (build-system python-build-system)
20707 (home-page "https://github.com/avakar/speg")
20708 (synopsis "PEG-based parser interpreter with memoization")
20709 (description "This package is a PEG-based parser and interpreter with
20710 memoization.")
20711 (license license:expat)))
20712
20713 (define-public python-cson
20714 (package
20715 (name "python-cson")
20716 (version "0.8")
20717 (source
20718 (origin
20719 (method url-fetch)
20720 (uri (pypi-uri "cson" version))
20721 (sha256
20722 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20723 (build-system python-build-system)
20724 (propagated-inputs
20725 `(("python-speg" ,python-speg)))
20726 (home-page "https://github.com/avakar/pycson")
20727 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20728 (description "This package is a parser for Coffeescript Object
20729 Notation (CSON).")
20730 (license license:expat)))
20731
20732 (define-public python-asynctest
20733 (package
20734 (name "python-asynctest")
20735 (version "0.13.0")
20736 (source
20737 (origin
20738 (method url-fetch)
20739 (uri (pypi-uri "asynctest" version))
20740 (sha256
20741 (base32
20742 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20743 (build-system python-build-system)
20744 (arguments
20745 '(#:phases
20746 (modify-phases %standard-phases
20747 (replace 'check
20748 (lambda _
20749 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20750 (add-after 'unpack 'disable-tests
20751 (lambda* _
20752 ;; XXX: 7 tests fail out of 220. Disable them for now.
20753 (substitute* (list "test/test_selector.py"
20754 "test/test_mock.py")
20755 (("def test_events_watched_outside_test_are_ignored")
20756 "@unittest.skip('disabled by guix')
20757 def test_events_watched_outside_test_are_ignored")
20758 (("def test_awaited_from_autospec_mock.*" line)
20759 (string-append line " return True\n"))
20760 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20761 (string-append line " return True\n"))
20762 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20763 (string-append line " return True\n"))
20764 (("def test_multiple_patches_on_coroutine.*" line)
20765 (string-append line " return True\n"))
20766 (("def test_patch_coroutine_only_when_running.*" line)
20767 (string-append line " return True\n")))
20768 #t)))))
20769 (home-page "https://github.com/Martiusweb/asynctest")
20770 (synopsis "Extension of unittest for testing asyncio libraries")
20771 (description
20772 "The package asynctest is built on top of the standard unittest module
20773 and cuts down boilerplate code when testing libraries for asyncio.")
20774 (license license:asl2.0)))
20775
20776 (define-public python-aionotify
20777 (package
20778 (name "python-aionotify")
20779 (version "0.2.0")
20780 (source
20781 (origin
20782 ;; Source tarball on PyPi lacks tests
20783 (method git-fetch)
20784 (uri (git-reference
20785 (url "https://github.com/rbarrois/aionotify")
20786 (commit (string-append "v" version))))
20787 (file-name (git-file-name name version))
20788 (sha256
20789 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20790 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20791 (build-system python-build-system)
20792 (home-page "https://github.com/rbarrois/aionotify")
20793 (synopsis "Asyncio-powered inotify library")
20794 (description
20795 "@code{aionotify} is a simple, asyncio-based inotify library.")
20796 (license license:bsd-3)))
20797
20798 (define-public python-forbiddenfruit
20799 (package
20800 (name "python-forbiddenfruit")
20801 (version "0.1.3")
20802 (source
20803 (origin
20804 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20805 (method git-fetch)
20806 (uri (git-reference
20807 (url "https://github.com/clarete/forbiddenfruit")
20808 (commit version)))
20809 (file-name (git-file-name name version))
20810 (sha256
20811 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20812 (build-system python-build-system)
20813 (arguments
20814 '(#:phases
20815 (modify-phases %standard-phases
20816 (replace 'check
20817 (lambda _
20818 (invoke "make" "SKIP_DEPS=1"))))))
20819 (native-inputs
20820 `(("python-nose" ,python-nose)
20821 ("python-coverage" ,python-coverage)))
20822 (home-page "https://github.com/clarete/forbiddenfruit")
20823 (synopsis "Patch python built-in objects")
20824 (description "This project allows Python code to extend built-in types.")
20825 (license (list license:gpl3+ license:expat))))
20826
20827 (define-public python-shouldbe
20828 (package
20829 (name "python-shouldbe")
20830 (version "0.1.2")
20831 (source
20832 (origin
20833 (method url-fetch)
20834 (uri (pypi-uri "shouldbe" version))
20835 (sha256
20836 (base32
20837 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20838 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20839 (build-system python-build-system)
20840 (propagated-inputs
20841 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20842 (native-inputs
20843 `(("python-nose" ,python-nose)))
20844 (home-page "https://github.com/directxman12/should_be")
20845 (synopsis "Python Assertion Helpers inspired by Shouldly")
20846 (description
20847 "Python Assertion Helpers inspired by Shouldly.")
20848 (license license:isc)))
20849
20850 (define-public python-k5test
20851 (package
20852 (name "python-k5test")
20853 (version "0.9.2")
20854 (source
20855 (origin
20856 (method url-fetch)
20857 (uri (pypi-uri "k5test" version))
20858 (sha256
20859 (base32
20860 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20861 (build-system python-build-system)
20862 (propagated-inputs
20863 `(("python-six" ,python-six)
20864 ;; `which`, `kadmin.local` binaries called inside library
20865 ("which" ,which)
20866 ("mit-krb5" ,mit-krb5)))
20867 (native-inputs `(("mit-krb5" ,mit-krb5)))
20868 (arguments
20869 '(#:phases
20870 (modify-phases %standard-phases
20871 (add-after 'unpack 'patch-paths
20872 (lambda* _
20873 (substitute* "k5test/realm.py"
20874 (("'kadmin_local'") "'kadmin.local'")))))))
20875 (home-page "https://github.com/pythongssapi/k5test")
20876 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20877 (description
20878 "@code{k5test} is a library for setting up self-contained Kerberos 5
20879 environments, and running Python unit tests inside those environments. It is
20880 based on the file of the same name found alongside the MIT Kerberos 5 unit
20881 tests.")
20882 (license license:isc)))
20883
20884 (define-public python-gssapi
20885 (package
20886 (name "python-gssapi")
20887 (version "1.6.9")
20888 (source
20889 (origin
20890 (method url-fetch)
20891 (uri (pypi-uri "gssapi" version))
20892 (sha256
20893 (base32
20894 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
20895 (build-system python-build-system)
20896 (arguments
20897 `(#:phases
20898 (modify-phases %standard-phases
20899 ;; Work around
20900 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
20901 (add-before 'check 'disable-failing-tests
20902 (lambda _
20903 (let ((reason "Disabled failing test (see: \
20904 https://github.com/pythongssapi/python-gssapi/issues/220)."))
20905 (substitute* "gssapi/tests/test_high_level.py"
20906 ((".*def test_add_with_impersonate.*" all)
20907 (string-append all " self.skipTest('" reason "')\n")))
20908 (substitute* "gssapi/tests/test_raw.py"
20909 ((".*def test_.*impersonate_name.*" all)
20910 (string-append all " self.skipTest('" reason "')\n")))
20911 #t))))))
20912 (propagated-inputs
20913 `(("python-decorator" ,python-decorator)
20914 ("python-six" ,python-six)))
20915 (inputs
20916 `(("mit-krb5" ,mit-krb5)))
20917 ;; for tests
20918 (native-inputs
20919 `(("python-shouldbe" ,python-shouldbe)
20920 ("python-parameterized" ,python-parameterized)
20921 ("python-k5test" ,python-k5test)
20922 ("python-nose" ,python-nose)))
20923 (home-page "https://github.com/pythongssapi/python-gssapi")
20924 (synopsis "Python GSSAPI Wrapper")
20925 (description
20926 "Python-GSSAPI provides both low-level and high level wrappers around the
20927 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20928 also be usable with other GSSAPI mechanisms.")
20929 (license license:isc)))
20930
20931 (define-public python-check-manifest
20932 (package
20933 (name "python-check-manifest")
20934 (version "0.37")
20935 (source
20936 (origin
20937 (method url-fetch)
20938 (uri (pypi-uri "check-manifest" version))
20939 (sha256
20940 (base32
20941 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20942 (build-system python-build-system)
20943 (native-inputs
20944 `(("python-mock" ,python-mock)
20945 ("git" ,git)))
20946 (home-page "https://github.com/mgedmin/check-manifest")
20947 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20948 (description "Python package can include a MANIFEST.in file to help with
20949 sending package files to the Python Package Index. This package checks that
20950 file to ensure it completely and accurately describes your project.")
20951 (license license:expat)))
20952
20953 (define-public python-android-stringslib
20954 (package
20955 (name "python-android-stringslib")
20956 (version "0.1.2")
20957 (source
20958 (origin
20959 (method git-fetch)
20960 (uri (git-reference
20961 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20962 (commit (string-append "v" version))))
20963 (file-name (git-file-name name version))
20964 (sha256
20965 (base32
20966 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20967 (build-system python-build-system)
20968 (arguments
20969 `(#:tests? #f))
20970 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20971 (synopsis "Android strings.xml support")
20972 (description "Android Strings Lib provides support for android's strings.xml
20973 files. These files are used to translate strings in android apps.")
20974 (license license:expat)))
20975
20976 (define-public python-watchdog
20977 (package
20978 (name "python-watchdog")
20979 (version "0.9.0")
20980 (source
20981 (origin
20982 (method url-fetch)
20983 (uri (pypi-uri "watchdog" version))
20984 (sha256
20985 (base32
20986 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20987 (build-system python-build-system)
20988 (arguments
20989 `(#:phases
20990 (modify-phases %standard-phases
20991 (add-before 'check 'remove-failing
20992 (lambda _
20993 (delete-file "tests/test_inotify_buffer.py")
20994 (delete-file "tests/test_snapshot_diff.py")
20995 #t)))))
20996 (propagated-inputs
20997 `(("python-argh" ,python-argh)
20998 ("python-pathtools" ,python-pathtools)
20999 ("python-pyyaml" ,python-pyyaml)))
21000 (native-inputs
21001 `(("python-pytest-cov" ,python-pytest-cov)
21002 ("python-pytest-timeout" ,python-pytest-timeout)))
21003 (home-page "https://github.com/gorakhargosh/watchdog")
21004 (synopsis "File system events monitoring")
21005 (description "This package provides a way to monitor file system events
21006 such as a file modification and trigger an action. This is similar to inotify,
21007 but portable.")
21008 (license license:asl2.0)))
21009
21010 (define-public python-watchgod
21011 (package
21012 (name "python-watchgod")
21013 (version "0.6")
21014 (source
21015 (origin
21016 ;; There are no tests in the PyPI tarball.
21017 (method git-fetch)
21018 (uri (git-reference
21019 (url "https://github.com/samuelcolvin/watchgod")
21020 (commit (string-append "v" version))))
21021 (file-name (git-file-name name version))
21022 (sha256
21023 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21024 (build-system python-build-system)
21025 (arguments
21026 `(#:phases
21027 (modify-phases %standard-phases
21028 (replace 'check
21029 (lambda _
21030 (invoke "pytest" "-vv"))))))
21031 (native-inputs
21032 `(("python-coverage" ,python-coverage)
21033 ("python-docutils" ,python-docutils)
21034 ("python-flake8" ,python-flake8)
21035 ("python-isort" ,python-isort)
21036 ("python-pycodestyle" ,python-pycodestyle)
21037 ("python-pyflakes" ,python-pyflakes)
21038 ("python-pygments" ,python-pygments)
21039 ("python-pytest" ,python-pytest)
21040 ("python-pytest-cov" ,python-pytest-cov)
21041 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21042 ("python-pytest-mock" ,python-pytest-mock)
21043 ("python-pytest-sugar" ,python-pytest-sugar)
21044 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21045 (home-page "https://github.com/samuelcolvin/watchgod")
21046 (synopsis "Simple, modern file watching and code reload in Python")
21047 (description
21048 "Simple, modern file watching and code reload in Python inspired by
21049 @code{watchdog}. Among the differences are a unified approach for each
21050 operating systems and an elegant approach to concurrency using threading.")
21051 (license license:expat)))
21052
21053 (define-public python-wget
21054 (package
21055 (name "python-wget")
21056 (version "3.2")
21057 (source
21058 (origin
21059 (method url-fetch)
21060 (uri (pypi-uri "wget" version ".zip"))
21061 (sha256
21062 (base32
21063 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21064 (build-system python-build-system)
21065 (native-inputs `(("unzip" ,unzip)))
21066 (home-page "https://bitbucket.org/techtonik/python-wget/")
21067 (synopsis "Pure Python download utility")
21068 (description "The python-wget library provides an API to download files
21069 with features similar to the @command{wget} utility.")
21070 (license license:unlicense)))
21071
21072 (define-public offlate
21073 (package
21074 (name "offlate")
21075 (version "0.5")
21076 (source
21077 (origin
21078 (method git-fetch)
21079 (uri (git-reference
21080 (url "https://framagit.org/tyreunom/offlate")
21081 (commit version)))
21082 (file-name (git-file-name name version))
21083 (sha256
21084 (base32
21085 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21086 (build-system python-build-system)
21087 (arguments
21088 ;; No tests
21089 `(#:tests? #f))
21090 (propagated-inputs
21091 `(("python-android-stringslib" ,python-android-stringslib)
21092 ("python-dateutil" ,python-dateutil)
21093 ("python-gitlab" ,python-gitlab)
21094 ("python-lxml" ,python-lxml)
21095 ("python-polib" ,python-polib)
21096 ("python-pyenchant" ,python-pyenchant)
21097 ("python-pygit2" ,python-pygit2)
21098 ("python-pygithub" ,python-pygithub)
21099 ("python-pyqt" ,python-pyqt)
21100 ("python-requests" ,python-requests)
21101 ("python-ruamel.yaml" ,python-ruamel.yaml)
21102 ("python-translation-finder" ,python-translation-finder)
21103 ("python-watchdog" ,python-watchdog)))
21104 (native-inputs
21105 `(("qttools" ,qttools)))
21106 (home-page "https://framagit.org/tyreunom/offlate")
21107 (synopsis "Offline translation interface for online translation tools")
21108 (description "Offlate offers a unified interface for different translation
21109 file formats, as well as many different online translation platforms. You can
21110 use it to get work from online platforms, specialized such as the Translation
21111 Project, or not such a gitlab instance when your upstream doesn't use any
21112 dedicated platform. The tool proposes a unified interface for any format and
21113 an upload option to send your work back to the platform.")
21114 (license license:gpl3+)))
21115
21116 (define-public python-titlecase
21117 (package
21118 (name "python-titlecase")
21119 (version "0.12.0")
21120 (source
21121 (origin
21122 (method url-fetch)
21123 (uri (pypi-uri "titlecase" version))
21124 (sha256
21125 (base32
21126 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21127 (build-system python-build-system)
21128 (native-inputs
21129 `(("python-nose" ,python-nose)))
21130 (home-page "https://github.com/ppannuto/python-titlecase")
21131 (synopsis "Capitalize strings similar to book titles")
21132 (description
21133 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21134 It capitalizes (predominantly English) strings in a way that is similar to
21135 book titles, using the New York Times Manual of Style to leave certain words
21136 lowercase.")
21137 (license license:expat)))
21138
21139 (define-public python-pypng
21140 (package
21141 (name "python-pypng")
21142 (version "0.0.20")
21143 (source
21144 (origin
21145 (method url-fetch)
21146 (uri (pypi-uri "pypng" version))
21147 (sha256
21148 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21149 (build-system python-build-system)
21150 (home-page "https://github.com/drj11/pypng")
21151 (synopsis "Pure Python PNG image encoder/decoder")
21152 (description
21153 "The PyPNG module implements support for PNG images. It reads and writes
21154 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21155 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21156 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21157 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21158 A number of optional chunks can be specified (when writing) and
21159 understood (when reading): tRNS, bKGD, gAMA.
21160
21161 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21162 aim at being a replacement or competitor. Its strength lies in fine-grained
21163 extensive support of PNG features. It can also read and write Netpbm PAM
21164 files, with a focus on its use as an intermediate format for implementing
21165 custom PNG processing.")
21166 (license license:expat)))
21167
21168 (define-public python-fuzzywuzzy
21169 (package
21170 (name "python-fuzzywuzzy")
21171 (version "0.18.0")
21172 (source
21173 (origin
21174 (method url-fetch)
21175 (uri (pypi-uri "fuzzywuzzy" version))
21176 (sha256
21177 (base32
21178 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21179 (build-system python-build-system)
21180 (native-inputs
21181 `(("python-hypothesis" ,python-hypothesis)
21182 ("python-pycodestyle" ,python-pycodestyle)
21183 ("python-pytest" ,python-pytest)))
21184 (propagated-inputs
21185 `(("python-levenshtein" ,python-levenshtein)))
21186 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21187 (synopsis "Fuzzy string matching in Python")
21188 (description "Approximate string matching using
21189 @emph{Levenshtein Distance} to calculate the differences between
21190 sequences.")
21191 (license license:gpl2)))
21192
21193 (define-public python2-fuzzywuzzy
21194 (package-with-python2 python-fuzzywuzzy))
21195
21196 (define-public python-block-tracing
21197 (package
21198 (name "python-block-tracing")
21199 (version "1.0.1")
21200 (source
21201 (origin
21202 (method url-fetch)
21203 (uri (pypi-uri "block_tracing" version))
21204 (sha256
21205 (base32
21206 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21207 (build-system python-build-system)
21208 (arguments '(#:tests? #f)) ; no tests
21209 (home-page "https://github.com/rianhunter/block_tracing")
21210 (synopsis "Protect process memory")
21211 (description
21212 "@code{block_tracing} is a tiny Python library that can be used to
21213 prevent debuggers and other applications from inspecting the memory within
21214 your process.")
21215 (license license:expat)))
21216
21217 (define-public python-gcovr
21218 (package
21219 (name "python-gcovr")
21220 (version "4.2")
21221 (source
21222 (origin
21223 (method url-fetch)
21224 (uri (pypi-uri "gcovr" version))
21225 (sha256
21226 (base32
21227 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21228 (build-system python-build-system)
21229 (propagated-inputs
21230 `(("python-lxml" ,python-lxml)
21231 ("python-jinja2" ,python-jinja2)))
21232 (home-page "https://gcovr.com/")
21233 (synopsis "Utility for generating code coverage results")
21234 (description
21235 "Gcovr provides a utility for managing the use of the GNU gcov
21236 utility and generating summarized code coverage results. It is inspired
21237 by the Python coverage.py package, which provides a similar utility for
21238 Python.")
21239 (license license:bsd-3)))
21240
21241 (define-public python-owslib
21242 (package
21243 (name "python-owslib")
21244 (version "0.19.2")
21245 (source
21246 (origin
21247 (method url-fetch)
21248 (uri (pypi-uri "OWSLib" version))
21249 (sha256
21250 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21251 (build-system python-build-system)
21252 (arguments
21253 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21254 (synopsis "Interface for Open Geospatial Consortium web service")
21255 (description
21256 "OWSLib is a Python package for client programming with Open Geospatial
21257 Consortium (OGC) web service (hence OWS) interface standards, and their related
21258 content models.")
21259 (home-page "https://geopython.github.io/OWSLib/")
21260 (license license:bsd-3)))
21261
21262 (define-public python-docusign-esign
21263 (package
21264 (name "python-docusign-esign")
21265 (version "3.1.0")
21266 (source (origin
21267 (method url-fetch)
21268 (uri (pypi-uri "docusign_esign" version))
21269 (sha256
21270 (base32
21271 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21272 (build-system python-build-system)
21273 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21274 (arguments `(#:tests? #f))
21275 (propagated-inputs
21276 `(("python-certifi" ,python-certifi)
21277 ("python-six" ,python-six)
21278 ("python-dateutil" ,python-dateutil)
21279 ("python-urllib3" ,python-urllib3)
21280 ("python-pyjwt" ,python-pyjwt)
21281 ("python-cryptography" ,python-cryptography)
21282 ("python-nose" ,python-nose)))
21283 (synopsis "DocuSign Python Client")
21284 (description "The Official DocuSign Python Client Library used to interact
21285 with the eSign REST API. Send, sign, and approve documents using this client.")
21286 (home-page "https://www.docusign.com/devcenter")
21287 (license license:expat)))
21288
21289 (define-public python-xattr
21290 (package
21291 (name "python-xattr")
21292 (version "0.9.7")
21293 (source
21294 (origin
21295 (method url-fetch)
21296 (uri (pypi-uri "xattr" version))
21297 (sha256
21298 (base32
21299 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21300 (build-system python-build-system)
21301 (propagated-inputs
21302 `(("python-cffi" ,python-cffi)))
21303 (home-page "https://github.com/xattr/xattr")
21304 (synopsis
21305 "Python wrapper for extended file system attributes")
21306 (description "This package provides a Python wrapper for using extended
21307 file system attributes. Extended attributes extend the basic attributes of files
21308 and directories in the file system. They are stored as name:data pairs
21309 associated with file system objects (files, directories, symlinks, etc).")
21310 (license license:expat)))
21311
21312 (define-public python-json-logger
21313 (package
21314 (name "python-json-logger")
21315 (version "0.1.11")
21316 (source
21317 (origin
21318 (method url-fetch)
21319 (uri (pypi-uri "python-json-logger" version))
21320 (sha256
21321 (base32
21322 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21323 (build-system python-build-system)
21324 (home-page
21325 "https://github.com/madzak/python-json-logger")
21326 (synopsis "JSON log formatter in Python")
21327 (description "This library allows standard Python logging to output log data
21328 as JSON objects. With JSON we can make our logs more readable by machines and
21329 we can stop writing custom parsers for syslog-type records.")
21330 (license license:bsd-3)))
21331
21332 (define-public python-daiquiri
21333 (package
21334 (name "python-daiquiri")
21335 (version "2.1.1")
21336 (source
21337 (origin
21338 (method url-fetch)
21339 (uri (pypi-uri "daiquiri" version))
21340 (sha256
21341 (base32
21342 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21343 (build-system python-build-system)
21344 (propagated-inputs
21345 `(("python-json-logger" ,python-json-logger)))
21346 (native-inputs
21347 `(("python-mock" ,python-mock)
21348 ("python-pytest" ,python-pytest)
21349 ("python-setuptools-scm" ,python-setuptools-scm)
21350 ("python-six" ,python-six)))
21351 (home-page "https://github.com/jd/daiquiri")
21352 (synopsis
21353 "Library to configure Python logging easily")
21354 (description "The daiquiri library provides an easy way to configure
21355 logging in Python. It also provides some custom formatters and handlers.")
21356 (license license:asl2.0)))
21357
21358 (define-public python-pifpaf
21359 (package
21360 (name "python-pifpaf")
21361 (version "2.5.0")
21362 (source
21363 (origin
21364 (method url-fetch)
21365 (uri (pypi-uri "pifpaf" version))
21366 (sha256
21367 (base32
21368 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21369 (build-system python-build-system)
21370 (arguments
21371 '(#:phases
21372 (modify-phases %standard-phases
21373 (replace 'check
21374 (lambda _
21375 (invoke "python" "setup.py" "testr" "--slowest"
21376 "--testr-args=until-failure"))))))
21377 (propagated-inputs
21378 `(("python-click" ,python-click)
21379 ("python-daiquiri" ,python-daiquiri)
21380 ("python-fixtures" ,python-fixtures)
21381 ("python-jinja2" ,python-jinja2)
21382 ("python-pbr" ,python-pbr)
21383 ("python-psutil" ,python-psutil)
21384 ("python-six" ,python-six)
21385 ("python-xattr" ,python-xattr)))
21386 (native-inputs
21387 `(("python-mock" ,python-mock)
21388 ("python-os-testr" ,python-os-testr)
21389 ("python-requests" ,python-requests)
21390 ("python-testrepository" ,python-testrepository)
21391 ("python-testtools" ,python-testtools)))
21392 (home-page "https://github.com/jd/pifpaf")
21393 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21394 (description "Pifpaf is a suite of fixtures and a command-line tool that
21395 starts and stops daemons for a quick throw-away usage. This is typically
21396 useful when needing these daemons to run integration testing. It originally
21397 evolved from its precursor @code{overtest}.")
21398 (license license:asl2.0)))
21399
21400 (define-public python-pytest-check-links
21401 (package
21402 (name "python-pytest-check-links")
21403 (version "0.3.0")
21404 (source
21405 (origin
21406 (method url-fetch)
21407 ;; URI uses underscores
21408 (uri (pypi-uri "pytest_check_links" version))
21409 (sha256
21410 (base32
21411 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21412 (build-system python-build-system)
21413 (propagated-inputs
21414 `(("python-docutils" ,python-docutils)
21415 ("python-html5lib" ,python-html5lib)
21416 ("python-nbconvert" ,python-nbconvert)
21417 ("python-nbformat" ,python-nbformat)
21418 ("python-pytest" ,python-pytest)
21419 ("python-six" ,python-six)))
21420 (native-inputs
21421 `(("python-pbr-minimal" ,python-pbr-minimal)))
21422 (home-page "https://github.com/minrk/pytest-check-links")
21423 (synopsis "Check links in files")
21424 (description "This package provides a pytest plugin that checks URLs for
21425 HTML-containing files.")
21426 (license license:bsd-3)))
21427
21428 (define-public python-json5
21429 (package
21430 (name "python-json5")
21431 (version "0.8.5")
21432 (source
21433 (origin
21434 ;; sample.json5 is missing from PyPi source tarball
21435 (method git-fetch)
21436 (uri (git-reference
21437 (url "https://github.com/dpranke/pyjson5")
21438 (commit (string-append "v" version))))
21439 (file-name (git-file-name name version))
21440 (sha256
21441 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21442 (build-system python-build-system)
21443 (home-page "https://github.com/dpranke/pyjson5")
21444 (synopsis
21445 "Python implementation of the JSON5 data format")
21446 (description
21447 "JSON5 extends the JSON data interchange format to make it slightly more
21448 usable as a configuration language. This Python package implements parsing and
21449 dumping of JSON5 data structures.")
21450 (license license:asl2.0)))
21451
21452 (define-public python-frozendict
21453 (package
21454 (name "python-frozendict")
21455 (version "1.2")
21456 (source
21457 (origin
21458 (method url-fetch)
21459 (uri (pypi-uri "frozendict" version))
21460 (sha256
21461 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21462 (build-system python-build-system)
21463 (home-page "https://github.com/slezica/python-frozendict")
21464 (synopsis "Simple immutable mapping for Python")
21465 (description
21466 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21467 implements the complete mapping interface. It can be used as a drop-in
21468 replacement for dictionaries where immutability is desired.")
21469 (license license:expat)))
21470
21471 (define-public python-unpaddedbase64
21472 (package
21473 (name "python-unpaddedbase64")
21474 (version "1.1.0")
21475 (source
21476 (origin
21477 (method git-fetch)
21478 (uri (git-reference
21479 (url "https://github.com/matrix-org/python-unpaddedbase64")
21480 (commit (string-append "v" version))))
21481 (file-name (git-file-name name version))
21482 (sha256
21483 (base32
21484 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21485 (build-system python-build-system)
21486 (home-page "https://pypi.org/project/unpaddedbase64/")
21487 (synopsis "Encode and decode Base64 without “=” padding")
21488 (description
21489 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21490 using “=” characters. However this conveys no benefit so many protocols
21491 choose to use Base64 without the “=” padding.")
21492 (license license:asl2.0)))
21493
21494 (define-public python-py-cpuinfo
21495 (package
21496 (name "python-py-cpuinfo")
21497 (version "5.0.0")
21498 (source
21499 (origin
21500 (method url-fetch)
21501 (uri (pypi-uri "py-cpuinfo" version))
21502 (sha256
21503 (base32
21504 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21505 (build-system python-build-system)
21506 (home-page "https://github.com/workhorsy/py-cpuinfo")
21507 (synopsis "Get CPU info with Python")
21508 (description
21509 "This Python module returns the CPU info by using the best sources of
21510 information for your operating system.")
21511 (license license:expat)))
21512
21513 (define-public python-canonicaljson
21514 (package
21515 (name "python-canonicaljson")
21516 (version "1.4.0")
21517 (source
21518 (origin
21519 (method url-fetch)
21520 (uri (pypi-uri "canonicaljson" version))
21521 (sha256
21522 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21523 (build-system python-build-system)
21524 (propagated-inputs
21525 `(("python-six" ,python-six)
21526 ("python-frozendict" ,python-frozendict)
21527 ("python-simplejson" ,python-simplejson)))
21528 (home-page "https://github.com/matrix-org/python-canonicaljson")
21529 (synopsis "Canonical JSON")
21530 (description
21531 "Deterministically encode JSON.
21532
21533 @itemize
21534 @item Encodes objects and arrays as RFC 7159 JSON.
21535 @item Sorts object keys so that you get the same result each time.
21536 @item Has no insignificant whitespace to make the output as small as possible.
21537 @item Escapes only the characters that must be escaped, U+0000 to
21538 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21539 @item Uses the shortest escape sequence for each escaped character.
21540 @item Encodes the JSON as UTF-8.
21541 @item Can encode frozendict immutable dictionaries.
21542 @end itemize")
21543 (license license:asl2.0)))
21544
21545 (define-public python-signedjson
21546 (package
21547 (name "python-signedjson")
21548 (version "1.1.1")
21549 (source
21550 (origin
21551 (method url-fetch)
21552 (uri (pypi-uri "signedjson" version))
21553 (sha256
21554 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21555 (build-system python-build-system)
21556 (propagated-inputs
21557 `(("python-canonicaljson" ,python-canonicaljson)
21558 ("python-importlib-metadata" ,python-importlib-metadata)
21559 ("python-pynacl" ,python-pynacl)
21560 ("python-typing-extensions" ,python-typing-extensions)
21561 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21562 (native-inputs
21563 `(("python-setuptools-scm" ,python-setuptools-scm)))
21564 (home-page "https://github.com/matrix-org/python-signedjson")
21565 (synopsis "Sign JSON objects with ED25519 signatures")
21566 (description
21567 "Sign JSON objects with ED25519 signatures.
21568
21569 @itemize
21570 @item More than one entity can sign the same object.
21571 @item Each entity can sign the object with more than one key making it easier to
21572 rotate keys
21573 @item ED25519 can be replaced with a different algorithm.
21574 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21575 key.
21576 @end itemize")
21577 (license license:asl2.0)))
21578
21579 (define-public python-daemonize
21580 (package
21581 (name "python-daemonize")
21582 (version "2.5.0")
21583 (source
21584 (origin
21585 (method url-fetch)
21586 (uri (pypi-uri "daemonize" version))
21587 (sha256
21588 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21589 (build-system python-build-system)
21590 (home-page "https://github.com/thesharp/daemonize")
21591 (synopsis "Library for writing system daemons in Python")
21592 (description "Daemonize is a library for writing system daemons in Python.")
21593 (license license:expat)))
21594
21595 (define-public python-pymacaroons
21596 (package
21597 (name "python-pymacaroons")
21598 (version "0.13.0")
21599 (source
21600 (origin
21601 (method url-fetch)
21602 (uri (pypi-uri "pymacaroons" version))
21603 (sha256
21604 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21605 (build-system python-build-system)
21606 (propagated-inputs
21607 `(("python-six" ,python-six)
21608 ("python-pynacl" ,python-pynacl)))
21609 (home-page "https://github.com/ecordell/pymacaroons")
21610 (synopsis "Python Macaroon Library")
21611 (description
21612 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21613 tokens, macaroons embed caveats that define specific authorization
21614 requirements for the target service, the service that issued the root macaroon
21615 and which is capable of verifying the integrity of macaroons it receives.
21616
21617 Macaroons allow for delegation and attenuation of authorization. They are
21618 simple and fast to verify, and decouple authorization policy from the
21619 enforcement of that policy.")
21620 (license license:expat)))
21621
21622 (define-public python-ldap3
21623 (package
21624 (name "python-ldap3")
21625 (version "2.7")
21626 (home-page "https://github.com/cannatag/ldap3")
21627 (source
21628 (origin
21629 (method git-fetch)
21630 (uri (git-reference (url home-page)
21631 (commit (string-append "v" version))))
21632 (file-name (git-file-name name version))
21633 (sha256
21634 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21635 (build-system python-build-system)
21636 (arguments
21637 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21638 #:phases (modify-phases %standard-phases
21639 (replace 'check
21640 (lambda* (#:key tests? #:allow-other-keys)
21641 (when tests?
21642 (invoke "nosetests" "-s" "test"))
21643 #t)))))
21644 (native-inputs
21645 `(("python-nose" ,python-nose)))
21646 (propagated-inputs
21647 `(("python-gssapi" ,python-gssapi)
21648 ("python-pyasn1" ,python-pyasn1)))
21649 (synopsis "Python LDAP client")
21650 (description
21651 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21652 library.")
21653 (license license:lgpl3+)))
21654
21655 (define-public python-boltons
21656 (package
21657 (name "python-boltons")
21658 (version "20.0.0")
21659 (source
21660 (origin
21661 (method url-fetch)
21662 (uri (pypi-uri "boltons" version))
21663 (sha256
21664 (base32
21665 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21666 (build-system python-build-system)
21667 (home-page "https://github.com/mahmoud/boltons")
21668 (synopsis "Extensions to the Python standard library")
21669 (description
21670 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21671 as — and yet conspicuously missing from — the standard library, including:
21672
21673 @itemize
21674 @item Atomic file saving, bolted on with fileutils
21675 @item A highly-optimized OrderedMultiDict, in dictutils
21676 @item Two types of PriorityQueue, in queueutils
21677 @item Chunked and windowed iteration, in iterutils
21678 @item Recursive data structure iteration and merging, with iterutils.remap
21679 @item Exponential backoff functionality, including jitter, through
21680 iterutils.backoff
21681 @item A full-featured TracebackInfo type, for representing stack traces, in
21682 tbutils
21683 @end itemize")
21684 (license license:bsd-3)))
21685
21686 (define-public python-eliot
21687 (package
21688 (name "python-eliot")
21689 (version "1.12.0")
21690 (source
21691 (origin
21692 (method url-fetch)
21693 (uri (pypi-uri "eliot" version))
21694 (sha256
21695 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21696 (build-system python-build-system)
21697 (arguments
21698 `(#:phases
21699 (modify-phases %standard-phases
21700 (add-after 'unpack 'remove-journald-support
21701 (lambda _
21702 (for-each delete-file
21703 '("eliot/tests/test_journald.py"
21704 "eliot/journald.py"))
21705 #t))
21706 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21707 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21708 ;; be installed and these tests should pass.
21709 (lambda _
21710 (delete-file "eliot/tests/test_prettyprint.py")
21711 #t)))))
21712 (propagated-inputs
21713 `(("python-boltons" ,python-boltons)
21714 ("python-pyrsistent" ,python-pyrsistent)
21715 ("python-six" ,python-six)
21716 ("python-zope-interface" ,python-zope-interface)))
21717 (native-inputs
21718 `(("python-black" ,python-black)
21719 ("python-coverage" ,python-coverage)
21720 ("python-dask" ,python-dask)
21721 ("python-flake8" ,python-flake8)
21722 ("python-hypothesis" ,python-hypothesis)
21723 ("python-pytest" ,python-pytest)
21724 ("python-setuptools" ,python-setuptools)
21725 ("python-sphinx" ,python-sphinx)
21726 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21727 ("python-testtools" ,python-testtools)
21728 ("python-twine" ,python-twine)
21729 ("python-twisted" ,python-twisted)))
21730 (home-page "https://github.com/itamarst/eliot/")
21731 (synopsis "Eliot: the logging system that tells you why it happened")
21732 (description
21733 "@dfn{eliot} is a Python logging system that outputs causal chains of
21734 actions: actions can spawn other actions, and eventually they either succeed
21735 or fail. The resulting logs tell you the story of what your software did: what
21736 happened, and what caused it.")
21737 (license license:asl2.0)))
21738
21739 (define-public python-pem
21740 (package
21741 (name "python-pem")
21742 (version "20.1.0")
21743 (source
21744 (origin
21745 (method url-fetch)
21746 (uri (pypi-uri "pem" version))
21747 (sha256
21748 (base32
21749 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21750 (build-system python-build-system)
21751 (native-inputs
21752 `(("python-certifi" ,python-certifi)
21753 ("python-coverage" ,python-coverage)
21754 ("python-pretend" ,python-pretend)
21755 ("python-pyopenssl" ,python-pyopenssl)
21756 ("python-pytest" ,python-pytest)
21757 ("python-sphinx" ,python-sphinx)
21758 ("python-twisted" ,python-twisted)))
21759 (home-page "https://pem.readthedocs.io/")
21760 (synopsis "Easy PEM file parsing in Python")
21761 (description
21762 "This package provides a Python module for parsing and splitting PEM files.")
21763 (license license:expat)))
21764
21765 (define-public python-txsni
21766 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21767 ;; Python and OpenSSL.
21768 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21769 (revision "0"))
21770 (package
21771 (name "python-txsni")
21772 (version (git-version "0.1.9" revision commit))
21773 (home-page "https://github.com/glyph/txsni")
21774 (source
21775 (origin
21776 (method git-fetch)
21777 (uri (git-reference (url home-page) (commit commit)))
21778 (file-name (git-file-name name version))
21779 (sha256
21780 (base32
21781 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21782 (build-system python-build-system)
21783 (propagated-inputs
21784 `(("python-pyopenssl" ,python-pyopenssl)
21785 ("python-service-identity" ,python-service-identity)
21786 ("python-twisted" ,python-twisted)))
21787 (synopsis "Run TLS servers with Twisted")
21788 (description
21789 "This package provides an easy-to-use SNI endpoint for use
21790 with the Twisted web framework.")
21791 (license license:expat))))
21792
21793 (define-public python-txacme
21794 (package
21795 (name "python-txacme")
21796 (version "0.9.2")
21797 (source
21798 (origin
21799 (method url-fetch)
21800 (uri (pypi-uri "txacme" version))
21801 (sha256
21802 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21803 (build-system python-build-system)
21804 (propagated-inputs
21805 `(("python-acme" ,python-acme)
21806 ("python-attrs" ,python-attrs)
21807 ("python-eliot" ,python-eliot)
21808 ("python-josepy" ,python-josepy)
21809 ("python-pem" ,python-pem)
21810 ("python-treq" ,python-treq)
21811 ("python-twisted" ,python-twisted)
21812 ("python-txsni" ,python-txsni)))
21813 (native-inputs
21814 `(("python-fixtures" ,python-fixtures)
21815 ("python-hypothesis" ,python-hypothesis)
21816 ("python-mock" ,python-mock)
21817 ("python-service-identity"
21818 ,python-service-identity)
21819 ("python-testrepository" ,python-testrepository)
21820 ("python-testscenarios" ,python-testscenarios)
21821 ("python-testtools" ,python-testtools)))
21822 (home-page "https://github.com/twisted/txacme")
21823 (synopsis "Twisted implexmentation of the ACME protocol")
21824 (description
21825 "ACME is Automatic Certificate Management Environment, a protocol that
21826 allows clients and certificate authorities to automate verification and
21827 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21828 Certificate Authority.
21829
21830 txacme is an implementation of the protocol for Twisted, the event-driven
21831 networking engine for Python.")
21832 (license license:expat)))
21833
21834 (define-public python-pysaml2
21835 (package
21836 (name "python-pysaml2")
21837 (version "5.0.0")
21838 (source
21839 (origin
21840 (method url-fetch)
21841 (uri (pypi-uri "pysaml2" version))
21842 (sha256
21843 (base32
21844 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21845 (build-system python-build-system)
21846 (propagated-inputs
21847 `(("python-cryptography" ,python-cryptography)
21848 ("python-dateutil" ,python-dateutil)
21849 ("python-defusedxml" ,python-defusedxml)
21850 ("python-pyopenssl" ,python-pyopenssl)
21851 ("python-pytz" ,python-pytz)
21852 ("python-requests" ,python-requests)
21853 ("python-six" ,python-six)))
21854 (home-page "https://idpy.org")
21855 (synopsis "Python implementation of SAML Version 2 Standard")
21856 (description
21857 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21858 It contains all necessary pieces for building a SAML2 service provider or
21859 an identity provider. The distribution contains examples of both.
21860
21861 This package was originally written to work in a WSGI environment, but
21862 there are extensions that allow you to use it with other frameworks.")
21863 (license license:asl2.0)))
21864
21865 (define-public python-click-plugins
21866 (package
21867 (name "python-click-plugins")
21868 (version "1.1.1")
21869 (source
21870 (origin
21871 (method url-fetch)
21872 (uri (pypi-uri "click-plugins" version))
21873 (sha256
21874 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21875 (build-system python-build-system)
21876 (native-inputs
21877 `(("python-pytest" ,python-pytest)))
21878 (propagated-inputs
21879 `(("python-click" ,python-click)))
21880 (synopsis "Extension for Click to register external CLI commands")
21881 (description "This package provides n extension module for Click to
21882 register external CLI commands via setuptools entry-points.")
21883 (home-page "https://github.com/click-contrib/click-plugins")
21884 (license license:bsd-3)))
21885
21886 (define-public python-diceware
21887 (package
21888 (name "python-diceware")
21889 (version "0.9.6")
21890 (source
21891 (origin
21892 (method url-fetch)
21893 (uri (pypi-uri "diceware" version))
21894 (sha256
21895 (base32
21896 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21897 (build-system python-build-system)
21898 (native-inputs
21899 `(("python-coverage" ,python-coverage)
21900 ("python-pytest" ,python-pytest)
21901 ("python-pytest-runner" ,python-pytest-runner)))
21902 (home-page "https://github.com/ulif/diceware/")
21903 (synopsis "Generates memorable passphrases")
21904 (description "This package generates passphrases by concatenating words
21905 randomly picked from wordlists. It supports several sources of
21906 randomness (including real life dice) and different wordlists (including
21907 cryptographically signed ones).")
21908 (license license:gpl3+)))
21909
21910 (define-public python-dictdiffer
21911 (package
21912 (name "python-dictdiffer")
21913 (version "0.8.1")
21914 (source (origin
21915 (method url-fetch)
21916 (uri (pypi-uri "dictdiffer" version))
21917 (sha256
21918 (base32
21919 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
21920 (build-system python-build-system)
21921 (native-inputs
21922 `(("python-check-manifest" ,python-check-manifest)
21923 ("python-coverage" ,python-coverage)
21924 ("python-isort" ,python-isort)
21925 ("python-mock" ,python-mock)
21926 ("python-pydoctstyle" ,python-pydocstyle)
21927 ("python-pytest-cache" ,python-pytest-cache)
21928 ("python-pytest-cov" ,python-pytest-cov)
21929 ("python-pytest-pep8" ,python-pytest-pep8)
21930 ("python-pytest-runner" ,python-pytest-runner)
21931 ("python-pytest" ,python-pytest)
21932 ("python-setuptools-scm" ,python-setuptools-scm)
21933 ("python-tox" ,python-tox)))
21934 (home-page "https://github.com/inveniosoftware/dictdiffer")
21935 (synopsis "Diff and patch Python dictionary objects")
21936 (description
21937 "Dictdiffer is a Python module that helps you to diff and patch
21938 dictionaries.")
21939 (license license:expat)))
21940
21941 (define-public pyzo
21942 (package
21943 (name "pyzo")
21944 (version "4.11.0")
21945 (source
21946 (origin
21947 (method url-fetch)
21948 (uri (pypi-uri "pyzo" version))
21949 (sha256
21950 (base32 "0vzsk6rchavlvy7ciq1z9qh3qrj9q213v2nn491fgjq3g19glj53"))))
21951 (build-system python-build-system)
21952 (arguments
21953 `(#:phases
21954 (modify-phases %standard-phases
21955 (add-before 'check 'fix-home-directory
21956 (lambda _
21957 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21958 (setenv "HOME" "/tmp")
21959 #t)))
21960 ;; Tests fail with "Uncaught Python exception: python: undefined
21961 ;; symbol: objc_getClass".
21962 #:tests? #f))
21963 (propagated-inputs
21964 `(("python-pyqt" ,python-pyqt)))
21965 (home-page "https://pyzo.org")
21966 (synopsis
21967 "Python IDE for scientific computing")
21968 (description
21969 "Pyzo is a Python IDE focused on interactivity and introspection,
21970 which makes it very suitable for scientific computing. Its practical
21971 design is aimed at simplicity and efficiency.
21972
21973 It consists of two main components, the editor and the shell, and uses
21974 a set of pluggable tools to help the programmer in various ways. Some
21975 example tools are source structure, project manager, interactive help,
21976 workspace...")
21977 (license license:bsd-2)))
21978
21979 (define-public python-osc
21980 (package
21981 (name "python-osc")
21982 (version "1.7.4")
21983 (source
21984 (origin
21985 (method url-fetch)
21986 (uri (pypi-uri "python-osc" version))
21987 (sha256
21988 (base32
21989 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21990 (build-system python-build-system)
21991 (home-page "https://github.com/attwad/python-osc")
21992 (synopsis "Open Sound Control server and client implementations")
21993 (description
21994 "@code{python-osc} is a pure Python library with no external
21995 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21996 Open Sound Control 1.0} specification.")
21997 (license license:unlicense)))
21998
21999 (define-public python-voluptuous
22000 (package
22001 (name "python-voluptuous")
22002 (version "0.11.7")
22003 (source
22004 (origin
22005 (method url-fetch)
22006 (uri (pypi-uri "voluptuous" version))
22007 (sha256
22008 (base32
22009 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22010 (build-system python-build-system)
22011 (native-inputs
22012 `(("python-nose" ,python-nose)))
22013 (home-page "https://github.com/alecthomas/voluptuous")
22014 (synopsis "Python data validation library")
22015 (description
22016 "Voluptuous is a Python data validation library. It is primarily
22017 intended for validating data coming into Python as JSON, YAML, etc.")
22018 (license license:bsd-3)))
22019
22020 (define-public python-cmd2
22021 (package
22022 (name "python-cmd2")
22023 (version "1.0.2")
22024 (source
22025 (origin
22026 (method url-fetch)
22027 (uri (pypi-uri "cmd2" version))
22028 (sha256
22029 (base32
22030 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22031 (build-system python-build-system)
22032 (propagated-inputs
22033 `(("python-attrs" ,python-attrs)
22034 ("python-colorama" ,python-colorama)
22035 ("python-pyperclip" ,python-pyperclip)
22036 ("python-wcwidth" ,python-wcwidth)))
22037 (native-inputs
22038 `(("python-codecov" ,python-codecov)
22039 ("python-coverage" ,python-coverage)
22040 ("python-doc8" ,python-doc8)
22041 ("python-flake8" ,python-flake8)
22042 ("python-invoke" ,python-invoke)
22043 ("python-mock" ,python-mock)
22044 ("python-pytest" ,python-pytest)
22045 ("python-pytest-cov" ,python-pytest-cov)
22046 ("python-pytest-mock" ,python-pytest-mock)
22047 ("python-setuptools-scm" ,python-setuptools-scm)
22048 ("python-sphinx" ,python-sphinx)
22049 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22050 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22051 ("python-tox" ,python-tox)
22052 ("python-twine" ,python-twine)
22053 ("which" ,which)))
22054 (home-page "https://github.com/python-cmd2/cmd2")
22055 (synopsis "Tool for building interactive command line applications")
22056 (description
22057 "Cmd2 is a tool for building interactive command line applications in
22058 Python. Its goal is to make it quick and easy for developers to build
22059 feature-rich and user-friendly interactive command line applications. It
22060 provides a simple API which is an extension of Python's built-in @code{cmd}
22061 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22062 make your life easier and eliminates much of the boilerplate code which would
22063 be necessary when using @code{cmd}.")
22064 (license license:expat)))
22065
22066 (define-public python-pytidylib
22067 (package
22068 (name "python-pytidylib")
22069 (version "0.3.2")
22070 (source (origin
22071 (method url-fetch)
22072 (uri (pypi-uri "pytidylib" version))
22073 (sha256
22074 (base32
22075 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22076 (build-system python-build-system)
22077 (arguments
22078 '(#:phases
22079 (modify-phases %standard-phases
22080 (add-before 'build 'qualify-libtidy
22081 (lambda* (#:key inputs #:allow-other-keys)
22082 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22083 "/lib/libtidy.so")))
22084 (substitute* "tidylib/tidy.py"
22085 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22086 (format #f "'~a'" libtidy)))
22087 #t))))))
22088 (inputs `(("tidy" ,tidy)))
22089 (home-page "https://github.com/countergram/pytidylib")
22090 (synopsis "Python wrapper for HTML Tidy library")
22091 (description
22092 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22093 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22094 (license license:expat)))
22095
22096 (define-public python2-pytidylib
22097 (package-with-python2 python-pytidylib))
22098
22099 (define-public python-mujson
22100 (package
22101 (name "python-mujson")
22102 (version "1.4")
22103 (source
22104 (origin
22105 (method url-fetch)
22106 (uri (pypi-uri "mujson" version))
22107 (sha256
22108 (base32
22109 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22110 (build-system python-build-system)
22111 (home-page "https://github.com/mattgiles/mujson")
22112 (synopsis "Use the fastest JSON functions available at import time")
22113 (description "This package selects the fastest JSON functions available
22114 at import time.")
22115 (license license:expat)))
22116
22117 (define-public python-bashlex
22118 (package
22119 (name "python-bashlex")
22120 (version "0.14")
22121 (source
22122 (origin
22123 (method url-fetch)
22124 (uri (pypi-uri "bashlex" version))
22125 (sha256
22126 (base32
22127 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22128 (build-system python-build-system)
22129 (arguments
22130 `(#:phases
22131 (modify-phases %standard-phases
22132 (add-before 'build 'pregenerate-yacc-tables
22133 (lambda _
22134 ;; parser.py caches tables, which attempts to write to site lib
22135 ;; see https://github.com/idank/bashlex/issues/51
22136 (invoke "python" "-c" "import bashlex"))))))
22137 (home-page
22138 "https://github.com/idank/bashlex")
22139 (synopsis "Python parser for bash")
22140 (description "@code{bashlex} is a Python port of the parser used
22141 internally by GNU bash.
22142
22143 For the most part it's transliterated from C, the major differences are:
22144
22145 @itemize
22146 @item it does not execute anything
22147 @item it is reentrant
22148 @item it generates a complete AST
22149 @end itemize
22150 ")
22151 (license license:gpl3+)))
22152
22153 (define-public python-jinxed
22154 (package
22155 (name "python-jinxed")
22156 (version "1.0.0")
22157 (source
22158 (origin
22159 (method url-fetch)
22160 (uri (pypi-uri "jinxed" version))
22161 (sha256
22162 (base32
22163 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22164 (build-system python-build-system)
22165 (arguments
22166 '(#:phases
22167 (modify-phases %standard-phases
22168 (add-before 'check 'set-environment-variables
22169 (lambda* (#:key inputs #:allow-other-keys)
22170 (let ((ncurses (assoc-ref inputs "ncurses")))
22171 (setenv "TERM" "LINUX")
22172 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22173 #t))))
22174 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22175 (native-inputs
22176 `(("ncurses" ,ncurses)))
22177 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22178 (synopsis "Jinxed Terminal Library")
22179 (description
22180 "Jinxed is an implementation of a subset of the Python curses library.")
22181 (license license:mpl2.0)))
22182
22183 (define-public python-blessed
22184 (package
22185 (name "python-blessed")
22186 (version "1.17.8")
22187 (source
22188 (origin
22189 (method url-fetch)
22190 (uri (pypi-uri "blessed" version))
22191 (sha256
22192 (base32
22193 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22194 (modules '((guix build utils)))
22195 (snippet
22196 '(begin
22197 ;; Don't get hung up on Windows test failures.
22198 (delete-file "blessed/win_terminal.py") #t))))
22199 (build-system python-build-system)
22200 (propagated-inputs
22201 `(("python-jinxed" ,python-jinxed)
22202 ("python-six" ,python-six)
22203 ("python-wcwidth" ,python-wcwidth)))
22204 (native-inputs
22205 `(("python-mock" ,python-mock)
22206 ("python-pytest" ,python-pytest)))
22207 (home-page "https://github.com/jquast/blessed")
22208 (synopsis "Wrapper around terminal capabilities")
22209 (description
22210 "Blessed is a thin, practical wrapper around terminal styling, screen
22211 positioning, and keyboard input.")
22212 (license license:expat)))
22213
22214 (define-public python-readme-renderer
22215 (package
22216 (name "python-readme-renderer")
22217 (version "26.0")
22218 (source
22219 (origin
22220 (method url-fetch)
22221 (uri (pypi-uri "readme_renderer" version))
22222 (sha256
22223 (base32
22224 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22225 (build-system python-build-system)
22226 (propagated-inputs
22227 `(("python-bleach" ,python-bleach)
22228 ("python-docutils" ,python-docutils)
22229 ("python-pygments" ,python-pygments)
22230 ("python-six" ,python-six)))
22231 (native-inputs
22232 `(("python-mock" ,python-mock)
22233 ("python-pytest" ,python-pytest)))
22234 (home-page "https://github.com/pypa/readme_renderer")
22235 (synopsis "Render README files in Warehouse")
22236 (description
22237 "Readme Renderer is a library that will safely render arbitrary README
22238 files into HTML. It is designed to be used in Warehouse to render the
22239 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22240 and plain text.")
22241 (license license:asl2.0)))
22242
22243 (define-public python-lazr-delegates
22244 (package
22245 (name "python-lazr-delegates")
22246 (version "2.0.4")
22247 (source
22248 (origin
22249 (method url-fetch)
22250 (uri (pypi-uri "lazr.delegates" version))
22251 (sha256
22252 (base32
22253 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22254 (build-system python-build-system)
22255 (arguments
22256 '(#:phases
22257 (modify-phases %standard-phases
22258 (replace 'check
22259 (lambda _
22260 (invoke "python" "setup.py" "nosetests"))))))
22261 (native-inputs
22262 `(("python-nose" ,python-nose)))
22263 (propagated-inputs
22264 `(("python-zope-interface" ,python-zope-interface)))
22265 (home-page "https://launchpad.net/lazr.delegates")
22266 (synopsis "Easily write objects that delegate behavior")
22267 (description
22268 "The @code{lazr.delegates} package makes it easy to write objects that
22269 delegate behavior to another object. The new object adds some property or
22270 behavior on to the other object, while still providing the underlying interface,
22271 and delegating behavior.")
22272 (license license:lgpl3)))
22273
22274 (define-public python-lazr-config
22275 (package
22276 (name "python-lazr-config")
22277 (version "2.2.2")
22278 (source
22279 (origin
22280 (method url-fetch)
22281 (uri (pypi-uri "lazr.config" version))
22282 (sha256
22283 (base32
22284 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22285 (build-system python-build-system)
22286 (arguments
22287 '(#:phases
22288 (modify-phases %standard-phases
22289 (replace 'check
22290 (lambda _
22291 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22292 (native-inputs
22293 `(("python-nose" ,python-nose)))
22294 (propagated-inputs
22295 `(("python-lazr-delegates" ,python-lazr-delegates)
22296 ("python-zope-interface" ,python-zope-interface)))
22297 (home-page "https://launchpad.net/lazr.config")
22298 (synopsis "Create configuration schemas and process and validate configurations")
22299 (description
22300 "The LAZR config system is typically used to manage process configuration.
22301 Process configuration is for saying how things change when we run systems on
22302 different machines, or under different circumstances. This system uses ini-like
22303 file format of section, keys, and values. The config file supports inheritance
22304 to minimize duplication of information across files. The format supports schema
22305 validation.")
22306 (license license:lgpl3)))
22307
22308 (define-public python-flufl-bounce
22309 (package
22310 (name "python-flufl-bounce")
22311 (version "3.0.1")
22312 (source
22313 (origin
22314 (method url-fetch)
22315 (uri (pypi-uri "flufl.bounce" version))
22316 (sha256
22317 (base32
22318 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22319 (build-system python-build-system)
22320 (propagated-inputs
22321 `(("python-atpublic" ,python-atpublic)
22322 ("python-zope-interface" ,python-zope-interface)))
22323 (native-inputs
22324 `(("python-nose2" ,python-nose2)))
22325 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22326 (synopsis "Email bounce detectors")
22327 (description "The @code{flufl.bounce} library provides a set of heuristics
22328 and an API for detecting the original bouncing email addresses from a bounce
22329 message. Many formats found in the wild are supported, as are VERP and
22330 RFC 3464.")
22331 (license (list license:asl2.0
22332 license:lgpl3)))) ; only for setup_headers.py
22333
22334 (define-public python-flufl-i18n
22335 (package
22336 (name "python-flufl-i18n")
22337 (version "3.0")
22338 (source
22339 (origin
22340 (method url-fetch)
22341 (uri (pypi-uri "flufl.i18n" version))
22342 (sha256
22343 (base32
22344 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22345 (build-system python-build-system)
22346 (propagated-inputs
22347 `(("python-atpublic" ,python-atpublic)))
22348 (home-page "https://flufli18n.readthedocs.io")
22349 (synopsis "API for Python internationalization")
22350 (description
22351 "This package provides a high-level, convenient API for managing
22352 internationalization/translation contexts in Python applications. There is a
22353 simple API for single-context applications, such as command line scripts which
22354 only need to translate into one language during the entire course of their
22355 execution. There is a more flexible, but still convenient API for multi-context
22356 applications, such as servers, which may need to switch language contexts for
22357 different tasks.")
22358 (license license:asl2.0)))
22359
22360 (define-public python-flufl-lock
22361 (package
22362 (name "python-flufl-lock")
22363 (version "4.0")
22364 (source
22365 (origin
22366 (method url-fetch)
22367 (uri (pypi-uri "flufl.lock" version))
22368 (sha256
22369 (base32
22370 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22371 (build-system python-build-system)
22372 (propagated-inputs
22373 `(("python-atpublic" ,python-atpublic)
22374 ("python-psutil" ,python-psutil)))
22375 (home-page "https://flufllock.readthedocs.io")
22376 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22377 (description
22378 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22379 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22380 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22381 and have a maximum lifetime built-in.")
22382 (license (list license:asl2.0
22383 license:lgpl3)))) ; only for setup_helpers.py
22384
22385 (define-public python-flufl-testing
22386 (package
22387 (name "python-flufl-testing")
22388 (version "0.8")
22389 (source
22390 (origin
22391 (method url-fetch)
22392 (uri (pypi-uri "flufl.testing" version))
22393 (sha256
22394 (base32
22395 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22396 (build-system python-build-system)
22397 (native-inputs
22398 `(("python-nose2" ,python-nose2)))
22399 (home-page "https://gitlab.com/warsaw/flufl.testing")
22400 (synopsis "Collection of test tool plugins")
22401 (description
22402 "This package contains a small collection of test tool plugins for
22403 @code{nose2} and @code{flake8}.")
22404 (license license:asl2.0)))
22405
22406 (define-public python-devtools
22407 (package
22408 (name "python-devtools")
22409 (version "0.6")
22410 (source
22411 (origin
22412 (method git-fetch)
22413 (uri (git-reference
22414 (url "https://github.com/samuelcolvin/python-devtools")
22415 (commit (string-append "v" version))))
22416 (file-name (git-file-name name version))
22417 (sha256
22418 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22419 (build-system python-build-system)
22420 (native-inputs
22421 `(("python-pytest" ,python-pytest)
22422 ("python-pytest-mock" ,python-pytest-mock)))
22423 (propagated-inputs
22424 `(("python-pygments" ,python-pygments)))
22425 (arguments
22426 `(#:phases (modify-phases %standard-phases
22427 (replace 'check
22428 (lambda _
22429 (invoke "pytest")
22430 #t)))))
22431 (home-page "https://github.com/samuelcolvin/python-devtools")
22432 (synopsis "Debug command and development tools")
22433 (description
22434 "This package provides a debug print command and other development tools.
22435 It adds a simple and readable way to print stuff during development.")
22436 (license license:expat)))
22437
22438 (define-public python-dateparser
22439 (package
22440 (name "python-dateparser")
22441 (version "0.7.6")
22442 (source
22443 (origin
22444 (method url-fetch)
22445 (uri (pypi-uri "dateparser" version))
22446 (sha256
22447 (base32
22448 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22449 (build-system python-build-system)
22450 (propagated-inputs
22451 `(("python-dateutil" ,python-dateutil)
22452 ("python-pytz" ,python-pytz)
22453 ("python-regex" ,python-regex)
22454 ("python-ruamel.yaml" ,python-ruamel.yaml)
22455 ("python-tzlocal" ,python-tzlocal)))
22456 (native-inputs
22457 `(("python-mock" ,python-mock)
22458 ("python-parameterized" ,python-parameterized)
22459 ("tzdata" ,tzdata-for-tests)))
22460 (arguments
22461 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22462 #:tests? #f
22463 #:phases
22464 (modify-phases %standard-phases
22465 (add-before 'check 'set-check-environment
22466 (lambda* (#:key inputs #:allow-other-keys)
22467 (setenv "TZ" "UTC")
22468 (setenv "TZDIR"
22469 (string-append (assoc-ref inputs "tzdata")
22470 "/share/zoneinfo"))
22471 #t)))))
22472 (home-page "https://github.com/scrapinghub/dateparser")
22473 (synopsis
22474 "Date parsing library designed to parse dates from HTML pages")
22475 (description
22476 "@code{python-dateparser} provides modules to easily parse localized
22477 dates in almost any string formats commonly found on web pages.")
22478 (license license:bsd-3)))
22479
22480 (define-public python-dparse
22481 (package
22482 (name "python-dparse")
22483 (version "0.5.1")
22484 (source
22485 (origin
22486 (method url-fetch)
22487 (uri (pypi-uri "dparse" version))
22488 (sha256
22489 (base32
22490 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22491 (build-system python-build-system)
22492 (native-inputs
22493 `(("python-pytest" ,python-pytest)))
22494 (propagated-inputs
22495 `(("python-packaging" ,python-packaging)
22496 ("python-pyyaml" ,python-pyyaml)
22497 ("python-toml" ,python-toml)))
22498 (home-page "https://github.com/pyupio/dparse")
22499 (synopsis "Parser for Python dependency files")
22500 (description "This package provides a parser for Python dependency files.")
22501 (license license:expat)))
22502
22503 (define-public python-dpath
22504 (package
22505 (name "python-dpath")
22506 (version "2.0.1")
22507 (source
22508 (origin
22509 (method url-fetch)
22510 (uri (pypi-uri "dpath" version))
22511 (sha256
22512 (base32
22513 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22514 (build-system python-build-system)
22515 (native-inputs
22516 `(("python-hypothesis" ,python-hypothesis)
22517 ("python-mock" ,python-mock)
22518 ("python-nose" ,python-nose)))
22519 (arguments
22520 '(#:phases
22521 (modify-phases %standard-phases
22522 (replace 'check
22523 (lambda* (#:key inputs outputs #:allow-other-keys)
22524 (add-installed-pythonpath inputs outputs)
22525 ;; This invokation is taken from tox.ini.
22526 (invoke "nosetests" "-d" "-v" "tests/"))))))
22527 (home-page "https://github.com/akesterson/dpath-python")
22528 (synopsis "Filesystem-like pathing and searching for dictionaries")
22529 (description
22530 "@code{python-dpath} is a library for accessing and searching
22531 dictionaries via /slashed/paths ala xpath.
22532
22533 Basically it lets you glob over a dictionary as if it were a filesystem. It
22534 allows you to specify globs (ala the bash eglob syntax, through some advanced
22535 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22536 facility for filtering those results.")
22537 (license license:expat)))
22538
22539 (define-public python-safety
22540 (package
22541 (name "python-safety")
22542 (version "1.9.0")
22543 (source
22544 (origin
22545 (method url-fetch)
22546 (uri (pypi-uri "safety" version))
22547 (sha256
22548 (base32
22549 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22550 (build-system python-build-system)
22551 (arguments
22552 `(#:phases
22553 (modify-phases %standard-phases
22554 (add-after 'unpack 'disable-tests
22555 (lambda _
22556 (substitute* "tests/test_safety.py"
22557 ;; requires network
22558 (("def test_check_live") "def _test_check_live"))
22559 #t)))))
22560 (propagated-inputs
22561 `(("python-click" ,python-click)
22562 ("python-dparse" ,python-dparse)
22563 ("python-packaging" ,python-packaging)
22564 ("python-requests" ,python-requests)))
22565 (home-page "https://github.com/pyupio/safety")
22566 (synopsis "Check installed dependencies for known vulnerabilities")
22567 (description "Safety checks installed dependencies for known vulnerabilities.
22568 By default it uses the open Python vulnerability database Safety DB.")
22569 (license license:expat)))
22570
22571 (define-public python-pypandoc
22572 (package
22573 (name "python-pypandoc")
22574 (version "1.5")
22575 (source
22576 (origin
22577 (method url-fetch)
22578 (uri (pypi-uri "pypandoc" version))
22579 (sha256
22580 (base32
22581 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22582 (build-system python-build-system)
22583 (inputs
22584 `(("pandoc" ,pandoc)
22585 ("pandoc-citeproc" ,pandoc-citeproc)))
22586 (propagated-inputs
22587 `(("wheel" ,python-wheel)))
22588 (native-inputs
22589 `(("texlive" ,(texlive-union (list texlive-amsfonts
22590 texlive-fonts-ec
22591 texlive-latex-hyperref
22592 texlive-latex-oberdiek
22593 texlive-lm
22594 texlive-xcolor)))))
22595 (arguments
22596 `(#:phases
22597 (modify-phases %standard-phases
22598 (add-before 'check 'disable-tests
22599 (lambda _
22600 ;; Disable test requiring network access
22601 (substitute* "tests.py"
22602 (("test_basic_conversion_from_http_url")
22603 "skip_test_basic_conversion_from_http_url"))
22604 ;; Needed by texlive-union to generate fonts
22605 (setenv "HOME" "/tmp")
22606 #t)))))
22607 (home-page "https://github.com/bebraw/pypandoc")
22608 (synopsis "Python wrapper for pandoc")
22609 (description "pypandoc is a thin Python wrapper around pandoc
22610 and pandoc-citeproc.")
22611 (license license:expat)))
22612
22613 (define-public python-rnc2rng
22614 (package
22615 (name "python-rnc2rng")
22616 (version "2.6.4")
22617 (source
22618 (origin
22619 (method url-fetch)
22620 (uri (pypi-uri "rnc2rng" version))
22621 (sha256
22622 (base32
22623 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22624 (build-system python-build-system)
22625 (propagated-inputs
22626 `(("python-rply" ,python-rply)))
22627 (arguments
22628 `(#:phases (modify-phases %standard-phases
22629 (replace 'check
22630 (lambda _
22631 (invoke "python" "test.py"))))))
22632 (home-page "https://github.com/djc/rnc2rng")
22633 (synopsis "Convert RELAX NG Compact to regular syntax")
22634 (description
22635 "This package provides the @command{rnc2rng} command-line tool as well as
22636 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22637 equivalent schemata in the XML-based default RELAX NG syntax.")
22638 (license license:expat)))
22639
22640 (define-public python-telethon
22641 (package
22642 (name "python-telethon")
22643 (version "1.17.5")
22644 (source
22645 (origin
22646 (method git-fetch)
22647 (uri (git-reference
22648 (url "https://github.com/LonamiWebs/Telethon")
22649 (commit (string-append "v" version))))
22650 (file-name (git-file-name name version))
22651 (sha256
22652 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22653 (build-system python-build-system)
22654 (arguments
22655 '(#:phases
22656 (modify-phases %standard-phases
22657 (replace 'check
22658 (lambda* (#:key tests? #:allow-other-keys)
22659 (when tests?
22660 (invoke "py.test" "-v"))
22661 #t)))))
22662 (propagated-inputs
22663 `(("python-rsa" ,python-rsa)
22664 ("python-pyaes" ,python-pyaes)))
22665 (native-inputs
22666 `(("python-pytest" ,python-pytest)
22667 ("python-pytest-asyncio" ,python-pytest-asyncio)
22668 ("python-pytest-trio" ,python-pytest-trio)))
22669 (home-page "https://docs.telethon.dev")
22670 (synopsis "Full-featured Telegram client library for Python 3")
22671 (description "This library is designed to make it easy to write Python
22672 programs that can interact with Telegram.")
22673 (license license:expat)))
22674
22675 (define-public python-citeproc-py
22676 (package
22677 (name "python-citeproc-py")
22678 (version "0.5.1")
22679 (source
22680 (origin
22681 (method url-fetch)
22682 (uri (pypi-uri "citeproc-py" version))
22683 (sha256
22684 (base32
22685 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22686 (build-system python-build-system)
22687 (propagated-inputs
22688 `(("python-lxml" ,python-lxml)
22689 ("python-rnc2rng" ,python-rnc2rng)))
22690 (home-page
22691 "https://github.com/brechtm/citeproc-py")
22692 (synopsis "Citations and bibliography formatter")
22693 (description
22694 "Citeproc-py is a CSL processor for Python. It aims to implement the
22695 CSL 1.0.1 specification. citeproc-py can output styled citations and
22696 bibliographies in a number of different output formats. Currently supported
22697 are plain text, reStructuredText and HTML.")
22698 (license license:bsd-2)))
22699
22700 (define-public python-inform
22701 (package
22702 (name "python-inform")
22703 (version "1.23.0")
22704 (source
22705 (origin
22706 (method url-fetch)
22707 (uri (pypi-uri "inform" version))
22708 (sha256
22709 (base32
22710 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22711 (build-system python-build-system)
22712 (arguments
22713 `(#:tests? #f)) ; PyPI tarball lacks tests
22714 (native-inputs
22715 `(("python-hypothesis" ,python-hypothesis)
22716 ("python-pytest-cov" ,python-pytest-cov)
22717 ("python-pytest-runner" ,python-pytest-runner)))
22718 (propagated-inputs
22719 `(("python-arrow" ,python-arrow)
22720 ("python-six" ,python-six)))
22721 (home-page "https://inform.readthedocs.io")
22722 (synopsis "Print & logging utilities for communicating with user")
22723 (description
22724 "Inform is designed to display messages from programs that are typically run from
22725 a console. It provides a collection of ‘print’ functions that allow you to simply and
22726 cleanly print different types of messages.")
22727 (license license:gpl3+)))
22728
22729 (define-public python-nestedtext
22730 (package
22731 (name "python-nestedtext")
22732 (version "1.0.0")
22733 (source
22734 (origin
22735 (method url-fetch)
22736 (uri (pypi-uri "nestedtext" version))
22737 (sha256
22738 (base32
22739 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22740 (build-system python-build-system)
22741 (arguments
22742 `(#:tests? #f)) ; PyPI tarball lacks tests
22743 (propagated-inputs
22744 `(("python-inform" ,python-inform)))
22745 (home-page "https://nestedtext.org")
22746 (synopsis "Human readable and writable data interchange format")
22747 (description
22748 "NestedText is a file format for holding data that is to be entered, edited, or
22749 viewed by people. It allows data to be organized into a nested collection of
22750 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22751 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22752 NestedText is both simple and natural. Only a small number of concepts and rules must
22753 be kept in mind when creating it. It is easily created, modified, or viewed with
22754 a text editor and easily understood and used by both programmers and non-programmers.")
22755 (license license:expat))) ; MIT license
22756
22757 (define-public python-parallel
22758 (package
22759 (name "python-parallel")
22760 (version "1.6.4.4")
22761 (source
22762 (origin
22763 (method url-fetch)
22764 (uri (string-append
22765 "https://www.parallelpython.com/downloads/pp/pp-"
22766 version ".zip"))
22767 (sha256
22768 (base32
22769 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22770 (native-inputs
22771 `(("unzip" ,unzip)))
22772 (build-system python-build-system)
22773 (arguments '(#:tests? #f)) ; No test suite.
22774 (home-page "https://www.parallelpython.com")
22775 (synopsis "Parallel and distributed programming for Python")
22776 (description "Parallel Python module (PP) provides an easy and efficient
22777 way to create parallel-enabled applications for SMP computers and clusters.
22778 PP module features cross-platform portability and dynamic load balancing.
22779 Thus applications written with PP will parallelize efficiently even on
22780 heterogeneous and multi-platform clusters (including clusters running other
22781 applications with variable CPU loads).")
22782 (license license:bsd-3)))
22783
22784 (define-public python2-parallel
22785 (package-with-python2 python-parallel))