Merge branch '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 © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;;
97 ;;; This file is part of GNU Guix.
98 ;;;
99 ;;; GNU Guix is free software; you can redistribute it and/or modify it
100 ;;; under the terms of the GNU General Public License as published by
101 ;;; the Free Software Foundation; either version 3 of the License, or (at
102 ;;; your option) any later version.
103 ;;;
104 ;;; GNU Guix is distributed in the hope that it will be useful, but
105 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
106 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 ;;; GNU General Public License for more details.
108 ;;;
109 ;;; You should have received a copy of the GNU General Public License
110 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
111
112 (define-module (gnu packages python-xyz)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (gnu packages)
115 #:use-module (gnu packages algebra)
116 #:use-module (gnu packages adns)
117 #:use-module (gnu packages aidc)
118 #:use-module (gnu packages attr)
119 #:use-module (gnu packages backup)
120 #:use-module (gnu packages bash)
121 #:use-module (gnu packages check)
122 #:use-module (gnu packages cmake)
123 #:use-module (gnu packages compression)
124 #:use-module (gnu packages crypto)
125 #:use-module (gnu packages databases)
126 #:use-module (gnu packages dbm)
127 #:use-module (gnu packages djvu)
128 #:use-module (gnu packages docker)
129 #:use-module (gnu packages enchant)
130 #:use-module (gnu packages file)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages gcc)
133 #:use-module (gnu packages geo)
134 #:use-module (gnu packages ghostscript)
135 #:use-module (gnu packages gl)
136 #:use-module (gnu packages glib)
137 #:use-module (gnu packages gnome)
138 #:use-module (gnu packages gnupg)
139 #:use-module (gnu packages graphviz)
140 #:use-module (gnu packages graphics)
141 #:use-module (gnu packages gsasl)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages haskell-xyz)
145 #:use-module (gnu packages icu4c)
146 #:use-module (gnu packages image)
147 #:use-module (gnu packages kerberos)
148 #:use-module (gnu packages libevent)
149 #:use-module (gnu packages libffi)
150 #:use-module (gnu packages libidn)
151 #:use-module (gnu packages linux)
152 #:use-module (gnu packages llvm)
153 #:use-module (gnu packages man)
154 #:use-module (gnu packages maths)
155 #:use-module (gnu packages monitoring)
156 #:use-module (gnu packages multiprecision)
157 #:use-module (gnu packages networking)
158 #:use-module (gnu packages ncurses)
159 #:use-module (gnu packages openstack)
160 #:use-module (gnu packages pcre)
161 #:use-module (gnu packages perl)
162 #:use-module (gnu packages photo)
163 #:use-module (gnu packages pkg-config)
164 #:use-module (gnu packages python)
165 #:use-module (gnu packages python-check)
166 #:use-module (gnu packages python-compression)
167 #:use-module (gnu packages python-crypto)
168 #:use-module (gnu packages python-science)
169 #:use-module (gnu packages python-web)
170 #:use-module (gnu packages qt)
171 #:use-module (gnu packages rdf)
172 #:use-module (gnu packages readline)
173 #:use-module (gnu packages sdl)
174 #:use-module (gnu packages search)
175 #:use-module (gnu packages shells)
176 #:use-module (gnu packages sphinx)
177 #:use-module (gnu packages ssh)
178 #:use-module (gnu packages terminals)
179 #:use-module (gnu packages tex)
180 #:use-module (gnu packages texinfo)
181 #:use-module (gnu packages textutils)
182 #:use-module (gnu packages time)
183 #:use-module (gnu packages tls)
184 #:use-module (gnu packages version-control)
185 #:use-module (gnu packages video)
186 #:use-module (gnu packages web)
187 #:use-module (gnu packages base)
188 #:use-module (gnu packages xml)
189 #:use-module (gnu packages xorg)
190 #:use-module (gnu packages xdisorg)
191 #:use-module (gnu packages tcl)
192 #:use-module (gnu packages bdw-gc)
193 #:use-module (gnu packages serialization)
194 #:use-module (guix packages)
195 #:use-module (guix download)
196 #:use-module (guix git-download)
197 #:use-module (guix hg-download)
198 #:use-module (guix utils)
199 #:use-module (guix build-system gnu)
200 #:use-module (guix build-system cmake)
201 #:use-module (guix build-system python)
202 #:use-module (guix build-system trivial)
203 #:use-module (srfi srfi-1)
204 #:use-module (srfi srfi-26))
205
206 (define-public python-slixmpp
207 (package
208 (name "python-slixmpp")
209 (version "1.5.2")
210 (source
211 (origin
212 (method git-fetch)
213 (uri
214 (git-reference
215 (url "https://lab.louiz.org/poezio/slixmpp.git")
216 (commit
217 (string-append "slix-" version))))
218 (file-name
219 (git-file-name name version))
220 (sha256
221 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
222 (build-system python-build-system)
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch
227 (lambda _
228 (substitute* "setup.py"
229 (("'CC', 'cc'")
230 "'CC', 'gcc'"))
231 #t)))))
232 (native-inputs
233 `(("cython" ,python-cython)
234 ("gnupg" ,gnupg)
235 ("pkg-config" ,pkg-config)))
236 (propagated-inputs
237 `(("python-aiodns" ,python-aiodns)
238 ("python-aiohttp" ,python-aiohttp)
239 ("python-pyasn1" ,python-pyasn1)
240 ("python-pyasn1-modules" ,python-pyasn1-modules)))
241 (inputs
242 `(("libidn" ,libidn)
243 ("python" ,python))) ; We are building a Python extension.
244 (synopsis "XMPP library without threads")
245 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
246 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
247 socket handling, the timers, the events dispatching) in order to remove all
248 threads.")
249 (home-page "https://lab.louiz.org/poezio/slixmpp")
250 (license license:expat)))
251
252 (define-public python-tenacity
253 (package
254 (name "python-tenacity")
255 (version "6.1.0")
256 (source (origin
257 (method url-fetch)
258 (uri (pypi-uri "tenacity" version))
259 (sha256
260 (base32
261 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-setuptools-scm" ,python-setuptools-scm)
265 ("python-sphinx" ,python-sphinx)
266 ("python-tornado" ,python-tornado)
267 ("python-pytest" ,python-pytest)))
268 (propagated-inputs
269 `(("python-six" ,python-six)))
270 (arguments
271 `(#:phases (modify-phases %standard-phases
272 (replace 'check
273 (lambda _
274 (invoke "pytest")
275 #t)))))
276 (home-page "https://github.com/jd/tenacity")
277 (synopsis "Retrying library for python")
278 (description "Tenacity is a general-purpose python library to simplify the
279 task of adding retry behavior to just about anything.")
280 (license license:asl2.0)))
281
282 (define-public python-colorlog
283 (package
284 (name "python-colorlog")
285 (version "4.1.0")
286 (source (origin
287 (method url-fetch)
288 (uri (pypi-uri "colorlog" version))
289 (sha256
290 (base32
291 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
292 (build-system python-build-system)
293 (native-inputs
294 `(("python-pytest" ,python-pytest)))
295 (arguments
296 `(#:phases (modify-phases %standard-phases
297 (replace 'check
298 (lambda _
299 ;; Extend PYTHONPATH so the built package will be found.
300 (setenv "PYTHONPATH"
301 (string-append (getcwd) "/build/lib:"
302 (getenv "PYTHONPATH")))
303 (invoke "pytest" "-p" "no:logging")
304 #t)))))
305 (home-page "https://github.com/borntyping/python-colorlog")
306 (synopsis "Log formatting with colors for python")
307 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
308 with Python's logging module that outputs records using terminal colors.")
309 (license license:expat)))
310
311 (define-public python-pyprind
312 (package
313 (name "python-pyprind")
314 (version "2.11.2")
315 (source (origin
316 (method url-fetch)
317 (uri (pypi-uri "PyPrind" version))
318 (sha256
319 (base32
320 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
321 (build-system python-build-system)
322 (propagated-inputs
323 `(("python-psutil" ,python-psutil)))
324 (home-page "https://github.com/rasbt/pyprind")
325 (synopsis "Python Progress Bar and Percent Indicator Utility")
326 (description "The PyPrind (Python Progress Indicator) module provides a
327 progress bar and a percentage indicator object that let you track the progress
328 of a loop structure or other iterative computation.")
329 (license license:bsd-3)))
330
331 (define-public python-gphoto2
332 (package
333 (name "python-gphoto2")
334 (version "2.2.1")
335 (source (origin
336 (method url-fetch)
337 (uri (pypi-uri "gphoto2" version))
338 (sha256
339 (base32
340 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
341 (build-system python-build-system)
342 (native-inputs
343 `(("pkg-config" ,pkg-config)))
344 (inputs
345 `(("libgphoto2" ,libgphoto2)))
346 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
347 (synopsis "Python interface to libgphoto2")
348 (description "@code{python-gphoto2} is a comprehensive Python interface
349 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
350 automatically generate the interface code.")
351 (license license:gpl3+)))
352
353 (define-public python-colour
354 (package
355 (name "python-colour")
356 (version "0.1.5")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "colour" version))
360 (sha256
361 (base32
362 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
363 (build-system python-build-system)
364 (native-inputs
365 `(("python-d2to1" ,python-d2to1)))
366 (home-page "https://github.com/vaab/colour")
367 (synopsis "Convert and manipulate various color representations")
368 (description "Pythonic way to manipulate color representations (HSL, RVB,
369 web, X11, ...).")
370 (license license:expat)))
371
372 (define-public python-d2to1
373 (package
374 (name "python-d2to1")
375 (version "0.2.12.post1")
376 (source (origin
377 (method url-fetch)
378 (uri (pypi-uri "d2to1" version))
379 (sha256
380 (base32
381 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
382 (build-system python-build-system)
383 (native-inputs
384 `(("python-nose" ,python-nose)))
385 (home-page "https://github.com/embray/d2to1")
386 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
387 in python")
388 (description "The python package d2to1 (the d is for distutils) allows
389 using distutils2-like setup.cfg files for a package's metadata with a
390 distribute/setuptools setup.py script.")
391 (license license:bsd-2)))
392
393 (define-public python-rawkit
394 (package
395 (name "python-rawkit")
396 (version "0.6.0")
397 (source (origin
398 (method url-fetch)
399 (uri (pypi-uri "rawkit" version))
400 (sha256
401 (base32
402 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
403 (build-system python-build-system)
404 (native-inputs
405 `(("python-pytest" ,python-pytest)
406 ("python-mock" ,python-mock)))
407 (inputs
408 `(("libraw" ,libraw)))
409 (home-page "https://rawkit.readthedocs.io")
410 (synopsis "Ctypes-based LibRaw binding for Python")
411 (description "The rawkit package provides two modules: rawkit and libraw.
412 The rawkit module provides a high-level Pythonic interface for developing raw
413 photos, while the libraw module provides a CTypes based interface for
414 interacting with the low-level LibRaw C APIs.")
415 (license license:expat)))
416
417 (define-public python-easygui
418 (package
419 (name "python-easygui")
420 (version "0.98.1")
421 (source (origin
422 (method url-fetch)
423 (uri (pypi-uri "easygui" version))
424 (sha256
425 (base32
426 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
427 (build-system python-build-system)
428 (propagated-inputs
429 `(("python-tkinter" ,python "tk")))
430 (home-page "https://github.com/robertlugg/easygui")
431 (synopsis "GUI programming module for Python")
432 (description "EasyGUI is a module for very simple, very easy GUI
433 programming in Python. EasyGUI is different from other GUI generators in that
434 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
435 simple function calls.")
436 (license license:bsd-3)))
437
438 (define-public python-pymediainfo
439 (package
440 (name "python-pymediainfo")
441 (version "4.1")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "pymediainfo" version))
446 (sha256
447 (base32
448 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-setuptools-scm" ,python-setuptools-scm)
452 ("python-pytest" ,python-pytest)))
453 (inputs
454 `(("libmediainfo" ,libmediainfo)))
455 (arguments
456 `(#:phases
457 (modify-phases %standard-phases
458 (add-after 'unpack 'patch-libmediainfo
459 (lambda _
460 (substitute* "pymediainfo/__init__.py"
461 (("libmediainfo.so.0")
462 (string-append (assoc-ref %build-inputs "libmediainfo")
463 "/lib/libmediainfo.so.0")))
464 #t))
465 (replace 'check
466 (lambda _
467 ;; Extend PYTHONPATH so the built package will be found.
468 (setenv "PYTHONPATH"
469 (string-append (getcwd) "/build/lib:"
470 (getenv "PYTHONPATH")))
471 ;; Skip the only failing test "test_parse_url"
472 (invoke "pytest" "-vv" "-k" "not test_parse_url")
473 #t)))))
474 (home-page
475 "https://github.com/sbraz/pymediainfo")
476 (synopsis
477 "Python wrapper for the mediainfo library")
478 (description
479 "Python wrapper for the mediainfo library to access the technical and tag
480 data for video and audio files.")
481 (license license:expat)))
482
483 (define-public python-psutil
484 (package
485 (name "python-psutil")
486 (version "5.7.2")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "psutil" version))
491 (sha256
492 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
493 (build-system python-build-system)
494 (arguments
495 ;; FIXME: some tests do not return and time out. Some tests fail because
496 ;; some processes survive kill().
497 '(#:tests? #f))
498 (home-page "https://www.github.com/giampaolo/psutil")
499 (synopsis "Library for retrieving information on running processes")
500 (description
501 "psutil (Python system and process utilities) is a library for retrieving
502 information on running processes and system utilization (CPU, memory, disks,
503 network) in Python. It is useful mainly for system monitoring, profiling and
504 limiting process resources and management of running processes. It implements
505 many functionalities offered by command line tools such as: ps, top, lsof,
506 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
507 pidof, tty, taskset, pmap.")
508 (properties `((python2-variant . ,(delay python2-psutil))))
509 (license license:bsd-3)))
510
511 (define-public python2-psutil
512 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
513 (package
514 (inherit base)
515 (propagated-inputs
516 `(("python2-enum34" ,python2-enum34) ;optional
517 ,@(package-propagated-inputs base))))))
518
519 (define-public python-shapely
520 (package
521 (name "python-shapely")
522 (version "1.7.1")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "Shapely" version))
527 (sha256
528 (base32
529 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
530 (modules '((guix build utils)))
531 (snippet
532 '(begin
533 (delete-file "shapely/speedups/_speedups.c")
534 (delete-file "shapely/vectorized/_vectorized.c")
535 #t))))
536 (build-system python-build-system)
537 (native-inputs
538 `(("python-cython" ,python-cython)
539 ("python-matplotlib" ,python-matplotlib)
540 ("python-pytest" ,python-pytest)
541 ("python-pytest-cov" ,python-pytest-cov)))
542 (inputs
543 `(("geos" ,geos)))
544 (propagated-inputs
545 `(("python-numpy" ,python-numpy)))
546 (arguments
547 `(#:phases
548 (modify-phases %standard-phases
549 (add-after 'unpack 'patch-geos-path
550 (lambda* (#:key inputs #:allow-other-keys)
551 (let ((geos (assoc-ref inputs "geos"))
552 (glibc (assoc-ref inputs ,(if (%current-target-system)
553 "cross-libc" "libc"))))
554 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
555 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
556 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
557 geos "/lib/libgeos_c.so'])"))
558 (("free = load_dll\\('c'\\)\\.free")
559 (string-append "free = load_dll('c', fallbacks=['"
560 glibc "/lib/libc.so.6']).free"))
561 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
562 (string-append "free = load_dll('c', fallbacks=['"
563 glibc "/lib/libc.so.6']).free"))))
564 #t)))))
565 (home-page "https://github.com/Toblerity/Shapely")
566 (synopsis "Library for the manipulation and analysis of geometric objects")
567 (description "Shapely is a Python package for manipulation and analysis of
568 planar geometric objects. It is based on the @code{GEOS} library.")
569 (license license:bsd-3)))
570
571 (define-public python-shortuuid
572 (package
573 (name "python-shortuuid")
574 (version "0.5.0")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "shortuuid" version))
579 (sha256
580 (base32
581 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
582 (build-system python-build-system)
583 (native-inputs
584 `(("python-pep8" ,python-pep8)))
585 (home-page "https://github.com/skorokithakis/shortuuid")
586 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
587 (description
588 "@code{shortuuid} is a Python library for generating concise, unambiguous
589 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
590 module and then similar looking characters are removed.")
591 (license license:bsd-3)))
592
593 (define-public python-logwrap
594 (package
595 (name "python-logwrap")
596 (version "3.2.1")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (pypi-uri "logwrap" version ".zip"))
601 (sha256
602 (base32
603 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
604 (build-system python-build-system)
605 (propagated-inputs
606 `(("python-six" ,python-six)
607 ("python-typing" ,python-typing)))
608 (native-inputs
609 `(("unzip" ,unzip)
610 ("python-cython" ,python-cython)
611 ("python-pytest" ,python-pytest)
612 ("python-pytest-cov" ,python-pytest-cov)
613 ("python-pytest-runner" ,python-pytest-runner)))
614 (home-page "https://github.com/penguinolog/logwrap")
615 (synopsis "Decorator for logging function arguments")
616 (description "This package provides a decorator to log function arguments
617 and function call return values in a human-readable way.")
618 (license license:asl2.0)))
619
620 (define-public python2-shapely
621 (package-with-python2 python-shapely))
622
623 (define-public python-clyent
624 (package
625 (name "python-clyent")
626 (version "1.2.1")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "clyent" version))
631 (sha256
632 (base32
633 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
634 (build-system python-build-system)
635 (native-inputs
636 `(("python-mock" ,python-mock)))
637 (home-page "https://github.com/Anaconda-Platform/clyent")
638 (synopsis "Command line client library")
639 (description "Clyent is a Python command line utility library. It is used
640 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
641 (license license:bsd-3)))
642
643 (define-public python2-clyent
644 (package-with-python2 python-clyent))
645
646 (define-public python-babel
647 (package
648 (name "python-babel")
649 (version "2.8.0")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (pypi-uri "Babel" version))
654 (sha256
655 (base32
656 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
657 (build-system python-build-system)
658 (native-inputs
659 `(("python-freezegun" ,python-freezegun)
660 ("python-pytest" ,python-pytest)))
661 (propagated-inputs
662 `(("python-pytz" ,python-pytz)))
663 (arguments
664 `(#:phases (modify-phases %standard-phases
665 (replace 'check
666 (lambda _
667 (invoke "pytest" "-vv" "-k"
668 (string-append
669 ;; XXX: These tests fail when using Pytest 4.x and
670 ;; Babel 2.6.0. Try removing this for later versions.
671 "not test_no_inherit_metazone_marker_never_in_output"
672 " and not test_smoke_dates"
673 " and not test_smoke_numbers")))))))
674 (home-page "http://babel.pocoo.org/")
675 (synopsis
676 "Tools for internationalizing Python applications")
677 (description
678 "Babel is composed of two major parts:
679 - tools to build and work with gettext message catalogs
680 - a Python interface to the CLDR (Common Locale Data Repository), providing
681 access to various locale display names, localized number and date formatting,
682 etc. ")
683 (license license:bsd-3)))
684
685 (define-public python2-babel
686 (package-with-python2 python-babel))
687
688 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
689 (define-public python2-babel-2.6
690 (package
691 (inherit python2-babel)
692 (version "2.6.0")
693 (source (origin
694 (method url-fetch)
695 (uri (pypi-uri "Babel" version))
696 (sha256
697 (base32
698 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
699
700 (define-public python2-backport-ssl-match-hostname
701 (package
702 (name "python2-backport-ssl-match-hostname")
703 (version "3.5.0.1")
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "backports.ssl_match_hostname" version))
708 (sha256
709 (base32
710 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
711 (build-system python-build-system)
712 (arguments
713 `(#:python ,python-2
714 #:tests? #f)) ; no test target
715 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
716 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
717 (description
718 "This backport brings the ssl.match_hostname() function to users of
719 earlier versions of Python. The function checks the hostname in the
720 certificate returned by the server to which a connection has been established,
721 and verifies that it matches the intended target hostname.")
722 (license license:psfl)))
723
724 (define-public python-bitarray
725 (package
726 (name "python-bitarray")
727 (version "1.4.0")
728 (source (origin
729 (method url-fetch)
730 (uri (pypi-uri "bitarray" version))
731 (sha256
732 (base32
733 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
734 (build-system python-build-system)
735 (home-page "https://github.com/ilanschnell/bitarray")
736 (synopsis "Efficient arrays of booleans")
737 (description "This package provides an object type which efficiently
738 represents an array of booleans. Bitarrays are sequence types and behave very
739 much like usual lists. Eight bits are represented by one byte in a contiguous
740 block of memory. The user can select between two representations:
741 little-endian and big-endian. All of the functionality is implemented in C.
742 Methods for accessing the machine representation are provided. This can be
743 useful when bit level access to binary files is required, such as portable
744 bitmap image files. Also, when dealing with compressed data which uses
745 variable bit length encoding, you may find this module useful.")
746 (license license:psfl)))
747
748 (define-public python-boolean.py
749 (package
750 (name "python-boolean.py")
751 (version "3.6")
752 (source
753 (origin
754 ;; There's no source tarball on PyPI.
755 (method git-fetch)
756 (uri (git-reference
757 (url "https://github.com/bastikr/boolean.py")
758 (commit (string-append "v" version))))
759 (file-name (git-file-name name version))
760 (sha256
761 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
762 (build-system python-build-system)
763 (home-page "https://github.com/bastikr/boolean.py")
764 (synopsis "Boolean algebra in one Python module")
765 (description
766 "This is a small Python library that implements boolean algebra.
767 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
768 @code{Symbol} class that can take on one of these two values. Calculations
769 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
770 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
771 Expressions are constructed from parsed strings or directly in Python.")
772 (license license:bsd-2)))
773
774 (define-public python-hdf4
775 (package
776 (name "python-hdf4")
777 (version "0.9")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (pypi-uri name version))
782 (sha256
783 (base32
784 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
785 (build-system python-build-system)
786 (native-inputs `(("nose" ,python-nose)))
787 (propagated-inputs `(("numpy" ,python-numpy)))
788 (inputs
789 `(("hdf4" ,hdf4)
790 ("libjpeg" ,libjpeg-turbo)
791 ("zlib" ,zlib)))
792 (arguments
793 `(#:phases
794 (modify-phases %standard-phases
795 (replace 'check
796 (lambda _
797 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
798 ;; on to import numpy. Somehow this works on their CI system.
799 ;; Let's just manage PYTHONPATH here instead.
800 (substitute* "runexamples.sh"
801 (("export PYTHONPATH=.*") ""))
802 (setenv "PYTHONPATH"
803 (string-append (getcwd) ":"
804 (getenv "PYTHONPATH")))
805 (invoke "./runexamples.sh")
806 (invoke "nosetests" "-v"))))))
807 (home-page "https://github.com/fhs/python-hdf4")
808 (synopsis "Python interface to the NCSA HDF4 library")
809 (description
810 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
811 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
812 NetCDF files can also be read and modified. Python-HDF4 is a fork of
813 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
814 (license license:expat)))
815
816 (define-public python2-hdf4
817 (package-with-python2 python-hdf4))
818
819 (define-public python-h5py
820 (package
821 (name "python-h5py")
822 (version "2.10.0")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "h5py" version))
827 (sha256
828 (base32
829 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
830 (build-system python-build-system)
831 (arguments
832 `(#:tests? #f ; no test target
833 #:phases
834 (modify-phases %standard-phases
835 (add-after 'unpack 'fix-hdf5-paths
836 (lambda* (#:key inputs #:allow-other-keys)
837 (let ((prefix (assoc-ref inputs "hdf5")))
838 (substitute* "setup_build.py"
839 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
840 (string-append "['" prefix "/lib" "']"))
841 (("'/opt/local/include', '/usr/local/include'")
842 (string-append "'" prefix "/include" "'")))
843 (substitute* "setup_configure.py"
844 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
845 (string-append "['" prefix "/lib" "']")))
846 #t))))))
847 (propagated-inputs
848 `(("python-six" ,python-six)
849 ("python-numpy" ,python-numpy)))
850 (inputs
851 `(("hdf5" ,hdf5-1.10)))
852 (native-inputs
853 `(("python-cython" ,python-cython)
854 ("python-pkgconfig" ,python-pkgconfig)
855 ("pkg-config" ,pkg-config)))
856 (home-page "https://www.h5py.org/")
857 (synopsis "Read and write HDF5 files from Python")
858 (description
859 "The h5py package provides both a high- and low-level interface to the
860 HDF5 library from Python. The low-level interface is intended to be a
861 complete wrapping of the HDF5 API, while the high-level component supports
862 access to HDF5 files, datasets and groups using established Python and NumPy
863 concepts.")
864 (license license:bsd-3)))
865
866 (define-public python2-h5py
867 (package-with-python2 python-h5py))
868
869 (define-public python-sh
870 (package
871 (name "python-sh")
872 (version "1.12.14")
873 (source
874 (origin
875 (method url-fetch)
876 (uri (pypi-uri "sh" version))
877 (sha256
878 (base32
879 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
880 (build-system python-build-system)
881 (arguments
882 '(#:phases
883 (modify-phases %standard-phases
884 (replace 'check
885 (lambda _
886 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
887 (setenv "HOME" "/tmp")
888 (invoke "python" "sh.py" "test"))))))
889 (native-inputs
890 `(("python-coverage" ,python-coverage)))
891 (home-page "https://github.com/amoffat/sh")
892 (synopsis "Python subprocess replacement")
893 (description "This package provides a replacement for Python's
894 @code{subprocess} feature.")
895 (license license:expat)))
896
897 (define-public python2-sh
898 (package-with-python2 python-sh))
899
900 (define-public python-cftime
901 (package
902 (name "python-cftime")
903 (version "1.0.4.2")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "cftime" version))
908 (sha256
909 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
910 (build-system python-build-system)
911 (propagated-inputs
912 `(("python-numpy" ,python-numpy)))
913 (native-inputs
914 `(("python-coveralls" ,python-coveralls)
915 ("python-cython" ,python-cython)
916 ("python-pytest-cov" ,python-pytest-cov)))
917 (home-page "https://github.com/Unidata/cftime")
918 (synopsis "Library for time handling")
919 (description
920 "This package provides time-handling functionality that used to be part
921 of the netcdf4 package before.")
922 ;; This package claims to include code under the GPLv3 but is released
923 ;; under ISC.
924 (license (list license:isc license:gpl3+))))
925
926 (define-public python-netcdf4
927 (package
928 (name "python-netcdf4")
929 (version "1.5.3")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "netCDF4" version))
934 (sha256
935 (base32
936 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
937 (build-system python-build-system)
938 (arguments
939 '(#:phases
940 (modify-phases %standard-phases
941 (add-after 'unpack 'configure-locations
942 (lambda* (#:key inputs #:allow-other-keys)
943 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
944 #t)))))
945 (native-inputs
946 `(("python-cython" ,python-cython)))
947 (propagated-inputs
948 `(("python-numpy" ,python-numpy)
949 ("python-cftime" ,python-cftime)))
950 (inputs
951 `(("netcdf" ,netcdf)
952 ("hdf4" ,hdf4)
953 ("hdf5" ,hdf5)))
954 (home-page "https://github.com/Unidata/netcdf4-python")
955 (synopsis "Python/numpy interface to the netCDF library")
956 (description "Netcdf4-python is a Python interface to the netCDF C
957 library. netCDF version 4 has many features not found in earlier
958 versions of the library and is implemented on top of HDF5. This module
959 can read and write files in both the new netCDF 4 and the old netCDF 3
960 format, and can create files that are readable by HDF5 clients. The
961 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
962 to users of that module.")
963 ;; The software is mainly ISC, but includes some files covered
964 ;; by the Expat license.
965 (license (list license:isc license:expat))))
966
967 (define-public python-license-expression
968 (package
969 (name "python-license-expression")
970 (version "0.999")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "license-expression" version))
975 (sha256
976 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
977 (build-system python-build-system)
978 (propagated-inputs
979 `(("python-boolean.py" ,python-boolean.py)))
980 (home-page "https://github.com/nexB/license-expression")
981 (synopsis "Apply boolean logic to license expressions")
982 (description
983 "This Python module defines a tiny language to evaluate and compare
984 license expressions using boolean logic. Logical combinations of licenses can
985 be tested for equality, containment, and equivalence. They can be normalised
986 and simplified. It supports SPDX license expressions as well as other naming
987 conventions and aliases in the same expression.")
988 (license license:gpl2+)))
989
990 (define-public python-lockfile
991 (package
992 (name "python-lockfile")
993 (version "0.12.2")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "lockfile" version))
998 (sha256
999 (base32
1000 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1001 (build-system python-build-system)
1002 (arguments '(#:test-target "check"))
1003 (native-inputs
1004 `(("python-pbr" ,python-pbr)))
1005 (home-page "https://launchpad.net/pylockfile")
1006 (synopsis "Platform-independent file locking module")
1007 (description
1008 "The lockfile package exports a LockFile class which provides a simple
1009 API for locking files.")
1010 (license license:expat)))
1011
1012 (define-public python2-lockfile
1013 (package-with-python2 python-lockfile))
1014
1015 (define-public python-filelock
1016 (package
1017 (name "python-filelock")
1018 (version "3.0.12")
1019 (source
1020 (origin
1021 (method url-fetch)
1022 (uri (pypi-uri "filelock" version))
1023 (sha256
1024 (base32
1025 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1026 (build-system python-build-system)
1027 (home-page
1028 "https://github.com/benediktschmitt/py-filelock")
1029 (synopsis "Platform independent file lock")
1030 (description "@code{filelock} contains a single module implementing
1031 a platform independent file lock in Python, which provides a simple way of
1032 inter-process communication.")
1033 (license license:unlicense)))
1034
1035 (define-public python-semantic-version
1036 (package
1037 (name "python-semantic-version")
1038 (version "2.6.0")
1039 (source
1040 (origin
1041 (method url-fetch)
1042 (uri (pypi-uri "semantic_version" version))
1043 (sha256
1044 (base32
1045 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1046 (build-system python-build-system)
1047 (arguments
1048 `(#:tests? #f)) ; PyPI tarball lacks tests
1049 (home-page "https://github.com/rbarrois/python-semanticversion")
1050 (synopsis "Semantic versioning module for Python")
1051 (description
1052 "The @code{semantic_version} class is a small library for handling
1053 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1054
1055 It can compare versions, generate a new version that represents a bump in one of
1056 the version levels, and check whether any given string is a proper semantic
1057 version identifier.")
1058 (license license:bsd-3)))
1059
1060 (define-public python2-semantic-version
1061 (package-with-python2 python-semantic-version))
1062
1063 (define-public python-serpent
1064 (package
1065 (name "python-serpent")
1066 (version "1.28")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "serpent" version))
1071 (sha256
1072 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1073 (build-system python-build-system)
1074 (native-inputs
1075 `(("python-attrs" ,python-attrs)
1076 ("python-pytz" ,python-pytz)))
1077 (home-page "https://github.com/irmen/Serpent")
1078 (synopsis "Serializer for literal Python expressions")
1079 (description
1080 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1081 serialization. It serializes an object tree into bytes (an utf-8 encoded
1082 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1083 to rebuild the original object tree.
1084
1085 Because only safe literals are encoded, it is safe to send serpent data to
1086 other machines, such as over the network.")
1087 (properties `((python2-variant . ,(delay python2-serpent))))
1088 (license license:expat)))
1089
1090 (define-public python2-serpent
1091 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1092 (package
1093 (inherit base)
1094 (propagated-inputs
1095 `(("python-enum34" ,python2-enum34)
1096 ,@(package-propagated-inputs base))))))
1097
1098 (define-public python-setuptools
1099 (package
1100 (name "python-setuptools")
1101 (version "41.0.1")
1102 (source
1103 (origin
1104 (method url-fetch)
1105 (uri (pypi-uri "setuptools" version ".zip"))
1106 (sha256
1107 (base32
1108 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1109 (modules '((guix build utils)))
1110 (snippet
1111 '(begin
1112 ;; Remove included binaries which are used to build self-extracting
1113 ;; installers for Windows.
1114 ;; TODO: Find some way to build them ourself so we can include them.
1115 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1116 #t))))
1117 (build-system python-build-system)
1118 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1119 ;; One could bootstrap with an internal untested setuptools.
1120 (arguments
1121 `(#:tests? #f))
1122 (home-page "https://pypi.org/project/setuptools/")
1123 (synopsis
1124 "Library designed to facilitate packaging Python projects")
1125 (description
1126 "Setuptools is a fully-featured, stable library designed to facilitate
1127 packaging Python projects, where packaging includes:
1128 Python package and module definitions,
1129 distribution package metadata,
1130 test hooks,
1131 project installation,
1132 platform-specific details,
1133 Python 3 support.")
1134 ;; TODO: setuptools now bundles the following libraries:
1135 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1136 (license (list license:psfl ; setuptools itself
1137 license:expat ; six, appdirs, pyparsing
1138 license:asl2.0 ; packaging is dual ASL2/BSD-2
1139 license:bsd-2))))
1140
1141 (define-public python2-setuptools
1142 (package-with-python2 python-setuptools))
1143
1144 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1145 (define-public python-setuptools-for-tensorflow
1146 (hidden-package
1147 (package
1148 (inherit python-setuptools)
1149 (version "39.1.0")
1150 (source (origin
1151 (inherit (package-source python-setuptools))
1152 (uri (pypi-uri "setuptools" version ".zip"))
1153 (sha256
1154 (base32
1155 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1156
1157 (define-public python-uniseg
1158 (package
1159 (name "python-uniseg")
1160 (version "0.7.1")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "uniseg" version ".zip"))
1165 (sha256
1166 (base32
1167 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1168 (build-system python-build-system)
1169 (arguments
1170 '(#:tests? #f)) ; The test suite requires network access.
1171 (native-inputs
1172 `(("unzip" ,unzip)))
1173 (home-page
1174 "https://bitbucket.org/emptypage/uniseg-python")
1175 (synopsis
1176 "Python library to determine Unicode text segmentations")
1177 (description
1178 "Uniseg is a Python package used to determine Unicode text segmentations.
1179 Supported segmentations include:
1180 @enumerate
1181 @item @dfn{Code point} (any value in the Unicode codespace)
1182 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1183 multiple Unicode code points, e.g. \"G\" + acute-accent)
1184 @item Word break
1185 @item Sentence break
1186 @item Line break
1187 @end enumerate")
1188 (license license:expat)))
1189
1190 (define-public python2-uniseg
1191 (package-with-python2 python-uniseg))
1192
1193 (define-public python-humanfriendly
1194 (package
1195 (name "python-humanfriendly")
1196 (version "8.2")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "humanfriendly" version))
1201 (sha256
1202 (base32
1203 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1204 (build-system python-build-system)
1205 (arguments
1206 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1207 #:tests? #f))
1208 (home-page "https://humanfriendly.readthedocs.io")
1209 (synopsis "Human-friendly input and output in Python")
1210 (description
1211 "The functions and classes in @code{humanfriendly} can be used to make
1212 text interfaces more user-friendly. It includes tools to parse and format
1213 numbers, file sizes, and timespans, timers for long-running operations, menus
1214 to allow the user to choose from a list of options, and terminal interaction
1215 helpers.")
1216 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1217 (license license:expat)))
1218
1219 (define-public python2-humanfriendly
1220 (let ((base (package-with-python2
1221 (strip-python2-variant python-humanfriendly))))
1222 (package (inherit base)
1223 (propagated-inputs
1224 `(("python2-monotonic" ,python2-monotonic)
1225 ,@(package-propagated-inputs base))))))
1226
1227 (define-public python-textparser
1228 (package
1229 (name "python-textparser")
1230 (version "0.23.0")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "textparser" version))
1235 (sha256
1236 (base32
1237 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1238 (build-system python-build-system)
1239 (home-page "https://github.com/eerimoq/textparser")
1240 (synopsis "Fast text parser for Python")
1241 (description "This library provides a text parser written in the Python
1242 language. It aims to be fast.")
1243 (license license:expat)))
1244
1245 (define-public python-aenum
1246 (package
1247 (name "python-aenum")
1248 (version "2.2.4")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (pypi-uri "aenum" version))
1253 (sha256
1254 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1255 (build-system python-build-system)
1256 (arguments
1257 `(#:phases (modify-phases %standard-phases
1258 (replace 'check
1259 (lambda _
1260 (format #t "current working dir ~s~%" (getcwd))
1261 (setenv "PYTHONPATH"
1262 (string-append ".:" (getenv "PYTHONPATH")))
1263 ;; We must run the test suite module directly, as it
1264 ;; fails to define the 'tempdir' variable in scope for
1265 ;; the tests otherwise
1266 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1267 ;; issues/32/running-tests-with-python-setuppy-test).
1268 (invoke "python3" "aenum/test.py")
1269 ;; This one fails with "NameError: name
1270 ;; 'test_pickle_dump_load' is not defined" (see:
1271 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1272 ;; /error-running-the-test_v3py-test-suite).
1273 ;; (invoke "python3" "aenum/test_v3.py")
1274 #t)))))
1275 (home-page "https://bitbucket.org/stoneleaf/aenum")
1276 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1277 (description "The aenum library includes an @code{Enum} base class, a
1278 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1279 class.")
1280 (license license:bsd-3)))
1281
1282 (define-public python-can
1283 (package
1284 (name "python-can")
1285 (version "3.3.3")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "python-can" version))
1290 (sha256
1291 (base32
1292 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1293 (build-system python-build-system)
1294 (arguments
1295 `(#:phases (modify-phases %standard-phases
1296 (add-after 'unpack 'relax-version-requirements
1297 (lambda _
1298 (substitute* "setup.py"
1299 (("mock~=2\\.0") "mock")
1300 (("coverage<5") "coverage")
1301 (("pytest~=4\\.3") "pytest")
1302 (("hypothesis~=4\\.56") "hypothesis"))
1303 #t))
1304 (add-after 'unpack 'fix-broken-tests
1305 ;; The tests try to run two scripts it expects should be
1306 ;; in PATH, but they aren't at this time (see:
1307 ;; https://github.com/hardbyte/python-can/issues/805).
1308 (lambda _
1309 (substitute* "test/test_scripts.py"
1310 (("\"can_logger\\.py --help\"") "")
1311 (("\"can_player\\.py --help\"") ""))
1312 #t)))))
1313 (propagated-inputs
1314 `(("python-aenum" ,python-aenum)
1315 ("python-wrapt" ,python-wrapt)))
1316 (native-inputs
1317 `(("python-codecov" ,python-codecov)
1318 ("python-coverage" ,python-coverage)
1319 ("python-future" ,python-future)
1320 ("python-hypothesis" ,python-hypothesis)
1321 ("python-mock" ,python-mock)
1322 ("python-pyserial" ,python-pyserial)
1323 ("python-pytest" ,python-pytest)
1324 ("python-pytest-cov" ,python-pytest-cov)
1325 ("python-pytest-runner" ,python-pytest-runner)
1326 ("python-pytest-timeout" ,python-pytest-timeout)))
1327 (home-page "https://github.com/hardbyte/python-can")
1328 (synopsis "Controller Area Network (CAN) interface module for Python")
1329 (description "This package defines the @code{can} module, which provides
1330 controller area network (CAN) support for Python developers; providing common
1331 abstractions to different hardware devices, and a suite of utilities for
1332 sending and receiving messages on a CAN bus.")
1333 (license license:lgpl3+)))
1334
1335 (define-public python-diskcache
1336 (package
1337 (name "python-diskcache")
1338 (version "4.1.0")
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "diskcache" version))
1343 (sha256
1344 (base32
1345 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:tests? #f)) ;test suite not included in the release
1349 (home-page "http://www.grantjenks.com/docs/diskcache/")
1350 (synopsis "Disk and file backed cache library")
1351 (description "DiskCache is a disk and file backed persistent cache.")
1352 (license license:asl2.0)))
1353
1354 (define-public python-bitstruct
1355 (package
1356 (name "python-bitstruct")
1357 (version "8.9.0")
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "bitstruct" version))
1362 (sha256
1363 (base32
1364 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1365 (build-system python-build-system)
1366 (home-page "https://github.com/eerimoq/bitstruct")
1367 (synopsis "Python values to and C bit field structs converter")
1368 (description "This module performs conversions between Python values and C
1369 bit field structs represented as Python byte strings. It is intended to have
1370 a similar interface as the @code{struct} module from Python, but working on
1371 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1372 (license license:expat)))
1373
1374 (define-public python-cantools
1375 (package
1376 (name "python-cantools")
1377 (version "33.1.1")
1378 (source
1379 (origin
1380 ;; We take the sources from the Git repository as the documentation is
1381 ;; not included with the PyPI archive.
1382 (method git-fetch)
1383 (uri (git-reference
1384 (url "https://github.com/eerimoq/cantools")
1385 (commit version)))
1386 (file-name (git-file-name name version))
1387 (sha256
1388 (base32
1389 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases
1393 (modify-phases %standard-phases
1394 (add-after 'build 'build-doc
1395 (lambda _
1396 ;; See: https://github.com/eerimoq/cantools/issues/190.
1397 (substitute* "README.rst"
1398 (("https://github.com/eerimoq/cantools/raw/master\
1399 /docs/monitor.png")
1400 "monitor.png"))
1401 (with-directory-excursion "docs"
1402 (invoke "make" "man" "info"))))
1403 (add-after 'install 'install-doc
1404 (lambda* (#:key outputs #:allow-other-keys)
1405 (let* ((out (assoc-ref outputs "out"))
1406 (info (string-append out "/share/info"))
1407 (man1 (string-append out "/share/man/man1")))
1408 (format #t "CWD: ~s~%" (getcwd))
1409 (install-file "docs/_build/texinfo/cantools.info" info)
1410 (install-file "docs/_build/man/cantools.1" man1)
1411 #t))))))
1412 (native-inputs
1413 `(("sphinx" ,python-sphinx)
1414 ("texinfo" ,texinfo)))
1415 (propagated-inputs
1416 `(("python-bitstruct" ,python-bitstruct)
1417 ("python-can" ,python-can)
1418 ("python-diskcache" ,python-diskcache)
1419 ("python-textparser" ,python-textparser)))
1420 (home-page "https://github.com/eerimoq/cantools")
1421 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1422 (description "This package includes Controller Area Network (CAN) related
1423 tools that can be used to:
1424 @itemize
1425 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1426 @item encode and decode CAN messages
1427 @item multiplex simple and extended signals
1428 @item diagnose DID encoding and decoding
1429 @item dump the CAN decoder output
1430 @item test CAN nodes
1431 @item generate C source code
1432 @item monitor the CAN bus
1433 @end itemize")
1434 (license license:expat)))
1435
1436 (define-public python-capturer
1437 (package
1438 (name "python-capturer")
1439 (version "2.4")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (pypi-uri "capturer" version))
1444 (sha256
1445 (base32
1446 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1447 (build-system python-build-system)
1448 (arguments
1449 `(#:tests? #f))
1450 (propagated-inputs
1451 `(("python-humanfriendly" ,python-humanfriendly)))
1452 (home-page "https://capturer.readthedocs.io")
1453 (synopsis "Capture stdout and stderr streams of the current process")
1454 (description
1455 "The capturer package makes it easy to capture the stdout and stderr
1456 streams of the current process and subprocesses. Output can be relayed
1457 to the terminal in real time but is also available to the Python program
1458 for additional processing.")
1459 (license license:expat)))
1460
1461 (define-public python2-capturer
1462 (package-with-python2 python-capturer))
1463
1464 (define-public python-case
1465 (package
1466 (name "python-case")
1467 (version "1.5.3")
1468 (source
1469 (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "case" version))
1472 (sha256
1473 (base32
1474 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1475 (build-system python-build-system)
1476 (propagated-inputs
1477 `(("python-mock" ,python-mock)
1478 ("python-nose" ,python-nose)
1479 ("python-six" ,python-six)
1480 ("python-unittest2" ,python-unittest2)))
1481 (native-inputs
1482 `(("python-coverage" ,python-coverage)))
1483 (home-page "https://github.com/celery/case")
1484 (synopsis "Unittest utilities and convenience methods")
1485 (description
1486 "The @code{case} package provides utilities on top of unittest, including
1487 some helpful Python 2 compatibility convenience methods.")
1488 (license license:bsd-3)))
1489
1490 (define-public python-verboselogs
1491 (package
1492 (name "python-verboselogs")
1493 (version "1.7")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "verboselogs" version))
1498 (sha256
1499 (base32
1500 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1501 (build-system python-build-system)
1502 (arguments
1503 `(#:phases
1504 (modify-phases %standard-phases
1505 (replace 'check
1506 (lambda _
1507 ;; Do not run pylint plugin test, as astroid is an old
1508 ;; unsupported version.
1509 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1510 "verboselogs/tests.py"))))))
1511 (native-inputs
1512 `(("python-mock" ,python-mock)
1513 ("python-pytest" ,python-pytest)))
1514 (home-page "https://verboselogs.readthedocs.io")
1515 (synopsis "Verbose logging level for Python's logging module")
1516 (description
1517 "The @code{verboselogs} package extends Python's @code{logging} module to
1518 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1519 (license license:expat)))
1520
1521 (define-public python2-verboselogs
1522 (package-with-python2 python-verboselogs))
1523
1524 (define-public python-coloredlogs
1525 (package
1526 (name "python-coloredlogs")
1527 (version "10.0")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "coloredlogs" version))
1532 (sha256
1533 (base32
1534 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(;Tests require some updated modules
1538 #:tests? #f))
1539 (propagated-inputs
1540 `(("python-capturer" ,python-capturer)))
1541 (home-page "https://coloredlogs.readthedocs.io")
1542 (synopsis "Colored stream handler for Python's logging module")
1543 (description
1544 "The @code{coloredlogs} package enables colored terminal output for
1545 Python's logging module. The @code{ColoredFormatter} class inherits from
1546 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1547 messages in color.")
1548 (license license:expat)))
1549
1550 (define-public python2-coloredlogs
1551 (package-with-python2 python-coloredlogs))
1552
1553 (define-public python-editorconfig
1554 (package
1555 (name "python-editorconfig")
1556 (version "0.12.2")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (pypi-uri "EditorConfig" version))
1561 (sha256
1562 (base32
1563 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1564 (build-system python-build-system)
1565 (home-page "https://editorconfig.org/")
1566 (synopsis "EditorConfig bindings for python")
1567 (description "The EditorConfig project consists of a file format for
1568 defining coding styles and a collection of text editor plugins that enable
1569 editors to read the file format and adhere to defined styles. EditorConfig
1570 files are easily readable and they work nicely with version control systems.")
1571 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1572 (license (list license:bsd-2 license:psfl))))
1573
1574 (define-public dosage
1575 (package
1576 (name "dosage")
1577 (version "2.17")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "dosage" version))
1582 (sha256
1583 (base32
1584 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1585 (build-system python-build-system)
1586 (propagated-inputs
1587 `(("python2-backports-functools-lru-cache"
1588 ,python2-backports-functools-lru-cache)
1589 ("python2-backports-shutil-get-terminal-size"
1590 ,python2-backports-shutil-get-terminal-size)
1591 ("python-cached-property" ,python-cached-property)
1592 ("python-colorama" ,python-colorama)
1593 ("python-imagesize" ,python-imagesize)
1594 ("python-importlib-metadata" ,python-importlib-metadata)
1595 ("python-lxml" ,python-lxml)
1596 ("python-requests" ,python-requests)
1597 ("python-six" ,python-six)))
1598 (native-inputs
1599 `(("python-pytest-cov" ,python-pytest-cov)
1600 ("python-pytest-xdist" ,python-pytest-xdist)
1601 ("python-responses" ,python-responses)
1602 ("python-setuptools-scm" ,python-setuptools-scm)))
1603 (home-page "https://github.com/webcomics/dosage")
1604 (synopsis "Comic strip downloader and archiver")
1605 (description "Dosage is designed to keep a local copy of specific webcomics and other
1606 picture-based content such as Picture of the Day sites. With the @command{dosage}
1607 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1608 downloaded, or download a strip for a particular date or index, if possible.")
1609 (license license:expat)))
1610
1611 (define-public python-et-xmlfile
1612 (package
1613 (name "python-et-xmlfile")
1614 (version "1.0.1")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (pypi-uri "et_xmlfile" version))
1619 (sha256
1620 (base32
1621 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:phases (modify-phases %standard-phases
1625 (replace 'check
1626 (lambda _
1627 (invoke "pytest"))))))
1628 (native-inputs
1629 `(("python-pytest" ,python-pytest)
1630 ("python-lxml" ,python-lxml))) ;used for the tests
1631 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1632 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1633 (description "This Python library is based upon the @code{xmlfile} module
1634 from @code{lxml}. It aims to provide a low memory, compatible implementation
1635 of @code{xmlfile}.")
1636 (license license:expat)))
1637
1638 (define-public python2-et-xmlfile
1639 (package-with-python2 python-et-xmlfile))
1640
1641 (define-public python-openpyxl
1642 (package
1643 (name "python-openpyxl")
1644 (version "3.0.5")
1645 (source
1646 (origin
1647 ;; We use the upstream repository, as the tests are not included in the
1648 ;; PyPI releases.
1649 (method hg-fetch)
1650 (uri (hg-reference
1651 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1652 (changeset version)))
1653 (file-name (string-append name "-" version "-checkout"))
1654 (sha256
1655 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1656 (build-system python-build-system)
1657 (arguments
1658 `(#:phases (modify-phases %standard-phases
1659 (replace 'check
1660 (lambda _
1661 (invoke "pytest"))))))
1662 (native-inputs
1663 ;; For the test suite.
1664 `(("python-lxml" ,python-lxml)
1665 ("python-pillow" ,python-pillow)
1666 ("python-pytest" ,python-pytest)))
1667 (propagated-inputs
1668 `(("python-et-xmlfile" ,python-et-xmlfile)
1669 ("python-jdcal" ,python-jdcal)))
1670 (home-page "https://openpyxl.readthedocs.io")
1671 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1672 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1673 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1674 standard.")
1675 (properties `((python2-variant . ,(delay python2-openpyxl))))
1676 (license license:expat)))
1677
1678 (define-public python2-openpyxl
1679 (let ((base (package-with-python2
1680 (strip-python2-variant python-openpyxl))))
1681 (package
1682 (inherit base)
1683 ;; This is the latest version that has python2 support
1684 (version "2.6.4")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (pypi-uri "openpyxl" version))
1689 (sha256
1690 (base32
1691 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1692 (arguments '(#:tests? #f))))) ; No test suite.
1693
1694 (define-public python-eventlet
1695 (package
1696 (name "python-eventlet")
1697 (version "0.25.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "eventlet" version))
1702 (sha256
1703 (base32
1704 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1705 (build-system python-build-system)
1706 (propagated-inputs
1707 `(("python-greenlet" ,python-greenlet)))
1708 (arguments
1709 ;; TODO: Requires unpackaged 'enum-compat'.
1710 '(#:tests? #f))
1711 (home-page "https://eventlet.net")
1712 (synopsis "Concurrent networking library for Python")
1713 (description
1714 "Eventlet is a concurrent networking library for Python that
1715 allows you to change how you run your code, not how you write it.
1716 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1717 Coroutines ensure that the developer uses a blocking style of programming
1718 that is similar to threading, but provide the benefits of non-blocking I/O.
1719 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1720 from the Python interpreter, or as a small part of a larger application.")
1721 (license license:expat)))
1722
1723 (define-public python2-eventlet
1724 (let ((base (package-with-python2
1725 (strip-python2-variant python-eventlet))))
1726 (package (inherit base)
1727 (propagated-inputs
1728 `(("python2-enum34" ,python2-enum34)
1729 ,@(package-propagated-inputs base))))))
1730
1731 (define-public python-six
1732 (package
1733 (name "python-six")
1734 (version "1.14.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "six" version))
1739 (sha256
1740 (base32
1741 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1742 (build-system python-build-system)
1743 (arguments
1744 `(#:phases
1745 (modify-phases %standard-phases
1746 (replace 'check
1747 (lambda _
1748 (invoke "py.test" "-v"))))))
1749 (native-inputs
1750 `(("python-pytest" ,python-pytest-bootstrap)))
1751 (home-page "https://pypi.org/project/six/")
1752 (synopsis "Python 2 and 3 compatibility utilities")
1753 (description
1754 "Six is a Python 2 and 3 compatibility library. It provides utility
1755 functions for smoothing over the differences between the Python versions with
1756 the goal of writing Python code that is compatible on both Python versions.
1757 Six supports every Python version since 2.5. It is contained in only one
1758 Python file, so it can be easily copied into your project.")
1759 (license license:x11)))
1760
1761 (define-public python2-six
1762 (package-with-python2 python-six))
1763
1764 (define-public python-six-bootstrap
1765 (package
1766 (inherit python-six)
1767 (name "python-six-bootstrap")
1768 (native-inputs `())
1769 (arguments `(#:tests? #f))))
1770
1771 (define-public python2-six-bootstrap
1772 (package-with-python2 python-six-bootstrap))
1773
1774 (define-public python-schedule
1775 (package
1776 (name "python-schedule")
1777 (version "0.4.3")
1778 (source
1779 (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "schedule" version))
1782 (sha256
1783 (base32
1784 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1785 (build-system python-build-system)
1786 (native-inputs
1787 `(("python-pytest" ,python-pytest)
1788 ("python-mock" ,python-mock)))
1789 (home-page "https://github.com/dbader/schedule")
1790 (synopsis "Schedule periodic function calls in Python")
1791 (description
1792 "Schedule is an in-process scheduler for periodic jobs that uses the
1793 builder pattern for configuration. Schedule lets you run Python functions (or
1794 any other callable) periodically at pre-determined intervals using a simple,
1795 human-friendly syntax.")
1796 (license license:expat)))
1797
1798 (define-public python2-schedule
1799 (package-with-python2 python-schedule))
1800
1801 (define-public python-scour
1802 (package
1803 (name "python-scour")
1804 (version "038.1")
1805 (source
1806 (origin
1807 (method git-fetch)
1808 (uri
1809 (git-reference
1810 (url "https://github.com/scour-project/scour")
1811 (commit
1812 (string-append "v" version))))
1813 (file-name (git-file-name name version))
1814 (sha256
1815 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1816 (propagated-inputs
1817 `(("python-six" ,python-six)))
1818 (build-system python-build-system)
1819 (home-page "https://github.com/scour-project/scour")
1820 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1821 (description "The goal of Scour is to output a file that renderes
1822 identically at a fraction of the size by removing a lot of redundant
1823 information created by most SVG editors. Optimization options are typically
1824 lossless but can be tweaked for more aggressive cleaning.")
1825 (license license:asl2.0)))
1826
1827 (define-public python-mechanize
1828 (package
1829 (name "python-mechanize")
1830 (version "0.4.5")
1831 (source
1832 (origin
1833 (method url-fetch)
1834 (uri (pypi-uri "mechanize" version))
1835 (sha256
1836 (base32
1837 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1838 (build-system python-build-system)
1839 (propagated-inputs
1840 `(("python-html5lib" ,python-html5lib)))
1841 (home-page "https://github.com/python-mechanize/mechanize")
1842 (synopsis
1843 "Stateful programmatic web browsing in Python")
1844 (description
1845 "Mechanize implements stateful programmatic web browsing in Python,
1846 after Andy Lester’s Perl module WWW::Mechanize.")
1847 (license license:bsd-3)))
1848
1849 (define-public python2-mechanize
1850 (package-with-python2 python-mechanize))
1851
1852 (define-public python-simpleaudio
1853 (package
1854 (name "python-simpleaudio")
1855 (version "1.0.4")
1856 (source
1857 (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "simpleaudio" version))
1860 (sha256
1861 (base32
1862 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1863 (build-system python-build-system)
1864 (arguments
1865 `(#:tests? #f))
1866 (inputs
1867 `(("alsa-lib" ,alsa-lib)))
1868 (home-page
1869 "https://github.com/hamiltron/py-simple-audio")
1870 (synopsis "Simple, asynchronous audio playback for Python 3")
1871 (description
1872 "The @code{simplaudio} package provides cross-platform, dependency-free
1873 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1874 (license license:expat))) ; MIT license
1875
1876 (define-public python-simplejson
1877 (package
1878 (name "python-simplejson")
1879 (version "3.17.0")
1880 (source
1881 (origin
1882 (method url-fetch)
1883 (uri (pypi-uri "simplejson" version))
1884 (sha256
1885 (base32
1886 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1887 (build-system python-build-system)
1888 (home-page "http://simplejson.readthedocs.org/en/latest/")
1889 (synopsis
1890 "Json library for Python")
1891 (description
1892 "JSON (JavaScript Object Notation) is a subset of JavaScript
1893 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1894 format.
1895
1896 Simplejson exposes an API familiar to users of the standard library marshal
1897 and pickle modules. It is the externally maintained version of the json
1898 library contained in Python 2.6, but maintains compatibility with Python 2.5
1899 and (currently) has significant performance advantages, even without using
1900 the optional C extension for speedups. Simplejson is also supported on
1901 Python 3.3+.")
1902 (license license:x11)))
1903
1904 (define-public python2-simplejson
1905 (package-with-python2 python-simplejson))
1906
1907
1908 (define-public python-pyicu
1909 (package
1910 (name "python-pyicu")
1911 (version "2.4.3")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "PyICU" version))
1916 (sha256
1917 (base32
1918 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1919 (build-system python-build-system)
1920 (inputs
1921 `(("icu4c" ,icu4c)))
1922 (native-inputs
1923 `(("python-pytest" ,python-pytest)
1924 ("python-six" ,python-six)))
1925 (home-page "https://github.com/ovalhub/pyicu")
1926 (synopsis "Python extension wrapping the ICU C++ API")
1927 (description
1928 "PyICU is a python extension wrapping the ICU C++ API.")
1929 (license license:x11)))
1930
1931 (define-public python2-pyicu
1932 (package-with-python2 python-pyicu))
1933
1934 (define-public python-dogtail
1935 (package
1936 (name "python-dogtail")
1937 (version "0.9.11")
1938 (source (origin
1939 (method url-fetch)
1940 (uri
1941 (string-append
1942 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1943 "dogtail-" version ".tar.gz"))
1944 (sha256
1945 (base32
1946 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1947 (build-system python-build-system)
1948 (arguments
1949 `(#:tests? #f ; TODO Launching dbus for the tests
1950 ; fails
1951 #:phases
1952 (modify-phases %standard-phases
1953 (replace 'check
1954 (lambda* (#:key tests? #:allow-other-keys)
1955 (when tests?
1956 (system "Xvfb :1 &")
1957 (setenv "DISPLAY" ":1")
1958 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1959 #t)))))
1960 (propagated-inputs
1961 `(("python-pygobject" ,python-pygobject)
1962 ("python-pycairo" ,python-pycairo)
1963 ("python-pyatspi" ,python-pyatspi)))
1964 (native-inputs
1965 `(("python-nose" ,python-nose)
1966 ("gtk+" ,gtk+)
1967 ("xvfb" ,xorg-server)
1968 ("dbus" ,dbus)
1969 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1970 ("gobject-introspection" ,gobject-introspection)))
1971 (home-page "https://gitlab.com/dogtail/dogtail/")
1972 (synopsis "GUI test tool and automation framework written in Python")
1973 (description
1974 "Dogtail is a GUI test tool and automation framework written in Python.
1975 It uses Accessibility (a11y) technologies to communicate with desktop
1976 applications. dogtail scripts are written in Python and executed like any
1977 other Python program.")
1978 (license license:gpl2+)))
1979
1980 (define-public python2-dogtail
1981 (package-with-python2 python-dogtail))
1982
1983 (define-public python-empy
1984 (package
1985 (name "python-empy")
1986 (version "3.3.3")
1987 (source (origin
1988 (method url-fetch)
1989 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1990 version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1994 (build-system python-build-system)
1995 (arguments
1996 `(#:tests? #f)) ; python2 only
1997 (home-page "http://www.alcyone.com/software/empy/")
1998 (synopsis "Templating system for Python")
1999 (description
2000 "EmPy is a system for embedding Python expressions and statements in
2001 template text; it takes an EmPy source file, processes it, and produces
2002 output. This is accomplished via expansions, which are special signals to the
2003 EmPy system and are set off by a special prefix (by default the at sign, @@).
2004 EmPy can expand arbitrary Python expressions and statements in this way, as
2005 well as a variety of special forms. Textual data not explicitly delimited in
2006 this way is sent unaffected to the output, allowing Python to be used in
2007 effect as a markup language. Also supported are callbacks via hooks,
2008 recording and playback via diversions, and dynamic, chainable filters. The
2009 system is highly configurable via command line options and embedded
2010 commands.")
2011 (license license:lgpl2.1+)))
2012
2013 (define-public python2-empy
2014 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2015 (package
2016 (inherit base)
2017 (arguments `(,@(package-arguments base)
2018 #:tests? #t)))))
2019
2020 (define-public python2-element-tree
2021 (package
2022 (name "python2-element-tree")
2023 (version "1.2.6")
2024 (source (origin
2025 (method url-fetch)
2026 (uri (string-append
2027 "http://effbot.org/media/downloads/elementtree-"
2028 version "-20050316.tar.gz"))
2029 (sha256
2030 (base32
2031 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2032 (build-system python-build-system)
2033 (arguments
2034 `(#:python ,python-2 ; seems to be part of Python 3
2035 #:tests? #f)) ; no 'test' sub-command
2036 (synopsis "Toolkit for XML processing in Python")
2037 (description
2038 "ElementTree is a Python library supporting lightweight XML processing.")
2039 (home-page "https://effbot.org/zone/element-index.htm")
2040 (license (license:x11-style
2041 "http://docs.python.org/2/license.html"
2042 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2043
2044 (define-public python2-pybugz
2045 (package
2046 (name "python2-pybugz")
2047 (version "0.6.11")
2048 (source (origin
2049 (method url-fetch)
2050 (uri (string-append
2051 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2052 version ".tar.gz"))
2053 (sha256
2054 (base32
2055 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2056 (patches (search-patches "pybugz-stty.patch"
2057 "pybugz-encode-error.patch"))))
2058 (build-system python-build-system)
2059 (arguments
2060 `(#:python ,python-2 ; SyntaxError with Python 3
2061 #:tests? #f)) ; no 'test' sub-command
2062 (propagated-inputs
2063 `(("element-tree" ,python2-element-tree)))
2064 (synopsis "Python and command-line interface to Bugzilla")
2065 (description
2066 "PyBugz is a Python library and command-line tool to query the Bugzilla
2067 bug tracking system. It is meant as an aid to speed up interaction with the
2068 bug tracker.")
2069 (home-page "http://www.liquidx.net/pybugz/")
2070 (license license:gpl2)))
2071
2072 (define-public python2-enum
2073 (package
2074 (name "python2-enum")
2075 (version "0.4.6")
2076 (source (origin
2077 (method url-fetch)
2078 (uri (pypi-uri "enum" version))
2079 (sha256
2080 (base32
2081 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2082 (build-system python-build-system)
2083 (arguments
2084 `(#:python ,python-2))
2085 (home-page "https://pypi.org/project/enum/")
2086 (synopsis "Robust enumerated type support in Python")
2087 (description
2088 "This provides a module for robust enumerations in Python. It has
2089 been superseded by the Python standard library and is provided only for
2090 compatibility.")
2091 ;; Choice of either license.
2092 (license (list license:gpl3+ license:psfl))))
2093
2094 (define-public python-enum34
2095 (package
2096 (name "python-enum34")
2097 (version "1.1.6")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "enum34" version))
2102 (sha256
2103 (base32
2104 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2105 (build-system python-build-system)
2106 (home-page "https://pypi.org/project/enum34/")
2107 (synopsis "Backported Python 3.4 Enum")
2108 (description
2109 "Enum34 is the new Python stdlib enum module available in Python 3.4
2110 backported for previous versions of Python from 2.4 to 3.3.")
2111 (license license:bsd-3)))
2112
2113 (define-public python2-enum34
2114 (package-with-python2 python-enum34))
2115
2116 (define-public python-parse-type
2117 (package
2118 (name "python-parse-type")
2119 (version "0.4.2")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (pypi-uri "parse_type" version))
2124 (sha256
2125 (base32
2126 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2127 (build-system python-build-system)
2128 (propagated-inputs
2129 `(("python-six" ,python-six)
2130 ("python-parse" ,python-parse)))
2131 (native-inputs
2132 `(("python-pytest" ,python-pytest)
2133 ("python-pytest-runner" ,python-pytest-runner)))
2134 (home-page "https://github.com/jenisys/parse_type")
2135 (synopsis "Extended parse module")
2136 (description
2137 "Parse_type extends the python parse module.")
2138 (properties
2139 `((python2-variant . ,(delay python2-parse-type))))
2140 (license license:bsd-3)))
2141
2142 (define-public python2-parse-type
2143 (let ((base (package-with-python2
2144 (strip-python2-variant python-parse-type))))
2145 (package (inherit base)
2146 (propagated-inputs
2147 `(("python2-enum34" ,python2-enum34)
2148 ,@(package-propagated-inputs base))))))
2149
2150 (define-public python-parse
2151 (package
2152 (name "python-parse")
2153 (version "1.8.4")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "parse" version))
2158 (sha256
2159 (base32
2160 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2161 (build-system python-build-system)
2162 (arguments
2163 `(#:phases
2164 (modify-phases %standard-phases
2165 (replace 'check
2166 (lambda _ (invoke "python" "test_parse.py"))))))
2167 (home-page "https://github.com/r1chardj0n3s/parse")
2168 (synopsis "Parse strings")
2169 (description
2170 "Parse strings using a specification based on the Python @code{format()}
2171 syntax.")
2172 (license license:x11)))
2173
2174 (define-public python-polib
2175 (package
2176 (name "python-polib")
2177 (version "1.0.8")
2178 (source (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "polib" version))
2181 (sha256
2182 (base32
2183 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2184 (build-system python-build-system)
2185 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2186 (synopsis "Manipulate, create and modify gettext files")
2187 (description "Polib can manipulate any gettext format (po, pot and mo)
2188 files. It can be used to create po files from scratch or to modify
2189 existing ones.")
2190 (license license:expat)))
2191
2192 (define-public python2-polib
2193 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2194 (package
2195 (inherit base)
2196 (arguments `(,@(package-arguments base)
2197 ;; Tests don't work with python2.
2198 #:tests? #f)))))
2199
2200 (define-public python-poyo
2201 (package
2202 (name "python-poyo")
2203 (version "0.5.0")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "poyo" version))
2208 (sha256
2209 (base32
2210 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2211 (build-system python-build-system)
2212 (home-page "https://github.com/hackebrot/poyo")
2213 (synopsis "Lightweight YAML Parser for Python")
2214 (description
2215 "This package provides a lightweight YAML Parser for Python. It supports
2216 only a chosen subset of the YAML format that is required to parse cookiecutter
2217 user configuration files. It does not have support for serializing into YAML
2218 and is not compatible with JSON.")
2219 (license license:expat)))
2220
2221 (define-public scons
2222 (package
2223 (name "scons")
2224 (version "3.0.4")
2225 (source (origin
2226 (method git-fetch)
2227 (uri (git-reference
2228 (url "https://github.com/SCons/scons")
2229 (commit version)))
2230 (file-name (git-file-name name version))
2231 (sha256
2232 (base32
2233 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2234 (build-system python-build-system)
2235 (arguments
2236 `(#:use-setuptools? #f ; still relies on distutils
2237 #:tests? #f ; no 'python setup.py test' command
2238 #:phases
2239 (modify-phases %standard-phases
2240 (add-before 'build 'bootstrap
2241 (lambda _
2242 (substitute* "src/engine/SCons/compat/__init__.py"
2243 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2244 "sys.modules[new] = __import__(old)"))
2245 (substitute* "src/engine/SCons/Platform/__init__.py"
2246 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2247 "mod = __import__(full_name)"))
2248 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2249 (chdir "build/scons")
2250 #t)))))
2251 (home-page "https://scons.org/")
2252 (synopsis "Software construction tool written in Python")
2253 (description
2254 "SCons is a software construction tool. Think of SCons as an improved,
2255 cross-platform substitute for the classic Make utility with integrated
2256 functionality similar to autoconf/automake and compiler caches such as ccache.
2257 In short, SCons is an easier, more reliable and faster way to build
2258 software.")
2259 (license license:x11)))
2260
2261 (define-public scons-python2
2262 (package
2263 (inherit (package-with-python2 scons))
2264 (name "scons-python2")))
2265
2266 (define-public python-extras
2267 (package
2268 (name "python-extras")
2269 (version "1.0.0")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "extras" version))
2274 (sha256
2275 (base32
2276 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2277 (build-system python-build-system)
2278 (arguments
2279 ;; FIXME: Circular dependency on testtools.
2280 '(#:tests? #f))
2281 (home-page "https://github.com/testing-cabal/extras")
2282 (synopsis "Useful extensions to the Python standard library")
2283 (description
2284 "Extras is a set of extensions to the Python standard library.")
2285 (license license:expat)))
2286
2287 (define-public python2-extras
2288 (package-with-python2 python-extras))
2289
2290 (define-public python-mimeparse
2291 (package
2292 (name "python-mimeparse")
2293 (version "1.6.0")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "python-mimeparse" version))
2298 (sha256
2299 (base32
2300 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2301 (build-system python-build-system)
2302 (arguments
2303 '(#:phases
2304 (modify-phases %standard-phases
2305 (replace 'check
2306 (lambda _
2307 (invoke "./mimeparse_test.py"))))))
2308 (home-page
2309 "https://github.com/dbtsai/python-mimeparse")
2310 (synopsis "Python library for parsing MIME types")
2311 (description
2312 "Mimeparse provides basic functions for parsing MIME type names and
2313 matching them against a list of media-ranges.")
2314 (license license:expat)))
2315
2316 (define-public python2-mimeparse
2317 (package-with-python2 python-mimeparse))
2318
2319 (define-public python-miniboa
2320 (package
2321 (name "python-miniboa")
2322 (version "1.0.7")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "miniboa" version))
2327 (sha256
2328 (base32
2329 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2330 (build-system python-build-system)
2331 (home-page "https://github.com/shmup/miniboa")
2332 (synopsis "Simple, single-threaded Telnet server")
2333 (description
2334 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2335 server.")
2336 (license license:asl2.0)))
2337
2338 (define-public python2-miniboa
2339 (package-with-python2 python-miniboa))
2340
2341 (define-public python-pafy
2342 (package
2343 (name "python-pafy")
2344 (version "0.5.3.1")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "pafy" version))
2349 (sha256
2350 (base32
2351 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2352 (build-system python-build-system)
2353 (arguments
2354 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2355 (propagated-inputs
2356 ;; Youtube-dl is a python package which is imported in the file
2357 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2358 `(("youtube-dl" ,youtube-dl)))
2359 (home-page "https://np1.github.io/pafy/")
2360 (synopsis "Retrieve YouTube content and metadata")
2361 (description
2362 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2363 (license license:lgpl3+)))
2364
2365 (define-public python2-funcsigs
2366 (package
2367 (name "python2-funcsigs")
2368 (version "1.0.2")
2369 (source (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "funcsigs" version))
2372 (sha256
2373 (base32
2374 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2375 (build-system python-build-system)
2376 (arguments
2377 `(#:python ,python-2))
2378 (native-inputs
2379 `(("python2-unittest2" ,python2-unittest2)))
2380 (home-page "http://funcsigs.readthedocs.org")
2381 (synopsis "Python function signatures from PEP362")
2382 (description
2383 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2384 (license license:asl2.0)))
2385
2386 (define-public python2-funcsigs-bootstrap
2387 (package
2388 (inherit python2-funcsigs)
2389 (name "python2-funcsigs-bootstrap")
2390 (native-inputs `())
2391 (arguments
2392 `(#:tests? #f
2393 ,@(package-arguments python2-funcsigs)))))
2394
2395 (define-public python-py
2396 (package
2397 (name "python-py")
2398 (version "1.8.1")
2399 (source
2400 (origin
2401 (method url-fetch)
2402 (uri (pypi-uri "py" version))
2403 (sha256
2404 (base32
2405 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2406 (build-system python-build-system)
2407 (arguments
2408 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2409 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2410 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2411 ;; Is this module globally installed?"
2412 '(#:tests? #f))
2413 (native-inputs
2414 `(("python-setuptools-scm" ,python-setuptools-scm)))
2415 (home-page "https://github.com/pytest-dev/py")
2416 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2417 (description
2418 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2419 code introspection, and logging.")
2420 (license license:expat)))
2421
2422 (define-public python2-py
2423 (package-with-python2 python-py))
2424
2425 ;; Recent versions of python-fixtures and python-testrepository need
2426 ;; python-pbr for packaging, which itself needs these two packages for
2427 ;; testing.
2428 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2429 ;; same source, just without any test dependencies and with tests disabled.
2430 ;; python-pbr-minmal is then used to package python-fixtures and
2431 ;; python-testrepository.
2432 ;; Strictly speaking we currently could remove the test-requirements from the
2433 ;; normal python-pbr package (and save this package) since test are disabled
2434 ;; there anyway. But this may change in future.
2435 (define-public python-pbr-minimal
2436 (package
2437 (name "python-pbr-minimal")
2438 (version "3.0.1")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "pbr" version))
2443 (sha256
2444 (base32
2445 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2446 (build-system python-build-system)
2447 (arguments
2448 `(#:tests? #f))
2449 (home-page "https://docs.openstack.org/pbr/latest/")
2450 (synopsis "Minimal build of python-pbr used for bootstrapping")
2451 (description
2452 "Used only for bootstrapping python2-pbr, you should not need this.")
2453 (license license:asl2.0)))
2454
2455 (define-public python2-pbr-minimal
2456 (package-with-python2 python-pbr-minimal))
2457
2458 (define-public python-pbr
2459 (package
2460 (inherit python-pbr-minimal)
2461 (name "python-pbr")
2462 (arguments
2463 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2464 (propagated-inputs
2465 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2466 (native-inputs
2467 `(("python-fixtures" ,python-fixtures-bootstrap)
2468 ;; discover, coverage, hacking, subunit
2469 ("python-mock" ,python-mock)
2470 ("python-six" ,python-six)
2471 ("python-sphinx" ,python-sphinx)
2472 ("python-testrepository" ,python-testrepository-bootstrap)
2473 ("python-testresources" ,python-testresources-bootstrap)
2474 ("python-testscenarios" ,python-testscenarios-bootstrap)
2475 ("python-testtools" ,python-testtools-bootstrap)
2476 ("python-virtualenv" ,python-virtualenv)))
2477 (synopsis "Enhance the default behavior of Python’s setuptools")
2478 (description
2479 "Python Build Reasonableness (PBR) is a library that injects some useful
2480 and sensible default behaviors into your setuptools run. It will set
2481 versions, process requirements files and generate AUTHORS and ChangeLog file
2482 from git information.
2483 ")))
2484
2485 (define-public python2-pbr
2486 (package-with-python2 python-pbr))
2487
2488 (define-public python-pyrsistent
2489 (package
2490 (name "python-pyrsistent")
2491 (version "0.16.0")
2492 (home-page "https://github.com/tobgu/pyrsistent")
2493 (source (origin
2494 (method url-fetch)
2495 (uri (pypi-uri "pyrsistent" version))
2496 (sha256
2497 (base32
2498 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2499 (build-system python-build-system)
2500 (arguments
2501 '(#:phases (modify-phases %standard-phases
2502 ;; The package works fine with newer Pytest and Hypothesis, but
2503 ;; has pinned older versions to stay compatible with Python 2.
2504 (add-before 'check 'loosen-pytest-requirement
2505 (lambda _
2506 (substitute* "setup.py"
2507 (("pytest<5") "pytest")
2508 (("hypothesis<5") "hypothesis"))
2509 #t)))))
2510 (native-inputs
2511 `(("python-hypothesis" ,python-hypothesis)
2512 ("python-pytest" ,python-pytest)
2513 ("python-pytest-runner" ,python-pytest-runner)))
2514 (propagated-inputs
2515 `(("python-six" ,python-six)))
2516 (synopsis "Persistent data structures for Python")
2517 (description
2518 "Pyrsistent is a number of persistent collections (by some referred to as
2519 functional data structures). Persistent in the sense that they are immutable.
2520
2521 All methods on a data structure that would normally mutate it instead return a
2522 new copy of the structure containing the requested updates. The original
2523 structure is left untouched.")
2524 (license license:expat)))
2525
2526 (define-public python2-pyrsistent
2527 (package-with-python2 python-pyrsistent))
2528
2529 (define-public python-exif-read
2530 (package
2531 (name "python-exif-read")
2532 (version "2.1.2")
2533 (source (origin
2534 (method url-fetch)
2535 (uri (pypi-uri "ExifRead" version))
2536 (sha256
2537 (base32
2538 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2539 (build-system python-build-system)
2540 (arguments `(#:tests? #f)) ; no tests
2541 (home-page "https://github.com/ianare/exif-py")
2542 (synopsis "Python library to extract EXIF data from image files")
2543 (description
2544 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2545 files.")
2546 (license license:bsd-3)))
2547
2548 (define-public python2-exif-read
2549 (package-with-python2 python-exif-read))
2550
2551 (define-public python-pyld
2552 (package
2553 (name "python-pyld")
2554 (version "1.0.5")
2555 (source (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "PyLD" version))
2558 (sha256
2559 (base32
2560 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2561 (build-system python-build-system)
2562 (home-page "https://github.com/digitalbazaar/pyld")
2563 (synopsis "Python implementation of the JSON-LD specification")
2564 (description
2565 "PyLD is an implementation of the JSON-LD specification.")
2566 (license license:bsd-3)))
2567
2568 (define-public python2-pyld
2569 (package-with-python2 python-pyld))
2570
2571 (define-public python-cli-helpers
2572 (package
2573 (name "python-cli-helpers")
2574 (version "2.0.1")
2575 (source
2576 (origin
2577 ;; There's no source tarball on PyPI.
2578 (method git-fetch)
2579 (uri (git-reference
2580 (url "https://github.com/dbcli/cli_helpers")
2581 (commit (string-append "v" version))))
2582 (file-name (git-file-name name version))
2583 (sha256
2584 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2585 (build-system python-build-system)
2586 (native-inputs
2587 `(("python-pytest" ,python-pytest)))
2588 (propagated-inputs
2589 `(("python-wcwidth" ,python-wcwidth)
2590 ("python-configobj" ,python-configobj)
2591 ("python-tabulate" ,python-tabulate)
2592 ("python-terminaltables" ,python-terminaltables)))
2593 (home-page "https://github.com/dbcli/cli_helpers")
2594 (synopsis "Helpers for building command-line apps")
2595 (description
2596 "CLI Helpers is a Python package that makes it easy to perform common
2597 tasks when building command-line apps. It's a helper library for command-line
2598 interfaces.")
2599 (license license:bsd-3)))
2600
2601 (define-public python-click
2602 (package
2603 (name "python-click")
2604 (version "7.1.2")
2605 (source
2606 (origin
2607 (method url-fetch)
2608 (uri (pypi-uri "click" version))
2609 (sha256
2610 (base32
2611 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2612 (build-system python-build-system)
2613 (arguments
2614 `(#:phases
2615 (modify-phases %standard-phases
2616 (add-after 'unpack 'fix-paths
2617 (lambda* (#:key inputs #:allow-other-keys)
2618 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2619 "cross-libc" "libc"))))
2620 (substitute* "src/click/_unicodefun.py"
2621 (("'locale'")
2622 (string-append "'" glibc "/bin/locale'"))))
2623 #t))
2624 (replace 'check
2625 (lambda _
2626 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2627 (invoke "python" "-m" "pytest"))))))
2628 (native-inputs
2629 `(("python-pytest" ,python-pytest)))
2630 (home-page "https://palletsprojects.com/p/click/")
2631 (synopsis "Command line library for Python")
2632 (description
2633 "Click is a Python package for creating command line interfaces in a
2634 composable way with as little code as necessary. Its name stands for
2635 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2636 with sensible defaults out of the box.")
2637 (license license:bsd-3)))
2638
2639 (define-public python2-click
2640 (package-with-python2 python-click))
2641
2642 (define-public python-click-5
2643 (package (inherit python-click)
2644 (name "python-click")
2645 (version "5.1")
2646 (source
2647 (origin
2648 (method url-fetch)
2649 (uri (pypi-uri "click" version))
2650 (sha256
2651 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2652 (arguments `())))
2653
2654 (define-public python-wheel
2655 (package
2656 (name "python-wheel")
2657 (version "0.33.6")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "wheel" version))
2662 (sha256
2663 (base32
2664 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2665 (build-system python-build-system)
2666 (arguments
2667 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2668 ;; fails to find the newly-built bdist_wheel library, even though it is
2669 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2670 '(#:tests? #f))
2671 (home-page "https://bitbucket.org/pypa/wheel/")
2672 (synopsis "Format for built Python packages")
2673 (description
2674 "A wheel is a ZIP-format archive with a specially formatted filename and
2675 the @code{.whl} extension. It is designed to contain all the files for a PEP
2676 376 compatible install in a way that is very close to the on-disk format. Many
2677 packages will be properly installed with only the @code{Unpack} step and the
2678 unpacked archive preserves enough information to @code{Spread} (copy data and
2679 scripts to their final locations) at any later time. Wheel files can be
2680 installed with a newer @code{pip} or with wheel's own command line utility.")
2681 (license license:expat)))
2682
2683 (define-public python2-wheel
2684 (package-with-python2 python-wheel))
2685
2686 (define-public python-vcversioner
2687 (package
2688 (name "python-vcversioner")
2689 (version "2.16.0.0")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "vcversioner" version))
2694 (sha256
2695 (base32
2696 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2697 (build-system python-build-system)
2698 (synopsis "Python library for version number discovery")
2699 (description "Vcversioner is a Python library that inspects tagging
2700 information in a variety of version control systems in order to discover
2701 version numbers.")
2702 (home-page "https://github.com/habnabit/vcversioner")
2703 (license license:isc)))
2704
2705 (define-public python2-vcversioner
2706 (package-with-python2 python-vcversioner))
2707
2708 (define-public python-jdcal
2709 (package
2710 (name "python-jdcal")
2711 (version "1.4")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "jdcal" version))
2716 (sha256
2717 (base32
2718 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2719 (build-system python-build-system)
2720 (arguments
2721 `(#:phases (modify-phases %standard-phases
2722 (replace 'check
2723 (lambda _
2724 (invoke "pytest"))))))
2725 (native-inputs
2726 `(("python-pytest" ,python-pytest)))
2727 (home-page "https://github.com/phn/jdcal")
2728 (synopsis "Functions to convert between Julian dates Gregorian dates")
2729 (description "This Python library provides functions for converting
2730 between Julian dates and Gregorian dates.")
2731 (license license:bsd-2)))
2732
2733 (define-public python2-jdcal
2734 (package-with-python2 python-jdcal))
2735
2736 (define-public python-jsondiff
2737 (package
2738 (name "python-jsondiff")
2739 (version "1.2.0")
2740 (source
2741 (origin
2742 (method url-fetch)
2743 (uri (pypi-uri "jsondiff" version))
2744 (sha256
2745 (base32
2746 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2747 (build-system python-build-system)
2748 (native-inputs
2749 `(("python-nose" ,python-nose)
2750 ("python-nose-random" ,python-nose-random)))
2751 (home-page
2752 "https://github.com/fzumstein/jsondiff")
2753 (synopsis "Compare JSON and JSON-like structures in Python")
2754 (description "@code{jsondiff} is a Python library which lets you
2755 compare, diff, and patch JSON and JSON-like structures in Python.")
2756 (license license:expat)))
2757
2758 (define-public python-jsonschema
2759 (package
2760 (name "python-jsonschema")
2761 (version "3.2.0")
2762 (source (origin
2763 (method url-fetch)
2764 (uri (pypi-uri "jsonschema" version))
2765 (sha256
2766 (base32
2767 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2768 (build-system python-build-system)
2769 (arguments
2770 '(#:phases
2771 (modify-phases %standard-phases
2772 (replace 'check
2773 (lambda* (#:key inputs outputs #:allow-other-keys)
2774 (add-installed-pythonpath inputs outputs)
2775 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2776 (invoke "trial" "jsonschema"))))))
2777 (native-inputs
2778 `(("python-setuptools_scm" ,python-setuptools-scm)
2779 ("python-twisted" ,python-twisted)))
2780 (propagated-inputs
2781 `(("python-attrs" ,python-attrs)
2782 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2783 ("python-pyrsistent" ,python-pyrsistent)
2784 ("python-six" ,python-six)))
2785 (home-page "https://github.com/Julian/jsonschema")
2786 (synopsis "Implementation of JSON Schema for Python")
2787 (description
2788 "Jsonschema is an implementation of JSON Schema for Python.")
2789 (license license:expat)
2790 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2791
2792 (define-public python2-jsonschema
2793 (let ((jsonschema (package-with-python2
2794 (strip-python2-variant python-jsonschema))))
2795 (package (inherit jsonschema)
2796 (propagated-inputs
2797 `(("python2-functools32" ,python2-functools32)
2798 ,@(package-propagated-inputs jsonschema))))))
2799
2800 (define-public python-schema
2801 (package
2802 (name "python-schema")
2803 (version "0.6.6")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "schema" version))
2808 (sha256
2809 (base32
2810 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2811 (build-system python-build-system)
2812 (native-inputs
2813 `(("python-pytest" ,python-pytest)))
2814 (home-page "https://github.com/keleshev/schema")
2815 (synopsis "Simple data validation library")
2816 (description
2817 "@code{python-schema} is a library for validating Python data
2818 structures, such as those obtained from config-files, forms, external
2819 services or command-line parsing, converted from JSON/YAML (or
2820 something else) to Python data-types.")
2821 (license license:psfl)))
2822
2823 (define-public python2-schema
2824 (package-with-python2 python-schema))
2825
2826 (define-public python-schema-0.5
2827 (package (inherit python-schema)
2828 (version "0.5.0")
2829 (source
2830 (origin
2831 (method url-fetch)
2832 (uri (pypi-uri "schema" version))
2833 (sha256
2834 (base32
2835 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2836
2837 (define-public python2-schema-0.5
2838 (package-with-python2 python-schema-0.5))
2839
2840 (define-public python-kitchen
2841 (package
2842 (name "python-kitchen")
2843 (version "1.2.5")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "kitchen" version))
2848 (sha256
2849 (base32
2850 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2851 (build-system python-build-system)
2852 (propagated-inputs
2853 `(("python-chardet" ,python-chardet)))
2854 (home-page "https://github.com/fedora-infra/kitchen")
2855 (synopsis "Python API for snippets")
2856 (description "@code{kitchen} module provides a python API for all sorts of
2857 little useful snippets of code that everybody ends up writing for their projects
2858 but never seem big enough to build an independent release. Use kitchen and stop
2859 cutting and pasting that code over and over.")
2860 (license (list license:lgpl2.1+
2861 ;; subprocess.py, test_subprocess.py,
2862 ;; kitchen/pycompat25/defaultdict.py:
2863 license:psfl))))
2864
2865 (define-public python2-kitchen
2866 (package-with-python2 python-kitchen))
2867
2868 (define-public python-unidecode
2869 (package
2870 (name "python-unidecode")
2871 (version "1.1.1")
2872 (source (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "Unidecode" version))
2875 (sha256
2876 (base32
2877 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2878 (build-system python-build-system)
2879 (home-page "https://pypi.org/project/Unidecode/")
2880 (synopsis "ASCII transliterations of Unicode text")
2881 (description
2882 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2883 useful when integrating with legacy code that doesn't support Unicode, or for
2884 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2885 machine identifiers from human-readable Unicode strings that should still be
2886 somewhat intelligible.")
2887 (license license:gpl2+)))
2888
2889 (define-public python2-unidecode
2890 (package-with-python2 python-unidecode))
2891
2892 (define-public python-text-unidecode
2893 (package
2894 (name "python-text-unidecode")
2895 (version "1.3")
2896 (source (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "text-unidecode" version))
2899 (sha256
2900 (base32
2901 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2902 (build-system python-build-system)
2903 (arguments
2904 '(#:phases (modify-phases %standard-phases
2905 (replace 'check
2906 (lambda _
2907 (setenv "PYTHONPATH"
2908 (string-append "./build/lib:"
2909 (getenv "PYTHONPATH")))
2910 (invoke "pytest" "-vv"))))))
2911 (native-inputs
2912 `(("python-pytest" ,python-pytest)))
2913 (home-page "https://github.com/kmike/text-unidecode/")
2914 (synopsis "Decode Unicode data")
2915 (description
2916 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2917 Perl library. It can create ASCII representations of Unicode data. In general
2918 users should prefer the @code{python-unidecode} package which offers better
2919 memory usage and transliteration quality.")
2920 ;; The user can choose either license.
2921 (license (list license:clarified-artistic license:gpl2+))))
2922
2923 (define-public python2-text-unidecode
2924 (package-with-python2 python-text-unidecode))
2925
2926 (define-public python-pyjwt
2927 (package
2928 (name "python-pyjwt")
2929 (version "1.7.1")
2930 (source
2931 (origin
2932 (method url-fetch)
2933 (uri (pypi-uri "PyJWT" version))
2934 (sha256
2935 (base32
2936 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2937 (modules '((guix build utils)))
2938 (snippet
2939 '(begin
2940 (for-each delete-file-recursively
2941 (find-files "." "\\.pyc$"))
2942 #t))))
2943 (build-system python-build-system)
2944 (arguments
2945 '(#:phases (modify-phases %standard-phases
2946 (replace 'check
2947 (lambda _
2948 ;; Mimic upstream commit 3a20892442b34c7 to get
2949 ;; rid of dependency on pytest-runner < 5.0.
2950 ;; Remove substitution for PyJWT > 1.7.1.
2951 (substitute* "setup.py"
2952 ((".*pytest-runner.*")
2953 ""))
2954 (invoke "pytest" "-vv"))))))
2955 (native-inputs
2956 `(("python-pytest" ,python-pytest)
2957 ("python-pytest-cov" ,python-pytest-cov)))
2958 (home-page "https://github.com/progrium/pyjwt")
2959 (synopsis "JSON Web Token implementation in Python")
2960 (description
2961 "PyJWT is a JSON Web Token implementation written in Python.")
2962 (license license:expat)))
2963
2964 (define-public python2-pyjwt
2965 (package-with-python2 python-pyjwt))
2966
2967 (define-public python-pykka
2968 (package
2969 (name "python-pykka")
2970 (version "1.2.1")
2971 (source
2972 (origin
2973 (method url-fetch)
2974 (uri (pypi-uri "Pykka" version))
2975 (sha256
2976 (base32
2977 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2978 (build-system python-build-system)
2979 (native-inputs
2980 `(("python-mock" ,python-mock)
2981 ("python-nose" ,python-nose)
2982 ("python-gevent" ,python-gevent)
2983 ("python-eventlet" ,python-eventlet)))
2984 (home-page "https://www.pykka.org/")
2985 (synopsis "Pykka is a Python implementation of the actor model")
2986 (description
2987 "Pykka is a Python implementation of the actor model.
2988 The actor model introduces some simple rules to control the sharing
2989 of state and cooperation between execution units, which makes it
2990 easier to build concurrent applications.")
2991 (license license:asl2.0)))
2992
2993 (define-public python2-pykka
2994 (package-with-python2 python-pykka))
2995
2996 (define-public python-pymsgbox
2997 (package
2998 (name "python-pymsgbox")
2999 (version "1.0.6")
3000 (source
3001 (origin
3002 (method git-fetch)
3003 (uri (git-reference
3004 ;; LICENSE.txt is not present on pypi
3005 (url "https://github.com/asweigart/PyMsgBox")
3006 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3007 (file-name (git-file-name name version))
3008 (sha256
3009 (base32
3010 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3011 (arguments
3012 ;; Circular dependency to run tests:
3013 ;; Tests need pyautogui, which depends on pymsgbox.
3014 '(#:tests? #f))
3015 (build-system python-build-system)
3016 (home-page "https://github.com/asweigart/PyMsgBox")
3017 (synopsis "Python module for JavaScript-like message boxes")
3018 (description
3019 "PyMsgBox is a simple, cross-platform, pure Python module for
3020 JavaScript-like message boxes. Types of dialog boxes include:
3021 @enumerate
3022 @item alert
3023 @item confirm
3024 @item prompt
3025 @item password
3026 @end enumerate
3027 ")
3028 (license license:bsd-3)))
3029
3030 (define-public python-pympler
3031 (package
3032 (name "python-pympler")
3033 (home-page "https://pythonhosted.org/Pympler/")
3034 (version "0.8")
3035 (source (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "Pympler" version))
3038 (sha256
3039 (base32
3040 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3041 (build-system python-build-system)
3042 (arguments
3043 `(#:phases (modify-phases %standard-phases
3044 (delete 'check)
3045 (add-after 'install 'check
3046 (lambda* (#:key inputs outputs #:allow-other-keys)
3047 (add-installed-pythonpath inputs outputs)
3048 (invoke "python" "setup.py" "test"))))))
3049 (synopsis "Measure, monitor and analyze memory behavior")
3050 (description
3051 "Pympler is a development tool to measure, monitor and analyze
3052 the memory behavior of Python objects in a running Python application.
3053
3054 By pympling a Python application, detailed insight in the size and the
3055 lifetime of Python objects can be obtained. Undesirable or unexpected
3056 runtime behavior like memory bloat and other @samp{pymples} can easily
3057 be identified.
3058
3059 A web profiling frontend exposes process statistics, garbage
3060 visualisation and class tracker statistics.")
3061 (license license:asl2.0)))
3062
3063 (define-public python2-pympler
3064 (package-with-python2 python-pympler))
3065
3066 (define-public python-itsdangerous
3067 (package
3068 (name "python-itsdangerous")
3069 (version "1.1.0")
3070 (source
3071 (origin
3072 (method url-fetch)
3073 (uri (pypi-uri "itsdangerous" version))
3074 (sha256
3075 (base32
3076 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3077 (build-system python-build-system)
3078 (home-page "https://palletsprojects.com/p/itsdangerous/")
3079 (synopsis "Python library for passing data to/from untrusted environments")
3080 (description
3081 "Itsdangerous provides various helpers to pass trusted data to untrusted
3082 environments and back.")
3083 (license license:bsd-3)))
3084
3085 (define-public python2-itsdangerous
3086 (package-with-python2 python-itsdangerous))
3087
3088 (define-public python-pyyaml
3089 (package
3090 (name "python-pyyaml")
3091 (version "5.3.1")
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (pypi-uri "PyYAML" version))
3096 (sha256
3097 (base32
3098 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3099 (build-system python-build-system)
3100 (inputs
3101 `(("libyaml" ,libyaml)))
3102 (home-page "https://pyyaml.org")
3103 (synopsis "YAML parser and emitter for Python")
3104 (description
3105 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3106 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3107 API, and sensible error messages. PyYAML supports standard YAML tags and
3108 provides Python-specific tags that represent an arbitrary Python object.")
3109 (license license:expat)))
3110
3111 (define-public python2-pyyaml
3112 (package-with-python2 python-pyyaml))
3113
3114 (define-public python-vine
3115 (package
3116 (name "python-vine")
3117 (version "1.1.4")
3118 (source
3119 (origin
3120 (method url-fetch)
3121 (uri (pypi-uri "vine" version))
3122 (sha256
3123 (base32
3124 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3125 (build-system python-build-system)
3126 (native-inputs
3127 `(("python-pytest" ,python-pytest)
3128 ("python-case" ,python-case)))
3129 (home-page "https://github.com/celery/vine")
3130 (synopsis "Promises for Python")
3131 (description
3132 "@code{vine} provides a special implementation of promises in that it can
3133 be used both for \"promise of a value\" and lazy evaluation. The biggest
3134 upside for this is that everything in a promise can also be a promise,
3135 e.g. filters, callbacks and errbacks can all be promises.")
3136 (license license:bsd-3)))
3137
3138 (define-public python-virtualenv
3139 (package
3140 (name "python-virtualenv")
3141 (version "20.0.10")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "virtualenv" version))
3146 (sha256
3147 (base32
3148 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3149 (build-system python-build-system)
3150 (native-inputs
3151 `(("python-mock" ,python-mock)
3152 ("python-pytest" ,python-pytest)
3153 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3154 ;; be an input at all". However, removing the input makes the build error:
3155 ;; File "setup.py", line 4, in <module>
3156 ;; raise RuntimeError("setuptools >= 41 required to build")
3157 ("python-setuptools" ,python-setuptools)
3158 ("python-setuptools-scm" ,python-setuptools-scm)))
3159 (propagated-inputs
3160 `(("python-appdirs" ,python-appdirs)
3161 ("python-distlib" ,python-distlib)
3162 ("python-filelock" ,python-filelock)
3163 ("python-six" ,python-six)
3164 ("python-importlib-metadata" ,python-importlib-metadata)))
3165 (home-page "https://virtualenv.pypa.io/")
3166 (synopsis "Virtual Python environment builder")
3167 (description
3168 "Virtualenv is a tool to create isolated Python environments.")
3169 (properties `((python2-variant . ,(delay python2-virtualenv))))
3170 (license license:expat)))
3171
3172 (define-public python2-virtualenv
3173 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3174 (package
3175 (inherit base)
3176 (arguments
3177 `(#:python ,python-2
3178 #:phases
3179 (modify-phases %standard-phases
3180 (add-after 'set-paths 'adjust-PYTHONPATH
3181 (lambda* (#:key inputs #:allow-other-keys)
3182 (let* ((python (assoc-ref inputs "python"))
3183 (python-sitedir (string-append python "/lib/python2.7"
3184 "/site-packages")))
3185 ;; XXX: 'python2' always comes first on PYTHONPATH
3186 ;; and shadows the 'setuptools' input. Move python2
3187 ;; last: this should be fixed in python-build-system
3188 ;; in a future rebuild cycle.
3189 (setenv "PYTHONPATH"
3190 (string-append (string-join (delete python-sitedir
3191 (string-split
3192 (getenv "PYTHONPATH")
3193 #\:))
3194 ":")
3195 ":" python-sitedir))
3196 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3197 (getenv "PYTHONPATH"))
3198 #t))))))
3199 (propagated-inputs
3200 `(("python-contextlib2" ,python2-contextlib2)
3201 ,@(package-propagated-inputs base))))))
3202
3203 (define-public python-markupsafe
3204 (package
3205 (name "python-markupsafe")
3206 (version "1.1.1")
3207 (source
3208 (origin
3209 (method url-fetch)
3210 (uri (pypi-uri "MarkupSafe" version))
3211 (sha256
3212 (base32
3213 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3214 (build-system python-build-system)
3215 (arguments
3216 `(#:modules ((ice-9 ftw)
3217 (srfi srfi-1)
3218 (srfi srfi-26)
3219 (guix build utils)
3220 (guix build python-build-system))
3221 #:phases (modify-phases %standard-phases
3222 (replace 'check
3223 (lambda _
3224 (let ((cwd (getcwd))
3225 (libdir (find (cut string-prefix? "lib." <>)
3226 (scandir "build"))))
3227 (setenv "PYTHONPATH"
3228 (string-append cwd "/build/" libdir ":"
3229 (getenv "PYTHONPATH")))
3230 (invoke "pytest" "-vv")))))))
3231 (native-inputs
3232 `(("python-pytest" ,python-pytest)))
3233 (home-page "https://github.com/mitsuhiko/markupsafe")
3234 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3235 (description
3236 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3237 for Python.")
3238 (license license:bsd-3)))
3239
3240 (define-public python2-markupsafe
3241 (package-with-python2 python-markupsafe))
3242
3243 (define-public python-jinja2
3244 (package
3245 (name "python-jinja2")
3246 (version "2.11.2")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (pypi-uri "Jinja2" version))
3251 (sha256
3252 (base32
3253 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3254 (build-system python-build-system)
3255 (arguments
3256 '(#:phases (modify-phases %standard-phases
3257 (replace 'check
3258 (lambda* (#:key tests? #:allow-other-keys)
3259 (if tests?
3260 (begin
3261 (setenv "PYTHONPATH"
3262 (string-append "./build/lib:"
3263 (getenv "PYTHONPATH")))
3264 (invoke "pytest" "-vv"))
3265 (format #t "test suite not run~%"))
3266 #t)))))
3267 (native-inputs
3268 `(("python-pytest" ,python-pytest)))
3269 (propagated-inputs
3270 `(("python-markupsafe" ,python-markupsafe)))
3271 (home-page "http://jinja.pocoo.org/")
3272 (synopsis "Python template engine")
3273 (description
3274 "Jinja2 is a small but fast and easy to use stand-alone template engine
3275 written in pure Python.")
3276 (license license:bsd-3)))
3277
3278 (define-public python2-jinja2
3279 (package-with-python2 python-jinja2))
3280
3281 (define-public python-jinja2-time
3282 (package
3283 (name "python-jinja2-time")
3284 (version "0.2.0")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "jinja2-time" version))
3289 (sha256
3290 (base32
3291 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3292 (build-system python-build-system)
3293 (propagated-inputs
3294 `(("python-arrow" ,python-arrow)
3295 ("python-jinja2" ,python-jinja2)))
3296 (home-page
3297 "https://github.com/hackebrot/jinja2-time")
3298 (synopsis "Jinja2 Extension for Dates and Times")
3299 (description
3300 "This package provides an extension for the template engine Jinja2. It
3301 adds a 'now' tag providing a convenient access to the arrow.now() API from
3302 templates. A format string can be provided to control the output.")
3303 (license license:expat)))
3304
3305 (define-public python-pystache
3306 (package
3307 (name "python-pystache")
3308 (version "0.5.4")
3309 (source (origin
3310 (method url-fetch)
3311 (uri (pypi-uri "pystache" version))
3312 (sha256
3313 (base32
3314 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3315 (build-system python-build-system)
3316 (arguments
3317 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3318 (home-page "http://defunkt.io/pystache/")
3319 (synopsis "Python logic-less template engine")
3320 (description
3321 "Pystache is a Python implementation of the framework agnostic,
3322 logic-free templating system Mustache.")
3323 (license license:expat)
3324 (properties `((python2-variant . ,(delay python2-pystache))))))
3325
3326 (define-public python2-pystache
3327 (package (inherit (package-with-python2
3328 (strip-python2-variant python-pystache)))
3329 (arguments
3330 `(#:python ,python-2
3331 #:phases
3332 (modify-phases %standard-phases
3333 (replace 'check
3334 (lambda _
3335 (invoke "python" "test_pystache.py"))))))))
3336
3337 (define-public python-joblib
3338 (package
3339 (name "python-joblib")
3340 (version "0.14.1")
3341 (source (origin
3342 (method url-fetch)
3343 (uri (pypi-uri "joblib" version))
3344 (sha256
3345 (base32
3346 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3347 (build-system python-build-system)
3348 (arguments
3349 `(#:phases
3350 (modify-phases %standard-phases
3351 (replace 'check
3352 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3353 (native-inputs
3354 `(("python-pytest" ,python-pytest)))
3355 (home-page "https://joblib.readthedocs.io/")
3356 (synopsis "Using Python functions as pipeline jobs")
3357 (description
3358 "Joblib is a set of tools to provide lightweight pipelining in Python.
3359 In particular, joblib offers: transparent disk-caching of the output values
3360 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3361 logging and tracing of the execution.")
3362 (license license:bsd-3)))
3363
3364 (define-public python2-joblib
3365 (package-with-python2 python-joblib))
3366
3367 (define-public python-daemon
3368 (package
3369 (name "python-daemon")
3370 (version "2.2.3")
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "python-daemon" version))
3375 (sha256
3376 (base32
3377 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3378 (build-system python-build-system)
3379 (arguments
3380 `(#:phases
3381 (modify-phases %standard-phases
3382 (add-before 'check 'disable-tests
3383 (lambda _
3384 ;; FIXME: Determine why test fails
3385 (substitute* "test/test_daemon.py"
3386 (("test_detaches_process_context")
3387 "skip_test_detaches_process_context"))
3388 #t)))))
3389 (propagated-inputs
3390 `(("python-lockfile" ,python-lockfile)))
3391 (native-inputs
3392 `(("python-unittest2" ,python-unittest2)
3393 ("python-testtools" ,python-testtools)
3394 ("python-testscenarios" ,python-testscenarios)
3395 ("python-mock" ,python-mock)
3396 ("python-docutils" ,python-docutils)))
3397 (home-page "https://pagure.io/python-daemon/")
3398 (synopsis "Python library for making a Unix daemon process")
3399 (description "Python-daemon is a library that assists a Python program to
3400 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3401
3402 This library provides a @code{DaemonContext} class that manages the following
3403 important tasks for becoming a daemon process:
3404 @enumerate
3405 @item Detach the process into its own process group.
3406 @item Set process environment appropriate for running inside a chroot.
3407 @item Renounce suid and sgid privileges.
3408 @item Close all open file descriptors.
3409 @item Change the working directory, uid, gid, and umask.
3410 @item Set appropriate signal handlers.
3411 @item Open new file descriptors for stdin, stdout, and stderr.
3412 @item Manage a specified PID lock file.
3413 @item Register cleanup functions for at-exit processing.
3414 @end enumerate")
3415 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3416 (license (list license:asl2.0 license:gpl3+))))
3417
3418 (define-public python-anytree
3419 (package
3420 (name "python-anytree")
3421 (version "2.8.0")
3422 (source (origin
3423 (method url-fetch)
3424 (uri (pypi-uri "anytree" version))
3425 (sha256
3426 (base32
3427 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3428 (build-system python-build-system)
3429 (propagated-inputs
3430 `(("python-six" ,python-six)))
3431 (native-inputs
3432 `(;; For tests.
3433 ("graphviz" ,graphviz) ;for 'dot'
3434 ("python-nose" ,python-nose)))
3435 (home-page "https://github.com/c0fec0de/anytree")
3436 (synopsis "Lightweight tree data library")
3437 (description
3438 "@code{anytree} is a simple, lightweight, and extensible tree data
3439 structure for Python.")
3440 (license license:asl2.0)))
3441
3442 (define-public python-docutils
3443 (package
3444 (name "python-docutils")
3445 (version "0.16")
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (pypi-uri "docutils" version))
3450 (sha256
3451 (base32
3452 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3453 (build-system python-build-system)
3454 (arguments
3455 '(#:phases (modify-phases %standard-phases
3456 (replace 'check
3457 (lambda* (#:key tests? #:allow-other-keys)
3458 (if tests?
3459 (invoke "python" "test/alltests.py")
3460 (format #t "test suite not run~%"))
3461 #t)))))
3462 (home-page "http://docutils.sourceforge.net/")
3463 (synopsis "Python Documentation Utilities")
3464 (description
3465 "Docutils is a modular system for processing documentation into useful
3466 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3467 easy to use markup language, for input.
3468
3469 This package provides tools for converting @file{.rst} files to other formats
3470 via commands such as @command{rst2man}, as well as supporting Python code.")
3471 ;; Most of the source code is public domain, but some source files are
3472 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3473 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3474
3475 (define-public python2-docutils
3476 (package-with-python2 python-docutils))
3477
3478 ;; python2-sphinx fails its test suite with newer versions.
3479 (define-public python2-docutils-0.14
3480 (package
3481 (inherit python2-docutils)
3482 (version "0.14")
3483 (source (origin
3484 (method url-fetch)
3485 (uri (pypi-uri "docutils" version))
3486 (sha256
3487 (base32
3488 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3489
3490 (define-public python-restructuredtext-lint
3491 (package
3492 (name "python-restructuredtext-lint")
3493 (version "1.3.0")
3494 (source
3495 (origin
3496 (method url-fetch)
3497 (uri (pypi-uri "restructuredtext-lint" version))
3498 (sha256
3499 (base32
3500 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3501 (build-system python-build-system)
3502 (arguments
3503 `(#:phases
3504 (modify-phases %standard-phases
3505 (delete 'check)
3506 (add-after 'install 'check
3507 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3508 (when tests?
3509 (add-installed-pythonpath inputs outputs)
3510 (invoke "nosetests" "-v"))
3511 #t)))))
3512 (propagated-inputs
3513 `(("python-docutils" ,python-docutils)))
3514 (native-inputs
3515 `(("python-nose" ,python-nose)))
3516 (home-page "https://github.com/twolfson/restructuredtext-lint")
3517 (synopsis "reStructuredText linter")
3518 (description "This package provides a linter for the reStructuredText
3519 format.")
3520 (license license:unlicense)))
3521
3522 (define-public python-doc8
3523 (package
3524 (name "python-doc8")
3525 (version "0.8.0")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (pypi-uri "doc8" version))
3530 (sha256
3531 (base32
3532 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3533 (build-system python-build-system)
3534 (arguments
3535 `(#:phases
3536 (modify-phases %standard-phases
3537 (delete 'check)
3538 (add-after 'install 'check
3539 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3540 (when tests?
3541 (add-installed-pythonpath inputs outputs)
3542 (invoke "pytest" "-v"))
3543 #t)))))
3544 (propagated-inputs
3545 `(("python-chardet" ,python-chardet)
3546 ("python-docutils" ,python-docutils)
3547 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3548 ("python-six" ,python-six)
3549 ("python-stevedore" ,python-stevedore)))
3550 (native-inputs
3551 `(("python-testtools" ,python-testtools)
3552 ("python-pytest" ,python-pytest)))
3553 (home-page "https://launchpad.net/doc8")
3554 (synopsis
3555 "Style checker for Sphinx (or other) RST documentation")
3556 (description
3557 "Doc8 is an opinionated style checker for reStructured Text and plain
3558 text styles of documentation.")
3559 (license license:asl2.0)))
3560
3561 (define-public python-pygments
3562 (package
3563 (name "python-pygments")
3564 (version "2.6.1")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "Pygments" version))
3569 (sha256
3570 (base32
3571 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3572 (build-system python-build-system)
3573 (arguments
3574 ;; FIXME: Tests require sphinx, which depends on this.
3575 '(#:tests? #f))
3576 (home-page "https://pygments.org/")
3577 (synopsis "Syntax highlighting")
3578 (description
3579 "Pygments is a syntax highlighting package written in Python.")
3580 (license license:bsd-2)
3581 (properties `((python2-variant . ,(delay python2-pygments))))))
3582
3583 ;; Pygments 2.6 and later does not support Python 2.
3584 (define-public python2-pygments
3585 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3586 (package
3587 (inherit base)
3588 (version "2.5.2")
3589 (source (origin
3590 (method url-fetch)
3591 (uri (pypi-uri "Pygments" version))
3592 (sha256
3593 (base32
3594 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3595
3596 (define-public python-bumpversion
3597 (package
3598 (name "python-bumpversion")
3599 (version "0.5.3")
3600 (source
3601 (origin
3602 (method url-fetch)
3603 (uri (pypi-uri "bumpversion" version))
3604 (sha256
3605 (base32
3606 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3607 (build-system python-build-system)
3608 (home-page "https://github.com/peritus/bumpversion")
3609 (synopsis "Tool to bump software version")
3610 (description "This tool provides a command-line interface (CLI) to bump a
3611 software version simply.")
3612 (license license:expat)))
3613
3614 (define-public python-deprecated
3615 (package
3616 (name "python-deprecated")
3617 (version "1.2.5")
3618 (source
3619 (origin
3620 (method git-fetch)
3621 (uri (git-reference
3622 (url "https://github.com/tantale/deprecated")
3623 (commit (string-append "v" version))))
3624 (file-name (git-file-name name version))
3625 (sha256
3626 (base32
3627 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3628 (build-system python-build-system)
3629 (arguments
3630 `(#:phases (modify-phases %standard-phases
3631 (replace 'check
3632 (lambda _
3633 (invoke "pytest"))))))
3634 (propagated-inputs
3635 `(("python-wrapt" ,python-wrapt)))
3636 (native-inputs
3637 `(("python-bumpversion" ,python-bumpversion)
3638 ("python-pytest" ,python-pytest)
3639 ("python-pytest-cov" ,python-pytest-cov)
3640 ("python-sphinx" ,python-sphinx)
3641 ("python-tox" ,python-tox)))
3642 (home-page "https://github.com/tantale/deprecated")
3643 (synopsis "Python decorator to deprecate classes, functions or methods")
3644 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3645 to deprecate classes, functions or methods.")
3646 (license license:expat)))
3647
3648 (define-public python-pygithub
3649 (package
3650 (name "python-pygithub")
3651 (version "1.43.8")
3652 (source
3653 ;; We fetch from the Git repo because there are no tests in the PyPI
3654 ;; archive.
3655 (origin
3656 (method git-fetch)
3657 (uri (git-reference
3658 (url "https://github.com/PyGithub/PyGithub")
3659 (commit (string-append "v" version))))
3660 (file-name (git-file-name name version))
3661 (sha256
3662 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3663 (build-system python-build-system)
3664 (arguments
3665 `(#:phases (modify-phases %standard-phases
3666 ;; Some tests rely on the network.
3667 (add-after 'unpack 'disable-failing-tests
3668 (lambda _
3669 (substitute* "tests/Issue142.py"
3670 (("testDecodeJson") "disabled_testDecodeJson"))
3671 #t))
3672 (add-before 'check 'prepare-for-tests
3673 (lambda _
3674 (for-each (lambda (f)
3675 (chmod f #o666))
3676 (find-files "./tests"))
3677 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3678 (setenv "PYTHONPATH"
3679 (string-append "./tests:" (getenv "PYTHONPATH")))
3680 #t)))))
3681 (propagated-inputs
3682 `(("python-deprecated" ,python-deprecated)
3683 ("python-pyjwt" ,python-pyjwt)
3684 ("python-requests" ,python-requests)))
3685 (native-inputs `(("python-httpretty" ,python-httpretty)))
3686 (home-page "https://pygithub.readthedocs.io/en/latest/")
3687 (synopsis "Python library for the GitHub API")
3688 (description "This library allows managing GitHub resources such as
3689 repositories, user profiles, and organizations in your Python applications,
3690 using version 3 of the GitHub application programming interface (API).")
3691 (license license:lgpl3+)))
3692
3693 (define-public python-rellu
3694 (package
3695 (name "python-rellu")
3696 (version "0.7")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "rellu" version))
3701 (sha256
3702 (base32
3703 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3704 (build-system python-build-system)
3705 (propagated-inputs
3706 `(("python-invoke" ,python-invoke)
3707 ("python-pygithub" ,python-pygithub)))
3708 (home-page "https://github.com/robotframework/rellu")
3709 (synopsis "Utilities to create PyPI releases")
3710 (description "This collection of utilities contains tooling and templates
3711 to assist in creating releases on GitHub and publishing them on PyPI. It is
3712 designed to be used by Robot Framework and tools and libraries in its
3713 ecosystem, but can naturally be used also by other projects.")
3714 (license license:asl2.0)))
3715
3716 (define-public python-robotframework
3717 (package
3718 (name "python-robotframework")
3719 (version "3.2.2")
3720 ;; There are no tests in the PyPI archive.
3721 (source
3722 (origin
3723 (method git-fetch)
3724 (uri (git-reference
3725 (url "https://github.com/robotframework/robotframework")
3726 (commit (string-append "v" version))))
3727 (file-name (git-file-name name version))
3728 (sha256
3729 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3730 (patches (search-patches
3731 "python-robotframework-source-date-epoch.patch"))))
3732 (build-system python-build-system)
3733 (arguments
3734 `(#:phases (modify-phases %standard-phases
3735 (add-before 'build 'build-and-install-doc
3736 (lambda* (#:key outputs #:allow-other-keys)
3737 (let* ((doc-output (assoc-ref outputs "doc"))
3738 (doc (string-append doc-output "/share/"
3739 ,name "-" ,version "/")))
3740 (invoke "invoke" "library-docs" "all")
3741 (mkdir-p doc)
3742 (copy-recursively "doc/libraries"
3743 (string-append doc "/libraries"))
3744 #t)))
3745 (replace 'check
3746 (lambda* (#:key inputs #:allow-other-keys)
3747 ;; Some tests require timezone data. Otherwise, they
3748 ;; look up /etc/localtime, which doesn't exist, and fail
3749 ;; with:
3750 ;;
3751 ;; OverflowError: mktime argument out of range
3752 (setenv "TZDIR"
3753 (string-append (assoc-ref inputs "tzdata")
3754 "/share/zoneinfo"))
3755 (setenv "TZ" "Europe/Paris")
3756
3757 (invoke "python" "utest/run.py"))))))
3758 (native-inputs
3759 `(("python-invoke" ,python-invoke)
3760 ("python-rellu" ,python-rellu)
3761 ("python:tk" ,python "tk") ;used when building the HTML doc
3762 ("tzdata" ,tzdata-for-tests)))
3763 (outputs '("out" "doc"))
3764 (home-page "https://robotframework.org")
3765 (synopsis "Generic automation framework")
3766 (description "Robot Framework is a generic automation framework for
3767 acceptance testing, acceptance test driven development (ATDD), and robotic
3768 process automation (RPA).")
3769 (license license:asl2.0)))
3770
3771 (define-public python-robotframework-lint
3772 ;; There is no properly tagged release; the commit below seems to correspond
3773 ;; to the 0.9 stable release available from PyPI. The tests are not
3774 ;; included in the PyPI archive, so we fetch the sources from the upstream
3775 ;; Git repo.
3776 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3777 (revision "0"))
3778 (package
3779 (name "python-robotframework-lint")
3780 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3781 revision commit))
3782 (source
3783 (origin
3784 (method git-fetch)
3785 (uri (git-reference
3786 (url "https://github.com/boakley/robotframework-lint")
3787 (commit commit)))
3788 (file-name (git-file-name name version))
3789 (sha256
3790 (base32
3791 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3792 (build-system python-build-system)
3793 (arguments
3794 `(#:phases
3795 (modify-phases %standard-phases
3796 (replace 'check
3797 (lambda _
3798 (invoke "python" "-m" "robot" "-A"
3799 "tests/conf/default.args" "tests"))))))
3800 (propagated-inputs
3801 `(("python-robotframework" ,python-robotframework)))
3802 (home-page "https://github.com/boakley/robotframework-lint/")
3803 (synopsis "Static analysis tool (linter) for Robot Framework")
3804 (description "This package provides the @code{rflint} command-line
3805 utility, a static analysis tool (linter) for Robot Framework source files.")
3806 (license license:asl2.0))))
3807
3808 (define-public python-robotframework-sshlibrary
3809 (package
3810 (name "python-robotframework-sshlibrary")
3811 (version "3.3.0")
3812 ;; There are no tests in the PyPI archive.
3813 (source
3814 (origin
3815 (method git-fetch)
3816 (uri (git-reference
3817 (url "https://github.com/robotframework/SSHLibrary")
3818 (commit (string-append "v" version))))
3819 (file-name (git-file-name name version))
3820 (sha256
3821 (base32
3822 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3823 (build-system python-build-system)
3824 (arguments
3825 `(#:phases
3826 (modify-phases %standard-phases
3827 (add-before 'build 'build-and-install-doc
3828 (lambda* (#:key outputs #:allow-other-keys)
3829 (let* ((doc-output (assoc-ref outputs "doc"))
3830 (doc (string-append doc-output "/share/"
3831 ,name "-" ,version "/")))
3832 (invoke "chmod" "-R" "+w" "docs")
3833 (invoke "invoke" "kw-docs" "project-docs")
3834 (mkdir-p doc)
3835 (for-each delete-file (find-files "docs" "\\.rst"))
3836 (copy-recursively "docs" doc)
3837 #t)))
3838 (replace 'check
3839 (lambda _
3840 ;; Some tests require an SSH server; we remove them.
3841 (delete-file "utest/test_client_api.py")
3842 (delete-file "utest/test_scp.py")
3843 (invoke "python" "utest/run.py"))))))
3844 (propagated-inputs
3845 `(("python-robotframework" ,python-robotframework)
3846 ("python-paramiko" ,python-paramiko)
3847 ("python-scp" ,python-scp)))
3848 (native-inputs
3849 `(("openssh" ,openssh)
3850 ("which" ,which)
3851 ;; To generate the documentation
3852 ("python-docutils" ,python-docutils)
3853 ("python-invoke" ,python-invoke)
3854 ("python-pygments" ,python-pygments)
3855 ("python-rellu" ,python-rellu)))
3856 (outputs '("out" "doc"))
3857 (home-page "https://github.com/robotframework/SSHLibrary")
3858 (synopsis "Robot Framework library for SSH and SFTP")
3859 (description "SSHLibrary is a Robot Framework library providing support
3860 for SSH and SFTP. It has the following main usages:
3861 @itemize @bullet
3862 @item Executing commands on the remote machine, either blocking or non-blocking.
3863 @item Writing and reading in an interactive shell.
3864 @item Transferring files and directories over SFTP.
3865 @item Ensuring that files and directories exist on the remote machine.
3866 @end itemize")
3867 (license license:asl2.0)))
3868
3869 (define-public python-rstr
3870 (package
3871 (name "python-rstr")
3872 (version "2.2.6")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "rstr" version))
3877 (sha256
3878 (base32
3879 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3880 (build-system python-build-system)
3881 (home-page
3882 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3883 (synopsis "Generate random strings in Python")
3884 (description "This package provides a python module for generating
3885 random strings of various types. It could be useful for fuzz testing,
3886 generating dummy data, or other applications. It has no dependencies
3887 outside the standard library.")
3888 (license license:bsd-3)))
3889
3890 (define-public python-scp
3891 (package
3892 (name "python-scp")
3893 (version "0.13.3")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (pypi-uri "scp" version))
3898 (sha256
3899 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3900 (build-system python-build-system)
3901 (arguments
3902 '(#:tests? #f)) ;tests require an SSH server
3903 (propagated-inputs
3904 `(("python-paramiko" ,python-paramiko)))
3905 (home-page "https://github.com/jbardin/scp.py")
3906 (synopsis "SCP protocol module for Python and Paramiko")
3907 (description "The scp module extends the Paramiko library to send and
3908 receive files via the SCP1 protocol, as implemented by the OpenSSH
3909 @command{scp} program.")
3910 (license license:gpl2+)))
3911
3912 (define-public python-rst.linker
3913 (package
3914 (name "python-rst.linker")
3915 (version "1.11")
3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "rst.linker" version))
3920 (sha256
3921 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3922 (build-system python-build-system)
3923 (propagated-inputs
3924 `(("python-dateutil" ,python-dateutil)
3925 ("python-six" ,python-six)))
3926 (native-inputs
3927 `(("python-setuptools-scm" ,python-setuptools-scm)))
3928 ;; Test would require path.py, which would introduce a cyclic dependence.
3929 (arguments `(#:tests? #f))
3930 ;; Note: As of version 1.7 the documentation is not worth building.
3931 (home-page "https://github.com/jaraco/rst.linker")
3932 (synopsis "Sphinx plugin to add links and timestamps")
3933 (description "rst.linker automatically replaces text by a
3934 reStructuredText external reference or timestamps. It's primary purpose is to
3935 augment the changelog, but it can be used for other documents, too.")
3936 (license license:expat)))
3937
3938 (define-public python2-rst.linker
3939 (package-with-python2 python-rst.linker))
3940
3941 (define-public python-sshpubkeys
3942 (package
3943 (name "python-sshpubkeys")
3944 (version "3.1.0")
3945 (home-page "https://github.com/ojarva/python-sshpubkeys")
3946 (source (origin
3947 (method git-fetch)
3948 (uri (git-reference
3949 (url home-page)
3950 (commit (string-append "v" version))))
3951 (file-name (git-file-name name version))
3952 (sha256
3953 (base32
3954 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3955 (build-system python-build-system)
3956 (propagated-inputs
3957 `(("python-cryptography" ,python-cryptography)
3958 ("python-ecdsa" ,python-ecdsa)))
3959 (synopsis "OpenSSH public key parser")
3960 (description
3961 "This package provides a library for parsing and validating OpenSSH
3962 public key files.")
3963 (license license:bsd-3)))
3964
3965 (define-public python-feedgenerator
3966 (package
3967 (name "python-feedgenerator")
3968 (version "1.9")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (pypi-uri "feedgenerator" version))
3973 (sha256
3974 (base32
3975 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3976 (modules '((guix build utils)))
3977 (snippet
3978 '(begin
3979 ;; Remove pre-compiled .pyc files from source.
3980 (for-each delete-file-recursively
3981 (find-files "." "__pycache__" #:directories? #t))
3982 (for-each delete-file (find-files "." "\\.pyc$"))
3983 #t))))
3984 (build-system python-build-system)
3985 (propagated-inputs
3986 `(("python-pytz" ,python-pytz)
3987 ("python-six" ,python-six)))
3988 (home-page "https://github.com/getpelican/feedgenerator")
3989 (synopsis
3990 "Standalone version of Django's Atom/RSS feed generator")
3991 (description
3992 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3993 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3994 (license license:bsd-3)))
3995
3996 (define-public python2-feedgenerator
3997 (package-with-python2 python-feedgenerator))
3998
3999 (define-public python-toml
4000 (package
4001 (name "python-toml")
4002 (version "0.10.1")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "toml" version))
4007 (sha256
4008 (base32
4009 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4010 (build-system python-build-system)
4011 (arguments
4012 `(#:tests? #f)) ;no tests suite in release
4013 (home-page "https://github.com/uiri/toml")
4014 (synopsis "Library for TOML")
4015 (description
4016 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4017 Language (TOML) configuration files.")
4018 (license license:expat)))
4019
4020 (define-public python-jsonrpc-server
4021 (package
4022 (name "python-jsonrpc-server")
4023 (version "0.4.0")
4024 (source
4025 (origin
4026 (method url-fetch)
4027 (uri (pypi-uri "python-jsonrpc-server" version))
4028 (sha256
4029 (base32
4030 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4031 (build-system python-build-system)
4032 (propagated-inputs
4033 `(("python-mock" ,python-mock)
4034 ("python-pytest" ,python-pytest)
4035 ("python-ujson" ,python-ujson)))
4036 (home-page
4037 "https://github.com/palantir/python-jsonrpc-server")
4038 (synopsis "JSON RPC 2.0 server library")
4039 (description
4040 "This package provides a JSON RPC 2.0 server library for Python.")
4041 (license license:expat)))
4042
4043 (define-public python-pydantic
4044 (package
4045 (name "python-pydantic")
4046 (version "1.6.1")
4047 (source
4048 (origin
4049 (method git-fetch)
4050 (uri (git-reference
4051 (url "https://github.com/samuelcolvin/pydantic")
4052 (commit (string-append "v" version))))
4053 (file-name (git-file-name name version))
4054 (sha256
4055 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4056 (build-system python-build-system)
4057 (arguments
4058 '(#:phases
4059 (modify-phases %standard-phases
4060 ;; Reported upstream:
4061 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4062 ;; Disable the faulty test as the fix is unclear.
4063 (add-before 'check 'disable-test
4064 (lambda _
4065 (substitute* "tests/test_validators.py"
4066 (("test_assert_raises_validation_error")
4067 "_test_assert_raises_validation_error"))
4068 #t))
4069 (replace 'check
4070 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4071 (native-inputs
4072 `(("python-pytest" ,python-pytest)))
4073 (home-page "https://github.com/samuelcolvin/pydantic")
4074 (synopsis "Python data validation and settings management")
4075 (description
4076 "Pydantic enforces type hints at runtime, and provides user friendly
4077 errors when data is invalid.")
4078 (license license:expat)))
4079
4080 (define-public python-pydocstyle
4081 (package
4082 (name "python-pydocstyle")
4083 (version "3.0.0")
4084 (source
4085 (origin
4086 (method url-fetch)
4087 (uri (pypi-uri "pydocstyle" version))
4088 (sha256
4089 (base32
4090 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4091 (build-system python-build-system)
4092 (propagated-inputs
4093 `(("python-six" ,python-six)
4094 ("python-snowballstemmer" ,python-snowballstemmer)))
4095 (home-page
4096 "https://github.com/PyCQA/pydocstyle/")
4097 (synopsis "Python docstring style checker")
4098 (description
4099 "This package provides a style checker for the Python Language
4100 Server (PLS).")
4101 (license license:expat)))
4102
4103 (define-public python-language-server
4104 (package
4105 (name "python-language-server")
4106 (version "0.36.1")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (pypi-uri "python-language-server" version))
4111 (sha256
4112 (base32
4113 "0ljzc50z5v08is8fis1fg2dk9sb6275jlvzxb6nij0w6ys772pf8"))))
4114 (build-system python-build-system)
4115 (propagated-inputs
4116 `(("python-autopep8" ,python-autopep8)
4117 ("python-configparser" ,python-configparser)
4118 ("python-pydocstyle" ,python-pydocstyle)
4119 ("python-future" ,python-future)
4120 ("python-jedi" ,python-jedi)
4121 ("python-jsonrpc-server" ,python-jsonrpc-server)
4122 ("python-pluggy" ,python-pluggy)
4123 ("python-pycodestyle" ,python-pycodestyle)
4124 ("python-pyflakes" ,python-pyflakes)
4125 ("python-rope" ,python-rope)
4126 ("python-ujson" ,python-ujson)
4127 ("python-yapf" ,python-yapf)))
4128 (native-inputs
4129 `(("python-coverage" ,python-coverage)
4130 ("python-flaky" ,python-flaky)
4131 ("python-matplotlib" ,python-matplotlib)
4132 ("python-mock" ,python-mock)
4133 ("python-numpy" ,python-numpy)
4134 ("python-pandas" ,python-pandas)
4135 ("python-pylint" ,python-pylint)
4136 ("python-pytest" ,python-pytest)
4137 ("python-pytest-cov" ,python-pytest-cov)
4138 ("python-versioneer" ,python-versioneer)))
4139 (home-page "https://github.com/palantir/python-language-server")
4140 (synopsis "Python implementation of the Language Server Protocol")
4141 (description
4142 "The Python Language Server (pyls) is an implementation of the Python 3
4143 language specification for the Language Server Protocol (LSP). This tool is
4144 used in text editing environments to provide a complete and integrated
4145 feature-set for programming Python effectively.")
4146 (license license:expat)))
4147
4148 (define-public python-pathspec
4149 (package
4150 (name "python-pathspec")
4151 (version "0.7.0")
4152 (source
4153 (origin
4154 (method url-fetch)
4155 (uri (pypi-uri "pathspec" version))
4156 (sha256
4157 (base32
4158 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4159 (build-system python-build-system)
4160 (home-page "https://github.com/cpburnz/python-path-specification")
4161 (synopsis "Utility library for gitignore style pattern matching of file paths")
4162 (description
4163 "This package provides a utility library for gitignore style pattern
4164 matching of file paths.")
4165 (license license:mpl2.0)))
4166
4167 (define-public python-black
4168 (package
4169 (name "python-black")
4170 (version "20.8b1")
4171 (source
4172 (origin
4173 (method url-fetch)
4174 (uri (pypi-uri "black" version))
4175 (sha256
4176 (base32
4177 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4178 (build-system python-build-system)
4179 (arguments
4180 `(#:phases
4181 (modify-phases %standard-phases
4182 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4183 (lambda _
4184 (let ((python3 (which "python3")))
4185 (substitute* '("tests/data/fmtonoff.py"
4186 "tests/data/string_prefixes.py"
4187 "tests/data/function.py"
4188 "tests/data/python37.py")
4189 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4190 (string-append "#!" python3 (if (string? minor-version)
4191 minor-version
4192 "")))))
4193 #t))
4194 (add-after 'unpack 'disable-broken-tests
4195 (lambda* (#:key outputs inputs #:allow-other-keys)
4196 ;; Make installed package available for running the tests
4197 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4198 ":" (getenv "PATH")))
4199
4200 ;; These tests are supposed to be skipped when the blackd
4201 ;; dependencies are missing, but this doesn't quite work.
4202 (substitute* "tests/test_black.py"
4203 (("( *)class BlackDTestCase.*" match indent)
4204 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4205 indent "class BlackDTestCase(unittest.TestCase):\n"))
4206 (("web.Application") "False")
4207 (("@unittest_run_loop") ""))
4208
4209 ;; Patching the above file breaks the self test
4210 (substitute* "tests/test_black.py"
4211 (("( *)def test_self" match indent)
4212 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4213
4214 (substitute* "tests/test_black.py"
4215 (("( *)def test_python38" match indent)
4216 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4217 #t)))))
4218 (propagated-inputs
4219 `(("python-click" ,python-click)
4220 ("python-attrs" ,python-attrs)
4221 ("python-appdirs" ,python-appdirs)
4222 ("python-pathspec" ,python-pathspec)
4223 ("python-mypy-extensions" ,python-mypy-extensions)
4224 ("python-regex" ,python-regex)
4225 ("python-toml" ,python-toml)
4226 ("python-typed-ast" ,python-typed-ast)
4227 ("python-typing-extensions" ,python-typing-extensions)))
4228 (native-inputs
4229 `(("python-setuptools-scm" ,python-setuptools-scm)))
4230 (home-page "https://github.com/ambv/black")
4231 (synopsis "The uncompromising code formatter")
4232 (description "Black is the uncompromising Python code formatter.")
4233 (license license:expat)))
4234
4235 (define-public python-black-macchiato
4236 (package
4237 (name "python-black-macchiato")
4238 (version "1.3.0")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "black-macchiato" version))
4243 (sha256
4244 (base32
4245 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4246 (build-system python-build-system)
4247 (propagated-inputs
4248 `(("python-black" ,python-black)))
4249 (home-page "https://github.com/wbolster/black-macchiato")
4250 (synopsis "Partial @code{python-black} formatting")
4251 (description
4252 "This package is built on top the @{python-black} code formatter to
4253 enable formatting of partial files.")
4254 (license license:bsd-3)))
4255
4256 (define-public python-blinker
4257 (package
4258 (name "python-blinker")
4259 (version "1.4")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "blinker" version))
4264 (sha256
4265 (base32
4266 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4267 (build-system python-build-system)
4268 (home-page "https://pythonhosted.org/blinker/")
4269 (synopsis "Fast, simple object-to-object and broadcast signaling")
4270 (description
4271 "Blinker provides a fast dispatching system that allows any number of
4272 interested parties to subscribe to events, or \"signals\".")
4273 (license license:expat)))
4274
4275 (define-public python2-blinker
4276 (package-with-python2 python-blinker))
4277
4278 (define-public pelican
4279 (package
4280 (name "pelican")
4281 (version "4.2.0")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (pypi-uri "pelican" version))
4286 (sha256
4287 (base32
4288 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4289 (build-system python-build-system)
4290 (propagated-inputs
4291 `(("python-blinker" ,python-blinker)
4292 ("python-dateutil" ,python-dateutil)
4293 ("python-docutils" ,python-docutils)
4294 ("python-feedgenerator" ,python-feedgenerator)
4295 ("python-jinja2" ,python-jinja2)
4296 ("python-markdown" ,python-markdown)
4297 ("python-pygments" ,python-pygments)
4298 ("python-pytz" ,python-pytz)
4299 ("python-six" ,python-six)
4300 ("python-unidecode" ,python-unidecode)))
4301 (home-page "https://getpelican.com/")
4302 (arguments
4303 `(;; XXX Requires a lot more packages to do unit tests :P
4304 #:tests? #f))
4305 (synopsis "Python-based static site publishing system")
4306 (description
4307 "Pelican is a tool to generate a static blog from reStructuredText,
4308 Markdown input files, and more. Pelican uses Jinja2 for templating
4309 and is very extensible.")
4310 (license license:agpl3+)))
4311
4312 (define-public mallard-ducktype
4313 (package
4314 (name "mallard-ducktype")
4315 (version "1.0.2")
4316 (source
4317 (origin
4318 (method git-fetch)
4319 ;; git-reference because tests are not included in pypi source tarball
4320 ;; https://issues.guix.gnu.org/issue/36755#2
4321 (uri (git-reference
4322 (url "https://github.com/projectmallard/mallard-ducktype")
4323 (commit version)))
4324 (file-name (git-file-name name version))
4325 (sha256
4326 (base32
4327 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4328 (build-system python-build-system)
4329 (arguments
4330 '(#:phases
4331 (modify-phases %standard-phases
4332 (replace 'check
4333 (lambda _
4334 (with-directory-excursion "tests"
4335 (invoke "sh" "runtests")))))))
4336 (home-page "http://projectmallard.org")
4337 (synopsis "Convert Ducktype to Mallard documentation markup")
4338 (description
4339 "Ducktype is a lightweight syntax that can represent all the semantics
4340 of the Mallard XML documentation system. Ducktype files can be converted to
4341 Mallard using the @command{ducktype} tool. The yelp-tools package
4342 provides additional functionality on the produced Mallard documents.")
4343 (license license:expat)))
4344
4345 (define-public python-cython
4346 (package
4347 (name "python-cython")
4348 (version "0.29.21")
4349 (source
4350 (origin
4351 (method url-fetch)
4352 (uri (pypi-uri "Cython" version))
4353 (sha256
4354 (base32
4355 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4356 (build-system python-build-system)
4357 ;; we need the full python package and not just the python-wrapper
4358 ;; because we need libpython3.3m.so
4359 (inputs
4360 `(("python" ,python)))
4361 (arguments
4362 `(#:phases
4363 (modify-phases %standard-phases
4364 (add-before 'check 'set-HOME
4365 ;; some tests require access to "$HOME/.cython"
4366 (lambda _ (setenv "HOME" "/tmp") #t))
4367 (replace 'check
4368 (lambda _
4369 ;; Disable compiler optimizations to greatly reduce the running
4370 ;; time of the test suite.
4371 (setenv "CFLAGS" "-O0")
4372
4373 (invoke "python" "runtests.py" "-vv"
4374 "-j" (number->string (parallel-job-count))
4375 ;; XXX: On 32-bit architectures, running the parallel tests
4376 ;; fails on many-core systems, see
4377 ;; <https://github.com/cython/cython/issues/2807>.
4378 ,@(if (not (target-64bit?))
4379 '("-x" "run.parallel")
4380 '())))))))
4381 (home-page "https://cython.org/")
4382 (synopsis "C extensions for Python")
4383 (description "Cython is an optimising static compiler for both the Python
4384 programming language and the extended Cython programming language. It makes
4385 writing C extensions for Python as easy as Python itself.")
4386 (license license:asl2.0)
4387 (properties `((python2-variant . ,(delay python2-cython))))))
4388
4389 (define-public python2-cython
4390 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4391 (package
4392 (inherit base)
4393 (name "python2-cython")
4394 (inputs
4395 `(("python-2" ,python-2))) ;this is not automatically changed
4396 (arguments
4397 (substitute-keyword-arguments (package-arguments base)
4398 ((#:phases phases)
4399 `(modify-phases ,phases
4400 (add-before 'check 'adjust-test_embed
4401 (lambda _
4402 (substitute* "runtests.py"
4403 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4404 ;; so it can give the right -L flag to GCC when embedding static
4405 ;; builds of Python. It is unaware that the Python "config"
4406 ;; directory (where the static library lives) was renamed in
4407 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4408 ;; which works fine, because that is where the shared library is.
4409 ;;
4410 ;; It also appears to be unaware that the Makefile in Demos/embed
4411 ;; already unconditionally pass the static library location to GCC,
4412 ;; after checking sysconfig.get_config_var('LIBPL).
4413 ;;
4414 ;; The effect is that the linker is unable to resolve libexpat
4415 ;; symbols when building for Python 2, because neither the Python 2
4416 ;; shared library nor Expat is available. To fix it, we can either
4417 ;; add Expat as an input and make it visible to the linker, or just
4418 ;; prevent it from overriding the Python shared library location.
4419 ;; The end result is identical, so we take the easy route.
4420 ((" or libname not in os\\.listdir\\(libdir\\)")
4421 ""))
4422 #t)))))))))
4423
4424 ;; The RPython toolchain currently does not support Python 3.
4425 (define-public python2-rpython
4426 (package
4427 (name "python2-rpython")
4428 (version "0.2.1")
4429 (source
4430 (origin
4431 (method url-fetch)
4432 (uri (pypi-uri "rpython" version))
4433 (sha256
4434 (base32
4435 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4436 (build-system python-build-system)
4437 (arguments `(#:python ,python-2))
4438 (native-inputs
4439 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4440 (home-page "https://rpython.readthedocs.org")
4441 (synopsis "Framework for implementing interpreters and virtual machines")
4442 (description "RPython is a translation and support framework for
4443 producing implementations of dynamic languages, emphasizing a clean separation
4444 between language specification and implementation aspects.")
4445 (license license:expat)))
4446
4447 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4448 ;; python-scipy still build, as these three packages are often used together.
4449 (define-public python-numpy
4450 (package
4451 (name "python-numpy")
4452 (version "1.17.3")
4453 (source
4454 (origin
4455 (method url-fetch)
4456 (uri (string-append
4457 "https://github.com/numpy/numpy/releases/download/v"
4458 version "/numpy-" version ".tar.gz"))
4459 (sha256
4460 (base32
4461 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4462 (build-system python-build-system)
4463 (inputs
4464 `(("openblas" ,openblas)
4465 ("lapack" ,lapack)))
4466 (native-inputs
4467 `(("python-cython" ,python-cython)
4468 ("python-pytest" ,python-pytest)
4469 ("gfortran" ,gfortran)))
4470 (arguments
4471 `(#:phases
4472 (modify-phases %standard-phases
4473 (add-before 'build 'configure-blas-lapack
4474 (lambda* (#:key inputs #:allow-other-keys)
4475 (call-with-output-file "site.cfg"
4476 (lambda (port)
4477 (format port
4478 "[openblas]
4479 libraries = openblas
4480 library_dirs = ~a/lib
4481 include_dirs = ~a/include
4482
4483 # backslash-n to make emacs happy
4484 \n[lapack]
4485 lapack_libs = lapack
4486 library_dirs = ~a/lib
4487 include_dirs = ~a/include
4488 "
4489 (assoc-ref inputs "openblas")
4490 (assoc-ref inputs "openblas")
4491 (assoc-ref inputs "lapack")
4492 (assoc-ref inputs "lapack"))))
4493 #t))
4494 (add-before 'build 'fix-executable-paths
4495 (lambda* (#:key inputs #:allow-other-keys)
4496 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4497 ;; instead of /bin/sh.
4498 (substitute* "numpy/distutils/exec_command.py"
4499 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4500 (string-append match-start (assoc-ref inputs "bash") match-end)))
4501 ;; Use "gcc" executable, not "cc".
4502 (substitute* "numpy/distutils/system_info.py"
4503 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4504 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4505 #t))
4506 ;; Tests can only be run after the library has been installed and not
4507 ;; within the source directory.
4508 (delete 'check)
4509 (add-after 'install 'check
4510 (lambda* (#:key outputs inputs #:allow-other-keys)
4511 ;; Make installed package available for running the tests
4512 (add-installed-pythonpath inputs outputs)
4513 ;; Make sure "f2py" etc is found.
4514 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4515 ":" (getenv "PATH")))
4516 (with-directory-excursion "/tmp"
4517 (invoke "python" "-c"
4518 "import numpy; numpy.test(verbose=2)")))))))
4519 (home-page "https://numpy.org")
4520 (synopsis "Fundamental package for scientific computing with Python")
4521 (description "NumPy is the fundamental package for scientific computing
4522 with Python. It contains among other things: a powerful N-dimensional array
4523 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4524 and Fortran code, useful linear algebra, Fourier transform, and random number
4525 capabilities.")
4526 (properties `((python2-variant . ,(delay python2-numpy))))
4527 (license license:bsd-3)))
4528
4529 ;; Numpy 1.16.x are the last versions that support Python 2.
4530 (define-public python2-numpy
4531 (let ((numpy (package-with-python2
4532 (strip-python2-variant python-numpy))))
4533 (package/inherit
4534 numpy
4535 (version "1.16.5")
4536 (source (origin
4537 (method url-fetch)
4538 (uri (string-append
4539 "https://github.com/numpy/numpy/releases/download/v"
4540 version "/numpy-" version ".tar.gz"))
4541 (sha256
4542 (base32
4543 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4544
4545 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4546 ;; interest only for legacy code going back to NumPy's predecessor
4547 ;; Numeric.
4548 (define-public python2-numpy-1.8
4549 (package (inherit python2-numpy)
4550 (version "1.8.2")
4551 (source
4552 (origin
4553 (method git-fetch)
4554 (uri (git-reference
4555 (url "https://github.com/numpy/numpy")
4556 (commit (string-append "v" version))))
4557 (file-name (git-file-name "numpy" version))
4558 (sha256
4559 (base32
4560 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4561 (arguments
4562 (substitute-keyword-arguments (package-arguments python2-numpy)
4563 ((#:phases phases)
4564 `(modify-phases ,phases
4565 (replace 'configure-blas-lapack
4566 (lambda* (#:key inputs #:allow-other-keys)
4567 (call-with-output-file "site.cfg"
4568 (lambda (port)
4569 (format port
4570 "[openblas]
4571 libraries = openblas,lapack
4572 library_dirs = ~a/lib:~a/lib
4573 include_dirs = ~a/include:~a/include
4574 "
4575 (assoc-ref inputs "openblas")
4576 (assoc-ref inputs "lapack")
4577 (assoc-ref inputs "openblas")
4578 (assoc-ref inputs "lapack"))))
4579 #t))))))
4580 (native-inputs
4581 `(("python2-nose" ,python2-nose)))
4582 (description "NumPy is the fundamental package for scientific computing
4583 with Python. It contains among other things: a powerful N-dimensional array
4584 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4585 and Fortran code, useful linear algebra, Fourier transform, and random number
4586 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4587 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4588 Numeric.")
4589 (license license:bsd-3)))
4590
4591 (define-public python-munch
4592 (package
4593 (name "python-munch")
4594 (version "2.0.4")
4595 (source
4596 (origin
4597 (method url-fetch)
4598 (uri (pypi-uri "munch" version))
4599 (sha256
4600 (base32
4601 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4602 (build-system python-build-system)
4603 (home-page "https://github.com/Infinidat/munch")
4604 (synopsis "Dot-accessible dictionary")
4605 (description "Munch is a dot-accessible dictionary similar to JavaScript
4606 objects.")
4607 (license license:expat)))
4608
4609 (define-public python2-munch
4610 (package-with-python2 python-munch))
4611
4612 (define-public python-colormath
4613 (package
4614 (name "python-colormath")
4615 (version "3.0.0")
4616 (source
4617 (origin
4618 (method url-fetch)
4619 (uri (pypi-uri "colormath" version))
4620 (sha256
4621 (base32
4622 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4623 (build-system python-build-system)
4624 (propagated-inputs
4625 `(("python-networkx" ,python-networkx)
4626 ("python-numpy" ,python-numpy)))
4627 (home-page "https://github.com/gtaylor/python-colormath")
4628 (synopsis "Color math and conversion library")
4629 (description
4630 "This is a Python library for color math and conversions.")
4631 (license license:bsd-3)))
4632
4633 (define-public python2-colormath
4634 (package-with-python2 python-colormath))
4635
4636 (define-public python-spectra
4637 (package
4638 (name "python-spectra")
4639 (version "0.0.11")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (pypi-uri "spectra" version))
4644 (sha256
4645 (base32
4646 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4647 (build-system python-build-system)
4648 (arguments
4649 `(#:phases
4650 (modify-phases %standard-phases
4651 (replace 'check
4652 (lambda _ (invoke "nosetests" "-v"))))))
4653 (propagated-inputs
4654 `(("python-colormath" ,python-colormath)))
4655 (native-inputs
4656 `(("python-nose" ,python-nose)))
4657 (home-page "https://github.com/jsvine/spectra")
4658 (synopsis "Color scales and color conversion")
4659 (description
4660 "This package provides a Python library intended to make color math,
4661 color scales, and color space conversion easy. It has support for:
4662
4663 @enumerate
4664 @item Color scales
4665 @item Color ranges
4666 @item Color blending
4667 @item Brightening/darkening colors
4668 @item Saturating/desaturating colors
4669 @item Conversion to/from multiple color spaces.
4670 @end enumerate\n")
4671 (license license:expat)))
4672
4673 (define-public python2-spectra
4674 (package-with-python2 python-spectra))
4675
4676 (define-public python-numpy-documentation
4677 (package
4678 (name "python-numpy-documentation")
4679 (version (package-version python-numpy))
4680 (source (package-source python-numpy))
4681 (build-system python-build-system)
4682 (native-inputs
4683 `(("python-matplotlib" ,python-matplotlib)
4684 ("python-numpy" ,python-numpy)
4685 ("pkg-config" ,pkg-config)
4686 ("python-sphinx" ,python-sphinx)
4687 ("python-numpydoc" ,python-numpydoc)
4688 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4689 texlive-fonts-ec
4690 texlive-generic-ifxetex
4691 texlive-generic-pdftex
4692 texlive-amsfonts
4693 texlive-latex-capt-of
4694 texlive-latex-cmap
4695 texlive-latex-environ
4696 texlive-latex-eqparbox
4697 texlive-latex-etoolbox
4698 texlive-latex-expdlist
4699 texlive-latex-fancyhdr
4700 texlive-latex-fancyvrb
4701 texlive-latex-fncychap
4702 texlive-latex-float
4703 texlive-latex-framed
4704 texlive-latex-geometry
4705 texlive-latex-graphics
4706 texlive-latex-hyperref
4707 texlive-latex-mdwtools
4708 texlive-latex-multirow
4709 texlive-latex-needspace
4710 texlive-latex-oberdiek
4711 texlive-latex-parskip
4712 texlive-latex-preview
4713 texlive-latex-tabulary
4714 texlive-latex-threeparttable
4715 texlive-latex-titlesec
4716 texlive-latex-trimspaces
4717 texlive-latex-ucs
4718 texlive-latex-upquote
4719 texlive-latex-url
4720 texlive-latex-varwidth
4721 texlive-latex-wrapfig)))
4722 ("texinfo" ,texinfo)
4723 ("perl" ,perl)
4724 ("scipy-sphinx-theme"
4725 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4726 (method git-fetch)
4727 (uri (git-reference
4728 (url "https://github.com/scipy/scipy-sphinx-theme")
4729 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4730 (sha256
4731 (base32
4732 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4733 ,@(package-native-inputs python-numpy)))
4734 (arguments
4735 `(#:tests? #f ; we're only generating the documentation
4736 #:phases
4737 (modify-phases %standard-phases
4738 (delete 'build)
4739 (replace 'install
4740 (lambda* (#:key inputs outputs #:allow-other-keys)
4741 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4742 (doc (string-append
4743 data "/doc/" ,name "-"
4744 ,(package-version python-numpy)))
4745 (info-reader (string-append data "/info"))
4746 (html (string-append doc "/html"))
4747 (scipy-sphinx-theme "scipy-sphinx-theme")
4748 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4749 (pyver ,(string-append "PYVER=")))
4750
4751 ;; FIXME: this is needed to for texlive-union to generate
4752 ;; fonts, which are not found.
4753 (setenv "HOME" "/tmp")
4754
4755 (with-directory-excursion "doc"
4756 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4757 (mkdir-p html)
4758 (invoke "make" "html" pyver)
4759 (invoke "make" "latex" "PAPER=a4" pyver)
4760 (invoke "make" "-C" "build/latex"
4761 "all-pdf" "PAPER=a4" pyver)
4762 ;; FIXME: Generation of the info file fails.
4763 ;; (invoke "make" "info" pyver)
4764 ;; (mkdir-p info)
4765 ;; (copy-file "build/texinfo/numpy.info"
4766 ;; (string-append info "/numpy.info"))
4767 (for-each (lambda (file)
4768 (copy-file (string-append "build/latex" file)
4769 (string-append doc file)))
4770 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4771 (with-directory-excursion "build/html"
4772 (for-each (lambda (file)
4773 (let* ((dir (dirname file))
4774 (tgt-dir (string-append html "/" dir)))
4775 (unless (equal? "." dir)
4776 (mkdir-p tgt-dir))
4777 (install-file file html)))
4778 (find-files "." ".*")))))
4779 #t)))))
4780 (home-page (package-home-page python-numpy))
4781 (synopsis "Documentation for the python-numpy package")
4782 (description (package-description python-numpy))
4783 (license (package-license python-numpy))))
4784
4785 (define-public python2-numpy-documentation
4786 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4787 (package
4788 (inherit numpy-documentation)
4789 (native-inputs `(("python2-functools32" ,python2-functools32)
4790 ,@(package-native-inputs numpy-documentation))))))
4791
4792 (define-public python-pygit2
4793 (package
4794 (name "python-pygit2")
4795 (version "1.1.0")
4796 (source
4797 (origin
4798 (method url-fetch)
4799 (uri (pypi-uri "pygit2" version))
4800 (sha256
4801 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4802 (build-system python-build-system)
4803 (arguments
4804 '(#:tests? #f)) ; tests don't run correctly in our environment
4805 (propagated-inputs
4806 `(("python-cached-property" ,python-cached-property)
4807 ("python-cffi" ,python-cffi)
4808 ("libgit2" ,libgit2)))
4809 (native-inputs
4810 `(("python-pytest" ,python-pytest)))
4811 (home-page "https://github.com/libgit2/pygit2")
4812 (synopsis "Python bindings for libgit2")
4813 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4814 library, libgit2 implements Git plumbing.")
4815 ;; GPL2.0 only, with linking exception.
4816 (license license:gpl2)))
4817
4818 (define-public python-patiencediff
4819 (package
4820 (name "python-patiencediff")
4821 (version "0.2.0")
4822 (source
4823 (origin
4824 (method url-fetch)
4825 (uri (pypi-uri "patiencediff" version))
4826 (sha256
4827 (base32
4828 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4829 (build-system python-build-system)
4830 (home-page "https://www.breezy-vcs.org/")
4831 (synopsis "Python implementation of the patiencediff algorithm")
4832 (description
4833 "This package contains a Python implementation of the @code{patiencediff}
4834 algorithm. Patiencediff provides a good balance of performance, nice output for
4835 humans, and implementation simplicity.")
4836 (license license:gpl2)))
4837
4838 (define-public python-pyparsing
4839 (package
4840 (name "python-pyparsing")
4841 (version "2.4.6")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "pyparsing" version))
4846 (sha256
4847 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4848 (build-system python-build-system)
4849 (outputs '("out" "doc"))
4850 (arguments
4851 `(#:tests? #f ; no test target
4852 #:phases
4853 (modify-phases %standard-phases
4854 (add-after 'install 'install-doc
4855 (lambda* (#:key outputs #:allow-other-keys)
4856 (let* ((doc (string-append (assoc-ref outputs "doc")
4857 "/share/doc/" ,name "-" ,version))
4858 (html-doc (string-append doc "/html"))
4859 (examples (string-append doc "/examples")))
4860 (mkdir-p html-doc)
4861 (mkdir-p examples)
4862 (for-each
4863 (lambda (dir tgt)
4864 (map (lambda (file)
4865 (install-file file tgt))
4866 (find-files dir ".*")))
4867 (list "docs" "htmldoc" "examples")
4868 (list doc html-doc examples))
4869 #t))))))
4870 (home-page "https://github.com/pyparsing/pyparsing")
4871 (synopsis "Python parsing class library")
4872 (description
4873 "The pyparsing module is an alternative approach to creating and
4874 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4875 of regular expressions. The pyparsing module provides a library of classes
4876 that client code uses to construct the grammar directly in Python code.")
4877 (license license:expat)))
4878
4879 (define-public python2-pyparsing
4880 (package-with-python2 python-pyparsing))
4881
4882 (define-public python-pyparsing-2.4.7
4883 (package
4884 (inherit python-pyparsing)
4885 (version "2.4.7")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "pyparsing" version))
4890 (sha256
4891 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4892
4893 (define-public python-numpydoc
4894 (package
4895 (name "python-numpydoc")
4896 (version "0.8.0")
4897 (source
4898 (origin
4899 (method url-fetch)
4900 (uri (pypi-uri "numpydoc" version))
4901 (sha256
4902 (base32
4903 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4904 (build-system python-build-system)
4905 (propagated-inputs
4906 `(("python-sphinx" ,python-sphinx)))
4907 (native-inputs
4908 `(("python-nose" ,python-nose)))
4909 (home-page "https://pypi.org/project/numpydoc/")
4910 (synopsis
4911 "Numpy's Sphinx extensions")
4912 (description
4913 "Sphinx extension to support docstrings in Numpy format.")
4914 (license license:bsd-2)))
4915
4916 (define-public python2-numpydoc
4917 (package-with-python2 python-numpydoc))
4918
4919 (define-public python-numexpr
4920 (package
4921 (name "python-numexpr")
4922 (version "2.6.5")
4923 (source
4924 (origin
4925 (method url-fetch)
4926 (uri (pypi-uri "numexpr" version))
4927 (sha256
4928 (base32
4929 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4930 (build-system python-build-system)
4931 (arguments `(#:tests? #f)) ; no tests included
4932 (propagated-inputs
4933 `(("python-numpy" ,python-numpy)))
4934 (home-page "https://github.com/pydata/numexpr")
4935 (synopsis "Fast numerical expression evaluator for NumPy")
4936 (description
4937 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4938 expressions that operate on arrays are accelerated and use less memory than
4939 doing the same calculation in Python. In addition, its multi-threaded
4940 capabilities can make use of all your cores, which may accelerate
4941 computations, most specially if they are not memory-bounded (e.g. those using
4942 transcendental functions).")
4943 (license license:expat)))
4944
4945 (define-public python2-numexpr
4946 (package-with-python2 python-numexpr))
4947
4948 (define-public python-cycler
4949 (package
4950 (name "python-cycler")
4951 (version "0.10.0")
4952 (source (origin
4953 (method url-fetch)
4954 (uri (pypi-uri "cycler" version))
4955 (sha256
4956 (base32
4957 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4958 (build-system python-build-system)
4959 (arguments
4960 ;; XXX: The current version requires 'coveralls' which we don't have.
4961 ;; Enable this for the next release which uses 'python-pytest'.
4962 '(#:tests? #f))
4963 (propagated-inputs
4964 `(("python-six" ,python-six)))
4965 (home-page "http://matplotlib.org/cycler/")
4966 (synopsis "Composable keyword argument iterator")
4967 (description
4968 "When using @code{matplotlib} and plotting more than one line, it is
4969 common to want to be able to want to be able to cycle over one or more artist
4970 styles; but the plotting logic can quickly become involved.
4971 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4972 @code{Cycler} class was developed.")
4973 (license license:bsd-3)))
4974
4975 (define-public python2-cycler
4976 (package-with-python2 python-cycler))
4977
4978 (define-public python-colorspacious
4979 (package
4980 (name "python-colorspacious")
4981 (version "1.1.2")
4982 (source
4983 (origin
4984 (method git-fetch)
4985 (uri (git-reference
4986 (url "https://github.com/njsmith/colorspacious")
4987 (commit (string-append "v" version))))
4988 (file-name (git-file-name name version))
4989 (sha256
4990 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4991 (build-system python-build-system)
4992 (propagated-inputs
4993 `(("python-numpy" ,python-numpy)))
4994 (native-inputs
4995 `(("python-nose" ,python-nose)))
4996 (arguments
4997 `(#:phases
4998 (modify-phases %standard-phases
4999 (replace 'check
5000 (lambda _
5001 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5002 (home-page "https://github.com/njsmith/colorspacious")
5003 (synopsis "Python library for colorspace conversions")
5004 (description "@code{colorspacious} is a Python library that lets you
5005 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5006 (license license:expat)))
5007
5008 (define-public python2-colorspacious
5009 (package-with-python2 python-colorspacious))
5010
5011 (define-public python-matplotlib
5012 (package
5013 (name "python-matplotlib")
5014 (version "3.1.2")
5015 (source
5016 (origin
5017 (method url-fetch)
5018 (uri (pypi-uri "matplotlib" version))
5019 (sha256
5020 (base32
5021 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5022 (build-system python-build-system)
5023 (propagated-inputs ; the following packages are all needed at run time
5024 `(("python-cycler" ,python-cycler)
5025 ("python-kiwisolver" ,python-kiwisolver)
5026 ("python-pyparsing" ,python-pyparsing)
5027 ("python-pygobject" ,python-pygobject)
5028 ("gobject-introspection" ,gobject-introspection)
5029 ("python-tkinter" ,python "tk")
5030 ("python-dateutil" ,python-dateutil)
5031 ("python-numpy" ,python-numpy)
5032 ("python-pillow" ,python-pillow)
5033 ("python-pytz" ,python-pytz)
5034 ("python-six" ,python-six)
5035 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5036 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5037 ;; object. For this reason we need to import both libraries.
5038 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5039 ("python-pycairo" ,python-pycairo)
5040 ("python-cairocffi" ,python-cairocffi)))
5041 (inputs
5042 `(("libpng" ,libpng)
5043 ("freetype" ,freetype)
5044 ("cairo" ,cairo)
5045 ("glib" ,glib)
5046 ;; FIXME: Add backends when available.
5047 ;("python-wxpython" ,python-wxpython)
5048 ("tcl" ,tcl)
5049 ("tk" ,tk)))
5050 (native-inputs
5051 `(("pkg-config" ,pkg-config)
5052 ("python-pytest" ,python-pytest)
5053 ("python-mock" ,python-mock)
5054 ("unzip" ,unzip)
5055 ("jquery-ui"
5056 ,(origin
5057 (method url-fetch)
5058 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5059 (sha256
5060 (base32
5061 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5062 (arguments
5063 `(#:phases
5064 (modify-phases %standard-phases
5065 ;; XXX We disable all image comparison tests because we're using a
5066 ;; newer version of FreeType than matplotlib expects. This leads to
5067 ;; minor differences throughout the tests.
5068 (add-after 'unpack 'fix-and-disable-failing-tests
5069 (lambda _
5070 (substitute* (append (find-files "lib/matplotlib/tests/"
5071 "test_.*\\.py$")
5072 (find-files "lib/mpl_toolkits/tests"
5073 "test_.*\\.py$"))
5074 (("^from matplotlib" match)
5075 (string-append "import pytest\n" match))
5076 (("( *)@image_comparison" match indent)
5077 (string-append indent
5078 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5079 match)))
5080 (substitute* "lib/matplotlib/tests/test_animation.py"
5081 (("/bin/sh") (which "sh")))
5082 (for-each delete-file
5083 ;; test_normal_axes, test_get_tightbbox_polar
5084 '("lib/matplotlib/tests/test_axes.py"
5085 ;; We don't use the webagg backend and this test forces it.
5086 "lib/matplotlib/tests/test_backend_webagg.py"
5087 ;; test_outward_ticks
5088 "lib/matplotlib/tests/test_tightlayout.py"
5089 ;; test_hidden_axes fails with minor extent
5090 ;; differences, possibly due to the use of a
5091 ;; different version of FreeType.
5092 "lib/matplotlib/tests/test_constrainedlayout.py"
5093 ;; Fontconfig returns no fonts.
5094 "lib/matplotlib/tests/test_font_manager.py"))
5095 #t))
5096 (add-before 'install 'install-jquery-ui
5097 (lambda* (#:key outputs inputs #:allow-other-keys)
5098 (let ((dir (string-append (assoc-ref outputs "out")
5099 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5100 (mkdir-p dir)
5101 (invoke "unzip"
5102 (assoc-ref inputs "jquery-ui")
5103 "-d" dir))
5104 #t))
5105 (replace 'check
5106 (lambda* (#:key outputs inputs #:allow-other-keys)
5107 (add-installed-pythonpath inputs outputs)
5108 (invoke "python" "tests.py" "-v"
5109 "-m" "not network and not webagg")))
5110 (add-before 'build 'configure-environment
5111 (lambda* (#:key outputs inputs #:allow-other-keys)
5112 (let ((cairo (assoc-ref inputs "cairo")))
5113 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5114 ;; has not effect.
5115 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5116 (setenv "HOME" (getcwd))
5117 ;; Fix rounding errors when using the x87 FPU.
5118 (when (string-prefix? "i686" ,(%current-system))
5119 (setenv "CFLAGS" "-ffloat-store"))
5120 (call-with-output-file "setup.cfg"
5121 (lambda (port)
5122 (format port "[directories]~%
5123 basedirlist = ~a,~a~%
5124 [packages]~%
5125 tests = True~%"
5126 (assoc-ref inputs "tcl")
5127 (assoc-ref inputs "tk")))))
5128 #t)))))
5129 (home-page "https://matplotlib.org/")
5130 (synopsis "2D plotting library for Python")
5131 (description
5132 "Matplotlib is a Python 2D plotting library which produces publication
5133 quality figures in a variety of hardcopy formats and interactive environments
5134 across platforms. Matplotlib can be used in Python scripts, the python and
5135 ipython shell, web application servers, and six graphical user interface
5136 toolkits.")
5137 (license license:psfl)
5138 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5139
5140 (define-public python2-matplotlib
5141 (let ((matplotlib (package-with-python2
5142 (strip-python2-variant python-matplotlib))))
5143 (package (inherit matplotlib)
5144 (version "2.2.4")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (pypi-uri "matplotlib" version))
5149 (sha256
5150 (base32
5151 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5152 (arguments
5153 (substitute-keyword-arguments (package-arguments matplotlib)
5154 ((#:phases phases)
5155 `(modify-phases ,phases
5156 (replace 'install-jquery-ui
5157 (lambda* (#:key outputs inputs #:allow-other-keys)
5158 (let ((dir (string-append (assoc-ref outputs "out")
5159 "/lib/python2.7/site-packages/"
5160 "matplotlib/backends/web_backend/")))
5161 (mkdir-p dir)
5162 (invoke "unzip"
5163 (assoc-ref inputs "jquery-ui")
5164 "-d" dir))
5165 #t))
5166 (delete 'fix-and-disable-failing-tests)
5167 (delete 'check))))) ; These tests weren't run the the past.
5168 ;; Make sure to use special packages for Python 2 instead
5169 ;; of those automatically rewritten by package-with-python2.
5170 (propagated-inputs
5171 `(("python2-pycairo" ,python2-pycairo)
5172 ("python2-backports-functools-lru-cache"
5173 ,python2-backports-functools-lru-cache)
5174 ("python2-functools32" ,python2-functools32)
5175 ("python2-pygobject-2" ,python2-pygobject-2)
5176 ("python2-subprocess32" ,python2-subprocess32)
5177 ("python2-tkinter" ,python-2 "tk")
5178 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5179 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5180
5181 (define-public python-matplotlib-documentation
5182 (package
5183 (name "python-matplotlib-documentation")
5184 (version (package-version python-matplotlib))
5185 (source (package-source python-matplotlib))
5186 (build-system python-build-system)
5187 (native-inputs
5188 `(("python-matplotlib" ,python-matplotlib)
5189 ("python-colorspacious" ,python-colorspacious)
5190 ("python-sphinx" ,python-sphinx)
5191 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5192 ("python-sphinx-gallery" ,python-sphinx-gallery)
5193 ("python-numpydoc" ,python-numpydoc)
5194 ("python-ipython" ,python-ipython)
5195 ("python-ipykernel" ,python-ipykernel)
5196 ("python-mock" ,python-mock)
5197 ("graphviz" ,graphviz)
5198 ("texlive" ,(texlive-union (list texlive-amsfonts
5199 texlive-latex-amsmath
5200 texlive-latex-enumitem
5201 texlive-latex-expdlist
5202 texlive-latex-geometry
5203 texlive-latex-preview
5204 texlive-latex-type1cm
5205 texlive-latex-ucs
5206
5207 texlive-generic-pdftex
5208
5209 texlive-fonts-ec
5210 texlive-fonts-adobe-times
5211 texlive-fonts-txfonts)))
5212 ("texinfo" ,texinfo)
5213 ,@(package-native-inputs python-matplotlib)))
5214 (arguments
5215 `(#:tests? #f ; we're only generating documentation
5216 #:phases
5217 (modify-phases %standard-phases
5218 ;; The tests in python-matplotlib are run after the install phase, so
5219 ;; we need to delete the extra phase here.
5220 (delete 'check)
5221 (replace 'build
5222 (lambda _
5223 (chdir "doc")
5224 (setenv "PYTHONPATH"
5225 (string-append (getenv "PYTHONPATH")
5226 ":" (getcwd) "/../examples/units"))
5227 (substitute* "conf.py"
5228 ;; Don't use git.
5229 (("^SHA = check_output.*")
5230 (string-append "SHA = \"" ,version "\"\n"))
5231 ;; Don't fetch intersphinx files from the Internet
5232 (("^explicit_order_folders" m)
5233 (string-append "intersphinx_mapping = {}\n" m))
5234 (("'sphinx.ext.intersphinx',") "")
5235 ;; Disable URL embedding which requires internet access.
5236 (("'https://docs.scipy.org/doc/numpy'") "None")
5237 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5238 (invoke "make"
5239 "SPHINXBUILD=sphinx-build"
5240 "SPHINXOPTS=" ; don't abort on warnings
5241 "html" "texinfo")))
5242 (replace 'install
5243 (lambda* (#:key inputs outputs #:allow-other-keys)
5244 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5245 (doc (string-append data "/doc/python-matplotlib-" ,version))
5246 (info (string-append data "/info"))
5247 (html (string-append doc "/html")))
5248 (mkdir-p html)
5249 (mkdir-p info)
5250 (copy-recursively "build/html" html)
5251 (symlink (string-append html "/_images")
5252 (string-append info "/matplotlib-figures"))
5253 (with-directory-excursion "build/texinfo"
5254 (substitute* "matplotlib.texi"
5255 (("@image\\{([^,]*)" all file)
5256 (string-append "@image{matplotlib-figures/" file)))
5257 (symlink (string-append html "/_images")
5258 "./matplotlib-figures")
5259 (invoke "makeinfo" "--no-split"
5260 "-o" "matplotlib.info" "matplotlib.texi"))
5261 (install-file "build/texinfo/matplotlib.info" info))
5262 #t)))))
5263 (home-page (package-home-page python-matplotlib))
5264 (synopsis "Documentation for the python-matplotlib package")
5265 (description (package-description python-matplotlib))
5266 (license (package-license python-matplotlib))))
5267
5268 (define-public python2-matplotlib-documentation
5269 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5270 (package
5271 (inherit parent)
5272 (native-inputs
5273 (alist-delete "python-sphinx-copybutton"
5274 (package-native-inputs parent))))))
5275
5276 (define-public python-matplotlib-venn
5277 (package
5278 (name "python-matplotlib-venn")
5279 (version "0.11.5")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5284 (sha256
5285 (base32
5286 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5287 (build-system python-build-system)
5288 (arguments '(#:tests? #f)) ; tests are not included
5289 (propagated-inputs
5290 `(("python-matplotlib" ,python-matplotlib)
5291 ("python-numpy" ,python-numpy)
5292 ("python-scipy" ,python-scipy)))
5293 (native-inputs
5294 `(("unzip" ,unzip)))
5295 (home-page "https://github.com/konstantint/matplotlib-venn")
5296 (synopsis "Plot area-proportional Venn diagrams")
5297 (description
5298 "This package provides tools for plotting area-proportional two- and
5299 three-way Venn diagrams in @code{matplotlib}.")
5300 (license license:expat)))
5301
5302 (define-public python-pysnptools
5303 (package
5304 (name "python-pysnptools")
5305 (version "0.4.11")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "pysnptools" version))
5310 (sha256
5311 (base32
5312 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5313 (build-system python-build-system)
5314 (arguments
5315 `(#:tests? #f ; no test data are included
5316 #:phases
5317 (modify-phases %standard-phases
5318 (replace 'check
5319 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5320 (if tests?
5321 (begin
5322 (add-installed-pythonpath inputs outputs)
5323 (invoke "python3" "pysnptools/test.py"))
5324 #t))))))
5325 (propagated-inputs
5326 `(("python-dill" ,python-dill)
5327 ("python-h5py" ,python-h5py)
5328 ("python-numpy" ,python-numpy)
5329 ("python-pandas" ,python-pandas)
5330 ("python-psutil" ,python-psutil)
5331 ("python-scipy" ,python-scipy)))
5332 (native-inputs
5333 `(("python-cython" ,python-cython)))
5334 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5335 (synopsis "Library for reading and manipulating genetic data")
5336 (description
5337 "PySnpTools is a library for reading and manipulating genetic data. It
5338 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5339 those files. It can also efficiently manipulate ranges of integers using set
5340 operators such as union, intersection, and difference.")
5341 (license license:asl2.0)))
5342
5343 (define-public python2-pysnptools
5344 (package-with-python2 python-pysnptools))
5345
5346 (define-public python-wurlitzer
5347 (package
5348 (name "python-wurlitzer")
5349 (version "2.0.1")
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "wurlitzer" version))
5354 (sha256
5355 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5356 (build-system python-build-system)
5357 (arguments
5358 '(#:phases
5359 (modify-phases %standard-phases
5360 (replace 'check
5361 (lambda _
5362 (invoke "pytest" "-vv" "test.py"))))))
5363 (native-inputs
5364 `(("python-mock" ,python-mock)
5365 ("python-pytest" ,python-pytest)))
5366 (home-page "https://github.com/minrk/wurlitzer")
5367 (synopsis "Capture C-level output in context managers")
5368 (description
5369 "This library helps to redirect @code{sys.stdout} to a stream or a file
5370 while executing some piece of code, including C code running within a Python
5371 process.")
5372 (license license:expat)))
5373
5374 (define-public python-socksipy-branch
5375 (package
5376 (name "python-socksipy-branch")
5377 (version "1.01")
5378 (source
5379 (origin
5380 (method url-fetch)
5381 (uri (pypi-uri "SocksiPy-branch" version))
5382 (sha256
5383 (base32
5384 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5385 (build-system python-build-system)
5386 (arguments
5387 `(#:tests? #f)) ; There are no tests
5388 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5389 (synopsis "Python SOCKS module")
5390 (description
5391 "SocksiPy - A Python SOCKS client module. It provides a
5392 socket-like interface that supports connections to any TCP
5393 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5394 The original version was developed by Dan Haim, this is a
5395 branch created by Mario Vilas to address some open issues,
5396 as the original project seems to have been abandoned circa 2007.")
5397 (license license:bsd-3)))
5398
5399 (define-public python2-socksipy-branch
5400 (package-with-python2 python-socksipy-branch))
5401
5402 (define-public python-socksipychain
5403 (package
5404 (name "python-socksipychain")
5405 (version "2.1.2")
5406 (source
5407 (origin
5408 (method git-fetch)
5409 (uri (git-reference
5410 (url "https://github.com/pagekite/PySocksipyChain")
5411 (commit (string-append "v" version))))
5412 (file-name (git-file-name name version))
5413 (sha256
5414 (base32
5415 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5416 (build-system python-build-system)
5417 (arguments
5418 `(#:tests? #f)) ; Tests try to access the network.
5419 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5420 (synopsis "Python SOCKS module with chained proxies support")
5421 (description
5422 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5423 adds support for arbitrary chaining of proxy servers and various modes of
5424 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5425 a simple netcat replacement with chaining support.")
5426 (license license:bsd-3)))
5427
5428 (define-public python-pycodestyle
5429 (package
5430 (name "python-pycodestyle")
5431 (version "2.6.0")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "pycodestyle" version))
5436 (sha256
5437 (base32
5438 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5439 (build-system python-build-system)
5440 (arguments
5441 `(#:phases
5442 (modify-phases %standard-phases
5443 (replace 'check
5444 (lambda _
5445 (invoke "pytest" "-vv"))))))
5446 (native-inputs
5447 `(("python-pytest" ,python-pytest)))
5448 (home-page "https://pycodestyle.readthedocs.io/")
5449 (synopsis "Python style guide checker")
5450 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5451 Python code against some of the style conventions in
5452 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5453 (license license:expat)))
5454
5455 (define-public python2-pycodestyle
5456 (package-with-python2 python-pycodestyle))
5457
5458 (define-public python-multidict
5459 (package
5460 (name "python-multidict")
5461 (version "4.7.5")
5462 (source
5463 (origin
5464 (method url-fetch)
5465 (uri (pypi-uri "multidict" version))
5466 (sha256
5467 (base32
5468 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5469 (build-system python-build-system)
5470 (arguments
5471 '(#:modules ((ice-9 ftw)
5472 (srfi srfi-1)
5473 (srfi srfi-26)
5474 (guix build utils)
5475 (guix build python-build-system))
5476 #:phases (modify-phases %standard-phases
5477 (replace 'check
5478 (lambda* (#:key tests? #:allow-other-keys)
5479 (if tests?
5480 (begin
5481 (let ((libdir (find (cut string-prefix? "lib." <>)
5482 (scandir "build"))))
5483 (setenv "PYTHONPATH"
5484 (string-append "./build/" libdir ":"
5485 (getenv "PYTHONPATH")))
5486 (invoke "pytest" "-vv")))
5487 (format #t "test suite not run~%"))
5488 #t)))))
5489 (native-inputs
5490 `(("python-pytest" ,python-pytest)
5491 ("python-pytest-cov" ,python-pytest-cov)))
5492 (home-page "https://github.com/aio-libs/multidict/")
5493 (synopsis "Multidict implementation")
5494 (description "Multidict is dict-like collection of key-value pairs
5495 where key might be occurred more than once in the container.")
5496 (license license:asl2.0)))
5497
5498 (define-public python-orderedmultidict
5499 (package
5500 (name "python-orderedmultidict")
5501 (version "1.0")
5502 (source
5503 (origin
5504 (method url-fetch)
5505 (uri (pypi-uri "orderedmultidict" version))
5506 (sha256
5507 (base32
5508 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5509 (build-system python-build-system)
5510 (arguments
5511 `(#:phases
5512 (modify-phases %standard-phases
5513 (add-after 'unpack 'fix-tests
5514 (lambda _
5515 ;; The package uses nosetest for running the tests.
5516 ;; Adding this initfile allows to run the test suite
5517 ;; without requiring nosetest.
5518 (with-output-to-file "tests/__init__.py" newline)
5519 #t)))))
5520 (propagated-inputs
5521 `(("python-six" ,python-six)))
5522 (native-inputs
5523 `(("python-pycodestyle" ,python-pycodestyle)))
5524 (home-page "https://github.com/gruns/orderedmultidict")
5525 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5526 (description "This package contains a library for ordered multivalue
5527 dictionaries. A multivalue dictionary is a dictionary that can store
5528 multiple values for the same key. An ordered multivalue dictionary is a
5529 multivalue dictionary that retains the order of insertions and deletions.")
5530 (license license:unlicense)))
5531
5532 (define-public python2-orderedmultidict
5533 (package-with-python2 python-orderedmultidict))
5534
5535 (define-public python-autopep8
5536 (package
5537 (name "python-autopep8")
5538 (version "1.5.3")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "autopep8" version))
5543 (sha256
5544 (base32
5545 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5546 (build-system python-build-system)
5547 (propagated-inputs
5548 `(("python-pycodestyle" ,python-pycodestyle)
5549 ("python-toml" ,python-toml)))
5550 (home-page "https://github.com/hhatto/autopep8")
5551 (synopsis "Format Python code according to the PEP 8 style guide")
5552 (description
5553 "@code{autopep8} automatically formats Python code to conform to
5554 the PEP 8 style guide. It uses the pycodestyle utility to determine
5555 what parts of the code needs to be formatted. @code{autopep8} is
5556 capable of fixing most of the formatting issues that can be reported
5557 by pycodestyle.")
5558 (license (license:non-copyleft
5559 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5560
5561 (define-public python2-autopep8
5562 (package-with-python2 python-autopep8))
5563
5564 (define-public python-distlib
5565 (package
5566 (name "python-distlib")
5567 (version "0.3.0")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "distlib" version ".zip"))
5572 (sha256
5573 (base32
5574 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5575 (build-system python-build-system)
5576 (arguments
5577 `(#:phases
5578 (modify-phases %standard-phases
5579 (add-before 'build 'no-/bin/sh
5580 (lambda _
5581 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5582 (("/bin/sh") (which "sh")))
5583 #t))
5584 (add-before 'check 'prepare-test-env
5585 (lambda _
5586 (setenv "HOME" "/tmp")
5587 ;; NOTE: Any value works, the variable just has to be present.
5588 (setenv "SKIP_ONLINE" "1")
5589 #t)))))
5590 (native-inputs `(("unzip" ,unzip)))
5591 (home-page "https://bitbucket.org/pypa/distlib")
5592 (synopsis "Distribution utilities")
5593 (description "Distlib is a library which implements low-level functions that
5594 relate to packaging and distribution of Python software. It is intended to be
5595 used as the basis for third-party packaging tools.")
5596 (license license:psfl)))
5597
5598 (define-public python-distutils-extra
5599 (package
5600 (name "python-distutils-extra")
5601 (version "2.38")
5602 (source
5603 (origin
5604 (method url-fetch)
5605 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5606 version "/+download/python-distutils-extra-"
5607 version ".tar.gz"))
5608 (sha256
5609 (base32
5610 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5611 (build-system python-build-system)
5612 (home-page "https://launchpad.net/python-distutils-extra/")
5613 (synopsis "Enhancements to Python's distutils")
5614 (description
5615 "The python-distutils-extra module enables you to easily integrate
5616 gettext support, themed icons, and scrollkeeper-based documentation into
5617 Python's distutils.")
5618 (license license:gpl2)))
5619
5620 (define-public python2-distutils-extra
5621 (package-with-python2 python-distutils-extra))
5622
5623 (define-public python2-elib.intl
5624 (package
5625 (name "python2-elib.intl")
5626 (version "0.0.3")
5627 (source
5628 (origin
5629 ;; This project doesn't tag releases or publish tarballs, so we take
5630 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5631 (method git-fetch)
5632 (uri (git-reference
5633 (url "https://github.com/dieterv/elib.intl")
5634 (commit "d09997cfef")))
5635 (file-name (string-append name "-" version "-checkout"))
5636 (sha256
5637 (base32
5638 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5639 (build-system python-build-system)
5640 (arguments
5641 ;; incompatible with Python 3 (exception syntax)
5642 `(#:python ,python-2
5643 #:tests? #f))
5644 (home-page "https://github.com/dieterv/elib.intl")
5645 (synopsis "Enhanced internationalization for Python")
5646 (description
5647 "The elib.intl module provides enhanced internationalization (I18N)
5648 services for your Python modules and applications.")
5649 (license license:lgpl3+)))
5650
5651 (define-public python-olefile
5652 (package
5653 (name "python-olefile")
5654 (version "0.46")
5655 (source
5656 (origin
5657 (method url-fetch)
5658 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5659 "download/v" version "/olefile-" version ".tar.gz"))
5660 (file-name (string-append name "-" version ".tar.gz"))
5661 (sha256
5662 (base32
5663 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5664 (build-system python-build-system)
5665 (home-page "https://www.decalage.info/python/olefileio")
5666 (synopsis "Read and write Microsoft OLE2 files.")
5667 (description
5668 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5669 Storage or Compound Document, Microsoft Office). It is an improved version of
5670 the OleFileIO module from PIL, the Python Image Library.")
5671 (license license:bsd-3)))
5672
5673 (define-public python2-olefile
5674 (package-with-python2 python-olefile))
5675
5676 (define-public python-pillow
5677 (package
5678 (name "python-pillow")
5679 (version "8.0.1")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (pypi-uri "Pillow" version))
5684 (sha256
5685 (base32
5686 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5687 (build-system python-build-system)
5688 (native-inputs
5689 `(("python-pytest" ,python-pytest)))
5690 (inputs
5691 `(("freetype" ,freetype)
5692 ("lcms" ,lcms)
5693 ("libjpeg" ,libjpeg-turbo)
5694 ("libtiff" ,libtiff)
5695 ("libwebp" ,libwebp)
5696 ("openjpeg" ,openjpeg)
5697 ("zlib" ,zlib)))
5698 (propagated-inputs
5699 `(("python-olefile" ,python-olefile)))
5700 (arguments
5701 `(#:phases
5702 (modify-phases %standard-phases
5703 (add-after 'unpack 'patch-ldconfig
5704 (lambda _
5705 (substitute* "setup.py"
5706 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5707 (replace 'check
5708 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5709 (if tests?
5710 (begin
5711 (setenv "HOME" (getcwd))
5712 ;; Make installed package available for running the tests.
5713 (add-installed-pythonpath inputs outputs)
5714 (invoke "python" "selftest.py" "--installed")
5715 (invoke "python" "-m" "pytest" "-vv"))
5716 #t))))))
5717 (home-page "https://python-pillow.org")
5718 (synopsis "Fork of the Python Imaging Library")
5719 (description
5720 "The Python Imaging Library adds image processing capabilities to your
5721 Python interpreter. This library provides extensive file format support, an
5722 efficient internal representation, and fairly powerful image processing
5723 capabilities. The core image library is designed for fast access to data
5724 stored in a few basic pixel formats. It should provide a solid foundation for
5725 a general image processing tool.")
5726 (properties `((python2-variant . ,(delay python2-pillow))))
5727 (license (license:x11-style
5728 "http://www.pythonware.com/products/pil/license.htm"
5729 "The PIL Software License"))))
5730
5731 (define-public python2-pillow
5732 (package-with-python2
5733 (package
5734 (inherit (strip-python2-variant python-pillow))
5735 ;; Version 6 is the last series with Python 2 support.
5736 (version "6.2.2")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "Pillow" version))
5741 (sha256
5742 (base32
5743 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5744
5745 (define-public python-pillow-2.9
5746 (package
5747 (inherit python-pillow)
5748 (version "2.9.0")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (pypi-uri "Pillow" version))
5753 (sha256
5754 (base32
5755 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5756 (arguments
5757 (substitute-keyword-arguments (package-arguments python-pillow)
5758 ((#:tests? _ #f) #f)))
5759 (properties '((hidden? #t)))))
5760
5761 (define-public python-roifile
5762 (package
5763 (name "python-roifile")
5764 (version "2020.5.28")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "roifile" version))
5769 (sha256
5770 (base32
5771 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5772 (build-system python-build-system)
5773 (arguments `(#:tests? #f)) ; there are none
5774 (propagated-inputs
5775 `(("python-numpy" ,python-numpy)))
5776 (home-page "https://www.lfd.uci.edu/~gohlke/")
5777 (synopsis "Read and write ImageJ ROI format")
5778 (description "Roifile is a Python library to read, write, create, and plot
5779 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5780 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5781 (license license:bsd-3)))
5782
5783 (define-public python-tifffile
5784 (package
5785 (name "python-tifffile")
5786 (version "2020.6.3")
5787 (source
5788 (origin
5789 (method url-fetch)
5790 (uri (pypi-uri "tifffile" version))
5791 (sha256
5792 (base32
5793 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5794 (build-system python-build-system)
5795 ;; Tests require lfdfiles, which depends on tifffile
5796 (arguments `(#:tests? #f))
5797 (propagated-inputs
5798 `(("python-numpy" ,python-numpy)
5799 ;;("python-lfdfiles" ,python-lfdfiles)
5800 ("python-roifile" ,python-roifile)))
5801 (home-page "https://www.lfd.uci.edu/~gohlke/")
5802 (synopsis "Read and write TIFF(r) files")
5803 (description "This package lets you read image and metadata from many
5804 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5805 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5806 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5807 (license license:bsd-3)))
5808
5809 (define-public python-lfdfiles
5810 (package
5811 (name "python-lfdfiles")
5812 (version "2020.1.1")
5813 (source
5814 (origin
5815 (method url-fetch)
5816 (uri (pypi-uri "lfdfiles" version))
5817 (sha256
5818 (base32
5819 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5820 (build-system python-build-system)
5821 (propagated-inputs
5822 `(("python-click" ,python-click)
5823 ("python-numpy" ,python-numpy)
5824 ("python-tifffile" ,python-tifffile)))
5825 (home-page "https://www.lfd.uci.edu/~gohlke/")
5826 (synopsis "Work with LFD data files")
5827 (description
5828 "Lfdfiles is a Python library and console script for reading, writing,
5829 converting, and viewing many of the proprietary file formats used to store
5830 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5831 (license license:bsd-3)))
5832
5833 (define-public python-imageio
5834 (package
5835 (name "python-imageio")
5836 (version "2.8.0")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (pypi-uri "imageio" version))
5841 (sha256
5842 (base32
5843 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5844 (build-system python-build-system)
5845 (arguments
5846 `(#:tests? #f ; many tests require online data
5847 #:phases
5848 (modify-phases %standard-phases
5849 (replace 'check
5850 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5851 (if tests?
5852 (begin
5853 ;; Make installed package available for running the tests.
5854 (add-installed-pythonpath inputs outputs)
5855 (invoke "pytest" "-vv"))
5856 #t))))))
5857 (propagated-inputs
5858 `(("python-numpy" ,python-numpy)
5859 ("python-pillow" ,python-pillow)
5860 ("python-psutil" ,python-psutil)))
5861 (native-inputs
5862 `(("python-pytest" ,python-pytest)))
5863 (home-page "https://imageio.github.io/")
5864 (synopsis "Library for reading and writing a wide range of image data")
5865 (description
5866 "Imageio is a Python library that provides an easy interface to read and
5867 write a wide range of image data, including animated images, video, volumetric
5868 data, and scientific formats.")
5869 (license license:bsd-2)))
5870
5871 (define-public python-pycparser
5872 (package
5873 (name "python-pycparser")
5874 (version "2.20")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "pycparser" version))
5879 (sha256
5880 (base32
5881 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5882 (outputs '("out" "doc"))
5883 (build-system python-build-system)
5884 (native-inputs
5885 `(("pkg-config" ,pkg-config)))
5886 (arguments
5887 `(#:phases
5888 (modify-phases %standard-phases
5889 (replace 'check
5890 (lambda _
5891 (with-directory-excursion "tests"
5892 (invoke "python" "all_tests.py"))
5893 #t))
5894 (add-after 'install 'install-doc
5895 (lambda* (#:key outputs #:allow-other-keys)
5896 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5897 (doc (string-append data "/doc/" ,name "-" ,version))
5898 (examples (string-append doc "/examples")))
5899 (mkdir-p examples)
5900 (for-each (lambda (file)
5901 (copy-file (string-append "." file)
5902 (string-append doc file)))
5903 '("/README.rst" "/CHANGES" "/LICENSE"))
5904 (copy-recursively "examples" examples)
5905 #t))))))
5906 (home-page "https://github.com/eliben/pycparser")
5907 (synopsis "C parser in Python")
5908 (description
5909 "Pycparser is a complete parser of the C language, written in pure Python
5910 using the PLY parsing library. It parses C code into an AST and can serve as
5911 a front-end for C compilers or analysis tools.")
5912 (license license:bsd-3)))
5913
5914 (define-public python2-pycparser
5915 (package-with-python2 python-pycparser))
5916
5917 (define-public python-xlsxwriter
5918 (package
5919 (name "python-xlsxwriter")
5920 (version "1.3.7")
5921 (source
5922 (origin
5923 ;; There are no tests in the PyPI tarball.
5924 (method git-fetch)
5925 (uri (git-reference
5926 (url "https://github.com/jmcnamara/XlsxWriter")
5927 (commit (string-append "RELEASE_" version))))
5928 (file-name (git-file-name name version))
5929 (sha256
5930 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
5931 (build-system python-build-system)
5932 (home-page "https://github.com/jmcnamara/XlsxWriter")
5933 (synopsis "Python module for creating Excel XLSX files")
5934 (description
5935 "XlsxWriter is a Python module that can be used to write text, numbers,
5936 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
5937 (license license:bsd-2)))
5938
5939 (define-public python-pywavelets
5940 (package
5941 (name "python-pywavelets")
5942 (version "1.1.1")
5943 (home-page "https://github.com/PyWavelets/pywt")
5944 (source (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "PyWavelets" version))
5947 (sha256
5948 (base32
5949 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5950 (build-system python-build-system)
5951 (arguments
5952 '(#:modules ((ice-9 ftw)
5953 (srfi srfi-1)
5954 (srfi srfi-26)
5955 (guix build utils)
5956 (guix build python-build-system))
5957 #:phases
5958 (modify-phases %standard-phases
5959 (replace 'check
5960 (lambda _
5961 (let ((cwd (getcwd))
5962 (libdir (find (cut string-prefix? "lib." <>)
5963 (scandir "build"))))
5964 (with-directory-excursion (string-append cwd "/build/" libdir)
5965 (invoke "pytest" "-vv"))))))))
5966 (native-inputs
5967 `(("python-matplotlib" ,python-matplotlib) ;for tests
5968 ("python-pytest" ,python-pytest)))
5969 (propagated-inputs
5970 `(("python-numpy" ,python-numpy)))
5971 (synopsis "Wavelet transforms in Python")
5972 (description
5973 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5974 mathematical basis functions that are localized in both time and frequency.
5975 Wavelet transforms are time-frequency transforms employing wavelets. They are
5976 similar to Fourier transforms, the difference being that Fourier transforms are
5977 localized only in frequency instead of in time and frequency.")
5978 (license license:expat)))
5979
5980 (define-public python-pywinrm
5981 (package
5982 (name "python-pywinrm")
5983 (version "0.4.1")
5984 (source
5985 (origin
5986 (method url-fetch)
5987 (uri (pypi-uri "pywinrm" version))
5988 (sha256
5989 (base32
5990 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5991 (build-system python-build-system)
5992 (propagated-inputs
5993 `(("python-six" ,python-six)
5994 ("python-requests_ntlm" ,python-requests_ntlm)
5995 ("python-xmltodict" ,python-xmltodict)
5996 ("python-kerberos" ,python-kerberos)))
5997 (native-inputs
5998 `(("python-mock" ,python-mock)
5999 ("python-pytest" ,python-pytest)))
6000 (home-page "https://github.com/diyan/pywinrm/")
6001 (synopsis
6002 "Python library for Windows Remote Management (WinRM)")
6003 (description
6004 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6005 service. It allows you to invoke commands on target Windows machines from
6006 any machine that can run Python.")
6007 (license license:expat)))
6008
6009 (define-public python-xcffib
6010 (package
6011 (name "python-xcffib")
6012 (version "0.6.0")
6013 (source
6014 (origin
6015 (method url-fetch)
6016 (uri (pypi-uri "xcffib" version))
6017 (sha256
6018 (base32
6019 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6020 (build-system python-build-system)
6021 (inputs
6022 `(("libxcb" ,libxcb)))
6023 (propagated-inputs
6024 `(("python-cffi" ,python-cffi) ; used at run time
6025 ("python-six" ,python-six)))
6026 (arguments
6027 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6028 #:tests? #f
6029 #:phases
6030 (modify-phases %standard-phases
6031 (add-after 'unpack 'fix-libxcb-path
6032 (lambda* (#:key inputs #:allow-other-keys)
6033 (let ((libxcb (assoc-ref inputs "libxcb")))
6034 (substitute* '("xcffib/__init__.py")
6035 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6036 #t)))
6037 (add-after 'install 'install-doc
6038 (lambda* (#:key outputs #:allow-other-keys)
6039 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6040 "/doc/" ,name "-" ,version)))
6041 (mkdir-p doc)
6042 (copy-file "README.md"
6043 (string-append doc "/README.md"))
6044 #t))))))
6045 (home-page "https://github.com/tych0/xcffib")
6046 (synopsis "XCB Python bindings")
6047 (description
6048 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6049 support for Python 3 and PyPy. It is based on cffi.")
6050 (license license:expat)))
6051
6052 (define-public python2-xcffib
6053 (package-with-python2 python-xcffib))
6054
6055 (define-public python-cairocffi
6056 (package
6057 (name "python-cairocffi")
6058 (version "0.9.0")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (pypi-uri "cairocffi" version))
6063 (sha256
6064 (base32
6065 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
6066 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
6067 (build-system python-build-system)
6068 (outputs '("out" "doc"))
6069 (inputs
6070 `(("glib" ,glib)
6071 ("gtk+" ,gtk+)
6072 ("gdk-pixbuf" ,gdk-pixbuf)
6073 ("cairo" ,cairo)
6074 ("pango" ,pango)))
6075 (native-inputs
6076 `(("pkg-config" ,pkg-config)
6077 ("python-pytest" ,python-pytest)
6078 ("python-pytest-cov" ,python-pytest-cov)
6079 ("python-pytest-runner" ,python-pytest-runner)
6080 ("python-sphinx" ,python-sphinx)
6081 ("python-docutils" ,python-docutils)))
6082 (propagated-inputs
6083 `(("python-xcffib" ,python-xcffib))) ; used at run time
6084 (arguments
6085 `(#:phases
6086 (modify-phases %standard-phases
6087 (add-after 'unpack 'patch-paths
6088 (lambda* (#:key inputs outputs #:allow-other-keys)
6089 (substitute* (find-files "." "\\.py$")
6090 (("dlopen\\(ffi, 'cairo'")
6091 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6092 "/lib/libcairo.so.2'"))
6093 (("dlopen\\(ffi, 'gdk-3'")
6094 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6095 "/lib/libgtk-3.so.0'"))
6096 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6097 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6098 "/lib/libgdk_pixbuf-2.0.so.0'"))
6099 (("dlopen\\(ffi, 'glib-2.0'")
6100 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6101 "/lib/libglib-2.0.so.0'"))
6102 (("dlopen\\(ffi, 'gobject-2.0'")
6103 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6104 "/lib/libgobject-2.0.so.0'"))
6105 (("dlopen\\(ffi, 'pangocairo-1.0'")
6106 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6107 "/lib/libpangocairo-1.0.so.0'"))
6108 (("dlopen\\(ffi, 'pango-1.0'")
6109 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6110 "/lib/libpango-1.0.so.0'")))
6111 #t))
6112 (add-after 'install 'install-doc
6113 (lambda* (#:key inputs outputs #:allow-other-keys)
6114 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6115 (doc (string-append data "/doc/" ,name "-" ,version))
6116 (html (string-append doc "/html")))
6117 (setenv "LD_LIBRARY_PATH"
6118 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6119 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6120 (setenv "LANG" "en_US.UTF-8")
6121 (mkdir-p html)
6122 (for-each (lambda (file)
6123 (copy-file (string-append "." file)
6124 (string-append doc file)))
6125 '("/README.rst" "/CHANGES" "/LICENSE"))
6126 (system* "python" "setup.py" "build_sphinx")
6127 (copy-recursively "docs/_build/html" html)
6128 #t))))))
6129 (home-page "https://github.com/Kozea/cairocffi")
6130 (synopsis "Python bindings and object-oriented API for Cairo")
6131 (description
6132 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6133 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6134 graphics library with support for multiple backends including image buffers,
6135 PNG, PostScript, PDF, and SVG file output.")
6136 (license license:bsd-3)))
6137
6138 (define-public python2-cairocffi
6139 (package-with-python2 python-cairocffi))
6140
6141 (define-public python-decorator
6142 (package
6143 (name "python-decorator")
6144 (version "4.3.0")
6145 (source
6146 (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "decorator" version))
6149 (sha256
6150 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6151 (build-system python-build-system)
6152 (home-page "https://pypi.org/project/decorator/")
6153 (synopsis "Python module to simplify usage of decorators")
6154 (description
6155 "The aim of the decorator module is to simplify the usage of decorators
6156 for the average programmer, and to popularize decorators usage giving examples
6157 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6158 etc. The core of this module is a decorator factory.")
6159 (license license:expat)))
6160
6161 (define-public python2-decorator
6162 (package-with-python2 python-decorator))
6163
6164 (define-public python-drmaa
6165 (package
6166 (name "python-drmaa")
6167 (version "0.7.7")
6168 (source
6169 (origin
6170 (method url-fetch)
6171 (uri (pypi-uri "drmaa" version))
6172 (sha256
6173 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6174 (build-system python-build-system)
6175 ;; The test suite requires libdrmaa which is provided by the cluster
6176 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6177 ;; should be set to the path of the libdrmaa library.
6178 (arguments '(#:tests? #f))
6179 (native-inputs
6180 `(("python-nose" ,python-nose)))
6181 (home-page "https://pypi.org/project/drmaa/")
6182 (synopsis "Python bindings for the DRMAA library")
6183 (description
6184 "A Python package for Distributed Resource Management (DRM) job
6185 submission and control. This package is an implementation of the DRMAA 1.0
6186 Python language binding specification.")
6187 (license license:bsd-3)))
6188
6189 (define-public python2-drmaa
6190 (package-with-python2 python-drmaa))
6191
6192 (define-public python-grako
6193 (package
6194 (name "python-grako")
6195 (version "3.99.9")
6196 (source
6197 (origin
6198 (method url-fetch)
6199 (uri
6200 (pypi-uri "grako" version ".zip"))
6201 (sha256
6202 (base32
6203 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6204 (build-system python-build-system)
6205 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6206 (native-inputs
6207 `(("unzip" ,unzip)
6208 ("python-pytest" ,python-pytest)
6209 ("python-pytest-runner" ,python-pytest-runner)))
6210 (home-page "https://bitbucket.org/neogeny/grako")
6211 (synopsis "EBNF parser generator")
6212 (description
6213 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6214 memoizing PEG/Packrat parser in Python.")
6215 (license license:bsd-3)))
6216
6217 (define-public python2-grako
6218 (package-with-python2 python-grako))
6219
6220 (define-public python-grandalf
6221 (package
6222 (name "python-grandalf")
6223 (version "0.7")
6224 (source
6225 (origin
6226 ;; There's no source tarball on PyPI.
6227 (method git-fetch)
6228 (uri (git-reference
6229 (url "https://github.com/bdcht/grandalf")
6230 (commit (string-append "v" version))))
6231 (file-name (git-file-name name version))
6232 (sha256
6233 (base32
6234 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6235 (build-system python-build-system)
6236 (arguments
6237 '(#:phases
6238 (modify-phases %standard-phases
6239 (replace 'check
6240 (lambda _
6241 (invoke "python" "setup.py" "pytest"))))))
6242 (native-inputs
6243 `(("python-pytest" ,python-pytest)
6244 ("python-pytest-runner" ,python-pytest-runner)))
6245 (propagated-inputs
6246 `(("python-numpy" ,python-numpy)
6247 ("python-ply" ,python-ply)))
6248 (home-page "https://github.com/bdcht/grandalf")
6249 (synopsis "Graph and drawing algorithms framework")
6250 (description
6251 "Grandalf is a Python package made for experimentations with graphs
6252 drawing algorithms. It is written in pure Python, and currently implements
6253 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6254 minimization approach. While not as fast or featured as graphviz or other
6255 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6256 than thousands of nodes, while keeping the source code simple enough to tweak
6257 and hack any part of it for experimental purpose. With a total of about 1500
6258 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6259 in less than 600 lines. The energy minimization approach is comprised of only
6260 250 lines!
6261
6262 Grandalf does only 2 not-so-simple things:
6263 @itemize
6264 @item computing the nodes (x,y) coordinates (based on provided nodes
6265 dimensions, and a chosen layout)
6266 @item routing the edges with lines or nurbs
6267 @end itemize
6268
6269 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6270 will help you find where to draw things like nodes and edges, but it’s up to
6271 you to actually draw things with your favorite toolkit.")
6272 ;; The user can choose either license.
6273 (license (list license:gpl2 license:epl1.0))))
6274
6275 (define-public python-gridmap
6276 (package
6277 (name "python-gridmap")
6278 (version "0.14.0")
6279 (source
6280 (origin
6281 (method git-fetch)
6282 (uri (git-reference
6283 (url "https://github.com/pygridtools/gridmap")
6284 (commit (string-append "v" version))))
6285 (file-name (git-file-name name version))
6286 (sha256
6287 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6288 (build-system python-build-system)
6289 (arguments
6290 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6291 (propagated-inputs
6292 `(("python-psutil" ,python-psutil)
6293 ("python-drmaa" ,python-drmaa)
6294 ("python-pyzmq" ,python-pyzmq)))
6295 (home-page "https://github.com/pygridtools/gridmap")
6296 (synopsis "Create jobs on a cluster directly from Python")
6297 (description
6298 "Gridmap is a Python package to allow you to easily create jobs on the
6299 cluster directly from Python. You can directly map Python functions onto the
6300 cluster without needing to write any wrapper code yourself.")
6301 (license license:gpl3+)))
6302
6303 (define-public python2-gridmap
6304 (package-with-python2 python-gridmap))
6305
6306 (define-public python-honcho
6307 (package
6308 (name "python-honcho")
6309 (version "1.0.1")
6310 (source
6311 (origin
6312 (method git-fetch)
6313 (uri (git-reference
6314 (url "https://github.com/nickstenning/honcho")
6315 (commit (string-append "v" version))))
6316 (file-name (git-file-name name version))
6317 (sha256
6318 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6319 (build-system python-build-system)
6320 (native-inputs
6321 `(("python-pytest" ,python-pytest)
6322 ("python-mock" ,python-mock)
6323 ("python-tox" ,python-tox)
6324 ("which" ,which))) ;for tests
6325 (propagated-inputs
6326 `(("python-jinja2" ,python-jinja2)))
6327 (arguments
6328 `(#:phases
6329 (modify-phases %standard-phases
6330 (delete 'check)
6331 (add-after 'install 'check
6332 (lambda* (#:key outputs inputs #:allow-other-keys)
6333 ;; fix honcho path in testsuite
6334 (substitute* "tests/conftest.py"
6335 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6336 "/bin/honcho" "'")))
6337 ;; It's easier to run tests after install.
6338 ;; Make installed package available for running the tests
6339 (add-installed-pythonpath inputs outputs)
6340 (invoke "py.test" "-v"))))))
6341 (home-page "https://github.com/nickstenning/honcho")
6342 (synopsis "Manage Procfile-based applications")
6343 (description
6344 "A Procfile is a file which describes how to run an application
6345 consisting of several processes. honcho starts all listed processes.
6346 The output of all running processes is collected by honcho and
6347 displayed.")
6348 (license license:expat)))
6349
6350 (define-public python2-honcho
6351 (package-with-python2 python-honcho))
6352
6353 (define-public python-pexpect
6354 (package
6355 (name "python-pexpect")
6356 (version "4.8.0")
6357 (source
6358 (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "pexpect" version))
6361 (sha256
6362 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6363 (build-system python-build-system)
6364 (arguments
6365 `(#:phases
6366 (modify-phases %standard-phases
6367 (add-before 'check 'prepare-tests
6368 (lambda _
6369 (substitute* (find-files "tests")
6370 (("/bin/ls") (which "ls"))
6371 (("/bin/echo") (which "echo"))
6372 (("/bin/which") (which "which"))
6373 ;; Many tests try to use the /bin directory which
6374 ;; is not present in the build environment.
6375 ;; Use one that's non-empty and unlikely to change.
6376 (("/bin'") "/dev'")
6377 ;; Disable failing test. See upstream bug report
6378 ;; https://github.com/pexpect/pexpect/issues/568
6379 (("def test_bash") "def _test_bash"))
6380 ;; XXX: Socket connection test gets "Connection reset by peer".
6381 ;; Why does it not work? Delete for now.
6382 (delete-file "tests/test_socket.py")
6383 #t))
6384 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6385 (native-inputs
6386 `(("python-nose" ,python-nose)
6387 ("python-pytest" ,python-pytest)
6388 ("man-db" ,man-db)
6389 ("which" ,which)
6390 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6391 (propagated-inputs
6392 `(("python-ptyprocess" ,python-ptyprocess)))
6393 (home-page "http://pexpect.readthedocs.org/")
6394 (synopsis "Controlling interactive console applications")
6395 (description
6396 "Pexpect is a pure Python module for spawning child applications;
6397 controlling them; and responding to expected patterns in their output.
6398 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6399 child application and control it as if a human were typing commands.")
6400 (license license:isc)))
6401
6402 (define-public python2-pexpect
6403 (package-with-python2 python-pexpect))
6404
6405 (define-public python-setuptools-scm
6406 (package
6407 (name "python-setuptools-scm")
6408 (version "3.4.3")
6409 (source (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "setuptools_scm" version))
6412 (sha256
6413 (base32
6414 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6415 (build-system python-build-system)
6416 (home-page "https://github.com/pypa/setuptools_scm/")
6417 (synopsis "Manage Python package versions in SCM metadata")
6418 (description
6419 "Setuptools_scm handles managing your Python package versions in
6420 @dfn{software configuration management} (SCM) metadata instead of declaring
6421 them as the version argument or in a SCM managed file.")
6422 (license license:expat)))
6423
6424 (define-public python2-setuptools-scm
6425 (package-with-python2 python-setuptools-scm))
6426
6427 (define-public python-sexpdata
6428 (package
6429 (name "python-sexpdata")
6430 (version "0.0.3")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "sexpdata" version))
6435 (sha256
6436 (base32
6437 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6438 (build-system python-build-system)
6439 (home-page "https://github.com/jd-boyd/sexpdata")
6440 (synopsis "S-expression parser for Python")
6441 (description
6442 "Sexpdata is an S-expression parser/serializer. It has load and dump
6443 functions like pickle, json or PyYAML module.")
6444 (license license:bsd-3)))
6445
6446 (define-public python-pathlib2
6447 (package
6448 (name "python-pathlib2")
6449 (version "2.3.3")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "pathlib2" version))
6454 (sha256
6455 (base32
6456 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6457 (build-system python-build-system)
6458 (propagated-inputs
6459 `(("python-scandir" ,python-scandir)
6460 ("python-six" ,python-six)))
6461 (home-page "https://pypi.org/project/pathlib2/")
6462 (synopsis "Object-oriented file system paths")
6463 (description "The goal of pathlib2 is to provide a backport of the
6464 standard @code{pathlib} module which tracks the standard library module, so
6465 all the newest features of the standard @code{pathlib} can be used also on
6466 older Python versions.")
6467 (license license:expat)))
6468
6469 (define-public python-importlib-resources
6470 (package
6471 (name "python-importlib-resources")
6472 (version "3.0.0")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "importlib_resources" version))
6477 (sha256
6478 (base32
6479 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6480 (build-system python-build-system)
6481 (native-inputs
6482 `(("python-setuptools-scm" ,python-setuptools-scm)
6483 ("python-toml" ,python-toml)))
6484 (home-page "http://importlib-resources.readthedocs.io/")
6485 (synopsis "Read resources from Python packages")
6486 (description
6487 "@code{importlib_resources} is a backport of Python 3's standard library
6488 @code{importlib.resources} module for Python 2.7, and Python 3.")
6489 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6490 (license license:asl2.0)))
6491
6492 (define-public python2-importlib-resources
6493 (package
6494 (name "python2-importlib-resources")
6495 (version "1.0.2")
6496 (source (origin
6497 (method url-fetch)
6498 (uri (pypi-uri "importlib_resources" version))
6499 (sha256
6500 (base32
6501 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6502 (build-system python-build-system)
6503 (arguments
6504 `(#:python ,python-2
6505 #:phases (modify-phases %standard-phases
6506 ;; The build system tests for python-wheel, but it is
6507 ;; not required for Guix nor the test suite. Just drop
6508 ;; it to make bootstrapping pytest easier.
6509 (add-after 'unpack 'drop-wheel-dependency
6510 (lambda _
6511 (substitute* "setup.cfg"
6512 (("^[[:blank:]]+wheel")
6513 ""))
6514 #t)))))
6515 (propagated-inputs
6516 `(("python-pathlib2" ,python2-pathlib2)
6517 ("python-typing" ,python2-typing)))
6518 (home-page "https://gitlab.com/python-devs/importlib_resources")
6519 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6520 (description
6521 "This package provides an implementation of @code{importlib.resources}
6522 for older versions of Python.")
6523 (license license:asl2.0)))
6524
6525 ;; For importlib-metadata-bootstrap below.
6526 (define-public python2-importlib-resources-bootstrap
6527 (hidden-package
6528 (package/inherit
6529 python2-importlib-resources
6530 (name "python2-importlib-resources-bootstrap")
6531 (propagated-inputs
6532 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6533 ("python-typing" ,python2-typing))))))
6534
6535 (define-public python-importlib-metadata
6536 (package
6537 (name "python-importlib-metadata")
6538 (version "1.5.0")
6539 (source
6540 (origin
6541 (method url-fetch)
6542 (uri (pypi-uri "importlib_metadata" version))
6543 (sha256
6544 (base32
6545 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6546 (build-system python-build-system)
6547 (propagated-inputs
6548 `(("python-zipp" ,python-zipp)))
6549 (native-inputs
6550 `(("python-setuptools-scm" ,python-setuptools-scm)
6551 ("python-pyfakefs" ,python-pyfakefs)
6552 ("python-packaging" ,python-packaging)))
6553 (home-page "https://importlib-metadata.readthedocs.io/")
6554 (synopsis "Read metadata from Python packages")
6555 (description
6556 "@code{importlib_metadata} is a library which provides an API for
6557 accessing an installed Python package's metadata, such as its entry points or
6558 its top-level name. This functionality intends to replace most uses of
6559 @code{pkg_resources} entry point API and metadata API. Along with
6560 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6561 need to use the older and less efficient @code{pkg_resources} package.")
6562 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6563 (license license:asl2.0)))
6564
6565 (define-public python2-importlib-metadata
6566 (let ((base (package-with-python2 (strip-python2-variant
6567 python-importlib-metadata))))
6568 (package/inherit
6569 base
6570 (name "python2-importlib-metadata")
6571 (native-inputs
6572 `(("python-setuptools-scm" ,python2-setuptools-scm)
6573 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6574 ("python-packaging" ,python2-packaging-bootstrap)))
6575 (propagated-inputs
6576 `(("python-configparser" ,python2-configparser)
6577 ("python-contextlib2" ,python2-contextlib2)
6578 ("python-importlib-resources" ,python2-importlib-resources)
6579 ("python-pathlib2" ,python2-pathlib2)
6580 ,@(package-propagated-inputs base))))))
6581
6582 ;; This package is used by python2-pytest, and thus must not depend on it.
6583 (define-public python2-importlib-metadata-bootstrap
6584 (hidden-package
6585 (package/inherit
6586 python2-importlib-metadata
6587 (name "python2-importlib-metadata-bootstrap")
6588 (arguments
6589 `(#:tests? #f
6590 ,@(package-arguments python2-importlib-metadata)))
6591 (propagated-inputs
6592 `(("python-zipp" ,python2-zipp-bootstrap)
6593 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6594 ("python-configparser" ,python2-configparser)
6595 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6596 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6597
6598 (define-public python-importmagic
6599 (package
6600 (name "python-importmagic")
6601 (version "0.1.7")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (pypi-uri "importmagic" version))
6606 (sha256
6607 (base32
6608 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6609 (build-system python-build-system)
6610 (home-page "https://github.com/alecthomas/importmagic")
6611 (synopsis "Library for adding, removing and managing Python imports")
6612 (description
6613 "Importmagic is a Python library for automatically managing imports by
6614 finding unresolved symbols in Python code and their corresponding imports.")
6615 (license license:bsd-3)))
6616
6617 (define-public python-jaraco-packaging
6618 (package
6619 (name "python-jaraco-packaging")
6620 (version "6.1")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "jaraco.packaging" version))
6625 (sha256
6626 (base32
6627 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6628 (build-system python-build-system)
6629 (propagated-inputs
6630 `(("python-pytest" ,python-pytest)
6631 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6632 ("python-pytest-flake8" ,python-pytest-flake8)
6633 ("python-rst.linker" ,python-rst.linker)
6634 ("python-setuptools" ,python-setuptools)
6635 ("python-setuptools-scm" ,python-setuptools-scm)
6636 ("python-six" ,python-six)
6637 ("python-sphinx" ,python-sphinx)))
6638 (home-page "https://github.com/jaraco/jaraco.packaging")
6639 (synopsis "Tools to supplement packaging Python releases")
6640 (description
6641 "This package provides various tools to supplement packaging Python
6642 releases.")
6643 (license license:expat)))
6644
6645 (define-public python-pathpy
6646 (package
6647 (name "python-pathpy")
6648 (version "11.5.1")
6649 (source
6650 (origin
6651 (method url-fetch)
6652 (uri (pypi-uri "path.py" version))
6653 (sha256
6654 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6655 (outputs '("out" "doc"))
6656 (build-system python-build-system)
6657 (propagated-inputs
6658 `(("python-appdirs" ,python-appdirs)
6659 ("python-importlib-metadata" ,python-importlib-metadata)))
6660 (native-inputs
6661 `(("python-setuptools-scm" ,python-setuptools-scm)
6662 ("python-sphinx" ,python-sphinx)
6663 ("python-rst.linker" ,python-rst.linker)
6664 ("python-pytest" ,python-pytest)
6665 ("python-pytest-runner" ,python-pytest-runner)
6666 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6667 (arguments
6668 `(#:phases
6669 (modify-phases %standard-phases
6670 (add-after 'build 'build-doc
6671 (lambda _
6672 (setenv "LANG" "en_US.UTF-8")
6673 (invoke "python" "setup.py" "build_sphinx")))
6674 (add-after 'install 'install-doc
6675 (lambda* (#:key outputs #:allow-other-keys)
6676 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6677 (doc (string-append data "/doc/" ,name "-" ,version))
6678 (html (string-append doc "/html")))
6679 (mkdir-p html)
6680 (for-each (lambda (file)
6681 (copy-file file (string-append doc "/" file)))
6682 '("README.rst" "CHANGES.rst"))
6683 (copy-recursively "build/sphinx/html" html)
6684 #t)))
6685 (replace 'check
6686 (lambda _
6687 ;; The import time test aborts if an import takes longer than
6688 ;; 100ms. It may very well take a little longer than that.
6689 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6690 (home-page "https://github.com/jaraco/path.py")
6691 (synopsis "Python module wrapper for built-in os.path")
6692 (description
6693 "@code{path.py} implements path objects as first-class entities, allowing
6694 common operations on files to be invoked on those path objects directly.")
6695 (license license:expat)))
6696
6697 (define-public python2-pathpy
6698 (package-with-python2 python-pathpy))
6699
6700 (define-public python-simplegeneric
6701 (package
6702 (name "python-simplegeneric")
6703 (version "0.8.1")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "simplegeneric" version ".zip"))
6708 (sha256
6709 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6710 (build-system python-build-system)
6711 (native-inputs
6712 `(("unzip" ,unzip)))
6713 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6714 (synopsis "Python module for simple generic functions")
6715 (description
6716 "The simplegeneric module lets you define simple single-dispatch generic
6717 functions, akin to Python’s built-in generic functions like @code{len()},
6718 @code{iter()} and so on. However, instead of using specially-named methods,
6719 these generic functions use simple lookup tables, akin to those used by
6720 e.g. @code{pickle.dump()} and other generic functions found in the Python
6721 standard library.")
6722 (license license:zpl2.1)))
6723
6724 (define-public python2-simplegeneric
6725 (package-with-python2 python-simplegeneric))
6726
6727 (define-public python-ipython-genutils
6728 ;; TODO: This package is retired, check if can be removed, see description.
6729 (package
6730 (name "python-ipython-genutils")
6731 (version "0.1.0")
6732 (source
6733 (origin
6734 (method url-fetch)
6735 (uri (pypi-uri "ipython_genutils" version))
6736 (sha256
6737 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6738 (build-system python-build-system)
6739 (arguments `(#:tests? #f)) ; no tests
6740 (home-page "https://ipython.org")
6741 (synopsis "Vestigial utilities from IPython")
6742 (description
6743 "This package provides retired utilities from IPython. No packages
6744 outside IPython/Jupyter should depend on it.
6745
6746 This package shouldn't exist. It contains some common utilities shared by
6747 Jupyter and IPython projects during The Big Split. As soon as possible, those
6748 packages will remove their dependency on this, and this package will go
6749 away.")
6750 (license license:bsd-3)))
6751
6752 (define-public python2-ipython-genutils
6753 (package-with-python2 python-ipython-genutils))
6754
6755 (define-public python-ipyparallel
6756 (package
6757 (name "python-ipyparallel")
6758 (version "6.2.4")
6759 (source
6760 (origin
6761 (method url-fetch)
6762 (uri (pypi-uri "ipyparallel" version))
6763 (sha256
6764 (base32
6765 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6766 (build-system python-build-system)
6767 (arguments
6768 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6769 #:phases
6770 (modify-phases %standard-phases
6771 (add-before 'check 'prepare-for-tests
6772 (lambda _
6773 (setenv "HOME" (getcwd))
6774 #t)))))
6775 (propagated-inputs
6776 `(("python-dateutil" ,python-dateutil)
6777 ("python-decorator" ,python-decorator)
6778 ("python-ipykernel" ,python-ipykernel)
6779 ("python-ipython" ,python-ipython)
6780 ("python-ipython-genutils" ,python-ipython-genutils)
6781 ("python-jupyter-client" ,python-jupyter-client)
6782 ("python-pyzmq" ,python-pyzmq)
6783 ("python-tornado" ,python-tornado)
6784 ("python-traitlets" ,python-traitlets)))
6785 (native-inputs
6786 `(("python-ipython" ,python-ipython)
6787 ("python-mock" ,python-mock)
6788 ("python-nose" ,python-nose)
6789 ("python-pytest" ,python-pytest)
6790 ("python-pytest-cov" ,python-pytest-cov)
6791 ("python-testpath" ,python-testpath)))
6792 (home-page "https://ipython.org/")
6793 (synopsis "Interactive Parallel Computing with IPython")
6794 (description
6795 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6796 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6797 CLI scripts:
6798 @enumerate
6799 @item ipcluster - start/stop a cluster
6800 @item ipcontroller - start a scheduler
6801 @item ipengine - start an engine
6802 @end enumerate")
6803 (license license:bsd-3)))
6804
6805 (define-public python2-ipyparallel
6806 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6807 (package
6808 (inherit ipyparallel)
6809 (propagated-inputs
6810 `(("python2-futures" ,python2-futures)
6811 ,@(package-propagated-inputs ipyparallel))))))
6812
6813 (define-public python-ipython-cluster-helper
6814 (package
6815 (name "python-ipython-cluster-helper")
6816 (version "0.6.4")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "ipython-cluster-helper" version))
6821 (sha256
6822 (base32
6823 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6824 (modules '((guix build utils)))
6825 (snippet
6826 '(begin (substitute* "requirements.txt"
6827 (("ipython.*") "ipython\n"))
6828 #t))))
6829 (build-system python-build-system)
6830 (arguments
6831 `(#:tests? #f ; Test suite can't find IPython.
6832 #:phases
6833 (modify-phases %standard-phases
6834 (replace 'check
6835 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6836 (if tests?
6837 (begin
6838 (setenv "HOME" (getcwd))
6839 (add-installed-pythonpath inputs outputs)
6840 (invoke "python" "example/example.py" "--local"))
6841 #t))))))
6842 (propagated-inputs
6843 `(("python-ipyparallel" ,python-ipyparallel)
6844 ("python-ipython" ,python-ipython)
6845 ("python-netifaces" ,python-netifaces)
6846 ("python-pyzmq" ,python-pyzmq)
6847 ("python-setuptools" ,python-setuptools)
6848 ("python-six" ,python-six)))
6849 (home-page "https://github.com/roryk/ipython-cluster-helper")
6850 (synopsis
6851 "Simplify IPython cluster start up and use for multiple schedulers")
6852 (description
6853 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6854 profile, launches a cluster and returns a view. On program exit it shuts the
6855 cluster down and deletes the throwaway profile.")
6856 (license license:expat)))
6857
6858 (define-public python2-ipython-cluster-helper
6859 (package-with-python2 python-ipython-cluster-helper))
6860
6861 (define-public python-traitlets
6862 (package
6863 (name "python-traitlets")
6864 (version "4.3.3")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "traitlets" version))
6869 (sha256
6870 (base32
6871 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6872 (build-system python-build-system)
6873 (arguments
6874 `(#:phases
6875 (modify-phases %standard-phases
6876 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6877 (propagated-inputs
6878 `(("python-ipython-genutils" ,python-ipython-genutils)
6879 ("python-decorator" ,python-decorator)))
6880 (native-inputs
6881 `(("python-pytest" ,python-pytest)))
6882 (properties `((python2-variant . ,(delay python2-traitlets))))
6883 (home-page "https://ipython.org")
6884 (synopsis "Configuration system for Python applications")
6885 (description
6886 "Traitlets is a framework that lets Python classes have attributes with
6887 type checking, dynamically calculated default values, and ‘on change’
6888 callbacks. The package also includes a mechanism to use traitlets for
6889 configuration, loading values from files or from command line arguments. This
6890 is a distinct layer on top of traitlets, so you can use traitlets in your code
6891 without using the configuration machinery.")
6892 (license license:bsd-3)))
6893
6894 (define-public python2-traitlets
6895 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6896 (package
6897 (inherit traitlets)
6898 (propagated-inputs
6899 `(("python2-enum34" ,python2-enum34)
6900 ,@(package-propagated-inputs traitlets))))))
6901
6902 (define-public python-jupyter-core
6903 (package
6904 (name "python-jupyter-core")
6905 (version "4.4.0")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (string-append (pypi-uri "jupyter_core" version)))
6910 (sha256
6911 (base32
6912 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6913 (build-system python-build-system)
6914 ;; FIXME: not sure how to run the tests
6915 (arguments `(#:tests? #f))
6916 (propagated-inputs
6917 `(("python-traitlets" ,python-traitlets)))
6918 (home-page "http://jupyter.org/")
6919 (synopsis "Jupyter base package")
6920 (description
6921 "Jupyter core is the base package on which Jupyter projects rely.")
6922 (license license:bsd-3)))
6923
6924 (define-public python2-jupyter-core
6925 (package-with-python2 python-jupyter-core))
6926
6927 (define-public python-jupyter-client
6928 (package
6929 (name "python-jupyter-client")
6930 (version "5.2.4")
6931 (source
6932 (origin
6933 (method url-fetch)
6934 (uri (pypi-uri "jupyter_client" version))
6935 (sha256
6936 (base32
6937 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6938 (build-system python-build-system)
6939 ;; Tests fail because of missing native python kernel which I assume is
6940 ;; provided by the ipython package, which we cannot use because it would
6941 ;; cause a dependency cycle.
6942 (arguments
6943 `(#:tests? #f
6944
6945 #:phases (modify-phases %standard-phases
6946 (add-after 'unpack 'set-tool-file-names
6947 (lambda* (#:key inputs #:allow-other-keys)
6948 (let ((iproute (assoc-ref inputs "iproute")))
6949 (substitute* "jupyter_client/localinterfaces.py"
6950 (("'ip'")
6951 (string-append "'" iproute "/sbin/ip'")))
6952 #t))))))
6953 (inputs
6954 `(("iproute" ,iproute)))
6955 (propagated-inputs
6956 `(("python-pyzmq" ,python-pyzmq)
6957 ("python-traitlets" ,python-traitlets)
6958 ("python-jupyter-core" ,python-jupyter-core)))
6959 (home-page "http://jupyter.org/")
6960 (synopsis "Jupyter protocol implementation and client libraries")
6961 (description
6962 "The @code{jupyter_client} package contains the reference implementation
6963 of the Jupyter protocol. It also provides client and kernel management APIs
6964 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6965 installing @code{kernelspec}s for use with Jupyter frontends.")
6966 (license license:bsd-3)))
6967
6968 (define-public python2-jupyter-client
6969 (package-with-python2 python-jupyter-client))
6970
6971 (define-public python-ipykernel
6972 (package
6973 (name "python-ipykernel")
6974 (version "5.1.3")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "ipykernel" version))
6979 (sha256
6980 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6981 (build-system python-build-system)
6982 (arguments
6983 `(#:phases
6984 (modify-phases %standard-phases
6985 (replace 'check
6986 (lambda _
6987 (setenv "HOME" "/tmp")
6988 (invoke "pytest" "-v")
6989 #t))
6990 (add-after 'install 'set-python-file-name
6991 (lambda* (#:key outputs #:allow-other-keys)
6992 ;; Record the absolute file name of the 'python' executable in
6993 ;; 'kernel.json'.
6994 (let ((out (assoc-ref outputs "out")))
6995 (substitute* (string-append out "/share/jupyter"
6996 "/kernels/python3/kernel.json")
6997 (("\"python\"")
6998 (string-append "\"" (which "python") "\"")))
6999 #t))))))
7000 (propagated-inputs
7001 `(("python-ipython" ,python-ipython)
7002 ;; imported at runtime during connect
7003 ("python-jupyter-client" ,python-jupyter-client)))
7004 (native-inputs
7005 `(("python-flaky" ,python-flaky)
7006 ("python-nose" ,python-nose)
7007 ("python-pytest" ,python-pytest)))
7008 (home-page "https://ipython.org")
7009 (synopsis "IPython Kernel for Jupyter")
7010 (description
7011 "This package provides the IPython kernel for Jupyter.")
7012 (properties `((python2-variant . ,(delay python2-ipykernel))))
7013 (license license:bsd-3)))
7014
7015 ;; Version 5.x and above no longer support Python 2.
7016 (define-public python2-ipykernel
7017 (package
7018 (name "python2-ipykernel")
7019 (version "4.10.1")
7020 (source
7021 (origin
7022 (method url-fetch)
7023 (uri (pypi-uri "ipykernel" version))
7024 (sha256
7025 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7026 (build-system python-build-system)
7027 (arguments
7028 `(#:python ,python-2))
7029 (propagated-inputs
7030 `(("python2-ipython" ,python2-ipython)
7031 ;; imported at runtime during connect
7032 ("python2-jupyter-client" ,python2-jupyter-client)
7033 ("python2-tornado" ,python2-tornado)
7034 ("python2-traitlets" ,python2-traitlets)))
7035 (native-inputs
7036 `(("python2-mock" ,python2-mock)
7037 ("python2-nose" ,python2-nose)
7038 ("python2-pytest" ,python2-pytest)
7039 ("python2-pytest-cov" ,python2-pytest-cov)))
7040 (home-page "https://ipython.org")
7041 (synopsis "IPython Kernel for Jupyter")
7042 (description
7043 "This package provides the IPython kernel for Jupyter.")
7044 (license license:bsd-3)))
7045
7046 (define-public python-pari-jupyter
7047 (package
7048 (name "python-pari-jupyter")
7049 (version "1.3.2")
7050 (source
7051 (origin
7052 (method url-fetch)
7053 (uri (pypi-uri "pari_jupyter" version))
7054 (sha256
7055 (base32
7056 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7057 (build-system python-build-system)
7058 (propagated-inputs
7059 `(("python-ipykernel" ,python-ipykernel)))
7060 (inputs
7061 `(("pari-gp" ,pari-gp)
7062 ("readline" ,readline)))
7063 (arguments
7064 `(#:tests? #f)) ; no test suite
7065 (home-page
7066 "https://github.com/jdemeyer/pari_jupyter")
7067 (synopsis "A Jupyter kernel for PARI/GP")
7068 (description "The package provides a PARI/GP kernel for Jupyter.")
7069 (license license:gpl3+)))
7070
7071 (define-public python-backcall
7072 (package
7073 (name "python-backcall")
7074 (version "0.1.0")
7075 (source
7076 (origin
7077 (method url-fetch)
7078 (uri (pypi-uri "backcall" version))
7079 (sha256
7080 (base32
7081 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7082 (build-system python-build-system)
7083 (home-page "https://github.com/takluyver/backcall/")
7084 (synopsis "Specifications for callback functions passed in to an API")
7085 (description
7086 "If your code lets other people supply callback functions, it's important
7087 to specify the function signature you expect, and check that functions support
7088 that. Adding extra parameters later would break other peoples code unless
7089 you're careful. The @code{backcall} package provides a way of specifying the
7090 callback signature using a prototype function.")
7091 (license license:bsd-3)))
7092
7093 (define-public python-ipython
7094 (package
7095 (name "python-ipython")
7096 (version "7.9.0")
7097 (source
7098 (origin
7099 (method url-fetch)
7100 (uri (pypi-uri "ipython" version ".tar.gz"))
7101 (sha256
7102 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7103 (build-system python-build-system)
7104 (propagated-inputs
7105 `(("python-backcall" ,python-backcall)
7106 ("python-pyzmq" ,python-pyzmq)
7107 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7108 ("python-terminado" ,python-terminado)
7109 ("python-matplotlib" ,python-matplotlib)
7110 ("python-numpy" ,python-numpy)
7111 ("python-numpydoc" ,python-numpydoc)
7112 ("python-jedi" ,python-jedi)
7113 ("python-jinja2" ,python-jinja2)
7114 ("python-mistune" ,python-mistune)
7115 ("python-pexpect" ,python-pexpect)
7116 ("python-pickleshare" ,python-pickleshare)
7117 ("python-simplegeneric" ,python-simplegeneric)
7118 ("python-jsonschema" ,python-jsonschema)
7119 ("python-traitlets" ,python-traitlets)
7120 ("python-nbformat" ,python-nbformat)
7121 ("python-pygments" ,python-pygments)))
7122 (inputs
7123 `(("readline" ,readline)
7124 ("which" ,which)))
7125 (native-inputs
7126 `(("graphviz" ,graphviz)
7127 ("pkg-config" ,pkg-config)
7128 ("python-requests" ,python-requests) ;; for tests
7129 ("python-testpath" ,python-testpath)
7130 ("python-nose" ,python-nose)))
7131 (arguments
7132 `(#:phases
7133 (modify-phases %standard-phases
7134 (add-after 'unpack 'make-docs-reproducible
7135 (lambda _
7136 (substitute* "IPython/sphinxext/ipython_directive.py"
7137 ((".*import datetime") "")
7138 ((".*datetime.datetime.now\\(\\)") "")
7139 (("%timeit") "# %timeit"))
7140 #t))
7141 ;; Tests can only be run after the library has been installed and not
7142 ;; within the source directory.
7143 (delete 'check)
7144 (add-after 'install 'check
7145 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7146 (if tests?
7147 (begin
7148 ;; Make installed package available for running the tests
7149 (add-installed-pythonpath inputs outputs)
7150 (setenv "HOME" "/tmp/") ;; required by a test
7151 ;; We only test the core because one of the other tests
7152 ;; tries to import ipykernel.
7153 (invoke "python" "IPython/testing/iptest.py"
7154 "-v" "IPython/core/tests"))
7155 #t)))
7156 (add-before 'check 'fix-tests
7157 (lambda* (#:key inputs #:allow-other-keys)
7158 (substitute* "./IPython/utils/_process_posix.py"
7159 (("/usr/bin/env', 'which") (which "which")))
7160 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7161 (("#!/usr/bin/env python")
7162 (string-append "#!" (which "python"))))
7163 ;; This test introduces a circular dependency on ipykernel
7164 ;; (which depends on ipython).
7165 (delete-file "IPython/core/tests/test_display.py")
7166 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7167 (delete-file "IPython/core/tests/test_interactiveshell.py")
7168 #t)))))
7169 (home-page "https://ipython.org")
7170 (synopsis "IPython is a tool for interactive computing in Python")
7171 (description
7172 "IPython provides a rich architecture for interactive computing with:
7173 Powerful interactive shells, a browser-based notebook, support for interactive
7174 data visualization, embeddable interpreters and tools for parallel
7175 computing.")
7176 (properties `((python2-variant . ,(delay python2-ipython))))
7177 (license license:bsd-3)))
7178
7179 ;; This is the latest release of the LTS version of ipython with support for
7180 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7181 ;; dropped support for Python 2.7.
7182 (define-public python2-ipython
7183 (package
7184 (name "python2-ipython")
7185 (version "5.8.0")
7186 (source
7187 (origin
7188 (method url-fetch)
7189 (uri (pypi-uri "ipython" version ".tar.gz"))
7190 (sha256
7191 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7192 (build-system python-build-system)
7193 (propagated-inputs
7194 `(("python2-backports-shutil-get-terminal-size"
7195 ,python2-backports-shutil-get-terminal-size)
7196 ("python2-pathlib2" ,python2-pathlib2)
7197 ("python2-pyzmq" ,python2-pyzmq)
7198 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7199 ("python2-terminado" ,python2-terminado)
7200 ("python2-matplotlib" ,python2-matplotlib)
7201 ("python2-numpy" ,python2-numpy)
7202 ("python2-numpydoc" ,python2-numpydoc)
7203 ("python2-jinja2" ,python2-jinja2)
7204 ("python2-mistune" ,python2-mistune)
7205 ("python2-pexpect" ,python2-pexpect)
7206 ("python2-pickleshare" ,python2-pickleshare)
7207 ("python2-simplegeneric" ,python2-simplegeneric)
7208 ("python2-jsonschema" ,python2-jsonschema)
7209 ("python2-traitlets" ,python2-traitlets)
7210 ("python2-nbformat" ,python2-nbformat)
7211 ("python2-pygments" ,python2-pygments)))
7212 (inputs
7213 `(("readline" ,readline)
7214 ("which" ,which)))
7215 (native-inputs
7216 `(("graphviz" ,graphviz)
7217 ("pkg-config" ,pkg-config)
7218 ("python2-requests" ,python2-requests) ;; for tests
7219 ("python2-testpath" ,python2-testpath)
7220 ("python2-mock" ,python2-mock)
7221 ("python2-nose" ,python2-nose)))
7222 (arguments
7223 `(#:python ,python-2
7224 #:phases
7225 (modify-phases %standard-phases
7226 (add-before 'check 'delete-broken-tests
7227 (lambda* (#:key inputs #:allow-other-keys)
7228 ;; These tests throw errors for unknown reasons.
7229 (delete-file "IPython/core/tests/test_displayhook.py")
7230 (delete-file "IPython/core/tests/test_magic_terminal.py")
7231 (delete-file "IPython/core/tests/test_profile.py")
7232 #t)))))
7233 (home-page "https://ipython.org")
7234 (synopsis "IPython is a tool for interactive computing in Python")
7235 (description
7236 "IPython provides a rich architecture for interactive computing with:
7237 Powerful interactive shells, a browser-based notebook, support for interactive
7238 data visualization, embeddable interpreters and tools for parallel
7239 computing.")
7240 (license license:bsd-3)))
7241
7242 (define-public python-ipython-documentation
7243 (package
7244 (inherit python-ipython)
7245 (name "python-ipython-documentation")
7246 (version (package-version python-ipython))
7247 (arguments
7248 `(#:phases
7249 (modify-phases %standard-phases
7250 (delete 'build)
7251 (delete 'check)
7252 (replace 'install
7253 (lambda* (#:key outputs #:allow-other-keys)
7254 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7255 (doc (string-append data "/doc/" ,name "-" ,version))
7256 (html (string-append doc "/html"))
7257 (man1 (string-append data "/man/man1"))
7258 (info (string-append data "/info"))
7259 (examples (string-append doc "/examples"))
7260 (python-arg (string-append "PYTHON=" (which "python"))))
7261 (setenv "LANG" "en_US.utf8")
7262 (with-directory-excursion "docs"
7263 ;; FIXME: pdf fails to build
7264 ;;(system* "make" "pdf" "PAPER=a4")
7265 (system* "make" python-arg "html")
7266 ;; FIXME: the generated texi file contains ^@^@, which trips
7267 ;; up the parser.
7268 ;; (system* "make" python-arg "info")
7269 )
7270 (copy-recursively "docs/man" man1)
7271 (copy-recursively "examples" examples)
7272 (copy-recursively "docs/build/html" html)
7273 ;; (copy-file "docs/build/latex/ipython.pdf"
7274 ;; (string-append doc "/ipython.pdf"))
7275 (mkdir-p info)
7276 ;; (copy-file "docs/build/texinfo/ipython.info"
7277 ;; (string-append info "/ipython.info"))
7278 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7279 #t)))))
7280 (inputs
7281 `(("python-ipython" ,python-ipython)
7282 ("python-ipykernel" ,python-ipykernel)))
7283 (native-inputs
7284 `(("python-sphinx" ,python-sphinx)
7285 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7286 ;; FIXME: It's possible that a smaller union would work just as well.
7287 ("texlive" ,(texlive-union (list texlive-amsfonts
7288 texlive-fonts-ec
7289 texlive-generic-ifxetex
7290 texlive-generic-pdftex
7291 texlive-latex-capt-of
7292 texlive-latex-cmap
7293 texlive-latex-environ
7294 texlive-latex-eqparbox
7295 texlive-latex-etoolbox
7296 texlive-latex-expdlist
7297 texlive-latex-fancyhdr
7298 texlive-latex-fancyvrb
7299 texlive-latex-fncychap
7300 texlive-latex-float
7301 texlive-latex-framed
7302 texlive-latex-geometry
7303 texlive-latex-graphics
7304 texlive-latex-hyperref
7305 texlive-latex-mdwtools
7306 texlive-latex-multirow
7307 texlive-latex-needspace
7308 texlive-latex-oberdiek
7309 texlive-latex-parskip
7310 texlive-latex-preview
7311 texlive-latex-tabulary
7312 texlive-latex-threeparttable
7313 texlive-latex-titlesec
7314 texlive-latex-trimspaces
7315 texlive-latex-ucs
7316 texlive-latex-upquote
7317 texlive-latex-url
7318 texlive-latex-varwidth
7319 texlive-latex-wrapfig)))
7320 ("texinfo" ,texinfo)))))
7321
7322 (define-public python-urwid
7323 (package
7324 (name "python-urwid")
7325 (version "2.1.0")
7326 (source
7327 (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "urwid" version))
7330 (sha256
7331 (base32
7332 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7333 (build-system python-build-system)
7334 (home-page "http://urwid.org")
7335 (synopsis "Console user interface library for Python")
7336 (description
7337 "Urwid is a curses-based UI/widget library for Python. It includes many
7338 features useful for text console applications.")
7339 (license license:lgpl2.1+)))
7340
7341 (define-public python2-urwid
7342 (package-with-python2 python-urwid))
7343
7344 (define-public python-urwidtrees
7345 (package
7346 (name "python-urwidtrees")
7347 (version "1.0.2")
7348 (source
7349 (origin
7350 (method git-fetch)
7351 ;; package author intends on distributing via github rather than pypi:
7352 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7353 (uri (git-reference
7354 (url "https://github.com/pazz/urwidtrees")
7355 (commit version)))
7356 (file-name (git-file-name name version))
7357 (sha256
7358 (base32
7359 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7360 (build-system python-build-system)
7361 (arguments
7362 '(#:use-setuptools? #f
7363 #:tests? #f)) ; no tests
7364 (propagated-inputs `(("python-urwid" ,python-urwid)))
7365 (home-page "https://github.com/pazz/urwidtrees")
7366 (synopsis "Tree widgets for urwid")
7367 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7368 toolkit. Use it to build trees of widgets.")
7369 (license license:gpl3+)))
7370
7371 (define-public python2-urwidtrees
7372 (package-with-python2 python-urwidtrees))
7373
7374 (define-public python-ua-parser
7375 (package
7376 (name "python-ua-parser")
7377 (version "0.8.0")
7378 (source
7379 (origin
7380 (method url-fetch)
7381 (uri (pypi-uri "ua-parser" version))
7382 (sha256
7383 (base32
7384 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7385 (build-system python-build-system)
7386 (arguments
7387 `(#:tests? #f)) ;no test suite in release
7388 (native-inputs
7389 `(("python-pyyaml" ,python-pyyaml)))
7390 (home-page "https://github.com/ua-parser/uap-python")
7391 (synopsis "User agent parser")
7392 (description
7393 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7394 (license license:asl2.0)))
7395
7396 (define-public python2-ua-parser
7397 (package-with-python2 python-ua-parser))
7398
7399 (define-public python-user-agents
7400 (package
7401 (name "python-user-agents")
7402 (version "1.1.0")
7403 (source
7404 (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "user-agents" version))
7407 (sha256
7408 (base32
7409 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7410 (build-system python-build-system)
7411 (arguments
7412 `(#:tests? #f)) ;missing devices.json test file in release
7413 (propagated-inputs
7414 `(("python-ua-parser" ,python-ua-parser)))
7415 (home-page "https://github.com/selwin/python-user-agents")
7416 (synopsis "User Agent strings parsing library")
7417 (description
7418 "A library to identify devices (phones, tablets) and their capabilities by
7419 parsing (browser/HTTP) user agent strings.")
7420 (license license:expat)))
7421
7422 (define-public python2-user-agents
7423 (package-with-python2 python-user-agents))
7424
7425 (define-public python-dbus
7426 (package
7427 (name "python-dbus")
7428 (version "1.2.16")
7429 (source
7430 (origin
7431 (method url-fetch)
7432 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7433 "dbus-python-" version ".tar.gz"))
7434 (sha256
7435 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7436 (build-system gnu-build-system)
7437 (native-inputs
7438 `(("pkg-config" ,pkg-config)))
7439 (inputs
7440 `(("python" ,python-wrapper)
7441 ("dbus-glib" ,dbus-glib)))
7442 (synopsis "Python bindings for D-bus")
7443 (description "python-dbus provides bindings for libdbus, the reference
7444 implementation of D-Bus.")
7445 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7446 (license license:expat)))
7447
7448 (define-public python2-dbus
7449 (package (inherit python-dbus)
7450 (name "python2-dbus")
7451 (inputs `(("python" ,python-2)
7452 ,@(alist-delete "python"
7453 (package-inputs python-dbus)
7454 equal?)))))
7455
7456 (define-public python-notify2
7457 (package
7458 (name "python-notify2")
7459 (version "0.3.1")
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "notify2" version))
7464 (sha256
7465 (base32
7466 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7467 (build-system python-build-system)
7468 (arguments `(#:tests? #f)) ; tests depend on system state
7469 (native-inputs
7470 `(("python-dbus" ,python-dbus)))
7471 (home-page "https://bitbucket.org/takluyver/pynotify2")
7472 (synopsis "Python interface to D-Bus notifications")
7473 (description
7474 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7475 It is a reimplementation of pynotify in pure Python, and an alternative to
7476 the GObject Introspection bindings to libnotify for non-GTK applications.")
7477 (license (list license:bsd-2
7478 license:lgpl2.1+))))
7479
7480 (define-public python2-notify2
7481 (package-with-python2 python-notify2))
7482
7483 ;; beautifulsoup4 has a totally different namespace than 3.x,
7484 ;; and pypi seems to put it under its own name, so I guess we should too
7485 (define-public python-beautifulsoup4
7486 (package
7487 (name "python-beautifulsoup4")
7488 (version "4.9.1")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "beautifulsoup4" version))
7493 (sha256
7494 (base32
7495 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7496 (build-system python-build-system)
7497 (arguments
7498 `(#:phases
7499 (modify-phases %standard-phases
7500 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7501 ;; must use this conversion script when building with Python 3. The
7502 ;; conversion script also runs the tests.
7503 ;; For more information, see the file 'convert-py3k' in the source
7504 ;; distribution.
7505 (replace 'check
7506 (lambda _ (invoke "./convert-py3k"))))))
7507 (propagated-inputs
7508 `(("python-soupsieve" ,python-soupsieve)))
7509 (home-page
7510 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7511 (synopsis
7512 "Python screen-scraping library")
7513 (description
7514 "Beautiful Soup is a Python library designed for rapidly setting up
7515 screen-scraping projects. It offers Pythonic idioms for navigating,
7516 searching, and modifying a parse tree, providing a toolkit for
7517 dissecting a document and extracting what you need. It automatically
7518 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7519 (license license:expat)
7520 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7521
7522 (define-public python2-beautifulsoup4
7523 (package
7524 (inherit (package-with-python2
7525 (strip-python2-variant python-beautifulsoup4)))
7526 (arguments `(#:python ,python-2))))
7527
7528 (define-public python-soupsieve
7529 (package
7530 (name "python-soupsieve")
7531 (version "2.0.1")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "soupsieve" version))
7536 (sha256
7537 (base32
7538 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7539 (build-system python-build-system)
7540 (arguments `(#:tests? #f))
7541 ;;XXX: 2 tests fail currently despite claming they were to be
7542 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7543 ;;don't want to create a circular dependency.
7544 (home-page "https://github.com/facelessuser/soupsieve")
7545 (synopsis "CSS selector library")
7546 (description
7547 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7548 Soup 4. It aims to provide selecting, matching, and filtering using modern
7549 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7550 specifications up through the latest CSS level 4 drafts and beyond (though
7551 some are not yet implemented).")
7552 (properties `((python2-variant . ,(delay python2-soupsieve))))
7553 (license license:expat)))
7554
7555 ;; This is the last version that supports python-2
7556 (define-public python2-soupsieve
7557 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7558 (package
7559 (inherit base)
7560 (version "1.9.6")
7561 (source
7562 (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "soupsieve" version))
7565 (sha256
7566 (base32
7567 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7568 (propagated-inputs
7569 `(("python2-backports-functools-lru-cache"
7570 ,python2-backports-functools-lru-cache)
7571 ,@(package-propagated-inputs base))))))
7572
7573 (define-public python-netifaces
7574 (package
7575 (name "python-netifaces")
7576 (version "0.10.9")
7577 (source
7578 (origin
7579 (method url-fetch)
7580 (uri (pypi-uri "netifaces" version))
7581 (sha256
7582 (base32
7583 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7584 (build-system python-build-system)
7585 (home-page "https://github.com/al45tair/netifaces")
7586 (synopsis
7587 "Python module for portable network interface information")
7588 (description
7589 "Netifaces is a Python module providing information on network
7590 interfaces in an easy and portable manner.")
7591 (license license:expat)))
7592
7593 (define-public python2-netifaces
7594 (package-with-python2 python-netifaces))
7595
7596 (define-public python-networkx
7597 (package
7598 (name "python-networkx")
7599 (version "2.5")
7600 (source
7601 (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "networkx" version))
7604 (sha256
7605 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7606 (build-system python-build-system)
7607 (arguments
7608 '(#:phases (modify-phases %standard-phases
7609 (replace 'check
7610 (lambda* (#:key tests? #:allow-other-keys)
7611 (if tests?
7612 (invoke "pytest" "-vv" "--pyargs" "networkx")
7613 (format #t "test suite not run~%"))
7614 #t)))))
7615 ;; python-decorator is needed at runtime.
7616 (propagated-inputs
7617 `(("python-decorator" ,python-decorator)))
7618 (native-inputs
7619 `(("python-pytest" ,python-pytest)))
7620 (home-page "https://networkx.github.io/")
7621 (synopsis "Python module for creating and manipulating graphs and networks")
7622 (description
7623 "NetworkX is a Python package for the creation, manipulation, and study
7624 of the structure, dynamics, and functions of complex networks.")
7625 (properties `((python2-variant . ,(delay python2-networkx))))
7626 (license license:bsd-3)))
7627
7628 ;; NetworkX 2.2 is the last version with support for Python 2.
7629 (define-public python2-networkx
7630 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7631 (package
7632 (inherit base)
7633 (version "2.2")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "networkx" version ".zip"))
7637 (sha256
7638 (base32
7639 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7640 (arguments
7641 `(#:python ,python-2))
7642 (native-inputs
7643 `(("python-nose" ,python2-nose)
7644 ("unzip" ,unzip))))))
7645
7646 (define-public python-datrie
7647 (package
7648 (name "python-datrie")
7649 (version "0.8.2")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "datrie" version))
7654 (sha256
7655 (base32
7656 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7657 (build-system python-build-system)
7658 (native-inputs
7659 `(("python-cython" ,python-cython)
7660 ("python-hypothesis" ,python-hypothesis)
7661 ("python-pytest" ,python-pytest)
7662 ("python-pytest-runner" ,python-pytest-runner)))
7663 (home-page "https://github.com/kmike/datrie")
7664 (synopsis "Fast, efficiently stored trie for Python")
7665 (description
7666 "This package provides a fast, efficiently stored trie implementation for
7667 Python.")
7668 (license license:lgpl2.1+)))
7669
7670 (define-public snakemake
7671 (package
7672 (name "snakemake")
7673 (version "5.7.1")
7674 (source
7675 (origin
7676 (method url-fetch)
7677 (uri (pypi-uri "snakemake" version))
7678 (sha256
7679 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7680 (build-system python-build-system)
7681 (arguments
7682 ;; TODO: Package missing test dependencies.
7683 '(#:tests? #f
7684 #:phases
7685 (modify-phases %standard-phases
7686 ;; For cluster execution Snakemake will call Python. Since there is
7687 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7688 ;; this by calling the snakemake wrapper instead.
7689 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7690 (lambda* (#:key outputs #:allow-other-keys)
7691 (substitute* "snakemake/executors.py"
7692 (("\\{sys.executable\\} -m snakemake")
7693 (string-append (assoc-ref outputs "out")
7694 "/bin/snakemake")))
7695 #t)))))
7696 (propagated-inputs
7697 `(("python-appdirs" ,python-appdirs)
7698 ("python-configargparse" ,python-configargparse)
7699 ("python-datrie" ,python-datrie)
7700 ("python-docutils" ,python-docutils)
7701 ("python-gitpython" ,python-gitpython)
7702 ("python-jinja2" ,python-jinja2)
7703 ("python-jsonschema" ,python-jsonschema)
7704 ("python-networkx" ,python-networkx)
7705 ("python-psutil" ,python-psutil)
7706 ("python-pyyaml" ,python-pyyaml)
7707 ("python-ratelimiter" ,python-ratelimiter)
7708 ("python-requests" ,python-requests)
7709 ("python-wrapt" ,python-wrapt)))
7710 (home-page "https://snakemake.readthedocs.io")
7711 (synopsis "Python-based execution environment for make-like workflows")
7712 (description
7713 "Snakemake aims to reduce the complexity of creating workflows by
7714 providing a clean and modern domain specific specification language (DSL) in
7715 Python style, together with a fast and comfortable execution environment.")
7716 (license license:expat)))
7717
7718 (define-public python-pyqrcode
7719 (package
7720 (name "python-pyqrcode")
7721 (version "1.2.1")
7722 (source
7723 (origin
7724 (method url-fetch)
7725 (uri (pypi-uri "PyQRCode" version))
7726 (sha256
7727 (base32
7728 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7729 (build-system python-build-system)
7730 (home-page
7731 "https://github.com/mnooner256/pyqrcode")
7732 (synopsis "QR code generator")
7733 (description
7734 "Pyqrcode is a QR code generator written purely in Python with
7735 SVG, EPS, PNG and terminal output.")
7736 (license license:bsd-3)))
7737
7738 (define-public python-seaborn
7739 (package
7740 (name "python-seaborn")
7741 (version "0.10.0")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (pypi-uri "seaborn" version))
7746 (sha256
7747 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7748 (build-system python-build-system)
7749 (arguments
7750 `(#:phases
7751 (modify-phases %standard-phases
7752 (add-before 'check 'start-xserver
7753 (lambda* (#:key inputs #:allow-other-keys)
7754 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7755 ;; There must be a running X server and make check doesn't
7756 ;; start one. Therefore we must do it.
7757 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7758 (setenv "DISPLAY" ":1")
7759 #t)))
7760 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7761 (propagated-inputs
7762 `(("python-pandas" ,python-pandas)
7763 ("python-matplotlib" ,python-matplotlib)
7764 ("python-numpy" ,python-numpy)
7765 ("python-scipy" ,python-scipy)))
7766 (native-inputs
7767 `(("python-pytest" ,python-pytest)
7768 ("xorg-server" ,xorg-server-for-tests)))
7769 (home-page "https://seaborn.pydata.org/")
7770 (synopsis "Statistical data visualization")
7771 (description
7772 "Seaborn is a library for making attractive and informative statistical
7773 graphics in Python. It is built on top of matplotlib and tightly integrated
7774 with the PyData stack, including support for numpy and pandas data structures
7775 and statistical routines from scipy and statsmodels.")
7776 (properties `((python2-variant . ,(delay python2-seaborn))))
7777 (license license:bsd-3)))
7778
7779 ;; 0.9.1 is the last release with support for Python 2.
7780 (define-public python2-seaborn
7781 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7782 (package
7783 (inherit base)
7784 (version "0.9.1")
7785 (source (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "seaborn" version))
7788 (sha256
7789 (base32
7790 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7791
7792 (define-public python-mpmath
7793 (package
7794 (name "python-mpmath")
7795 (version "1.1.0")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "mpmath" version))
7799 (file-name (git-file-name name version))
7800 (sha256
7801 (base32
7802 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7803 (build-system python-build-system)
7804 (native-inputs
7805 `(("python-pytest" ,python-pytest)))
7806 (arguments
7807 '(#:phases
7808 (modify-phases %standard-phases
7809 (replace 'check
7810 (lambda _
7811 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7812 (home-page "http://mpmath.org")
7813 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7814 (description
7815 "@code{mpmath} can be used as an arbitrary-precision substitute for
7816 Python's float/complex types and math/cmath modules, but also does much
7817 more advanced mathematics.")
7818 (license license:bsd-3)))
7819
7820 (define-public python2-mpmath
7821 (package-with-python2 python-mpmath))
7822
7823 (define-public python-bigfloat
7824 (package
7825 (name "python-bigfloat")
7826 (version "0.3.0")
7827 (source
7828 (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "bigfloat" version))
7831 (sha256
7832 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7833 (build-system python-build-system)
7834 (inputs
7835 `(("mpfr" ,mpfr)))
7836 (home-page "https://github.com/mdickinson/bigfloat")
7837 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7838 (description
7839 "This package provides a Python interface to the MPFR library for
7840 multiprecision arithmetic.")
7841 (license license:lgpl3+)))
7842
7843 (define-public python2-bigfloat
7844 (package-with-python2 python-bigfloat))
7845
7846 (define-public python-sympy
7847 (package
7848 (name "python-sympy")
7849 (version "1.6.2")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "sympy" version))
7854 (sha256
7855 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7856 (build-system python-build-system)
7857 (arguments
7858 `(#:phases
7859 (modify-phases %standard-phases
7860 (replace 'check
7861 (lambda* (#:key outputs #:allow-other-keys)
7862 (invoke
7863 (or (which "python3") (which "python"))
7864 "-c" "import sympy; sympy.test(\"/core\")"))))))
7865 (propagated-inputs
7866 `(("python-mpmath" ,python-mpmath)))
7867 (home-page "https://www.sympy.org/")
7868 (synopsis "Python library for symbolic mathematics")
7869 (description
7870 "SymPy is a Python library for symbolic mathematics. It aims to become a
7871 full-featured computer algebra system (CAS) while keeping the code as simple
7872 as possible in order to be comprehensible and easily extensible.")
7873 (license license:bsd-3)))
7874
7875 (define-public python2-sympy
7876 (package
7877 (inherit (package-with-python2 python-sympy))
7878 (version "1.5.1") ; last release for python2
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "sympy" version))
7883 (sha256
7884 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7885
7886 (define-public python-q
7887 (package
7888 (name "python-q")
7889 (version "2.6")
7890 (source
7891 (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "q" version))
7894 (sha256
7895 (base32
7896 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7897 (build-system python-build-system)
7898 (home-page "https://github.com/zestyping/q")
7899 (synopsis "Quick-and-dirty debugging output for tired programmers")
7900 (description
7901 "q is a Python module for \"print\" style of debugging Python code. It
7902 provides convenient short API for print out of values, tracebacks, and
7903 falling into the Python interpreter.")
7904 (license license:asl2.0)))
7905
7906 (define-public python2-q
7907 (package-with-python2 python-q))
7908
7909 (define-public python-xlib
7910 (package
7911 (name "python-xlib")
7912 (version "0.27")
7913 (source
7914 (origin
7915 (method git-fetch)
7916 (uri (git-reference
7917 (url "https://github.com/python-xlib/python-xlib")
7918 (commit version)))
7919 (file-name (git-file-name name version))
7920 (sha256
7921 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7922 (build-system python-build-system)
7923 (arguments
7924 `(#:phases
7925 (modify-phases %standard-phases
7926 (add-before 'check 'start-xserver
7927 (lambda* (#:key inputs #:allow-other-keys)
7928 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7929 ;; There must be a running X server and make check doesn't
7930 ;; start one. Therefore we must do it.
7931 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7932 (setenv "DISPLAY" ":1")
7933 #t))))))
7934 (native-inputs
7935 `(("python-mock" ,python-mock)
7936 ("python-setuptools-scm" ,python-setuptools-scm)
7937 ("python-six" ,python-six)
7938 ("xorg-server" ,xorg-server)))
7939 (home-page "https://github.com/python-xlib/python-xlib")
7940 (synopsis "Python X11 client library")
7941 (description
7942 "The Python X Library is intended to be a fully functional
7943 X client library for Python programs. It is useful to implement
7944 low-level X clients. It is written entirely in Python.")
7945 (license license:gpl2+)))
7946
7947 (define-public python2-xlib
7948 (package-with-python2 python-xlib))
7949
7950 (define-public python-singledispatch
7951 (package
7952 (name "python-singledispatch")
7953 (version "3.4.0.3")
7954 (source
7955 (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "singledispatch" version))
7958 (sha256
7959 (base32
7960 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7961 (build-system python-build-system)
7962 (native-inputs
7963 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7964 (home-page
7965 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7966 (synopsis "Backport of singledispatch feature from Python 3.4")
7967 (description
7968 "This library brings functools.singledispatch from Python 3.4 to Python
7969 2.6-3.3.")
7970 (license license:expat)))
7971
7972 (define-public python2-singledispatch
7973 (package-with-python2 python-singledispatch))
7974
7975 ;; the python- version can be removed with python-3.5
7976 (define-public python-backports-abc
7977 (package
7978 (name "python-backports-abc")
7979 (version "0.5")
7980 (source
7981 (origin
7982 (method url-fetch)
7983 (uri (pypi-uri "backports_abc" version))
7984 (sha256
7985 (base32
7986 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7987 (build-system python-build-system)
7988 (home-page "https://github.com/cython/backports_abc")
7989 (synopsis "Backport of additions to the 'collections.abc' module")
7990 (description
7991 "Python-backports-abc provides a backport of additions to the
7992 @code{collections.abc} module in Python-3.5.")
7993 (license license:psfl)))
7994
7995 (define-public python2-backports-abc
7996 (package-with-python2 python-backports-abc))
7997
7998 (define-public python-backports-csv
7999 (package
8000 (name "python-backports-csv")
8001 (version "1.0.7")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "backports.csv" version))
8006 (sha256
8007 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8008 (build-system python-build-system)
8009 (home-page "https://github.com/ryanhiebert/backports.csv")
8010 (synopsis "Backport of Python 3's csv module for Python 2")
8011 (description
8012 "Provides a backport of Python 3's @code{csv} module for parsing
8013 comma separated values. The API of the @code{csv} module in Python 2
8014 is drastically different from the @code{csv} module in Python 3.
8015 This is due, for the most part, to the difference between str in
8016 Python 2 and Python 3.")
8017 (license license:psfl)))
8018
8019 (define-public python2-backports-csv
8020 (package-with-python2 python-backports-csv))
8021
8022 (define-public python2-backports-shutil-get-terminal-size
8023 (package
8024 (name "python2-backports-shutil-get-terminal-size")
8025 (version "1.0.0")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8030 (sha256
8031 (base32
8032 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8033 (build-system python-build-system)
8034 (arguments
8035 `(#:python ,python-2
8036 #:phases
8037 (modify-phases %standard-phases
8038 (replace 'check
8039 (lambda _
8040 (setenv "PYTHONPATH" (string-append "./build/lib:"
8041 (getenv "PYTHONPATH")))
8042 (invoke "py.test" "-v"))))))
8043 (native-inputs
8044 `(("python2-pytest" ,python2-pytest)))
8045 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8046 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8047 (description
8048 "This package provides a backport of the @code{get_terminal_size
8049 function} from Python 3.3's @code{shutil}.
8050 Unlike the original version it is written in pure Python rather than C,
8051 so it might be a tiny bit slower.")
8052 (license license:expat)))
8053
8054 (define-public python-waf
8055 (package
8056 (name "python-waf")
8057 (version "2.0.19")
8058 (source (origin
8059 (method url-fetch)
8060 (uri (string-append "https://waf.io/"
8061 "waf-" version ".tar.bz2"))
8062 (sha256
8063 (base32
8064 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8065 (build-system python-build-system)
8066 (arguments
8067 '(#:phases
8068 (modify-phases %standard-phases
8069 (replace 'build
8070 (lambda _
8071 ;; XXX: Find a way to add all extra tools.
8072 (let ((tools '("gccdeps"
8073 "clang_compilation_database")))
8074 (invoke "python" "waf-light" "configure" "build"
8075 (string-append "--tools="
8076 (string-join tools ","))))))
8077 (replace 'check
8078 (lambda _
8079 (invoke "python" "waf" "--version")))
8080 (replace 'install
8081 (lambda* (#:key outputs #:allow-other-keys)
8082 (let ((out (assoc-ref outputs "out")))
8083 (install-file "waf" (string-append out "/bin")))
8084 #t))
8085 ;; waf breaks when it is wrapped.
8086 (delete 'wrap))))
8087 (home-page "https://waf.io/")
8088 (synopsis "Python-based build system")
8089 (description
8090 "Waf is a Python-based framework for configuring, compiling and installing
8091 applications.")
8092 (license license:bsd-3)))
8093
8094 (define-public python2-waf
8095 (package-with-python2 python-waf))
8096
8097 (define-public python-pyzmq
8098 (package
8099 (name "python-pyzmq")
8100 (version "17.1.2")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "pyzmq" version))
8105 (sha256
8106 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8107 (build-system python-build-system)
8108 (arguments
8109 `(#:configure-flags
8110 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8111 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8112 ;; --inplace' for 'python setup.py test' to work.
8113 #:tests? #f))
8114 (inputs
8115 `(("zeromq" ,zeromq)))
8116 (native-inputs
8117 `(("pkg-config" ,pkg-config)
8118 ("python-nose" ,python-nose)))
8119 (home-page "https://github.com/zeromq/pyzmq")
8120 (synopsis "Python bindings for 0MQ")
8121 (description
8122 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8123 (license license:bsd-4)))
8124
8125 (define-public python2-pyzmq
8126 (package-with-python2 python-pyzmq))
8127
8128 (define-public python-pep8
8129 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8130 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8131 ;; some dependents' test suites, and nothing more.
8132 (package
8133 (name "python-pep8")
8134 (version "1.7.0")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "pep8" version))
8139 (sha256
8140 (base32
8141 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8142 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8143 (build-system python-build-system)
8144 (home-page "https://pep8.readthedocs.org/")
8145 (synopsis "Python style guide checker")
8146 (description
8147 "This tools checks Python code against some of the style conventions in
8148 PEP 8.")
8149 (license license:expat)))
8150
8151 (define-public python2-pep8
8152 (package-with-python2 python-pep8))
8153
8154 (define-public python-pep517
8155 (package
8156 (name "python-pep517")
8157 (version "0.8.2")
8158 (source
8159 (origin
8160 (method url-fetch)
8161 (uri (pypi-uri "pep517" version))
8162 (sha256
8163 (base32
8164 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8165 (build-system python-build-system)
8166 (arguments
8167 '(#:phases
8168 (modify-phases %standard-phases
8169 (replace 'check
8170 (lambda* (#:key tests? #:allow-other-keys)
8171 (delete-file "pytest.ini")
8172 ;; This test tries to connect to the internet
8173 (delete-file "tests/test_meta.py")
8174 (if tests?
8175 (invoke "pytest")
8176 #t))))))
8177 (native-inputs
8178 `(("python-mock" ,python-mock)
8179 ("python-pytest" ,python-pytest)
8180 ("python-testpath" ,python-testpath)))
8181 (propagated-inputs
8182 `(("python-toml" ,python-toml)
8183 ("python-wheel" ,python-wheel)))
8184 (home-page "https://github.com/pypa/pep517")
8185 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8186 (description
8187 "Wrappers to build Python packages using PEP 517 hooks.")
8188 (properties `((python2-variant . ,(delay python2-pep517))))
8189 (license license:expat)))
8190
8191 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8192 (define-public python2-pep517
8193 (let ((base (package-with-python2
8194 (strip-python2-variant python-pep517))))
8195 (package
8196 (inherit base)
8197 (name "python2-pep517")
8198 (arguments
8199 `(#:tests? #f
8200 ,@(package-arguments base)))
8201 (native-inputs `()))))
8202
8203 (define-public python-pyflakes
8204 (package
8205 (name "python-pyflakes")
8206 (version "2.2.0")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "pyflakes" version))
8211 (sha256
8212 (base32
8213 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8214 (build-system python-build-system)
8215 (home-page
8216 "https://github.com/pyflakes/pyflakes")
8217 (synopsis "Passive checker of Python programs")
8218 (description
8219 "Pyflakes statically checks Python source code for common errors.")
8220 (license license:expat)))
8221
8222 (define-public python2-pyflakes
8223 (package-with-python2 python-pyflakes))
8224
8225 (define-public python-mccabe
8226 (package
8227 (name "python-mccabe")
8228 (version "0.6.1")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "mccabe" version))
8233 (sha256
8234 (base32
8235 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8236 (build-system python-build-system)
8237 (native-inputs
8238 `(("python-pytest" ,python-pytest-bootstrap)
8239 ("python-pytest-runner" ,python-pytest-runner)))
8240 (home-page "https://github.com/flintwork/mccabe")
8241 (synopsis "McCabe checker, plugin for flake8")
8242 (description
8243 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8244 complexity of Python source code.")
8245 (license license:expat)))
8246
8247 (define-public python2-mccabe
8248 (package-with-python2 python-mccabe))
8249
8250 (define-public python-flake8
8251 (package
8252 (name "python-flake8")
8253 (version "3.8.4")
8254 (source (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "flake8" version))
8257 (sha256
8258 (base32
8259 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8260 (build-system python-build-system)
8261 (arguments
8262 `(#:phases
8263 (modify-phases %standard-phases
8264 (delete 'check)
8265 (add-after 'install 'check
8266 (lambda* (#:key inputs outputs #:allow-other-keys)
8267 (add-installed-pythonpath inputs outputs)
8268 (invoke "pytest" "-v")
8269 #t)))))
8270 (propagated-inputs
8271 `(("python-pycodestyle" ,python-pycodestyle)
8272 ("python-entrypoints" ,python-entrypoints)
8273 ("python-pyflakes" ,python-pyflakes)
8274 ("python-mccabe" ,python-mccabe)))
8275 (native-inputs
8276 `(("python-mock" ,python-mock)
8277 ("python-pytest" ,python-pytest-bootstrap)))
8278 (home-page "https://gitlab.com/pycqa/flake8")
8279 (synopsis
8280 "The modular source code checker: pep8, pyflakes and co")
8281 (description
8282 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8283 (properties `((python2-variant . ,(delay python2-flake8))))
8284 (license license:expat)))
8285
8286 (define-public python2-flake8
8287 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8288 (package (inherit base)
8289 (propagated-inputs
8290 `(("python2-configparser" ,python2-configparser)
8291 ("python2-enum34" ,python2-enum34)
8292 ("python2-functools32" ,python2-functools32)
8293 ("python2-typing" ,python2-typing)
8294 ,@(package-propagated-inputs base))))))
8295
8296 (define-public python-flake8-bugbear
8297 (package
8298 (name "python-flake8-bugbear")
8299 (version "20.1.4")
8300 (source
8301 (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "flake8-bugbear" version))
8304 (sha256
8305 (base32
8306 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8307 (build-system python-build-system)
8308 (arguments
8309 '(#:phases
8310 (modify-phases %standard-phases
8311 (add-before 'check 'disable-test
8312 (lambda _
8313 ;; This test fails on slow computers.
8314 (substitute* "tests/test_bugbear.py"
8315 (("def test_does_not_crash_on_any_valid_code")
8316 "def _test_does_not_crash_on_any_valid_code")))))))
8317 (native-inputs
8318 `(("python-hypothesis" ,python-hypothesis)
8319 ("python-hypothesmith" ,python-hypothesmith)))
8320 (propagated-inputs
8321 `(("python-attrs" ,python-attrs)
8322 ("python-flake8" ,python-flake8)))
8323 (home-page "https://github.com/PyCQA/flake8-bugbear")
8324 (synopsis
8325 "Flake8 plugin for finding likely bugs and design problems in your program")
8326 (description
8327 "This package contains a plugin for Flake8 finding likely bugs and
8328 design problems in your program. It contains warnings that don't belong
8329 in pyflakes and pycodestyle.")
8330 (license license:expat)))
8331
8332 (define-public python-flake8-polyfill
8333 (package
8334 (name "python-flake8-polyfill")
8335 (version "1.0.2")
8336 (source
8337 (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "flake8-polyfill" version))
8340 (sha256
8341 (base32
8342 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8343 (build-system python-build-system)
8344 (arguments
8345 '(#:phases
8346 (modify-phases %standard-phases
8347 (replace 'check
8348 (lambda _
8349 ;; Be compatible with Pytest 4:
8350 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8351 (substitute* "setup.cfg"
8352 (("\\[pytest\\]")
8353 "[tool:pytest]"))
8354
8355 (setenv "PYTHONPATH"
8356 (string-append (getcwd) "/build/lib:"
8357 (getenv "PYTHONPATH")))
8358 (invoke "py.test" "-v"))))))
8359 (native-inputs
8360 `(("python-flake8" ,python-flake8)
8361 ("python-mock" ,python-mock)
8362 ("python-pep8" ,python-pep8)
8363 ("python-pycodestyle" ,python-pycodestyle)
8364 ("python-pytest" ,python-pytest)))
8365 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8366 (synopsis "Polyfill package for Flake8 plugins")
8367 (description
8368 "This package that provides some compatibility helpers for Flake8
8369 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8370 (license license:expat)))
8371
8372 (define-public python2-flake8-polyfill
8373 (package-with-python2 python-flake8-polyfill))
8374
8375 (define-public python-flake8-pyi
8376 (package
8377 (name "python-flake8-pyi")
8378 (version "20.5.0")
8379 (source
8380 (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "flake8-pyi" version))
8383 (sha256
8384 (base32
8385 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8386 (build-system python-build-system)
8387 (propagated-inputs
8388 `(("python-attrs" ,python-attrs)
8389 ("python-flake8" ,python-flake8)
8390 ("python-pyflakes" ,python-pyflakes)))
8391 (home-page "https://github.com/ambv/flake8-pyi")
8392 (synopsis
8393 "Flake8 plugin that provides specializations for type hinting stub files")
8394 (description
8395 "This package contains a plugin that provides specializations for
8396 type hinting stub files, especially interesting for linting typeshed. It
8397 adds the @file{.pyi} extension to the default value of the @code{--filename}
8398 command-line argument to Flake8. This means stubs are linted by default with
8399 this plugin enabled, without needing to explicitly list every file. It
8400 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8401 expressions after the entire file has been read. This enables support for
8402 first-class forward references that stub files use.")
8403 (license license:expat)))
8404
8405 (define-public python-flake8-pie
8406 (package
8407 (name "python-flake8-pie")
8408 (version "0.5.0")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "flake8-pie" version))
8413 (sha256
8414 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8415 (build-system python-build-system)
8416 (home-page "https://github.com/sbdchd/flake8-pie")
8417 (synopsis "Flake8 extension that implements lints")
8418 (description
8419 "This package provides a flake8 extension that implements miscellaneous
8420 lints.")
8421 (license license:bsd-2)))
8422
8423 (define-public python-autoflake
8424 (package
8425 (name "python-autoflake")
8426 (version "1.3.1")
8427 (source
8428 (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "autoflake" version))
8431 (sha256
8432 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8433 (build-system python-build-system)
8434 (propagated-inputs
8435 `(("python-pyflakes" ,python-pyflakes)))
8436 (home-page "https://github.com/myint/autoflake")
8437 (synopsis "Removes unused imports and unused variables")
8438 (description
8439 "@code{autoflake} removes unused imports and unused variables from Python
8440 code as reported by @code{pyflakes}.
8441
8442 By default, it only removes unused imports for modules that are part of the
8443 standard library. Removal of unused variables is also disabled by default.
8444 It also removes useless @code{pass} statements.")
8445 (license license:expat)))
8446
8447 (define-public python-mistune
8448 (package
8449 (name "python-mistune")
8450 (version "0.8.4")
8451 (source
8452 (origin
8453 (method url-fetch)
8454 (uri (pypi-uri "mistune" version))
8455 (sha256
8456 (base32
8457 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8458 (build-system python-build-system)
8459 (native-inputs
8460 `(("python-nose" ,python-nose)
8461 ("python-cython" ,python-cython)))
8462 (home-page "https://github.com/lepture/mistune")
8463 (synopsis "Markdown parser in pure Python")
8464 (description "This package provides a fast markdown parser in pure
8465 Python.")
8466 (license license:bsd-3)))
8467
8468 (define-public python2-mistune
8469 (package-with-python2 python-mistune))
8470
8471 (define-public python-markdown
8472 (package
8473 (name "python-markdown")
8474 (version "3.2.1")
8475 (source
8476 (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "Markdown" version))
8479 (sha256
8480 (base32
8481 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8482 (build-system python-build-system)
8483 (native-inputs
8484 `(("python-nose" ,python-nose)
8485 ("python-pyyaml" ,python-pyyaml)))
8486 (home-page "https://python-markdown.github.io/")
8487 (synopsis "Python implementation of Markdown")
8488 (description
8489 "This package provides a Python implementation of John Gruber's
8490 Markdown. The library features international input, various Markdown
8491 extensions, and several HTML output formats. A command line wrapper
8492 markdown_py is also provided to convert Markdown files to HTML.")
8493 (properties `((python2-variant . ,(delay python2-markdown))))
8494 (license license:bsd-3)))
8495
8496 ;; Markdown 3.2 dropped support for Python 2.
8497 (define-public python2-markdown
8498 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8499 (package/inherit
8500 base
8501 (version "3.1.1")
8502 (source (origin
8503 (method url-fetch)
8504 (uri (pypi-uri "Markdown" version))
8505 (sha256
8506 (base32
8507 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8508
8509 (define-public python-ptyprocess
8510 (package
8511 (name "python-ptyprocess")
8512 (version "0.5.2")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "ptyprocess" version))
8517 (sha256
8518 (base32
8519 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8520 (build-system python-build-system)
8521 (native-inputs
8522 `(("python-nose" ,python-nose)))
8523 (arguments
8524 `(#:phases
8525 (modify-phases %standard-phases
8526 (replace 'check
8527 (lambda _ (invoke "nosetests"))))))
8528 (home-page "https://github.com/pexpect/ptyprocess")
8529 (synopsis "Run a subprocess in a pseudo terminal")
8530 (description
8531 "This package provides a Python library used to launch a subprocess in a
8532 pseudo terminal (pty), and interact with both the process and its pty.")
8533 (license license:isc)))
8534
8535 (define-public python2-ptyprocess
8536 (package-with-python2 python-ptyprocess))
8537
8538 (define-public python-cram
8539 (package
8540 (name "python-cram")
8541 (version "0.7")
8542 (home-page "https://bitheap.org/cram/")
8543 (source (origin
8544 (method url-fetch)
8545 (uri (list (string-append home-page "cram-"
8546 version ".tar.gz")
8547 (pypi-uri "cram" version)))
8548 (sha256
8549 (base32
8550 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8551 (arguments
8552 '(#:phases
8553 (modify-phases %standard-phases
8554 (add-after 'unpack 'patch-source
8555 (lambda _
8556 (substitute* (find-files "cram" ".*\\.py$")
8557 ;; Replace default shell path.
8558 (("/bin/sh") (which "sh")))
8559 (substitute* (find-files "tests" ".*\\.t$")
8560 (("md5") "md5sum")
8561 (("/bin/bash") (which "bash"))
8562 (("/bin/sh") (which "sh")))
8563 (substitute* "cram/_test.py"
8564 ;; This hack works around a bug triggered by substituting
8565 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8566 ;; "cram -h", which breaks the output at 80 characters. This
8567 ;; causes the line showing the default shell to break into two
8568 ;; lines, but the test expects a single line...
8569 (("env\\['COLUMNS'\\] = '80'")
8570 "env['COLUMNS'] = '160'"))
8571
8572 (substitute* "Makefile"
8573 ;; Recent versions of python-coverage have caused the test
8574 ;; coverage to decrease (as of version 0.7). Allow that.
8575 (("--fail-under=100")
8576 "--fail-under=90"))
8577
8578 #t))
8579 (replace 'check
8580 ;; The test phase uses the built library and executable.
8581 (lambda* (#:key inputs outputs #:allow-other-keys)
8582 (add-installed-pythonpath inputs outputs)
8583 (setenv "PATH" (string-append (getenv "PATH") ":"
8584 (assoc-ref outputs "out") "/bin"))
8585 (invoke "make" "test"))))))
8586 (build-system python-build-system)
8587 (native-inputs
8588 `(("python-coverage" ,python-coverage)
8589 ("which" ,which)))
8590 (synopsis "Simple testing framework for command line applications")
8591 (description
8592 "Cram is a functional testing framework for command line applications.
8593 Cram tests look like snippets of interactive shell sessions. Cram runs each
8594 command and compares the command output in the test with the command’s actual
8595 output.")
8596 (license license:gpl2+)))
8597
8598 (define-public python2-cram
8599 (package-with-python2 python-cram))
8600
8601 (define-public python-crashtest
8602 (package
8603 (name "python-crashtest")
8604 (version "0.3.1")
8605 (source
8606 (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "crashtest" version))
8609 (sha256
8610 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8611 (build-system python-build-system)
8612 (home-page "https://github.com/sdispater/crashtest")
8613 (synopsis "Manage Python errors with ease")
8614 (description
8615 "Python library that makes exceptions handling and inspection easier.")
8616 (license license:expat)))
8617
8618 (define-public python-straight-plugin
8619 (package
8620 (name "python-straight-plugin")
8621 (version "1.4.1")
8622 (source
8623 (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "straight.plugin" version))
8626 (sha256
8627 (base32
8628 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8629 (build-system python-build-system)
8630 (home-page "https://github.com/ironfroggy/straight.plugin")
8631 (synopsis "Simple namespaced plugin facility")
8632 (description "Straight Plugin provides a type of plugin you can create from
8633 almost any existing Python modules, and an easy way for outside developers to
8634 add functionality and customization to your projects with their own plugins.")
8635 (license license:expat)))
8636
8637 (define-public python2-straight-plugin
8638 (package-with-python2 python-straight-plugin))
8639
8640 (define-public python-fonttools
8641 (package
8642 (name "python-fonttools")
8643 (version "4.6.0")
8644 (source (origin
8645 (method url-fetch)
8646 (uri (pypi-uri "fonttools" version ".zip"))
8647 (sha256
8648 (base32
8649 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8650 (build-system python-build-system)
8651 (native-inputs
8652 `(("unzip" ,unzip)
8653 ("python-pytest" ,python-pytest)
8654 ("python-pytest-runner" ,python-pytest-runner)))
8655 (home-page "https://github.com/fonttools/fonttools")
8656 (synopsis "Tools to manipulate font files")
8657 (description
8658 "FontTools/TTX is a library to manipulate font files from Python. It
8659 supports reading and writing of TrueType/OpenType fonts, reading and writing
8660 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8661 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8662 from an XML-based format.")
8663 (license license:expat)))
8664
8665 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8666 (define-public python2-fonttools
8667 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8668 (package/inherit
8669 base
8670 (version "3.44.0")
8671 (source (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "fonttools" version ".zip"))
8674 (sha256
8675 (base32
8676 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8677
8678 (define-public python-ly
8679 (package
8680 (name "python-ly")
8681 (version "0.9.5")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (pypi-uri name version))
8686 (sha256
8687 (base32
8688 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8689 (build-system python-build-system)
8690 (arguments
8691 ;; FIXME: Some tests need network access.
8692 '(#:tests? #f))
8693 (synopsis "Tool and library for manipulating LilyPond files")
8694 (description "This package provides a Python library to parse, manipulate
8695 or create documents in LilyPond format. A command line program ly is also
8696 provided that can be used to do various manipulations with LilyPond files.")
8697 (home-page "https://pypi.org/project/python-ly/")
8698 (license license:gpl2+)))
8699
8700 (define-public python-appdirs
8701 (package
8702 (name "python-appdirs")
8703 (version "1.4.3")
8704 (source
8705 (origin
8706 (method url-fetch)
8707 (uri (pypi-uri "appdirs" version))
8708 (sha256
8709 (base32
8710 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8711 (build-system python-build-system)
8712 (home-page "https://github.com/ActiveState/appdirs")
8713 (synopsis
8714 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8715 (description
8716 "This module provides a portable way of finding out where user data
8717 should be stored on various operating systems.")
8718 (license license:expat)))
8719
8720 (define-public python2-appdirs
8721 (package-with-python2 python-appdirs))
8722
8723 (define-public python-gorilla
8724 (package
8725 (name "python-gorilla")
8726 (version "0.3.0")
8727 (source (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "gorilla" version))
8730 (sha256
8731 (base32
8732 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8733 (build-system python-build-system)
8734 (home-page "https://github.com/christophercrouzet/gorilla")
8735 (synopsis "Convenient monkey patching with Python")
8736 (description
8737 "Gorilla is a Python library that provides a convenient approach to
8738 monkey patching. Monkey patching is the process of modifying module and
8739 class attributes at runtime with the purpose of replacing or extending
8740 third-party code.")
8741 (license license:expat)))
8742
8743 (define-public python-llfuse
8744 (package
8745 (name "python-llfuse")
8746 (version "1.3.6")
8747 (source (origin
8748 (method url-fetch)
8749 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8750 (sha256
8751 (base32
8752 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8753 (build-system python-build-system)
8754 (inputs
8755 `(("fuse" ,fuse)
8756 ("attr" ,attr)))
8757 (native-inputs
8758 `(("pkg-config" ,pkg-config)))
8759 (synopsis "Python bindings for FUSE")
8760 (description
8761 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8762 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8763 (license license:lgpl2.0+)
8764 (properties `((python2-variant . ,(delay python2-llfuse))))))
8765
8766 (define-public python2-llfuse
8767 (package (inherit (package-with-python2
8768 (strip-python2-variant python-llfuse)))
8769 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8770
8771 ;; For attic-0.16
8772 (define-public python-llfuse-0.41
8773 (package (inherit python-llfuse)
8774 (version "0.41.1")
8775 (source (origin
8776 (method url-fetch)
8777 (uri (string-append
8778 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8779 "llfuse-" version ".tar.bz2"))
8780 (sha256
8781 (base32
8782 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8783 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8784 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8785 (license (list license:expat license:lgpl2.0+))))
8786
8787 (define-public python-msgpack
8788 (package
8789 (name "python-msgpack")
8790 (version "1.0.0")
8791 (source (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "msgpack" version))
8794 (sha256
8795 (base32
8796 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8797 (build-system python-build-system)
8798 (arguments
8799 `(#:modules ((guix build utils)
8800 (guix build python-build-system)
8801 (ice-9 ftw)
8802 (srfi srfi-1)
8803 (srfi srfi-26))
8804 #:phases
8805 (modify-phases %standard-phases
8806 (replace 'check
8807 (lambda _
8808 (let ((cwd (getcwd)))
8809 (setenv "PYTHONPATH"
8810 (string-append cwd "/build/"
8811 (find (cut string-prefix? "lib" <>)
8812 (scandir (string-append cwd "/build")))
8813 ":"
8814 (getenv "PYTHONPATH")))
8815 (invoke "pytest" "-v" "test")))))))
8816 (native-inputs
8817 `(("python-pytest" ,python-pytest)))
8818 (synopsis "MessagePack (de)serializer")
8819 (description "MessagePack is a fast, compact binary serialization format,
8820 suitable for similar data to JSON. This package provides CPython bindings for
8821 reading and writing MessagePack data.")
8822 (home-page "https://pypi.org/project/msgpack/")
8823 (license license:asl2.0)))
8824
8825 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8826 ;; release 0.5. Some packages like borg still call it by the old name for now.
8827 ;; <https://bugs.gnu.org/30662>
8828 (define-public python-msgpack-transitional
8829 (package
8830 (inherit python-msgpack)
8831 (name "python-msgpack-transitional")
8832 (version "0.5.6")
8833 (source (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "msgpack" version))
8836 (sha256
8837 (base32
8838 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8839 (arguments
8840 (substitute-keyword-arguments (package-arguments python-msgpack)
8841 ((#:phases phases)
8842 `(modify-phases ,phases
8843 (add-after 'unpack 'configure-transitional
8844 (lambda _
8845 ;; Keep using the old name.
8846 (substitute* "setup.py"
8847 (("TRANSITIONAL = False")
8848 "TRANSITIONAL = 1"))
8849 #t))))))))
8850
8851 (define-public python2-msgpack
8852 (package-with-python2 python-msgpack))
8853
8854 (define-public python-netaddr
8855 (package
8856 (name "python-netaddr")
8857 (version "0.7.19")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (pypi-uri "netaddr" version))
8862 (sha256
8863 (base32
8864 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8865 (build-system python-build-system)
8866 (arguments `(#:tests? #f)) ;; No tests.
8867 (home-page "https://github.com/drkjam/netaddr/")
8868 (synopsis "Pythonic manipulation of network addresses")
8869 (description
8870 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8871 and MAC network addresses.")
8872 (license license:bsd-3)))
8873
8874 (define-public python2-netaddr
8875 (package-with-python2 python-netaddr))
8876
8877 (define-public python2-pyroute2
8878 (package
8879 (name "python2-pyroute2")
8880 (version "0.5.6")
8881 (source
8882 (origin
8883 (method url-fetch)
8884 (uri (pypi-uri "pyroute2" version))
8885 (sha256
8886 (base32
8887 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8888 (build-system python-build-system)
8889 (arguments
8890 `(#:python ,python-2)) ;Python 3.x is not supported
8891 (home-page "https://github.com/svinota/pyroute2")
8892 (synopsis "Python netlink library")
8893 (description
8894 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8895 Supported netlink families and protocols include:
8896 @itemize
8897 @item rtnl, network settings - addresses, routes, traffic controls
8898 @item nfnetlink - netfilter API: ipset, nftables, ...
8899 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8900 @item devlink - manage and monitor devlink-enabled hardware
8901 @item generic - generic netlink families
8902 @itemize
8903 @item nl80211 - wireless functions API (basic support)
8904 @item taskstats - extended process statistics
8905 @item acpi_events - ACPI events monitoring
8906 @item thermal_events - thermal events monitoring
8907 @item VFS_DQUOT - disk quota events monitoring
8908 @end itemize
8909 @end itemize")
8910 (license license:gpl2+)))
8911
8912 (define-public python-wrapt
8913 (package
8914 (name "python-wrapt")
8915 (version "1.11.2")
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "wrapt" version))
8920 (sha256
8921 (base32
8922 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8923 (build-system python-build-system)
8924 (arguments
8925 ;; Tests are not included in the tarball, they are only available in the
8926 ;; git repository.
8927 `(#:tests? #f))
8928 (home-page "https://github.com/GrahamDumpleton/wrapt")
8929 (synopsis "Module for decorators, wrappers and monkey patching")
8930 (description
8931 "The aim of the wrapt module is to provide a transparent object proxy for
8932 Python, which can be used as the basis for the construction of function
8933 wrappers and decorator functions.")
8934 (license license:bsd-2)))
8935
8936 (define-public python2-wrapt
8937 (package-with-python2 python-wrapt))
8938
8939 (define-public python-commonmark
8940 (package
8941 (name "python-commonmark")
8942 (version "0.9.1")
8943 (source
8944 (origin
8945 (method url-fetch)
8946 (uri (pypi-uri "commonmark" version))
8947 (sha256
8948 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
8949 (build-system python-build-system)
8950 (arguments
8951 `(#:phases
8952 (modify-phases %standard-phases
8953 (replace 'check
8954 (lambda* (#:key inputs outputs #:allow-other-keys)
8955 (add-installed-pythonpath inputs outputs)
8956 (invoke "python" "setup.py" "test"))))))
8957 (home-page "https://github.com/readthedocs/commonmark.py")
8958 (synopsis "Python parser for the CommonMark Markdown spec")
8959 (description
8960 "This module is a pure Python port of jgm's @code{commonmark.js}, a
8961 Markdown parser and renderer for the CommonMark specification, using only
8962 native modules.")
8963 (license license:bsd-3)))
8964
8965 (define-public python-xlrd
8966 (package
8967 (name "python-xlrd")
8968 (version "1.2.0")
8969 (source (origin
8970 (method url-fetch)
8971 (uri (pypi-uri "xlrd" version))
8972 (sha256
8973 (base32
8974 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8975 (build-system python-build-system)
8976 (arguments
8977 `(#:phases
8978 (modify-phases %standard-phases
8979 ;; Some tests depend on writing a temporary file to the user's home
8980 ;; directory.
8981 (add-after 'unpack 'fix-tests
8982 (lambda _
8983 (delete-file "tests/test_open_workbook.py")
8984 #t)))))
8985 (home-page "http://www.python-excel.org/")
8986 (synopsis "Library for extracting data from Excel files")
8987 (description "This package provides a library to extract data from
8988 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8989 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8990 Unicode-aware. It is not intended as an end-user tool.")
8991 (license license:bsd-3)))
8992
8993 (define-public python2-xlrd
8994 (package-with-python2 python-xlrd))
8995
8996 (define-public python-immutables
8997 (package
8998 (name "python-immutables")
8999 (version "0.14")
9000 (source
9001 (origin
9002 (method url-fetch)
9003 (uri (pypi-uri "immutables" version))
9004 (sha256
9005 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9006 (build-system python-build-system)
9007 (home-page "https://github.com/MagicStack/immutables")
9008 (synopsis "High-performance immutable mapping type for Python")
9009 (description
9010 "An immutable mapping type for Python. The underlying datastructure is a
9011 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9012 functional languages.")
9013 (license license:asl2.0)))
9014
9015 (define-public python-prettytable
9016 (package
9017 (name "python-prettytable")
9018 (version "0.7.2")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9023 (sha256
9024 (base32
9025 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9026 (build-system python-build-system)
9027 (home-page "https://code.google.com/archive/p/prettytable/")
9028 (synopsis "Display tabular data in an ASCII table format")
9029 (description
9030 "A library designed to represent tabular data in visually appealing ASCII
9031 tables. PrettyTable allows for selection of which columns are to be printed,
9032 independent alignment of columns (left or right justified or centred) and
9033 printing of sub-tables by specifying a row range.")
9034 (license license:bsd-3)))
9035
9036 (define-public python2-prettytable
9037 (package-with-python2 python-prettytable))
9038
9039 (define-public python-curio
9040 (package
9041 (name "python-curio")
9042 (version "1.2")
9043 (source
9044 (origin
9045 (method url-fetch)
9046 (uri (pypi-uri "curio" version))
9047 (sha256
9048 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9049 (build-system python-build-system)
9050 (arguments
9051 `(#:phases
9052 (modify-phases %standard-phases
9053 (replace 'check
9054 (lambda* (#:key inputs outputs #:allow-other-keys)
9055 (add-installed-pythonpath inputs outputs)
9056 (invoke "pytest" "-vv" "-k"
9057 ;; Tries to open an outgoing connection.
9058 "not test_ssl_outgoing"))))))
9059 (native-inputs
9060 `(("python-pytest" ,python-pytest)))
9061 (home-page "https://github.com/dabeaz/curio")
9062 (synopsis "Coroutine-based library for concurrent Python")
9063 (description
9064 "Curio is a coroutine-based library for concurrent Python systems
9065 programming. It provides standard programming abstractions such as as
9066 tasks, sockets, files, locks, and queues.")
9067 (license license:bsd-3)))
9068
9069 (define-public python-tables
9070 (package
9071 (name "python-tables")
9072 (version "3.6.1")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "tables" version))
9077 (sha256
9078 (base32
9079 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9080 (modules '((guix build utils)))
9081 (snippet
9082 '(begin
9083 ;; Remove pre-compiled .pyc files from source.
9084 (for-each delete-file-recursively
9085 (find-files "." "__pycache__" #:directories? #t))
9086 (for-each delete-file (find-files "." "\\.pyc$"))
9087 #t))))
9088 (build-system python-build-system)
9089 (arguments
9090 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9091 ;; or "check", so we must override the build and check phases.
9092 #:phases
9093 (modify-phases %standard-phases
9094 (add-after 'unpack 'use-gcc
9095 (lambda _
9096 (substitute* "setup.py"
9097 (("^( +)compiler = new_compiler\\(\\)" line indent)
9098 (string-append line
9099 "\n"
9100 indent
9101 "compiler.set_executables(compiler='gcc',"
9102 "compiler_so='gcc',"
9103 "linker_exe='gcc',"
9104 "linker_so='gcc -shared')")))
9105 #t))
9106 (add-after 'unpack 'disable-tuning
9107 (lambda _
9108 (substitute* "setup.py"
9109 (("cpu_flags = .*")
9110 "cpu_flags = ['sse2']\n"))
9111 #t))
9112 (replace 'build
9113 (lambda* (#:key inputs #:allow-other-keys)
9114 (invoke "python" "setup.py" "build"
9115 (string-append "--hdf5="
9116 (assoc-ref inputs "hdf5")))))
9117 (replace 'check
9118 (lambda* (#:key inputs #:allow-other-keys)
9119 (invoke "python" "setup.py" "check"
9120 (string-append "--hdf5="
9121 (assoc-ref inputs "hdf5"))))))))
9122 (propagated-inputs
9123 `(("python-numexpr" ,python-numexpr)
9124 ("python-numpy" ,python-numpy)))
9125 (native-inputs
9126 `(("python-cython" ,python-cython)
9127 ("pkg-config" ,pkg-config)))
9128 (inputs
9129 `(("hdf5" ,hdf5-1.10)
9130 ("bzip2" ,bzip2)
9131 ("zlib" ,zlib)))
9132 (home-page "https://www.pytables.org/")
9133 (synopsis "Hierarchical datasets for Python")
9134 (description "PyTables is a package for managing hierarchical datasets and
9135 designed to efficiently cope with extremely large amounts of data.")
9136 (license license:bsd-3)))
9137
9138 (define-public python2-tables
9139 (package-with-python2 python-tables))
9140
9141 (define-public python-sniffio
9142 (package
9143 (name "python-sniffio")
9144 (version "1.1.0")
9145 (source
9146 (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "sniffio" version))
9149 (sha256
9150 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9151 (build-system python-build-system)
9152 (arguments
9153 `(#:phases
9154 (modify-phases %standard-phases
9155 (replace 'check
9156 (lambda _
9157 (invoke "pytest" "-vv"))))))
9158 (native-inputs
9159 `(("python-curio" ,python-curio)
9160 ("python-pytest" ,python-pytest)
9161 ("python-pytest-cov" ,python-pytest-cov)))
9162 (home-page "https://github.com/python-trio/sniffio")
9163 (synopsis "Detect which async library a program is running under")
9164 (description "This package detects which async library a program is
9165 running under. It supports multiple async I/O packages, like Trio, and
9166 asyncio.")
9167 ;; Either license applies.
9168 (license (list license:expat license:asl2.0))))
9169
9170 (define-public python-pytest-black
9171 (package
9172 (name "python-pytest-black")
9173 (version "0.3.8")
9174 (source
9175 (origin
9176 (method url-fetch)
9177 (uri (pypi-uri "pytest-black" version))
9178 (sha256
9179 (base32
9180 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9181 (build-system python-build-system)
9182 (propagated-inputs
9183 `(("python-pytest" ,python-pytest)
9184 ("python-black" ,python-black)
9185 ("python-toml" ,python-toml)))
9186 (native-inputs
9187 `(("python-setuptools-scm" ,python-setuptools-scm)))
9188 (home-page "https://github.com/shopkeep/pytest-black")
9189 (synopsis "Pytest plugin to enable format checking with black")
9190 (description
9191 "This package provides a pytest plugin to enable format checking with the
9192 Python code formatter \"black\".")
9193 (license license:expat)))
9194
9195 (define-public python-get-version
9196 (package
9197 (name "python-get-version")
9198 (version "2.1")
9199 (source
9200 (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "get_version" version))
9203 (sha256
9204 (base32
9205 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9206 (build-system python-build-system)
9207 (propagated-inputs
9208 `(("python-pygments" ,python-pygments)
9209 ("python-pytest" ,python-pytest)
9210 ("python-pytest-black" ,python-pytest-black)
9211 ("python-pytest-cov" ,python-pytest-cov)
9212 ("python-setuptools" ,python-setuptools)
9213 ("python-testpath" ,python-testpath)))
9214 (home-page "https://github.com/flying-sheep/get_version")
9215 (synopsis "Version helper in the spirit of versioneer")
9216 (description
9217 "This package provides a version helper that lets you automatically use
9218 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9219 also supports getting the version from Python source distributions or, once
9220 your package is installed, via @code{pkg_resources} (part of
9221 @code{setuptools}).")
9222 (license license:gpl3+)))
9223
9224 (define-public python-legacy-api-wrap
9225 (package
9226 (name "python-legacy-api-wrap")
9227 (version "1.2")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "legacy-api-wrap" version))
9232 (sha256
9233 (base32
9234 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9235 (build-system python-build-system)
9236 (propagated-inputs
9237 `(("python-get-version" ,python-get-version)
9238 ("python-pytest" ,python-pytest)
9239 ("python-pytest-black" ,python-pytest-black)
9240 ("python-pytest-cov" ,python-pytest-cov)
9241 ("python-setuptools" ,python-setuptools)))
9242 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9243 (synopsis "Legacy API wrapper")
9244 (description "This module defines a decorator to wrap legacy APIs. The
9245 primary use case is APIs defined before keyword-only parameters existed.")
9246 (license license:gpl3+)))
9247
9248 (define-public python-pyasn1
9249 (package
9250 (name "python-pyasn1")
9251 (version "0.4.8")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "pyasn1" version))
9256 (sha256
9257 (base32
9258 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9259 (build-system python-build-system)
9260 (home-page "http://pyasn1.sourceforge.net/")
9261 (synopsis "ASN.1 types and codecs")
9262 (description
9263 "This is an implementation of ASN.1 types and codecs in Python. It is
9264 suitable for a wide range of protocols based on the ASN.1 specification.")
9265 (license license:bsd-2)))
9266
9267 (define-public python2-pyasn1
9268 (package-with-python2 python-pyasn1))
9269
9270 (define-public python-pyasn1-modules
9271 (package
9272 (name "python-pyasn1-modules")
9273 (version "0.2.2")
9274 (source
9275 (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "pyasn1-modules" version))
9278 (sha256
9279 (base32
9280 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9281 (build-system python-build-system)
9282 (propagated-inputs
9283 `(("python-pyasn1" ,python-pyasn1)))
9284 (home-page "https://sourceforge.net/projects/pyasn1/")
9285 (synopsis "ASN.1 codec implementations")
9286 (description
9287 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9288 implementations of ASN.1-based codecs and protocols.")
9289 (license license:bsd-3)))
9290
9291 (define-public python2-pyasn1-modules
9292 (package-with-python2 python-pyasn1-modules))
9293
9294 (define-public python-ipaddress
9295 (package
9296 (name "python-ipaddress")
9297 (version "1.0.22")
9298 (source (origin
9299 (method url-fetch)
9300 (uri (pypi-uri "ipaddress" version))
9301 (sha256
9302 (base32
9303 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9304 (build-system python-build-system)
9305 (home-page "https://github.com/phihag/ipaddress")
9306 (synopsis "IP address manipulation library")
9307 (description
9308 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9309 in Python. This library is used to create, poke at, and manipulate IPv4 and
9310 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9311 module to older versions of Python.")
9312 (license license:psfl)))
9313
9314 (define-public python2-ipaddress
9315 (package-with-python2 python-ipaddress))
9316
9317 (define-public python2-ipaddr
9318 (package
9319 (name "python2-ipaddr")
9320 (version "2.1.11")
9321 (source
9322 (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "ipaddr" version))
9325 (sha256
9326 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9327 (build-system python-build-system)
9328 (arguments
9329 `(#:python ,python-2 ;version 2 only
9330 #:phases
9331 (modify-phases %standard-phases
9332 (replace 'check
9333 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9334 (home-page "https://github.com/google/ipaddr-py")
9335 (synopsis "IP address manipulation library")
9336 (description
9337 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9338 IPv6 addresses and networks.
9339
9340 For new implementations you may prefer to use the standard module
9341 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9342 versions of Python.")
9343 (license license:asl2.0)))
9344
9345 (define-public python-idna
9346 (package
9347 (name "python-idna")
9348 (version "2.10")
9349 (source
9350 (origin
9351 (method url-fetch)
9352 (uri (pypi-uri "idna" version))
9353 (sha256
9354 (base32
9355 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9356 (build-system python-build-system)
9357 (home-page "https://github.com/kjd/idna")
9358 (synopsis "Internationalized domain names in applications")
9359 (description
9360 "This is a library to support the Internationalised Domain Names in
9361 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9362 protocol is often referred to as “IDNA2008” and can produce different results
9363 from the earlier standard from 2003. The library is also intended to act as a
9364 suitable drop-in replacement for the “encodings.idna” module that comes with
9365 the Python standard library but currently only supports the older 2003
9366 specification.")
9367 (license license:bsd-4)))
9368
9369 (define-public python-idna-2.7
9370 (package (inherit python-idna)
9371 (version "2.7")
9372 (source (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "idna" version))
9375 (sha256
9376 (base32
9377 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9378
9379
9380 (define-public python2-idna
9381 (package-with-python2 python-idna))
9382
9383 (define-public python-libsass
9384 (package
9385 (name "python-libsass")
9386 (version "0.20.1")
9387 (source
9388 (origin
9389 ;; PyPI tarball is missing some test files.
9390 (method git-fetch)
9391 (uri (git-reference
9392 (url "https://github.com/sass/libsass-python")
9393 (commit version)))
9394 (file-name (git-file-name name version))
9395 (sha256
9396 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9397 (build-system python-build-system)
9398 (arguments
9399 `(#:phases
9400 (modify-phases %standard-phases
9401 ;; Use Guix package of libsass instead of compiling from a checkout.
9402 (add-before 'build 'set-libsass
9403 (lambda _
9404 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9405 #t))
9406 (replace 'check
9407 (lambda* (#:key inputs outputs #:allow-other-keys)
9408 (add-installed-pythonpath inputs outputs)
9409 (invoke "pytest" "sasstests.py"))))))
9410 (native-inputs
9411 `(("python-pytest" ,python-pytest)
9412 ("python-werkzeug" ,python-werkzeug)))
9413 (inputs
9414 `(("libsass" ,libsass)))
9415 (propagated-inputs
9416 `(("python-six" ,python-six)))
9417 (home-page "https://sass.github.io/libsass-python/")
9418 (synopsis "Straightforward binding of libsass for Python")
9419 (description
9420 "This package provides a simple Python extension module @code{sass} which
9421 is binding LibSass.")
9422 (license license:expat)))
9423
9424 (define-public python-idna-ssl
9425 (package
9426 (name "python-idna-ssl")
9427 (version "1.0.1")
9428 (source
9429 (origin
9430 (method url-fetch)
9431 (uri (pypi-uri "idna-ssl" version))
9432 (sha256
9433 (base32
9434 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9435 (build-system python-build-system)
9436 (arguments
9437 `(#:tests? #f)) ;circular dependency with python-aiohttp
9438 (home-page "https://github.com/aio-libs/idna-ssl")
9439 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9440 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9441 domains support.")
9442 (license license:expat)))
9443
9444 (define-public python-pretend
9445 (package
9446 (name "python-pretend")
9447 (version "1.0.9")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "pretend" version))
9452 (sha256
9453 (base32
9454 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9455 (build-system python-build-system)
9456 (home-page "https://github.com/alex/pretend")
9457 (synopsis "Library for stubbing in Python")
9458 (description
9459 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9460 technique for writing tests. You may hear the term mixed up with mocks,
9461 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9462 responses, rather than doing any computation.")
9463 (license license:bsd-3)))
9464
9465 (define-public python2-pretend
9466 (package-with-python2 python-pretend))
9467
9468 (define-public python-pip
9469 (package
9470 (name "python-pip")
9471 (version "20.0.2")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "pip" version))
9476 (sha256
9477 (base32
9478 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9479 (build-system python-build-system)
9480 (arguments
9481 '(#:tests? #f)) ; there are no tests in the pypi archive.
9482 (home-page "https://pip.pypa.io/")
9483 (synopsis "Package manager for Python software")
9484 (description
9485 "Pip is a package manager for Python software, that finds packages on the
9486 Python Package Index (PyPI).")
9487 (license license:expat)))
9488
9489 (define-public python2-pip
9490 (package-with-python2 python-pip))
9491
9492 (define-public python-tlsh
9493 (package
9494 (name "python-tlsh")
9495 (version "3.4.5")
9496 (home-page "https://github.com/trendmicro/tlsh")
9497 (source
9498 (origin
9499 (method git-fetch)
9500 (uri (git-reference
9501 (url "https://github.com/trendmicro/tlsh")
9502 (commit (string-append "v" version))))
9503 (file-name (git-file-name name version))
9504 (sha256
9505 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9506 (build-system cmake-build-system)
9507 (arguments
9508 '(#:out-of-source? #f
9509 #:phases (modify-phases %standard-phases
9510 (replace
9511 'install
9512 (lambda* (#:key outputs #:allow-other-keys)
9513 ;; Build and install the Python bindings. The underlying
9514 ;; C++ library is apparently not meant to be installed.
9515 (let ((out (assoc-ref outputs "out")))
9516 (with-directory-excursion "py_ext"
9517 (and (system* "python" "setup.py" "build")
9518 (system* "python" "setup.py" "install"
9519 (string-append "--prefix=" out))))))))))
9520 (inputs `(("python" ,python-wrapper))) ;for the bindings
9521 (synopsis "Fuzzy matching library for Python")
9522 (description
9523 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9524 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9525 value which can be used for similarity comparisons. Similar objects have
9526 similar hash values, which allows for the detection of similar objects by
9527 comparing their hash values. The byte stream should have a sufficient amount
9528 of complexity; for example, a byte stream of identical bytes will not generate
9529 a hash value.")
9530 (license license:asl2.0)))
9531
9532 (define-public python2-tlsh
9533 (package
9534 (inherit python-tlsh)
9535 (name "python2-tlsh")
9536 (inputs `(("python" ,python-2)))))
9537
9538 (define-public python-termcolor
9539 (package
9540 (name "python-termcolor")
9541 (version "1.1.0")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "termcolor" version))
9546 (sha256
9547 (base32
9548 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9549 (build-system python-build-system)
9550 (arguments
9551 ;; There are no tests.
9552 `(#:tests? #f))
9553 (home-page "https://pypi.org/project/termcolor/")
9554 (synopsis "ANSII Color formatting for terminal output")
9555 (description
9556 "This package provides ANSII Color formatting for output in terminals.")
9557 (license license:expat)))
9558
9559 (define-public python2-termcolor
9560 (package-with-python2 python-termcolor))
9561
9562 (define-public python-terminaltables
9563 (package
9564 (name "python-terminaltables")
9565 (version "3.1.0")
9566 (source
9567 (origin
9568 (method url-fetch)
9569 (uri (pypi-uri "terminaltables" version))
9570 (sha256
9571 (base32
9572 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9573 (build-system python-build-system)
9574 (home-page "https://github.com/Robpol86/terminaltables")
9575 (synopsis
9576 "Generate simple tables in terminals from a nested list of strings")
9577 (description
9578 "This package makes it easy to draw tables in terminal/console
9579 applications from a list of lists of strings. It supports multi-line rows.")
9580 (license license:expat)))
9581
9582 (define-public python-libarchive-c
9583 (package
9584 (name "python-libarchive-c")
9585 (version "2.9")
9586 (source (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "libarchive-c" version))
9589 (sha256
9590 (base32
9591 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9592 (build-system python-build-system)
9593 (arguments
9594 '(#:phases (modify-phases %standard-phases
9595 (add-before
9596 'build 'reference-libarchive
9597 (lambda* (#:key inputs #:allow-other-keys)
9598 ;; Retain the absolute file name of libarchive.so.
9599 (let ((libarchive (assoc-ref inputs "libarchive")))
9600 (substitute* "libarchive/ffi.py"
9601 (("find_library\\('archive'\\)")
9602 (string-append "'" libarchive
9603 "/lib/libarchive.so'"))))))
9604 (replace 'check
9605 (lambda _ (invoke "pytest" "-vv"))))))
9606 (native-inputs
9607 `(("python-mock" ,python-mock)
9608 ("python-pytest" ,python-pytest)))
9609 (inputs
9610 `(("libarchive" ,libarchive)))
9611 (home-page "https://github.com/Changaco/python-libarchive-c")
9612 (synopsis "Python interface to libarchive")
9613 (description
9614 "This package provides Python bindings to libarchive, a C library to
9615 access possibly compressed archives in many different formats. It uses
9616 Python's @code{ctypes} foreign function interface (FFI).")
9617 (license license:lgpl2.0+)))
9618
9619 (define-public python2-libarchive-c
9620 (package-with-python2 python-libarchive-c))
9621
9622 (define-public python-file
9623 (package
9624 (inherit file)
9625 (name "python-file")
9626 (build-system python-build-system)
9627 (arguments
9628 '(#:tests? #f ;no tests
9629 #:configure-flags '("--single-version-externally-managed" "--root=/")
9630 #:phases (modify-phases %standard-phases
9631 (add-before 'build 'change-directory
9632 (lambda _
9633 (chdir "python")
9634 #t))
9635 (add-before 'build 'set-library-file-name
9636 (lambda* (#:key inputs #:allow-other-keys)
9637 (let ((file (assoc-ref inputs "file")))
9638 (substitute* "magic.py"
9639 (("find_library\\('magic'\\)")
9640 (string-append "'" file "/lib/libmagic.so'")))
9641 #t))))))
9642 (inputs `(("file" ,file)))
9643 (native-inputs (if (%current-target-system)
9644 `(("self" ,this-package))
9645 '()))
9646 (synopsis "Python bindings to the libmagic file type guesser")
9647 (description "This package provides Python bindings to the libmagic file
9648 type guesser.
9649
9650 Note that this module and the @code{python-magic} module both provide a
9651 @file{magic.py} file; these two modules, which are different and were
9652 developed separately, both serve the same purpose: provide Python bindings for
9653 libmagic.")))
9654
9655 (define-public python2-file
9656 (package-with-python2 python-file))
9657
9658 (define-public python-debian
9659 (package
9660 (name "python-debian")
9661 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9662 (version "0.1.36")
9663 (source
9664 (origin
9665 ;; Use git-fetch, as pypi doesn't include test suite.
9666 (method git-fetch)
9667 (uri (git-reference
9668 (url home-page)
9669 (commit version)))
9670 (file-name (git-file-name name version))
9671 (sha256
9672 (base32
9673 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9674 (build-system python-build-system)
9675 (arguments
9676 `(#:phases (modify-phases %standard-phases
9677 (add-after 'unpack 'remove-debian-specific-tests
9678 ;; python-apt, apt and dpkg are not yet available in guix,
9679 ;; and these tests heavily depend on them.
9680 (lambda _
9681 (delete-file "lib/debian/tests/test_deb822.py")
9682 (delete-file "lib/debian/tests/test_debfile.py")
9683 #t)))))
9684 (propagated-inputs
9685 `(("python-six" ,python-six)
9686 ("python-chardet" ,python-chardet)))
9687 (synopsis "Debian package related modules")
9688 (description
9689 ;; XXX: Use @enumerate instead of @itemize to work around
9690 ;; <http://bugs.gnu.org/21772>.
9691 "This package provides Python modules that abstract many formats of
9692 Debian-related files, such as:
9693
9694 @enumerate
9695 @item Debtags information;
9696 @item @file{debian/changelog} files;
9697 @item packages files, pdiffs;
9698 @item control files of single or multiple RFC822-style paragraphs---e.g.
9699 @file{debian/control}, @file{.changes}, @file{.dsc};
9700 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9701 contained files and meta-information.
9702 @end enumerate\n")
9703
9704 ;; Modules are either GPLv2+ or GPLv3+.
9705 (license license:gpl3+)))
9706
9707 (define-public python-nbformat
9708 (package
9709 (name "python-nbformat")
9710 (version "4.4.0")
9711 (source
9712 (origin
9713 (method url-fetch)
9714 (uri (pypi-uri "nbformat" version))
9715 (sha256
9716 (base32
9717 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9718 (build-system python-build-system)
9719 (arguments `(#:tests? #f)) ; no test target
9720 (propagated-inputs
9721 `(("python-ipython-genutils" ,python-ipython-genutils)
9722 ("python-jsonschema" ,python-jsonschema)
9723 ("python-jupyter-core" ,python-jupyter-core)
9724 ("python-traitlets" ,python-traitlets)))
9725 (home-page "http://jupyter.org")
9726 (synopsis "Jupyter Notebook format")
9727 (description "This package provides the reference implementation of the
9728 Jupyter Notebook format and Python APIs for working with notebooks.")
9729 (license license:bsd-3)))
9730
9731 (define-public python2-nbformat
9732 (package-with-python2 python-nbformat))
9733
9734 (define-public python-bleach
9735 (package
9736 (name "python-bleach")
9737 (version "3.1.5")
9738 (source
9739 (origin
9740 (method url-fetch)
9741 (uri (pypi-uri "bleach" version))
9742 (sha256
9743 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9744 (build-system python-build-system)
9745 (propagated-inputs
9746 `(("python-webencodings" ,python-webencodings)
9747 ("python-six" ,python-six)))
9748 (native-inputs
9749 `(("python-datrie" ,python-datrie)
9750 ("python-genshi" ,python-genshi)
9751 ("python-lxml" ,python-lxml)
9752 ("python-pytest" ,python-pytest)))
9753 (home-page "https://github.com/mozilla/bleach")
9754 (synopsis "Whitelist-based HTML-sanitizing tool")
9755 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9756 (license license:asl2.0)))
9757
9758 (define-public python2-bleach
9759 (package-with-python2 python-bleach))
9760
9761 (define-public python-entrypoints
9762 (package
9763 (name "python-entrypoints")
9764 (version "0.3")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "entrypoints" version))
9769 (sha256
9770 (base32
9771 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9772 (build-system python-build-system)
9773 ;; The package does not come with a setup.py file, so we have to generate
9774 ;; one ourselves.
9775 (arguments
9776 `(#:tests? #f
9777 #:phases
9778 (modify-phases %standard-phases
9779 (add-after 'unpack 'create-setup.py
9780 (lambda _
9781 (call-with-output-file "setup.py"
9782 (lambda (port)
9783 (format port "\
9784 from setuptools import setup
9785 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9786 " ,version))))))))
9787 (home-page "https://github.com/takluyver/entrypoints")
9788 (synopsis "Discover and load entry points from installed Python packages")
9789 (description "Entry points are a way for Python packages to advertise
9790 objects with some common interface. The most common examples are
9791 @code{console_scripts} entry points, which define shell commands by
9792 identifying a Python function to run. The @code{entrypoints} module contains
9793 functions to find and load entry points.")
9794 (license license:expat)))
9795
9796 (define-public python2-entrypoints
9797 (package-with-python2 python-entrypoints))
9798
9799 (define-public python-epc
9800 (package
9801 (name "python-epc")
9802 (version "0.0.5")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "epc" version))
9807 (sha256
9808 (base32
9809 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9810 (build-system python-build-system)
9811 (propagated-inputs
9812 `(("python-sexpdata" ,python-sexpdata)))
9813 (native-inputs
9814 `(("python-nose" ,python-nose)))
9815 (home-page "https://github.com/tkf/python-epc")
9816 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9817 (description
9818 "Python-EPC can call elisp functions from Python and Python functions
9819 from elisp.")
9820 (license license:gpl3)))
9821
9822 (define-public python-forex-python
9823 (package
9824 (name "python-forex-python")
9825 (version "1.5")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (pypi-uri "forex-python" version))
9830 (sha256
9831 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9832 (build-system python-build-system)
9833 (arguments
9834 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9835 ;; repository require online data.
9836 `(#:tests? #f))
9837 (propagated-inputs
9838 `(("python-requests" ,python-requests)
9839 ("python-simplejson" ,python-simplejson)))
9840 (home-page "https://github.com/MicroPyramid/forex-python")
9841 (synopsis "Foreign exchange rates and currency conversion")
9842 (description
9843 "@code{python-forex-python} can be used to manipulate foreign
9844 exchange rates and to operate currency conversions.
9845
9846 Features:
9847 @itemize
9848 @item List all currency rates.
9849 @item BitCoin price for all currencies.
9850 @item Converting amount to BitCoins.
9851 @item Get historical rates for any day since 1999.
9852 @item Conversion rate for one currency(ex; USD to INR).
9853 @item Convert amount from one currency to other.('USD 10$' to INR).
9854 @item Currency symbols.
9855 @item Currency names.
9856 @end itemize")
9857 (license license:expat)))
9858
9859 (define-public python-simpleeval
9860 (package
9861 (name "python-simpleeval")
9862 (version "0.9.10")
9863 (source
9864 (origin
9865 (method url-fetch)
9866 (uri (pypi-uri "simpleeval" version))
9867 (sha256
9868 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9869 (build-system python-build-system)
9870 (home-page "https://github.com/danthedeckie/simpleeval")
9871 (synopsis "Simple, safe single expression evaluator library")
9872 (description
9873 "This package provides a quick single file library for easily adding
9874 evaluatable expressions into python projects. Say you want to allow a user
9875 to set an alarm volume, which could depend on the time of day, alarm level,
9876 how many previous alarms had gone off, and if there is music playing at the
9877 time.")
9878 (license license:expat)))
9879
9880 (define-public python-nbconvert
9881 (package
9882 (name "python-nbconvert")
9883 (version "5.0.0b1")
9884 (source
9885 (origin
9886 (method url-fetch)
9887 (uri (pypi-uri "nbconvert" version))
9888 (sha256
9889 (base32
9890 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9891 (build-system python-build-system)
9892 (arguments
9893 `(;; The "bdist_egg" target is disabled by default, causing the installation
9894 ;; to fail.
9895 #:configure-flags (list "bdist_egg")
9896 ;; FIXME: 5 failures, 40 errors.
9897 #:tests? #f))
9898 ;; #:phases
9899 ;; (modify-phases %standard-phases
9900 ;; (replace 'check
9901 ;; (lambda _
9902 ;; (zero? (system* "py.test" "-v")))))
9903 (native-inputs
9904 `(("python-pytest" ,python-pytest)))
9905 (propagated-inputs
9906 `(("python-bleach" ,python-bleach)
9907 ("python-entrypoints" ,python-entrypoints)
9908 ("python-jinja2" ,python-jinja2)
9909 ("python-jupyter-core" ,python-jupyter-core)
9910 ("python-mistune" ,python-mistune)
9911 ("python-nbformat" ,python-nbformat)
9912 ("python-pygments" ,python-pygments)
9913 ("python-traitlets" ,python-traitlets)))
9914 (home-page "http://jupyter.org")
9915 (synopsis "Converting Jupyter Notebooks")
9916 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9917 notebooks to various other formats via Jinja templates. It allows you to
9918 convert an @code{.ipynb} notebook file into various static formats including:
9919
9920 @enumerate
9921 @item HTML
9922 @item LaTeX
9923 @item PDF
9924 @item Reveal JS
9925 @item Markdown (md)
9926 @item ReStructured Text (rst)
9927 @item executable script
9928 @end enumerate\n")
9929 (license license:bsd-3)))
9930
9931 (define-public python2-nbconvert
9932 (package-with-python2 python-nbconvert))
9933
9934 (define-public python-notebook
9935 (package
9936 (name "python-notebook")
9937 (version "5.7.4")
9938 (source (origin
9939 (method url-fetch)
9940 (uri (pypi-uri "notebook" version))
9941 (sha256
9942 (base32
9943 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9944 (build-system python-build-system)
9945 (arguments
9946 `(#:phases
9947 (modify-phases %standard-phases
9948 (replace 'check
9949 (lambda _
9950 ;; These tests require a browser
9951 (delete-file-recursively "notebook/tests/selenium")
9952 ;; Some tests need HOME
9953 (setenv "HOME" "/tmp")
9954 ;; This file contains "warningfilters", which are not supported
9955 ;; by this version of nose.
9956 (delete-file "setup.cfg")
9957 (with-directory-excursion "/tmp"
9958 (invoke "nosetests" "-v"))
9959 #t)))))
9960 (propagated-inputs
9961 `(("python-jupyter-core" ,python-jupyter-core)
9962 ("python-nbformat" ,python-nbformat)
9963 ("python-nbconvert" ,python-nbconvert)
9964 ("python-prometheus-client" ,python-prometheus-client)
9965 ("python-send2trash" ,python-send2trash)
9966 ("python-terminado" ,python-terminado)))
9967 (native-inputs
9968 `(("python-nose" ,python-nose)
9969 ("python-sphinx" ,python-sphinx)
9970 ("python-requests" ,python-requests)))
9971 (home-page "http://jupyter.org/")
9972 (synopsis "Web-based notebook environment for interactive computing")
9973 (description
9974 "The Jupyter HTML notebook is a web-based notebook environment for
9975 interactive computing.")
9976 (properties `((python2-variant . ,(delay python2-notebook))))
9977 (license license:bsd-3)))
9978
9979 (define-public python2-notebook
9980 (let ((base (package-with-python2
9981 (strip-python2-variant python-notebook))))
9982 (package (inherit base)
9983 (native-inputs
9984 `(("python2-mock" ,python2-mock)
9985 ,@(package-native-inputs base)))
9986 (arguments
9987 (substitute-keyword-arguments (package-arguments base)
9988 ((#:phases phases)
9989 `(modify-phases ,phases
9990 (add-before 'check 'disable-test-case
9991 ;; The test requires network access to localhost. Curiously it
9992 ;; fails with Python 2 only. Simply make the test-case return
9993 ;; immediately.
9994 (lambda _
9995 (substitute*
9996 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9997 (("formats = self.nbconvert_api") "return #")))))))))))
9998
9999 (define-public python-widgetsnbextension
10000 (package
10001 (name "python-widgetsnbextension")
10002 (version "3.5.1")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "widgetsnbextension" version))
10007 (sha256
10008 (base32
10009 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10010 (build-system python-build-system)
10011 (propagated-inputs
10012 `(("python-ipykernel" ,python-ipykernel)
10013 ("python-notebook" ,python-notebook)))
10014 (native-inputs
10015 `(("python-certifi" ,python-certifi)
10016 ("python-nose" ,python-nose)))
10017 (home-page "https://ipython.org")
10018 (synopsis "IPython HTML widgets for Jupyter")
10019 (description "This package provides interactive HTML widgets for Jupyter
10020 notebooks.")
10021 (license license:bsd-3)))
10022
10023 (define-public python2-widgetsnbextension
10024 (package-with-python2 python-widgetsnbextension))
10025
10026 (define-public python-ipywidgets
10027 (package
10028 (name "python-ipywidgets")
10029 (version "7.5.1")
10030 (source
10031 (origin
10032 (method url-fetch)
10033 (uri (pypi-uri "ipywidgets" version))
10034 (sha256
10035 (base32
10036 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10037 (build-system python-build-system)
10038 (propagated-inputs
10039 `(("python-ipython" ,python-ipython)
10040 ("python-traitlets" ,python-traitlets)
10041 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10042 (native-inputs
10043 `(("python-nose" ,python-nose)
10044 ("python-pytest" ,python-pytest)))
10045 (home-page "https://ipython.org")
10046 (synopsis "IPython HTML widgets for Jupyter")
10047 (description "Ipywidgets are interactive HTML widgets for Jupyter
10048 notebooks and the IPython kernel. Notebooks come alive when interactive
10049 widgets are used. Users gain control of their data and can visualize changes
10050 in the data.")
10051 (license license:bsd-3)))
10052
10053 (define-public python2-ipywidgets
10054 (package-with-python2 python-ipywidgets))
10055
10056 (define-public python-jupyter-console
10057 (package
10058 (name "python-jupyter-console")
10059 (version "6.1.0")
10060 (source
10061 (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "jupyter_console" version))
10064 (sha256
10065 (base32
10066 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10067 (build-system python-build-system)
10068 (propagated-inputs
10069 `(("python-ipykernel" ,python-ipykernel)
10070 ("python-jupyter-client" ,python-jupyter-client)
10071 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10072 ("python-pygments" ,python-pygments)))
10073 (native-inputs
10074 `(("python-nose" ,python-nose)))
10075 (home-page "https://jupyter.org")
10076 (synopsis "Jupyter terminal console")
10077 (description "This package provides a terminal-based console frontend for
10078 Jupyter kernels. It also allows for console-based interaction with non-Python
10079 Jupyter kernels such as IJulia and IRKernel.")
10080 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10081 (license license:bsd-3)))
10082
10083 (define-public python2-jupyter-console
10084 (package
10085 (name "python2-jupyter-console")
10086 (version "5.2.0")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "jupyter_console" version))
10091 (sha256
10092 (base32
10093 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10094 (build-system python-build-system)
10095 (arguments
10096 `(#:python ,python-2
10097 #:tests? #f)) ; Tests only run in a TTY.
10098 (propagated-inputs
10099 `(("python2-ipykernel" ,python2-ipykernel)
10100 ("python2-jupyter-client" ,python2-jupyter-client)
10101 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10102 ("python2-pygments" ,python2-pygments)))
10103 (native-inputs
10104 `(("python2-nose" ,python2-nose)))
10105 (home-page "https://jupyter.org")
10106 (synopsis "Jupyter terminal console")
10107 (description "This package provides a terminal-based console frontend for
10108 Jupyter kernels. It also allows for console-based interaction with non-Python
10109 Jupyter kernels such as IJulia and IRKernel.")
10110 (license license:bsd-3)))
10111
10112 ;; The python-ipython and python-jupyter-console require each other. To get
10113 ;; the functionality in both packages working, strip down the
10114 ;; python-jupyter-console package when using it as an input to python-ipython.
10115 (define python-jupyter-console-minimal
10116 (package
10117 (inherit python-jupyter-console)
10118 (name "python-jupyter-console-minimal")
10119 (arguments
10120 (substitute-keyword-arguments
10121 (package-arguments python-jupyter-console)
10122 ((#:phases phases)
10123 `(modify-phases ,phases
10124 (add-after 'install 'delete-bin
10125 (lambda* (#:key outputs #:allow-other-keys)
10126 ;; Delete the bin files, to avoid conflicts in profiles
10127 ;; where python-ipython and python-jupyter-console are
10128 ;; both present.
10129 (delete-file-recursively
10130 (string-append
10131 (assoc-ref outputs "out") "/bin"))))))))
10132 ;; Remove the python-ipython propagated input, to avoid the cycle
10133 (propagated-inputs
10134 (alist-delete
10135 "python-ipython"
10136 (package-propagated-inputs python-jupyter-console)))))
10137
10138 (define-public python-qtconsole
10139 (package
10140 (name "python-qtconsole")
10141 (version "4.4.3")
10142 (source
10143 (origin
10144 (method url-fetch)
10145 (uri (pypi-uri "qtconsole" version))
10146 (sha256
10147 (base32
10148 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10149 (build-system python-build-system)
10150 (arguments
10151 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10152 ;; but we only have the LTS version 5.x. This means that there might be
10153 ;; runtime errors, but since this is a dependency of the Jupyter package,
10154 ;; and Jupyter can be used without the qtconsole we can overlook this for
10155 ;; now.
10156 `(#:tests? #f
10157 #:phases
10158 (modify-phases %standard-phases
10159 (add-before 'check 'pre-check
10160 (lambda _
10161 (setenv "QT_QPA_PLATFORM" "offscreen")
10162 #t)))))
10163 (propagated-inputs
10164 `(("python-ipykernel" ,python-ipykernel)
10165 ("python-ipython" ,python-ipython)))
10166 (native-inputs
10167 `(("python-pytest" ,python-pytest)))
10168 (home-page "http://jupyter.org")
10169 (synopsis "Jupyter Qt console")
10170 (description "This package provides a Qt-based console for Jupyter with
10171 support for rich media output.")
10172 (license license:bsd-3)))
10173
10174 (define-public python-jsbeautifier
10175 (package
10176 (name "python-jsbeautifier")
10177 (version "1.10.2")
10178 (home-page "https://github.com/beautify-web/js-beautify")
10179 (source (origin
10180 (method git-fetch)
10181 (uri (git-reference
10182 (url home-page)
10183 (commit (string-append "v" version))))
10184 (file-name (git-file-name name version))
10185 (sha256
10186 (base32
10187 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10188 (build-system python-build-system)
10189 (arguments
10190 `(#:phases (modify-phases %standard-phases
10191 (add-after 'unpack 'chdir
10192 (lambda _
10193 ;; The upstream Git repository contains all the code,
10194 ;; but this package only builds the python code.
10195 (chdir "python")
10196 #t))
10197 (add-after 'unpack 'patch-python-six-requirements
10198 (lambda _
10199 (substitute* "python/setup.py"
10200 (("six>=1.12.0")
10201 "six>=1.11.0"))
10202 #t)))))
10203 (propagated-inputs
10204 `(("python-editorconfig" ,python-editorconfig)
10205 ("python-six" ,python-six)))
10206 (native-inputs
10207 `(("python-pytest" ,python-pytest)))
10208 (synopsis "JavaScript unobfuscator and beautifier")
10209 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10210 popular online obfuscators.")
10211 (license license:expat)))
10212
10213 (define-public jupyter
10214 (package
10215 (name "jupyter")
10216 (version "1.0.0")
10217 (source
10218 (origin
10219 (method url-fetch)
10220 (uri (pypi-uri "jupyter" version))
10221 (sha256
10222 (base32
10223 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10224 (build-system python-build-system)
10225 (arguments '(#:tests? #f)) ; there are none.
10226 (propagated-inputs
10227 `(("python-ipykernel" ,python-ipykernel)
10228 ("python-ipywidgets" ,python-ipywidgets)
10229 ("python-jupyter-console" ,python-jupyter-console)
10230 ("python-nbconvert" ,python-nbconvert)
10231 ("python-notebook" ,python-notebook)
10232 ("python-qtconsole" ,python-qtconsole)))
10233 (native-search-paths
10234 (list (search-path-specification
10235 (variable "JUPYTER_PATH")
10236 (files '("share/jupyter")))))
10237 (home-page "https://jupyter.org")
10238 (synopsis "Web application for interactive documents")
10239 (description
10240 "The Jupyter Notebook is a web application that allows you to create and
10241 share documents that contain live code, equations, visualizations and
10242 explanatory text. Uses include: data cleaning and transformation, numerical
10243 simulation, statistical modeling, machine learning and much more.")
10244 (license license:bsd-3)))
10245
10246 (define-public python-chardet
10247 (package
10248 (name "python-chardet")
10249 (version "3.0.4")
10250 (source
10251 (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "chardet" version))
10254 (sha256
10255 (base32
10256 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10257 (native-inputs
10258 `(("python-hypothesis" ,python-hypothesis)
10259 ("python-pytest" ,python-pytest)
10260 ("python-pytest-runner" ,python-pytest-runner)))
10261 (build-system python-build-system)
10262 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10263 (arguments `(#:tests? #f))
10264 (home-page "https://github.com/chardet/chardet")
10265 (synopsis "Universal encoding detector for Python 2 and 3")
10266 (description
10267 "This package provides @code{chardet}, a Python module that can
10268 automatically detect a wide range of file encodings.")
10269 (license license:lgpl2.1+)))
10270
10271 (define-public python2-chardet
10272 (package-with-python2 python-chardet))
10273
10274 (define-public python-docopt
10275 (package
10276 (name "python-docopt")
10277 (version "0.6.2")
10278 (source
10279 (origin
10280 (method git-fetch)
10281 ;; The release on PyPI does not include tests.
10282 (uri (git-reference
10283 (url "https://github.com/docopt/docopt")
10284 (commit version)))
10285 (file-name (git-file-name name version))
10286 (sha256
10287 (base32
10288 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10289 (build-system python-build-system)
10290 (native-inputs
10291 `(("python-pytest" ,python-pytest)))
10292 (arguments
10293 `(#:phases
10294 (modify-phases %standard-phases
10295 (replace 'check
10296 (lambda _ (invoke "py.test"))))))
10297 (home-page "http://docopt.org")
10298 (synopsis "Command-line interface description language for Python")
10299 (description "This library allows the user to define a command-line
10300 interface from a program's help message rather than specifying it
10301 programmatically with command-line parsers like @code{getopt} and
10302 @code{argparse}.")
10303 (license license:expat)))
10304
10305 (define-public python2-docopt
10306 (package-with-python2 python-docopt))
10307
10308 (define-public python-pythondialog
10309 (package
10310 (name "python-pythondialog")
10311 (version "3.4.0")
10312 (source
10313 (origin
10314 (method url-fetch)
10315 (uri (pypi-uri "pythondialog" version))
10316 (sha256
10317 (base32
10318 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10319 (build-system python-build-system)
10320 (arguments
10321 `(#:phases
10322 (modify-phases %standard-phases
10323 (add-after 'unpack 'patch-path
10324 (lambda* (#:key inputs #:allow-other-keys)
10325 (let* ((dialog (assoc-ref inputs "dialog")))
10326 ;; Since this library really wants to grovel the search path, we
10327 ;; must hardcode dialog's store path into it.
10328 (substitute* "dialog.py"
10329 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10330 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10331 #t))))
10332 #:tests? #f)) ; no test suite
10333 (propagated-inputs
10334 `(("dialog" ,dialog)))
10335 (home-page "http://pythondialog.sourceforge.net/")
10336 (synopsis "Python interface to the UNIX dialog utility")
10337 (description "A Python wrapper for the dialog utility. Its purpose is to
10338 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10339 This allows one to make simple text-mode user interfaces on Unix-like systems")
10340 (license license:lgpl2.1)
10341 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10342
10343 (define-public python2-pythondialog
10344 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10345 (package
10346 (inherit base)
10347 (version (package-version python-pythondialog))
10348 (source (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "python2-pythondialog" version))
10351 (sha256
10352 (base32
10353 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10354
10355 (define-public python-configobj
10356 (package
10357 (name "python-configobj")
10358 (version "5.0.6")
10359 (source (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "configobj" version))
10362 (sha256
10363 (base32
10364 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10365 ;; Patch setup.py so it looks for python-setuptools, which is
10366 ;; required to parse the keyword 'install_requires' in setup.py.
10367 (patches (search-patches "python-configobj-setuptools.patch"))))
10368 (build-system python-build-system)
10369 (propagated-inputs
10370 `(("python-six" ,python-six)))
10371 (synopsis "Config file reading, writing and validation")
10372 (description "ConfigObj is a simple but powerful config file reader and
10373 writer: an ini file round tripper. Its main feature is that it is very easy to
10374 use, with a straightforward programmer’s interface and a simple syntax for
10375 config files.")
10376 (home-page "https://github.com/DiffSK/configobj")
10377 (license license:bsd-3)))
10378
10379 (define-public python2-configobj
10380 (package-with-python2 python-configobj))
10381
10382 (define-public python-configargparse
10383 (package
10384 (name "python-configargparse")
10385 (version "0.14.0")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "ConfigArgParse" version))
10389 (sha256
10390 (base32
10391 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10392 (build-system python-build-system)
10393 (native-inputs
10394 `(("python-pyyaml" ,python-pyyaml)))
10395 (arguments
10396 `(#:phases
10397 (modify-phases %standard-phases
10398 (replace 'check
10399 (lambda _
10400 ;; Bypass setuptools-shim because one test relies on "setup.py"
10401 ;; being the first argument passed to the python call.
10402 ;;
10403 ;; NOTE: Many tests do not run because they rely on Python's
10404 ;; built-in test.test_argparse, but we remove the unit tests from
10405 ;; our Python installation.
10406 (invoke "python" "setup.py" "test"))))))
10407 (synopsis "Replacement for argparse")
10408 (description "A drop-in replacement for argparse that allows options to also
10409 be set via config files and/or environment variables.")
10410 (home-page "https://github.com/bw2/ConfigArgParse")
10411 (license license:expat)))
10412
10413 (define-public python2-configargparse
10414 (package-with-python2 python-configargparse))
10415
10416 (define-public python-argparse-manpage
10417 (package
10418 (name "python-argparse-manpage")
10419 (version "1.1")
10420 (source
10421 (origin
10422 (method url-fetch)
10423 (uri (pypi-uri "argparse-manpage" version))
10424 (sha256
10425 (base32
10426 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10427 (build-system python-build-system)
10428 (home-page "https://github.com/praiskup/argparse-manpage")
10429 (synopsis "Build manual page from Python's ArgumentParser object")
10430 (description
10431 "This package provides tools to build manual pages from Python's
10432 @code{ArgumentParser} object.")
10433 (license license:asl2.0)))
10434
10435 (define-public python-contextlib2
10436 (package
10437 (name "python-contextlib2")
10438 (version "0.6.0.post1")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "contextlib2" version))
10443 (sha256
10444 (base32
10445 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10446 (build-system python-build-system)
10447 (home-page "https://contextlib2.readthedocs.org/")
10448 (synopsis "Tools for decorators and context managers")
10449 (description "This module is primarily a backport of the Python
10450 3.2 contextlib to earlier Python versions. Like contextlib, it
10451 provides utilities for common tasks involving decorators and context
10452 managers. It also contains additional features that are not part of
10453 the standard library.")
10454 (properties `((python2-variant . ,(delay python2-contextlib2))))
10455 (license license:psfl)))
10456
10457 (define-public python2-contextlib2
10458 (let ((base (package-with-python2
10459 (strip-python2-variant python-contextlib2))))
10460 (package
10461 (inherit base)
10462 (arguments
10463 (substitute-keyword-arguments (package-arguments base)
10464 ((#:phases phases)
10465 `(modify-phases ,phases
10466 (replace 'check
10467 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10468 (native-inputs
10469 `(("python2-unittest2" ,python2-unittest2))))))
10470
10471 ;; This package is used by python2-pytest via python2-importlib-metadata,
10472 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10473 (define-public python2-contextlib2-bootstrap
10474 (hidden-package
10475 (package/inherit
10476 python2-contextlib2
10477 (name "python2-contextlib2-bootstrap")
10478 (arguments
10479 `(#:tests? #f
10480 ,@(package-arguments python2-contextlib2)))
10481 (native-inputs '()))))
10482
10483 (define-public python-texttable
10484 (package
10485 (name "python-texttable")
10486 (version "1.6.2")
10487 (source
10488 (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "texttable" version))
10491 (sha256
10492 (base32
10493 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10494 (build-system python-build-system)
10495 (arguments
10496 `(#:phases
10497 (modify-phases %standard-phases
10498 (replace 'check
10499 (lambda _ (invoke "pytest" "tests.py"))))))
10500 (native-inputs
10501 `(("python-pytest" ,python-pytest)))
10502 (home-page "https://github.com/foutaise/texttable/")
10503 (synopsis "Python module for creating simple ASCII tables")
10504 (description "Texttable is a Python module for creating simple ASCII
10505 tables.")
10506 (license license:expat)))
10507
10508 (define-public python2-texttable
10509 (package-with-python2 python-texttable))
10510
10511 (define-public python-atomicwrites
10512 (package
10513 (name "python-atomicwrites")
10514 (version "1.3.0")
10515 (source (origin
10516 (method url-fetch)
10517 (uri (pypi-uri "atomicwrites" version))
10518 (sha256
10519 (base32
10520 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10521 (build-system python-build-system)
10522 (synopsis "Atomic file writes in Python")
10523 (description "Library for atomic file writes using platform dependent tools
10524 for atomic file system operations.")
10525 (home-page "https://github.com/untitaker/python-atomicwrites")
10526 (license license:expat)))
10527
10528 (define-public python2-atomicwrites
10529 (package-with-python2 python-atomicwrites))
10530
10531 (define-public python-click-threading
10532 (package
10533 (name "python-click-threading")
10534 (version "0.4.4")
10535 (source (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "click-threading" version))
10538 (sha256
10539 (base32
10540 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10541 (build-system python-build-system)
10542 (propagated-inputs
10543 `(("python-click" ,python-click)))
10544 (synopsis "Utilities for multithreading in Click")
10545 (description "This package provides utilities for multithreading in Click
10546 applications.")
10547 (home-page "https://github.com/click-contrib/click-threading")
10548 (license license:expat)))
10549
10550 (define-public python-click-log
10551 (package
10552 (name "python-click-log")
10553 (version "0.3.2")
10554 (source (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "click-log" version))
10557 (sha256
10558 (base32
10559 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10560 (build-system python-build-system)
10561 (propagated-inputs
10562 `(("python-click" ,python-click)))
10563 (synopsis "Logging for click applications")
10564 (description "This package provides a Python library for logging Click
10565 applications.")
10566 (home-page "https://github.com/click-contrib/click-log")
10567 (license license:expat)))
10568
10569 (define-public python-apipkg
10570 (package
10571 (name "python-apipkg")
10572 (version "1.5")
10573 (source (origin
10574 (method url-fetch)
10575 (uri (pypi-uri "apipkg" version))
10576 (sha256
10577 (base32
10578 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10579 (build-system python-build-system)
10580 (native-inputs
10581 `(("python-pytest" ,python-pytest)
10582 ("python-setuptools-scm" ,python-setuptools-scm)))
10583 (synopsis "Namespace control and lazy-import mechanism")
10584 (description "With apipkg you can control the exported namespace of a Python
10585 package and greatly reduce the number of imports for your users. It is a small
10586 pure Python module that works on virtually all Python versions.")
10587 (home-page "https://github.com/pytest-dev/apipkg")
10588 (license license:expat)))
10589
10590 (define-public python-execnet
10591 (package
10592 (name "python-execnet")
10593 (version "1.4.1")
10594 (source (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "execnet" version))
10597 (sha256
10598 (base32
10599 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10600 (build-system python-build-system)
10601 (arguments
10602 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10603 ;; The two test failures are caused by the lack of an `ssh` executable.
10604 ;; The test suite can be run with pytest after the 'install' phase.
10605 #:tests? #f))
10606 (native-inputs
10607 `(("python-pytest" ,python-pytest)
10608 ("python-setuptools-scm" ,python-setuptools-scm)))
10609 (propagated-inputs
10610 `(("python-apipkg" ,python-apipkg)))
10611 (synopsis "Rapid multi-Python deployment")
10612 (description "Execnet provides a share-nothing model with
10613 channel-send/receive communication for distributing execution across many
10614 Python interpreters across version, platform and network barriers. It has a
10615 minimal and fast API targeting the following uses:
10616 @enumerate
10617 @item distribute tasks to (many) local or remote CPUs
10618 @item write and deploy hybrid multi-process applications
10619 @item write scripts to administer multiple environments
10620 @end enumerate")
10621 (home-page "https://codespeak.net/execnet/")
10622 (license license:expat)))
10623
10624 (define-public python2-execnet
10625 (package-with-python2 python-execnet))
10626
10627 (define-public python-icalendar
10628 (package
10629 (name "python-icalendar")
10630 (version "4.0.5")
10631 (source (origin
10632 (method url-fetch)
10633 (uri (pypi-uri "icalendar" version))
10634 (sha256
10635 (base32
10636 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10637 (build-system python-build-system)
10638 (propagated-inputs
10639 `(("python-dateutil" ,python-dateutil)
10640 ("python-pytz" ,python-pytz)))
10641 (synopsis "Python library for parsing iCalendar files")
10642 (description "The icalendar package is a parser/generator of iCalendar
10643 files for use with Python.")
10644 (home-page "https://github.com/collective/icalendar")
10645 (license license:bsd-2)))
10646
10647 (define-public python-args
10648 (package
10649 (name "python-args")
10650 (version "0.1.0")
10651 (source (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "args" version))
10654 (sha256
10655 (base32
10656 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10657 (build-system python-build-system)
10658 (home-page "https://github.com/kennethreitz/args")
10659 (synopsis "Command-line argument parser")
10660 (description
10661 "This library provides a Python module to parse command-line arguments.")
10662 (license license:bsd-3)))
10663
10664 (define-public python2-args
10665 (package-with-python2 python-args))
10666
10667 (define-public python-clint
10668 (package
10669 (name "python-clint")
10670 (version "0.5.1")
10671 (source (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "clint" version))
10674 (sha256
10675 (base32
10676 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10677 (build-system python-build-system)
10678 (arguments
10679 '(#:phases
10680 (modify-phases %standard-phases
10681 (replace 'check
10682 (lambda _ (invoke "py.test" "-v"))))))
10683 (native-inputs
10684 `(("python-pytest" ,python-pytest)))
10685 (propagated-inputs
10686 `(("python-args" ,python-args)))
10687 (home-page "https://github.com/kennethreitz/clint")
10688 (synopsis "Command-line interface tools")
10689 (description
10690 "Clint is a Python module filled with a set of tools for developing
10691 command-line applications, including tools for colored and indented
10692 output, progress bar display, and pipes.")
10693 (license license:isc)))
10694
10695 (define-public python2-clint
10696 (package-with-python2 python-clint))
10697
10698 (define-public python-rply
10699 (package
10700 (name "python-rply")
10701 (version "0.7.5")
10702 (source (origin
10703 (method url-fetch)
10704 (uri (pypi-uri "rply" version))
10705 (sha256
10706 (base32
10707 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10708 (build-system python-build-system)
10709 (propagated-inputs
10710 `(("python-appdirs" ,python-appdirs)))
10711 (home-page "https://github.com/alex/rply")
10712 (synopsis "Parser generator for Python")
10713 (description
10714 "This package provides a pure Python based parser generator, that also
10715 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10716 with a new public API, and RPython support.")
10717 (license license:bsd-3)))
10718
10719 (define-public python2-rply
10720 (package-with-python2 python-rply))
10721
10722 (define-public python-hy
10723 (package
10724 (name "python-hy")
10725 (version "0.18.0")
10726 (source (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "hy" version))
10729 (sha256
10730 (base32
10731 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10732 (build-system python-build-system)
10733 (arguments
10734 '(#:phases
10735 (modify-phases %standard-phases
10736 (add-before 'install 'set-HOME
10737 (lambda _
10738 (setenv "HOME" "/tmp") #t))
10739 (replace 'check
10740 (lambda _
10741 ;; Tests require write access to HOME.
10742 (setenv "HOME" "/tmp")
10743 (invoke "nosetests"))))))
10744 (native-inputs
10745 `(("python-coverage" ,python-coverage)
10746 ("python-nose" ,python-nose)))
10747 (propagated-inputs
10748 `(("python-astor" ,python-astor)
10749 ("python-colorama" ,python-colorama)
10750 ("python-rply" ,python-rply)
10751 ("python-funcparserlib"
10752 ,python-funcparserlib)))
10753 (home-page "http://hylang.org/")
10754 (synopsis "Lisp frontend to Python")
10755 (description
10756 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10757 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10758 Python at your fingertips, in Lisp form.")
10759 (license license:expat)))
10760
10761 (define-public python2-functools32
10762 (package
10763 (name "python2-functools32")
10764 (version "3.2.3-2")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "functools32" version))
10769 (sha256
10770 (base32
10771 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10772 (build-system python-build-system)
10773 (arguments
10774 `(#:python ,python-2
10775 #:tests? #f)) ; no test target
10776 (home-page "https://github.com/MiCHiLU/python-functools32")
10777 (synopsis
10778 "Backport of the functools module from Python 3.2.3")
10779 (description
10780 "This package is a backport of the @code{functools} module from Python
10781 3.2.3 for use with older versions of Python and PyPy.")
10782 (license license:expat)))
10783
10784 (define-public python2-subprocess32
10785 (package
10786 (name "python2-subprocess32")
10787 (version "3.2.7")
10788 (source (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "subprocess32" version))
10791 (sha256
10792 (base32
10793 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10794 (patches
10795 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10796 (build-system python-build-system)
10797 (arguments
10798 `(#:python ,python-2
10799 ;; The test suite fails with Python > 2.7.13:
10800 ;; import test.support
10801 ;; ImportError: No module named support
10802 #:tests? #f
10803 #:phases
10804 (modify-phases %standard-phases
10805 (add-after 'unpack 'patch-/bin/sh
10806 (lambda _
10807 (substitute* '("subprocess32.py"
10808 "test_subprocess32.py")
10809 (("/bin/sh") (which "sh")))
10810 #t)))))
10811 (home-page "https://github.com/google/python-subprocess32")
10812 (synopsis "Backport of the subprocess module from Python 3.2")
10813 (description
10814 "This is a backport of the @code{subprocess} standard library module
10815 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10816 new features. On POSIX systems it is guaranteed to be reliable when used
10817 in threaded applications. It includes timeout support from Python 3.3 but
10818 otherwise matches 3.2’s API.")
10819 (license license:psfl)))
10820
10821 (define-public python2-futures
10822 (package
10823 (name "python2-futures")
10824 (version "3.2.0")
10825 (source
10826 (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "futures" version))
10829 (sha256
10830 (base32
10831 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10832 (build-system python-build-system)
10833 (arguments
10834 `(#:python ,python-2
10835 #:phases
10836 (modify-phases %standard-phases
10837 (replace 'check
10838 (lambda _
10839 (invoke "python" "test_futures.py")
10840 #t)))))
10841 (home-page "https://github.com/agronholm/pythonfutures")
10842 (synopsis
10843 "Backport of the concurrent.futures package from Python 3.2")
10844 (description
10845 "The concurrent.futures module provides a high-level interface for
10846 asynchronously executing callables. This package backports the
10847 concurrent.futures package from Python 3.2")
10848 (license license:bsd-3)))
10849
10850 (define-public python-promise
10851 (package
10852 (name "python-promise")
10853 (version "0.4.2")
10854 (source
10855 (origin
10856 (method url-fetch)
10857 (uri (pypi-uri "promise" version))
10858 (sha256
10859 (base32
10860 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10861 (build-system python-build-system)
10862 ;; Tests wants python-futures, which is a python2 only program, and
10863 ;; can't be found by python-promise at test time.
10864 (arguments `(#:tests? #f))
10865 (home-page "https://github.com/syrusakbary/promise")
10866 (synopsis "Promises/A+ implementation for Python")
10867 (description
10868 "Promises/A+ implementation for Python")
10869 (properties `((python2-variant . ,(delay python2-promise))))
10870 (license license:expat)))
10871
10872 (define-public python2-promise
10873 (let ((promise (package-with-python2
10874 (strip-python2-variant python-promise))))
10875 (package (inherit promise)
10876 (arguments (substitute-keyword-arguments (package-arguments promise)
10877 ((#:tests? _) #t)))
10878 (native-inputs
10879 `(("python2-futures" ,python2-futures)
10880 ("python2-pytest" ,python2-pytest)
10881 ,@(package-native-inputs promise))))))
10882
10883 (define-public python-progressbar2
10884 (package
10885 (name "python-progressbar2")
10886 (version "3.51.3")
10887 (source
10888 (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "progressbar2" version))
10891 (sha256
10892 (base32
10893 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10894 (build-system python-build-system)
10895 (propagated-inputs
10896 `(("python-six" ,python-six)
10897 ("python-utils" ,python-utils)))
10898 (native-inputs
10899 `(("python-flake8" ,python-flake8)
10900 ("python-freezegun" ,python-freezegun)
10901 ("python-pycodestyle" ,python-pycodestyle)
10902 ("python-pytest" ,python-pytest)
10903 ("python-pytest-cache" ,python-pytest-cache)
10904 ("python-pytest-cov" ,python-pytest-cov)
10905 ("python-pytest-flakes" ,python-pytest-flakes)
10906 ("python-pytest-pep8" ,python-pytest-pep8)
10907 ("python-sphinx" ,python-sphinx)))
10908 (home-page "https://github.com/WoLpH/python-progressbar")
10909 (synopsis "Text progress bar library for Python")
10910 (description
10911 "This package provides a Python progressbar library to provide
10912 visual (yet text based) progress to long running operations.")
10913 (license license:bsd-3)))
10914
10915 (define-public python-progressbar33
10916 (package
10917 (name "python-progressbar33")
10918 (version "2.4")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "progressbar33" version))
10923 (sha256
10924 (base32
10925 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10926 (build-system python-build-system)
10927 (home-page "https://github.com/germangh/python-progressbar")
10928 (synopsis "Text progress bar library for Python")
10929 (description
10930 "This package provides a text progress bar library for Python. This
10931 version only differs from the original @code{progressbar} package in that it
10932 uses relative package imports instead of absolute imports, which is necessary
10933 for the module to work under Python 3.3.")
10934 ;; Either or both of these licenses may be selected.
10935 (license (list license:lgpl2.1+ license:bsd-3))))
10936
10937 (define-public python-colorama
10938 (package
10939 (name "python-colorama")
10940 (version "0.4.4")
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "colorama" version))
10945 (sha256
10946 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10947 (build-system python-build-system)
10948 (synopsis "Colored terminal text rendering for Python")
10949 (description "Colorama is a Python library for rendering colored terminal
10950 text.")
10951 (home-page "https://pypi.org/project/colorama/")
10952 (license license:bsd-3)))
10953
10954 (define-public python2-colorama
10955 (package-with-python2 python-colorama))
10956
10957 (define-public python-moto
10958 (package
10959 (name "python-moto")
10960 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
10961 (version "1.3.16.dev134")
10962 (source (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "moto" version))
10965 (sha256
10966 (base32
10967 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
10968 (build-system python-build-system)
10969 (arguments
10970 `(#:phases (modify-phases %standard-phases
10971 (add-after 'unpack 'patch-hardcoded-executable-names
10972 (lambda _
10973 (substitute* "moto/batch/models.py"
10974 (("/bin/sh")
10975 (which "sh")))
10976 (substitute* (find-files "tests" "\\.py$")
10977 (("#!/bin/bash")
10978 (string-append "#!" (which "bash"))))
10979 #t))
10980 (replace 'check
10981 (lambda _
10982 (setenv "PYTHONPATH" (string-append "./build/lib:"
10983 (getenv "PYTHONPATH")))
10984 (invoke "pytest" "-vv" "-m" "not network"
10985 ;; These tests require Docker.
10986 "-k" "not test_terminate_job \
10987 and not test_invoke_function_from_sqs_exception"))))))
10988 (native-inputs
10989 `(("python-flask" ,python-flask)
10990 ("python-flask-cors" ,python-flask-cors)
10991 ("python-freezegun" ,python-freezegun)
10992 ("python-parameterized" ,python-parameterized)
10993 ("python-pytest" ,python-pytest)
10994 ("python-sure" ,python-sure)))
10995 (propagated-inputs
10996 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
10997 ("python-boto" ,python-boto)
10998 ("python-boto3" ,python-boto3)
10999 ("python-botocore" ,python-botocore)
11000 ("python-cfn-lint" ,python-cfn-lint)
11001 ("python-cryptography" ,python-cryptography)
11002 ("python-dateutil" ,python-dateutil)
11003 ("python-docker" ,python-docker)
11004 ("python-idna" ,python-idna)
11005 ("python-jinja2" ,python-jinja2)
11006 ("python-jose" ,python-jose)
11007 ("python-jsondiff" ,python-jsondiff)
11008 ("python-mock" ,python-mock)
11009 ("python-pytz" ,python-pytz)
11010 ("python-pyyaml" ,python-pyyaml)
11011 ("python-requests" ,python-requests)
11012 ("python-responses" ,python-responses)
11013 ("python-six" ,python-six)
11014 ("python-sshpubkeys" ,python-sshpubkeys)
11015 ("python-werkzeug" ,python-werkzeug)
11016 ("python-xmltodict" ,python-xmltodict)))
11017 (home-page "https://github.com/spulec/moto")
11018 (synopsis "Mock out the boto library")
11019 (description
11020 "@code{moto} is a library designed to easily mock out the
11021 @code{boto} library.")
11022 (license license:asl2.0)))
11023
11024 (define-public python-rsa
11025 (package
11026 (name "python-rsa")
11027 (version "3.4.2")
11028 (source
11029 (origin
11030 (method url-fetch)
11031 (uri (pypi-uri "rsa" version))
11032 (sha256
11033 (base32
11034 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11035 (build-system python-build-system)
11036 (propagated-inputs
11037 `(("python-pyasn1" ,python-pyasn1)))
11038 (synopsis "Pure-Python RSA implementation")
11039 (description "Python-RSA is a pure-Python RSA implementation. It supports
11040 encryption and decryption, signing and verifying signatures, and key
11041 generation according to PKCS#1 version 1.5. It can be used as a Python
11042 library as well as on the command line.")
11043 (home-page "https://stuvel.eu/rsa")
11044 (license license:asl2.0)))
11045
11046 (define-public python2-rsa
11047 (package-with-python2 python-rsa))
11048
11049 (define-public python-pluggy
11050 (package
11051 (name "python-pluggy")
11052 (version "0.13.1")
11053 (source
11054 (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "pluggy" version))
11057 (sha256
11058 (base32
11059 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11060 (build-system python-build-system)
11061 (native-inputs
11062 `(("python-setuptools-scm" ,python-setuptools-scm)))
11063 (synopsis "Plugin and hook calling mechanism for Python")
11064 (description "Pluggy is an extraction of the plugin manager as used by
11065 Pytest but stripped of Pytest specific details.")
11066 (home-page "https://pypi.org/project/pluggy/")
11067 (properties `((python2-variant . ,(delay python2-pluggy))))
11068 (license license:expat)))
11069
11070 (define-public python2-pluggy
11071 (let ((base (package-with-python2 (strip-python2-variant
11072 python-pluggy))))
11073 (package/inherit
11074 base
11075 (propagated-inputs
11076 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11077
11078 ;; This package requires python2-importlib-metadata, but that package
11079 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11080 ;; variant to solve the circular dependency.
11081 (define-public python2-pluggy-bootstrap
11082 (hidden-package
11083 (package/inherit
11084 python2-pluggy
11085 (name "python2-pluggy-bootstrap")
11086 (arguments
11087 `(#:tests? #f
11088 ,@(package-arguments python2-pluggy)))
11089 (propagated-inputs
11090 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11091
11092 (define-public python-tox
11093 (package
11094 (name "python-tox")
11095 (version "3.20.0")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "tox" version))
11100 (sha256
11101 (base32
11102 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11103 (build-system python-build-system)
11104 (arguments
11105 ;; FIXME: Tests require pytest-timeout, which itself requires
11106 ;; pytest>=2.8.0 for installation.
11107 '(#:tests? #f))
11108 (propagated-inputs
11109 `(("python-filelock" ,python-filelock)
11110 ("python-packaging" ,python-packaging)
11111 ("python-pluggy" ,python-pluggy)
11112 ("python-py" ,python-py)
11113 ("python-six" ,python-six)
11114 ("python-toml" ,python-toml)
11115 ("python-virtualenv" ,python-virtualenv)))
11116 (native-inputs
11117 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11118 ("python-pytest" ,python-pytest) ; >= 2.3.5
11119 ("python-setuptools-scm" ,python-setuptools-scm)))
11120 (home-page "https://tox.readthedocs.io")
11121 (synopsis "Virtualenv-based automation of test activities")
11122 (description "Tox is a generic virtualenv management and test command line
11123 tool. It can be used to check that a package installs correctly with
11124 different Python versions and interpreters, or run tests in each type of
11125 supported environment, or act as a frontend to continuous integration
11126 servers.")
11127 (license license:expat)))
11128
11129 (define-public python2-tox
11130 (package-with-python2 python-tox))
11131
11132 (define-public python-jmespath
11133 (package
11134 (name "python-jmespath")
11135 (version "0.9.4")
11136 (source
11137 (origin
11138 (method url-fetch)
11139 (uri (pypi-uri "jmespath" version))
11140 (sha256
11141 (base32
11142 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11143 (build-system python-build-system)
11144 (native-inputs
11145 `(("python-nose" ,python-nose)))
11146 (synopsis "JSON Matching Expressions")
11147 (description "JMESPath (pronounced “james path”) is a Python library that
11148 allows one to declaratively specify how to extract elements from a JSON
11149 document.")
11150 (home-page "https://github.com/jmespath/jmespath.py")
11151 (license license:expat)))
11152
11153 (define-public python2-jmespath
11154 (package-with-python2 python-jmespath))
11155
11156 (define-public python-symengine
11157 (package
11158 (name "python-symengine")
11159 (version "0.6.1")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "symengine" version))
11164 (sha256
11165 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11166 (build-system python-build-system)
11167 (native-inputs
11168 `(("cmake" ,cmake)
11169 ("python-cython" ,python-cython)))
11170 (inputs
11171 `(("symengine" ,symengine)))
11172 (home-page "https://github.com/symengine/symengine.py")
11173 (synopsis "Python library providing wrappers to SymEngine")
11174 (description
11175 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11176 manipulation library.")
11177 (license license:expat)))
11178
11179 (define-public python-boto
11180 (package
11181 (name "python-boto")
11182 (version "2.49.0")
11183 (source (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "boto" version))
11186 (sha256
11187 (base32
11188 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11189 (build-system python-build-system)
11190 (arguments
11191 ;; XXX: This package is unmaintained and has problems with newer versions
11192 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11193 ;; subset of this library, so keep it around for now, but disable tests.
11194 '(#:tests? #f))
11195 (propagated-inputs
11196 `(("python-paramiko" ,python-paramiko)
11197 ("python-requests" ,python-requests)))
11198 (home-page "https://github.com/boto/boto")
11199 (synopsis "Python interfaces for Amazon Web Services")
11200 (description
11201 "This package provides various facilities for interacting with Amazon
11202 Web Services through Python.
11203
11204 This software is unmaintained, and new projects should use @code{boto3} instead.")
11205 (license license:expat)))
11206
11207 (define-public python-botocore
11208 ;; Note: When updating botocore, also make sure that boto3 and awscli
11209 ;; are compatible.
11210 (package
11211 (name "python-botocore")
11212 (version "1.19.22")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "botocore" version))
11217 (sha256
11218 (base32
11219 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11220 (build-system python-build-system)
11221 (arguments
11222 ;; FIXME: Many tests are failing.
11223 '(#:tests? #f))
11224 (propagated-inputs
11225 `(("python-dateutil" ,python-dateutil)
11226 ("python-jmespath" ,python-jmespath)
11227 ("python-urllib3" ,python-urllib3)))
11228 (home-page "https://github.com/boto/botocore")
11229 (synopsis "Low-level interface to AWS")
11230 (description "Botocore is a Python library that provides a low-level
11231 interface to the Amazon Web Services (AWS) API.")
11232 (license license:asl2.0)))
11233
11234 (define-public python2-botocore
11235 (package-with-python2 python-botocore))
11236
11237 (define-public python-boto3
11238 (package
11239 (name "python-boto3")
11240 (version "1.16.22")
11241 (home-page "https://github.com/boto/boto3")
11242 (source (origin
11243 (method git-fetch)
11244 (uri (git-reference (url home-page) (commit version)))
11245 (file-name (git-file-name name version))
11246 (sha256
11247 (base32
11248 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11249 (arguments
11250 `(#:phases
11251 (modify-phases %standard-phases
11252 (add-after 'unpack 'delete-network-tests
11253 ;; Deleting integration tests because they are trying to connect to AWS.
11254 (lambda _
11255 (delete-file-recursively "tests/integration")
11256 #t)))))
11257 (build-system python-build-system)
11258 (native-inputs
11259 `(("python-nose" ,python-nose)
11260 ("python-mock" ,python-mock)))
11261 (propagated-inputs
11262 `(("python-botocore" ,python-botocore)
11263 ("python-jmespath" ,python-jmespath)
11264 ("python-s3transfer" ,python-s3transfer)))
11265 (synopsis "AWS SDK for Python")
11266 (description
11267 "Boto3 is a Python library for writing programs that interact with
11268 @acronym{AWS,Amazon Web Services}.")
11269 (license license:asl2.0)))
11270
11271 (define-public python-pyfiglet
11272 (package
11273 (name "python-pyfiglet")
11274 (version "0.8.post1")
11275 (source
11276 (origin
11277 (method url-fetch)
11278 (uri (pypi-uri "pyfiglet" version))
11279 (sha256
11280 (base32
11281 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11282 (build-system python-build-system)
11283 (home-page "https://github.com/pwaller/pyfiglet")
11284 (synopsis "Draw ASCII art big letters in Python")
11285 (description "This module lets you draw large letter from ordinary characters
11286 in pure Python.")
11287 (license license:expat)))
11288
11289 (define-public python-xdo
11290 (package
11291 (name "python-xdo")
11292 (version "0.3")
11293 (source (origin
11294 (method url-fetch)
11295 (uri (string-append
11296 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11297 "python-xdo_" version ".orig.tar.gz"))
11298 (sha256
11299 (base32
11300 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11301 (build-system python-build-system)
11302 (arguments
11303 '(#:phases
11304 (modify-phases %standard-phases
11305 (add-before 'install 'patch-libxdo-path
11306 ;; Hardcode the path of dynamically loaded libxdo library.
11307 (lambda* (#:key inputs #:allow-other-keys)
11308 (let ((libxdo (string-append
11309 (assoc-ref inputs "xdotool")
11310 "/lib/libxdo.so")))
11311 (substitute* "xdo/_xdo.py"
11312 (("find_library\\(\"xdo\"\\)")
11313 (simple-format #f "\"~a\"" libxdo)))
11314 #t))))
11315 #:tests? #f)) ; no tests provided
11316 (propagated-inputs
11317 `(("python-six" ,python-six)))
11318 (inputs
11319 `(("xdotool" ,xdotool)
11320 ("libX11" ,libx11)))
11321 (home-page "https://tracker.debian.org/pkg/python-xdo")
11322 (synopsis "Python library for simulating X11 keyboard/mouse input")
11323 (description "Provides bindings to libxdo for manipulating X11 via simulated
11324 input. (Note that this is mostly a legacy library; you may wish to look at
11325 python-xdo for newer bindings.)")
11326 (license license:bsd-3)))
11327
11328 (define-public python2-xdo
11329 (package-with-python2 python-xdo))
11330
11331 (define-public python-mako
11332 (package
11333 (name "python-mako")
11334 (version "1.1.3")
11335 (source
11336 (origin
11337 (method url-fetch)
11338 (uri (pypi-uri "Mako" version))
11339 (sha256
11340 (base32
11341 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11342 (build-system python-build-system)
11343 (arguments
11344 `(#:phases (modify-phases %standard-phases
11345 (replace 'check
11346 (lambda* (#:key tests? #:allow-other-keys)
11347 (if tests?
11348 (invoke "nosetests" "-v")
11349 (format #t "test suite not run~%"))
11350 #t)))))
11351 (propagated-inputs
11352 `(("python-markupsafe" ,python-markupsafe)))
11353 (native-inputs
11354 `(("python-mock" ,python-mock)
11355 ("python-nose" ,python-nose)))
11356 (home-page "https://www.makotemplates.org/")
11357 (synopsis "Templating language for Python")
11358 (description "Mako is a templating language for Python that compiles
11359 templates into Python modules.")
11360 (license license:expat)))
11361
11362 (define-public python2-mako
11363 (package-with-python2 python-mako))
11364
11365 (define-public python-waitress
11366 (package
11367 (name "python-waitress")
11368 (version "1.1.0")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "waitress" version))
11373 (patches (search-patches "python-waitress-fix-tests.patch"))
11374 (sha256
11375 (base32
11376 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11377 (build-system python-build-system)
11378 (home-page "https://github.com/Pylons/waitress")
11379 (synopsis "Waitress WSGI server")
11380 (description "Waitress is meant to be a production-quality pure-Python WSGI
11381 server with very acceptable performance.")
11382 (license license:zpl2.1)))
11383
11384 (define-public python2-waitress
11385 (package-with-python2 python-waitress))
11386
11387 (define-public python-whichcraft
11388 (package
11389 (name "python-whichcraft")
11390 (version "0.6.1")
11391 (source
11392 (origin
11393 (method url-fetch)
11394 (uri (pypi-uri "whichcraft" version))
11395 (sha256
11396 (base32
11397 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11398 (build-system python-build-system)
11399 (native-inputs
11400 `(("python-pytest" ,python-pytest)))
11401 (home-page "https://github.com/pydanny/whichcraft")
11402 (synopsis "Cross-platform cross-python shutil.which functionality")
11403 (description
11404 "This package provides a shim of the shutil.which function that's
11405 designed to work across multiple versions of Python.")
11406 (license license:bsd-3)))
11407
11408 (define-public python-cookiecutter
11409 (package
11410 (name "python-cookiecutter")
11411 (version "1.7.2")
11412 (source
11413 (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "cookiecutter" version))
11416 (sha256
11417 (base32
11418 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11419 (build-system python-build-system)
11420 (native-inputs
11421 `(("python-freezegun" ,python-freezegun)
11422 ("python-pytest" ,python-pytest)
11423 ("python-pytest-catchlog" ,python-pytest-catchlog)
11424 ("python-pytest-cov" ,python-pytest-cov)
11425 ("python-pytest-mock" ,python-pytest-mock)))
11426 (propagated-inputs
11427 `(("python-binaryornot" ,python-binaryornot)
11428 ("python-click" ,python-click)
11429 ("python-future" ,python-future)
11430 ("python-jinja2" ,python-jinja2)
11431 ("python-jinja2-time" ,python-jinja2-time)
11432 ("python-poyo" ,python-poyo)
11433 ("python-requests" ,python-requests)
11434 ("python-slugify" ,python-slugify)
11435 ("python-text-unidecode" ,python-text-unidecode)
11436 ("python-whichcraft" ,python-whichcraft)))
11437 (home-page "https://github.com/cookiecutter/cookiecutter")
11438 (synopsis
11439 "Command-line utility that creates projects from project templates")
11440 (description
11441 "This package provides a command-line utility that creates projects from
11442 project templates, e.g. creating a Python package project from a Python package
11443 project template.")
11444 (license license:bsd-3)))
11445
11446 (define-public python-pyquery
11447 (package
11448 (name "python-pyquery")
11449 (version "1.2.17")
11450 (source
11451 (origin
11452 (method url-fetch)
11453 (uri (pypi-uri "pyquery" version))
11454 (sha256
11455 (base32
11456 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11457 (build-system python-build-system)
11458 (native-inputs
11459 `(("python-webob" ,python-webob)
11460 ("python-webtest" ,python-webtest)))
11461 (propagated-inputs
11462 `(("python-lxml" ,python-lxml)
11463 ("python-cssselect" ,python-cssselect)))
11464 (home-page "https://github.com/gawel/pyquery")
11465 (synopsis "Make jQuery-like queries on xml documents")
11466 (description "pyquery allows you to make jQuery queries on xml documents.
11467 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11468 fast xml and html manipulation.")
11469 (license license:bsd-3)))
11470
11471 (define-public python-anyjson
11472 (package
11473 (name "python-anyjson")
11474 (version "0.3.3")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "anyjson" version))
11479 (sha256
11480 (base32
11481 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11482 (build-system python-build-system)
11483 (arguments
11484 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11485 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11486 ;; whatever) so this transformation needs to be done before the tests
11487 ;; can be run. Maybe we could add a build step to transform beforehand
11488 ;; but it could be annoying/difficult.
11489 ;; We can enable tests for the Python 2 version, though, and do below.
11490 #:tests? #f))
11491 (home-page "https://bitbucket.org/runeh/anyjson/")
11492 (synopsis
11493 "Wraps best available JSON implementation in a common interface")
11494 (description
11495 "Anyjson loads whichever is the fastest JSON module installed
11496 and provides a uniform API regardless of which JSON implementation is used.")
11497 (license license:bsd-3)
11498 (properties `((python2-variant . ,(delay python2-anyjson))))))
11499
11500 (define-public python2-anyjson
11501 (let ((anyjson (package-with-python2
11502 (strip-python2-variant python-anyjson))))
11503 (package
11504 (inherit anyjson)
11505 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11506 #:tests? #t
11507 ,@(package-arguments anyjson)))
11508 (native-inputs `(("python2-nose" ,python2-nose))))))
11509
11510 (define-public python-amqp
11511 (package
11512 (name "python-amqp")
11513 (version "2.3.2")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "amqp" version))
11518 (sha256
11519 (base32
11520 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11521 (build-system python-build-system)
11522 (native-inputs
11523 `(("python-case" ,python-case)
11524 ("python-pytest-sugar" ,python-pytest-sugar)
11525 ("python-mock" ,python-mock)))
11526 (propagated-inputs
11527 `(("python-vine" ,python-vine)))
11528 (home-page "https://github.com/celery/py-amqp")
11529 (synopsis
11530 "Low-level AMQP client for Python (fork of amqplib)")
11531 (description
11532 "This is a fork of amqplib which was originally written by Barry Pederson.
11533 It is maintained by the Celery project, and used by kombu as a pure python
11534 alternative when librabbitmq is not available.")
11535 (license license:lgpl2.1+)
11536 (properties `((python2-variant . ,(delay python2-amqp))))))
11537
11538 (define-public python2-amqp
11539 (let ((amqp (package-with-python2
11540 (strip-python2-variant python-amqp))))
11541 (package
11542 (inherit amqp)
11543 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11544 ;; unmaintained. Weirdly, does not do this on the python 3
11545 ;; version?
11546 #:tests? #f
11547 ,@(package-arguments amqp))))))
11548
11549 (define-public python-txamqp
11550 (package
11551 (name "python-txamqp")
11552 (version "0.8.2")
11553 (source
11554 (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "txAMQP" version))
11557 (sha256
11558 (base32
11559 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11560 (build-system python-build-system)
11561 (propagated-inputs
11562 `(("python-six" ,python-six)
11563 ("python-twisted" ,python-twisted)))
11564 (home-page "https://github.com/txamqp/txamqp")
11565 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11566 (description
11567 "This package provides a Python library for communicating with AMQP peers
11568 and brokers using the asynchronous networking framework Twisted. It contains
11569 all the necessary code to connect, send and receive messages to/from an
11570 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11571 also includes support for using Thrift RPC over AMQP in Twisted
11572 applications.")
11573 (license license:asl2.0)))
11574
11575 (define-public python2-txamqp
11576 (package-with-python2 python-txamqp))
11577
11578 (define-public python-kombu
11579 (package
11580 (name "python-kombu")
11581 (version "4.2.2")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "kombu" version))
11586 (sha256
11587 (base32
11588 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11589 (build-system python-build-system)
11590 (native-inputs
11591 `(("python-mock" ,python-mock)
11592 ("python-case" ,python-case)
11593 ("python-pyro4" ,python-pyro4)
11594 ("python-pytest-sugar" ,python-pytest-sugar)
11595 ("python-pytz" ,python-pytz)))
11596 (propagated-inputs
11597 `(("python-anyjson" ,python-anyjson)
11598 ("python-amqp" ,python-amqp)
11599 ("python-redis" ,python-redis)))
11600 (home-page "https://kombu.readthedocs.io")
11601 (synopsis "Message passing library for Python")
11602 (description "The aim of Kombu is to make messaging in Python as easy as
11603 possible by providing an idiomatic high-level interface for the AMQ protocol,
11604 and also provide proven and tested solutions to common messaging problems.
11605 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11606 message orientation, queuing, routing, reliability and security, for which the
11607 RabbitMQ messaging server is the most popular implementation.")
11608 (license license:bsd-3)
11609 (properties `((python2-variant . ,(delay python2-kombu))))))
11610
11611 (define-public python2-kombu
11612 (let ((kombu (package-with-python2
11613 (strip-python2-variant python-kombu))))
11614 (package
11615 (inherit kombu)
11616 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11617 ;; It works fine on the python3 variant.
11618 #:tests? #f
11619 ,@(package-arguments kombu)))
11620 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11621 ,@(package-native-inputs kombu))))))
11622
11623 (define-public python-billiard
11624 (package
11625 (name "python-billiard")
11626 (version "3.5.0.5")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "billiard" version))
11631 (sha256
11632 (base32
11633 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11634 (build-system python-build-system)
11635 (native-inputs
11636 `(("python-case" ,python-case)
11637 ("python-pytest" ,python-pytest)))
11638 (home-page "https://github.com/celery/billiard")
11639 (synopsis
11640 "Python multiprocessing fork with improvements and bugfixes")
11641 (description
11642 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11643 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11644 pyprocessing package. This standalone variant is intended to be compatible with
11645 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11646 (license license:bsd-3)
11647 (properties `((python2-variant . ,(delay python2-billiard))))))
11648
11649 (define-public python2-billiard
11650 (let ((billiard (package-with-python2
11651 (strip-python2-variant python-billiard))))
11652 (package
11653 (inherit billiard)
11654 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11655 ("python2-mock" ,python2-mock)
11656 ,@(package-native-inputs billiard))))))
11657
11658 (define-public python-celery
11659 (package
11660 (name "python-celery")
11661 (version "4.2.1")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "celery" version))
11666 (sha256
11667 (base32
11668 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11669 (build-system python-build-system)
11670 (arguments
11671 '(;; TODO The tests fail with Python 3.7
11672 ;; https://github.com/celery/celery/issues/4849
11673 #:tests? #f
11674 #:phases
11675 (modify-phases %standard-phases
11676 (add-after 'unpack 'patch-requirements
11677 (lambda _
11678 (substitute* "requirements/test.txt"
11679 (("pytest>=3\\.0,<3\\.3")
11680 "pytest>=3.0"))
11681 #t)))))
11682 (native-inputs
11683 `(("python-case" ,python-case)
11684 ("python-pytest" ,python-pytest)))
11685 (propagated-inputs
11686 `(("python-pytz" ,python-pytz)
11687 ("python-billiard" ,python-billiard)
11688 ("python-kombu" ,python-kombu)))
11689 (home-page "https://celeryproject.org")
11690 (synopsis "Distributed Task Queue")
11691 (description "Celery is an asynchronous task queue/job queue based on
11692 distributed message passing. It is focused on real-time operation, but
11693 supports scheduling as well. The execution units, called tasks, are executed
11694 concurrently on a single or more worker servers using multiprocessing,
11695 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11696 synchronously (wait until ready).")
11697 (license license:bsd-3)
11698 (properties `((python2-variant . ,(delay python2-celery))))))
11699
11700 (define-public python2-celery
11701 (let ((celery (package-with-python2
11702 (strip-python2-variant python-celery))))
11703 (package
11704 (inherit celery)
11705 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11706 ("python2-mock" ,python2-mock)
11707 ,@(package-native-inputs celery))))))
11708
11709 (define-public python-translitcodec
11710 (package
11711 (name "python-translitcodec")
11712 (version "0.4.0")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (pypi-uri "translitcodec" version))
11717 (sha256
11718 (base32
11719 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11720 (build-system python-build-system)
11721 (arguments
11722 `(#:tests? #f)) ; no tests provided
11723 (home-page
11724 "https://github.com/claudep/translitcodec")
11725 (synopsis
11726 "Unicode to 8-bit charset transliteration codec")
11727 (description
11728 "This package contains codecs for transliterating ISO 10646 texts into
11729 best-effort representations using smaller coded character sets (ASCII,
11730 ISO 8859, etc.).")
11731 (license license:expat)))
11732
11733 (define-public python2-translitcodec
11734 (package-with-python2 python-translitcodec))
11735
11736 (define-public python-editor
11737 (package
11738 (name "python-editor")
11739 (version "1.0.4")
11740 (source
11741 (origin
11742 (method url-fetch)
11743 (uri (pypi-uri "python-editor" version))
11744 (sha256
11745 (base32
11746 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11747 (build-system python-build-system)
11748 (arguments
11749 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11750 (home-page "https://github.com/fmoo/python-editor")
11751 (synopsis "Programmatically open an editor, capture the result")
11752 (description
11753 "python-editor is a library that provides the editor module for
11754 programmatically interfacing with your system's $EDITOR.")
11755 (license license:asl2.0)))
11756
11757 (define-public python2-editor
11758 (package-with-python2 python-editor))
11759
11760 (define-public python-vobject
11761 (package
11762 (name "python-vobject")
11763 (version "0.9.6.1")
11764 (source (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "vobject" version))
11767 (sha256
11768 (base32
11769 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11770 (build-system python-build-system)
11771 (arguments
11772 '(;; The test suite relies on some non-portable Windows interfaces.
11773 #:tests? #f))
11774 (propagated-inputs
11775 `(("python-dateutil" ,python-dateutil)
11776 ("python-pyicu" ,python-pyicu)))
11777 (synopsis "Parse and generate vCard and vCalendar files")
11778 (description "Vobject is intended to be a full featured Python package for
11779 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11780 are supported and well tested. vCard 3.0 files are supported, and all data
11781 should be imported, but only a few components are understood in a sophisticated
11782 way.")
11783 (home-page "https://eventable.github.io/vobject/")
11784 (license license:asl2.0)))
11785
11786 (define-public python2-vobject
11787 (package-with-python2 python-vobject))
11788
11789 (define-public python-munkres
11790 (package
11791 (name "python-munkres")
11792 (version "1.0.8")
11793 (source (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "munkres" version))
11796 (sha256
11797 (base32
11798 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11799 (build-system python-build-system)
11800 (arguments
11801 '(#:tests? #f)) ; no test suite
11802 (home-page "https://software.clapper.org/munkres/")
11803 (synopsis "Implementation of the Munkres algorithm")
11804 (description "The Munkres module provides an implementation of the Munkres
11805 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11806 useful for solving the Assignment Problem.")
11807 (license license:bsd-3)))
11808
11809 (define-public python2-munkres
11810 (package-with-python2 python-munkres))
11811
11812 (define-public python-whoosh
11813 (package
11814 (name "python-whoosh")
11815 (version "2.7.4")
11816 (source
11817 (origin
11818 (method url-fetch)
11819 (uri (pypi-uri "Whoosh" version))
11820 (sha256
11821 (base32
11822 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11823 (build-system python-build-system)
11824 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11825 (native-inputs
11826 `(("python-pytest" ,python-pytest)))
11827 (home-page "https://bitbucket.org/mchaput/whoosh")
11828 (synopsis "Full text indexing, search, and spell checking library")
11829 (description
11830 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11831 checking library.")
11832 (license license:bsd-2)))
11833
11834 (define-public python2-whoosh
11835 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11836 (package (inherit whoosh)
11837 (propagated-inputs
11838 `(("python2-backport-ssl-match-hostname"
11839 ,python2-backport-ssl-match-hostname)
11840 ,@(package-propagated-inputs whoosh))))))
11841
11842 (define-public python-pathlib
11843 (package
11844 (name "python-pathlib")
11845 (version "1.0.1")
11846 (source (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "pathlib" version))
11849 (sha256
11850 (base32
11851 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11852 (build-system python-build-system)
11853 ;; The tests depend on the internal "test" module, which does not provide
11854 ;; a stable interface.
11855 (arguments `(#:tests? #f))
11856 (home-page "https://pathlib.readthedocs.org/")
11857 (synopsis "Object-oriented file system paths")
11858 (description "Pathlib offers a set of classes to handle file system paths.
11859 It offers the following advantages over using string objects:
11860
11861 @enumerate
11862 @item No more cumbersome use of os and os.path functions. Everything can
11863 be done easily through operators, attribute accesses, and method calls.
11864 @item Embodies the semantics of different path types. For example,
11865 comparing Windows paths ignores casing.
11866 @item Well-defined semantics, eliminating any inconsistencies or
11867 ambiguities (forward vs. backward slashes, etc.).
11868 @end enumerate
11869
11870 Note: In Python 3.4, pathlib is now part of the standard library. For other
11871 Python versions please consider python-pathlib2 instead, which tracks the
11872 standard library module. This module (python-pathlib) isn't maintained
11873 anymore.")
11874 (license license:expat)))
11875
11876 (define-public python2-pathlib
11877 (package-with-python2 python-pathlib))
11878
11879 (define-public python2-pathlib2
11880 (package
11881 (name "python2-pathlib2")
11882 (version "2.3.5")
11883 (source (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "pathlib2" version))
11886 (sha256
11887 (base32
11888 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11889 (build-system python-build-system)
11890 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11891 ;; version is 3.4 which already includes this package as part of the
11892 ;; standard library.
11893 (arguments
11894 `(#:python ,python-2))
11895 (propagated-inputs
11896 `(("python2-scandir" ,python2-scandir)
11897 ("python2-six" ,python2-six)))
11898 (home-page "https://pypi.org/project/pathlib2/")
11899 (synopsis "Object-oriented file system paths - backport of standard
11900 pathlib module")
11901 (description "The goal of pathlib2 is to provide a backport of standard
11902 pathlib module which tracks the standard library module, so all the newest
11903 features of the standard pathlib can be used also on older Python versions.
11904
11905 Pathlib offers a set of classes to handle file system paths. It offers the
11906 following advantages over using string objects:
11907
11908 @enumerate
11909 @item No more cumbersome use of os and os.path functions. Everything can
11910 be done easily through operators, attribute accesses, and method calls.
11911 @item Embodies the semantics of different path types. For example,
11912 comparing Windows paths ignores casing.
11913 @item Well-defined semantics, eliminating any inconsistencies or
11914 ambiguities (forward vs. backward slashes, etc.).
11915 @end enumerate")
11916 (license license:expat)))
11917
11918 (define-public python2-pathlib2-bootstrap
11919 (hidden-package
11920 (package
11921 (inherit python2-pathlib2)
11922 (name "python2-pathlib2-bootstrap")
11923 (propagated-inputs
11924 `(("python2-scandir" ,python2-scandir)
11925 ("python2-six" ,python2-six-bootstrap))))))
11926
11927 (define-public python-jellyfish
11928 (package
11929 (name "python-jellyfish")
11930 (version "0.5.6")
11931 (source (origin
11932 (method url-fetch)
11933 (uri (pypi-uri "jellyfish" version))
11934 (sha256
11935 (base32
11936 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11937 (build-system python-build-system)
11938 (native-inputs
11939 `(("python-pytest" ,python-pytest)))
11940 (home-page "https://github.com/jamesturk/jellyfish")
11941 (synopsis "Approximate and phonetic matching of strings")
11942 (description "Jellyfish uses a variety of string comparison and phonetic
11943 encoding algorithms to do fuzzy string matching.")
11944 (license license:bsd-2)
11945 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11946
11947 (define-public python2-jellyfish
11948 (let ((jellyfish (package-with-python2
11949 (strip-python2-variant python-jellyfish))))
11950 (package (inherit jellyfish)
11951 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11952 ,@(package-native-inputs jellyfish))))))
11953
11954 (define-public python2-unicodecsv
11955 (package
11956 (name "python2-unicodecsv")
11957 (version "0.14.1")
11958 (source (origin
11959 (method git-fetch)
11960 ;; The test suite is not included in the PyPi release.
11961 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11962 (uri (git-reference
11963 (url "https://github.com/jdunck/python-unicodecsv")
11964 (commit version)))
11965 (file-name (git-file-name name version))
11966 (sha256
11967 (base32
11968 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11969 (build-system python-build-system)
11970 (arguments
11971 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11972 #:python ,python-2))
11973 (native-inputs
11974 `(("python2-unittest2" ,python2-unittest2)))
11975 (home-page "https://github.com/jdunck/python-unicodecsv")
11976 (synopsis "Unicode CSV module for Python 2")
11977 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11978 module, adding support for Unicode strings.")
11979 (license license:bsd-2)))
11980
11981 (define-public python-rarfile
11982 (package
11983 (name "python-rarfile")
11984 (version "2.8")
11985 (source (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "rarfile" version))
11988 (sha256
11989 (base32
11990 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11991 (build-system python-build-system)
11992 (arguments
11993 '(#:phases
11994 (modify-phases %standard-phases
11995 (replace 'check
11996 ;; Many tests fail, but the installation proceeds.
11997 (lambda _ (invoke "make" "-C" "test" "test"))))))
11998 (native-inputs
11999 `(("which" ,which))) ; required for tests
12000 (propagated-inputs
12001 `(("libarchive" ,libarchive)))
12002 (home-page "https://github.com/markokr/rarfile")
12003 (synopsis "RAR archive reader for Python")
12004 (description "This is Python module for RAR archive reading. The interface
12005 is made as zipfile like as possible.")
12006 (license license:isc)))
12007
12008 (define-public python2-rarfile
12009 (package-with-python2 python-rarfile))
12010
12011 (define-public python-magic
12012 (package
12013 (name "python-magic")
12014 (version "0.4.15")
12015 (source
12016 (origin
12017 (method url-fetch)
12018 (uri (pypi-uri "python-magic" version))
12019 (sha256
12020 (base32
12021 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12022 (file-name (string-append name "-" version "-checkout"))))
12023 (build-system python-build-system)
12024 (arguments
12025 ;; The tests are unreliable, so don't run them. The tests fail
12026 ;; under Python3 because they were written for Python2 and
12027 ;; contain import statements that do not work in Python3. One of
12028 ;; the tests fails under Python2 because its assertions are
12029 ;; overly stringent; it relies on comparing output strings which
12030 ;; are brittle and can change depending on the version of
12031 ;; libmagic being used and the system on which the test is
12032 ;; running. In my case, under GuixSD 0.10.0, only one test
12033 ;; failed, and it seems to have failed only because the version
12034 ;; of libmagic that is packaged in Guix outputs a slightly
12035 ;; different (but not wrong) string than the one that the test
12036 ;; expected.
12037 '(#:tests? #f
12038 #:phases (modify-phases %standard-phases
12039 ;; Replace a specific method call with a hard-coded
12040 ;; path to the necessary libmagic.so file in the
12041 ;; store. If we don't do this, then the method call
12042 ;; will fail to find the libmagic.so file, which in
12043 ;; turn will cause any application using
12044 ;; python-magic to fail.
12045 (add-before 'build 'hard-code-path-to-libmagic
12046 (lambda* (#:key inputs #:allow-other-keys)
12047 (let ((file (assoc-ref inputs "file")))
12048 (substitute* "magic.py"
12049 (("ctypes.util.find_library\\('magic'\\)")
12050 (string-append "'" file "/lib/libmagic.so'")))
12051 #t)))
12052 (add-before 'install 'disable-egg-compression
12053 (lambda _
12054 (let ((port (open-file "setup.cfg" "a")))
12055 (display "\n[easy_install]\nzip_ok = 0\n"
12056 port)
12057 (close-port port)
12058 #t))))))
12059 (inputs
12060 ;; python-magic needs to be able to find libmagic.so.
12061 `(("file" ,file)))
12062 (home-page
12063 "https://github.com/ahupp/python-magic")
12064 (synopsis
12065 "File type identification using libmagic")
12066 (description
12067 "This module uses ctypes to access the libmagic file type
12068 identification library. It makes use of the local magic database and
12069 supports both textual and MIME-type output. Note that this module and
12070 the python-file module both provide a \"magic.py\" file; these two
12071 modules, which are different and were developed separately, both serve
12072 the same purpose: to provide Python bindings for libmagic.")
12073 (license license:expat)))
12074
12075 (define-public python2-magic
12076 (package-with-python2 python-magic))
12077
12078 (define-public python2-s3cmd
12079 (package
12080 (name "python2-s3cmd")
12081 (version "1.6.1")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12086 "s3cmd-" version ".tar.gz"))
12087 (sha256
12088 (base32
12089 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12090 (build-system python-build-system)
12091 (arguments
12092 ;; s3cmd is written for python2 only and contains no tests.
12093 `(#:python ,python-2
12094 #:tests? #f))
12095 (propagated-inputs
12096 `(("python2-dateutil" ,python2-dateutil)
12097 ;; The python-file package also provides a magic.py module.
12098 ;; This is an unfortunate state of affairs; however, s3cmd
12099 ;; fails to install if it cannot find specifically the
12100 ;; python-magic package. Thus we include it, instead of using
12101 ;; python-file. Ironically, s3cmd sometimes works better
12102 ;; without libmagic bindings at all:
12103 ;; https://github.com/s3tools/s3cmd/issues/198
12104 ("python2-magic" ,python2-magic)))
12105 (home-page "https://s3tools.org/s3cmd")
12106 (synopsis "Command line tool for S3-compatible storage services")
12107 (description
12108 "S3cmd is a command line tool for uploading, retrieving and managing data
12109 in storage services that are compatible with the Amazon Simple Storage
12110 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12111 GnuPG encryption, and more. It also supports management of Amazon's
12112 CloudFront content delivery network.")
12113 (license license:gpl2+)))
12114
12115 (define-public python-pkgconfig
12116 (package
12117 (name "python-pkgconfig")
12118 (version "1.3.1")
12119 (source
12120 (origin
12121 (method url-fetch)
12122 (uri (pypi-uri "pkgconfig" version))
12123 (sha256
12124 (base32
12125 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12126 (build-system python-build-system)
12127 (native-inputs
12128 `(("python-nose" ,python-nose)))
12129 (inputs
12130 `(("pkg-config" ,pkg-config)))
12131 (arguments
12132 `(#:phases
12133 (modify-phases %standard-phases
12134 (add-before 'build 'patch
12135 ;; Hard-code the path to pkg-config.
12136 (lambda _
12137 (substitute* "pkgconfig/pkgconfig.py"
12138 (("cmd = 'pkg-config")
12139 (string-append "cmd = '" (which "pkg-config"))))
12140 #t))
12141 (replace 'check
12142 (lambda _
12143 (invoke "nosetests" "test.py"))))))
12144 (home-page "https://github.com/matze/pkgconfig")
12145 (synopsis "Python interface for pkg-config")
12146 (description "This module provides a Python interface to pkg-config. It
12147 can be used to find all pkg-config packages, check if a package exists,
12148 check if a package meets certain version requirements, query CFLAGS and
12149 LDFLAGS and parse the output to build extensions with setup.py.")
12150 (license license:expat)))
12151
12152 (define-public python2-pkgconfig
12153 (package-with-python2 python-pkgconfig))
12154
12155 (define-public python-bz2file
12156 (package
12157 (name "python-bz2file")
12158 (version "0.98")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 (uri (pypi-uri "bz2file" version))
12163 (sha256
12164 (base32
12165 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12166 (build-system python-build-system)
12167 (arguments
12168 `(#:tests? #f)) ; Tests use deprecated python modules.
12169 (home-page "https://github.com/nvawda/bz2file")
12170 (synopsis "Read and write bzip2-compressed files")
12171 (description
12172 "Bz2file is a Python library for reading and writing bzip2-compressed
12173 files. It contains a drop-in replacement for the I/O interface in the
12174 standard library's @code{bz2} module, including features from the latest
12175 development version of CPython that are not available in older releases.")
12176 (license license:asl2.0)))
12177
12178 (define-public python2-bz2file
12179 (package-with-python2 python-bz2file))
12180
12181 (define-public python-future
12182 (package
12183 (name "python-future")
12184 (version "0.17.1")
12185 (source
12186 (origin
12187 (method url-fetch)
12188 (uri (pypi-uri "future" version))
12189 (sha256
12190 (base32
12191 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12192 (build-system python-build-system)
12193 ;; Many tests connect to the network or are otherwise flawed.
12194 ;; https://github.com/PythonCharmers/python-future/issues/210
12195 (arguments
12196 `(#:tests? #f))
12197 (home-page "https://python-future.org")
12198 (synopsis "Single-source support for Python 3 and 2")
12199 (description
12200 "@code{python-future} is the missing compatibility layer between Python 2 and
12201 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12202 to support both Python 2 and Python 3 with minimal overhead.")
12203 (license license:expat)))
12204
12205 (define-public python2-future
12206 (package-with-python2 python-future))
12207
12208 (define-public python-cysignals
12209 (package
12210 (name "python-cysignals")
12211 (version "1.9.0")
12212 (source
12213 (origin
12214 (method url-fetch)
12215 (uri (pypi-uri "cysignals" version))
12216 (sha256
12217 (base32
12218 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12219 (build-system python-build-system)
12220 (native-inputs
12221 `(("python-cython" ,python-cython)
12222 ("python-sphinx" ,python-sphinx)))
12223 (inputs
12224 `(("pari-gp" ,pari-gp)))
12225 (arguments
12226 `(#:modules ((guix build python-build-system)
12227 ((guix build gnu-build-system) #:prefix gnu:)
12228 (guix build utils))
12229 ;; FIXME: Tests are executed after installation and currently fail
12230 ;; when not installing into standard locations; the author is working
12231 ;; on a fix.
12232 #:tests? #f
12233 #:phases
12234 (modify-phases %standard-phases
12235 (add-before
12236 'build 'configure
12237 (assoc-ref gnu:%standard-phases 'configure)))))
12238 (home-page
12239 "https://github.com/sagemath/cysignals")
12240 (synopsis
12241 "Handling of interrupts and signals for Cython")
12242 (description
12243 "The cysignals package provides mechanisms to handle interrupts (and
12244 other signals and errors) in Cython code, using two related approaches,
12245 for mixed Cython/Python code or external C libraries and pure Cython code,
12246 respectively.")
12247 (license license:lgpl3+)))
12248
12249 (define-public python2-cysignals
12250 (package-with-python2 python-cysignals))
12251
12252 (define-public python2-shedskin
12253 (package
12254 (name "python2-shedskin")
12255 (version "0.9.4")
12256 (source
12257 (origin
12258 (method url-fetch)
12259 (uri (string-append "https://github.com/shedskin/shedskin/"
12260 "releases/download/v" version
12261 "/shedskin-" version ".tgz"))
12262 (sha256
12263 (base32
12264 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12265 (build-system python-build-system)
12266 (arguments
12267 `(#:python ,python-2
12268 #:phases (modify-phases %standard-phases
12269 (add-after 'unpack 'fix-resulting-include-libs
12270 (lambda* (#:key inputs #:allow-other-keys)
12271 (let ((libgc (assoc-ref inputs "libgc"))
12272 (pcre (assoc-ref inputs "pcre")))
12273 (substitute* "shedskin/makefile.py"
12274 (("variable == 'CCFLAGS':[ ]*")
12275 (string-append "variable == 'CCFLAGS':\n"
12276 " line += ' -I " pcre "/include"
12277 " -I " libgc "/include'"))
12278 (("variable == 'LFLAGS':[ ]*")
12279 (string-append "variable == 'LFLAGS':\n"
12280 " line += ' -L" pcre "/lib"
12281 " -L " libgc "/lib'")))
12282 #t))))))
12283 (inputs `(("pcre" ,pcre)
12284 ("libgc" ,libgc)))
12285 (home-page "https://shedskin.github.io/")
12286 (synopsis "Experimental Python-2 to C++ Compiler")
12287 (description (string-append "This is an experimental compiler for a subset of
12288 Python. It generates C++ code and a Makefile."))
12289 (license (list license:gpl3 license:bsd-3 license:expat))))
12290
12291 (define-public python2-rope
12292 (package
12293 (name "python2-rope")
12294 (version "0.11.0")
12295 (source
12296 (origin
12297 (method url-fetch)
12298 (uri (pypi-uri "rope" version))
12299 (sha256
12300 (base32
12301 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12302 (arguments
12303 ;; Rope has only partial python3 support, see `python-rope'
12304 `(#:python ,python-2))
12305 (build-system python-build-system)
12306 (native-inputs
12307 `(("python2-unittest2" ,python2-unittest2)))
12308 (home-page "https://github.com/python-rope/rope")
12309 (synopsis "Refactoring library for Python")
12310 (description "Rope is a refactoring library for Python. It facilitates
12311 the renaming, moving and extracting of attributes, functions, modules, fields
12312 and parameters in Python 2 source code. These refactorings can also be applied
12313 to occurrences in strings and comments.")
12314 (license license:gpl2)))
12315
12316 (define-public python-rope
12317 (package
12318 (inherit python2-rope)
12319 (name "python-rope")
12320 (arguments `(#:python ,python-wrapper
12321 ;; XXX: Only partial python3 support, results in some failing
12322 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12323 #:tests? #f))
12324 (properties `((python2-variant . ,(delay python2-rope))))))
12325
12326 (define-public python-py3status
12327 (package
12328 (name "python-py3status")
12329 (version "3.21")
12330 (source
12331 (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "py3status" version))
12334 (sha256
12335 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12336 (build-system python-build-system)
12337 (inputs
12338 `(("file" ,file)))
12339 (arguments
12340 '(#:phases
12341 (modify-phases %standard-phases
12342 ;; 'file' is used for detection of configuration file encoding
12343 ;; let's make link the dependency to particular input
12344 (add-before 'build 'patch-file-path
12345 (lambda* (#:key inputs #:allow-other-keys)
12346 (let ((file-path (assoc-ref inputs "file")))
12347 (substitute* "py3status/parse_config.py"
12348 (("\\[\"file\", \"-b\"")
12349 (string-append "['" file-path "/bin/file', '-b'")))
12350 #t))))
12351 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12352 (home-page "https://github.com/ultrabug/py3status")
12353 (synopsis "Extensible i3status wrapper written in Python")
12354 (description "py3status is an i3status wrapper which extends i3status
12355 functionality in a modular way, allowing you to extend your panel with your
12356 own code, responding to click events and updating clock every second.")
12357 (license license:bsd-3)))
12358
12359 (define-public python2-selectors2
12360 (package
12361 (name "python2-selectors2")
12362 (version "2.0.1")
12363 (source (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "selectors2" version))
12366 (sha256
12367 (base32
12368 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12369 (build-system python-build-system)
12370 (arguments
12371 `(#:python ,python-2))
12372 (native-inputs
12373 `(("python2-mock" ,python2-mock)
12374 ("python2-psutil" ,python2-psutil)))
12375 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12376 (synopsis "Backport of the selectors module from Python 3.5+")
12377 (description
12378 "This package provides a drop-in replacement for the @code{selectors}
12379 module in Python 3.5 and later.")
12380 (license license:expat)))
12381
12382 (define-public python-tblib
12383 (package
12384 (name "python-tblib")
12385 (version "1.6.0")
12386 (source (origin
12387 (method url-fetch)
12388 (uri (pypi-uri "tblib" version))
12389 (sha256
12390 (base32
12391 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12392 (build-system python-build-system)
12393 (arguments
12394 `(#:phases
12395 (modify-phases %standard-phases
12396 (replace 'check
12397 (lambda _
12398 ;; Upstream runs tests after installation and the package itself
12399 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12400 ;; found.
12401 (setenv "PYTHONPATH"
12402 (string-append (getcwd) "/build/lib:"
12403 (getenv "PYTHONPATH")))
12404 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12405 (native-inputs
12406 `(("python-pytest" ,python-pytest)
12407 ("python-six" ,python-six)))
12408 (home-page "https://github.com/ionelmc/python-tblib")
12409 (synopsis "Traceback serialization library")
12410 (description
12411 "Traceback serialization allows you to:
12412
12413 @enumerate
12414 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12415 different processes. This allows better error handling when running code over
12416 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12417
12418 @item Parse traceback strings and raise with the parsed tracebacks.
12419 @end enumerate\n")
12420 (license license:bsd-3)))
12421
12422 (define-public python2-tblib
12423 (package-with-python2 python-tblib))
12424
12425 (define-public python-greenlet
12426 (package
12427 (name "python-greenlet")
12428 (version "0.4.16")
12429 (source (origin
12430 (method url-fetch)
12431 (uri (pypi-uri "greenlet" version))
12432 (sha256
12433 (base32
12434 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12435 (build-system python-build-system)
12436 (home-page "https://greenlet.readthedocs.io/")
12437 (synopsis "Lightweight in-process concurrent programming")
12438 (description
12439 "Greenlet package is a spin-off of Stackless, a version of CPython
12440 that supports micro-threads called \"tasklets\". Tasklets run
12441 pseudo-concurrently (typically in a single or a few OS-level threads) and
12442 are synchronized with data exchanges on \"channels\".")
12443 (license (list license:psfl license:expat))))
12444
12445 (define-public python2-greenlet
12446 (package-with-python2 python-greenlet))
12447
12448 (define-public python-objgraph
12449 (package
12450 (name "python-objgraph")
12451 (version "3.4.1")
12452 (source
12453 (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "objgraph" version))
12456 (sha256
12457 (base32
12458 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12459 (build-system python-build-system)
12460 (propagated-inputs
12461 `(("python-graphviz" ,python-graphviz)))
12462 (native-inputs
12463 `(("python-mock" ,python-mock)
12464 ("graphviz" ,graphviz)))
12465 (home-page "https://mg.pov.lt/objgraph/")
12466 (synopsis "Draw Python object reference graphs with graphviz")
12467 (description
12468 "This package provides tools to draw Python object reference graphs with
12469 graphviz.")
12470 (license license:expat)))
12471
12472 (define-public python2-objgraph
12473 (package-with-python2 python-objgraph))
12474
12475 (define-public python-gevent
12476 (package
12477 (name "python-gevent")
12478 (version "20.6.2")
12479 (source (origin
12480 (method url-fetch)
12481 (uri (pypi-uri "gevent" version))
12482 (sha256
12483 (base32
12484 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12485 (modules '((guix build utils)))
12486 (snippet
12487 '(begin
12488 ;; unbunding libev and c-ares
12489 (delete-file-recursively "deps")
12490 #t))))
12491 (build-system python-build-system)
12492 (arguments
12493 `(#:modules ((ice-9 ftw)
12494 (ice-9 match)
12495 (srfi srfi-26)
12496 (guix build utils)
12497 (guix build python-build-system))
12498 #:phases (modify-phases %standard-phases
12499 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12500 (lambda _
12501 (substitute* "src/gevent/subprocess.py"
12502 (("/bin/sh") (which "sh")))
12503 (for-each (lambda (file)
12504 (substitute* file
12505 (("/bin/sh") (which "sh"))
12506 (("/bin/true") (which "true"))))
12507 (find-files "src/greentest" "\\.py$"))
12508 #t))
12509 (add-before 'build 'do-not-use-bundled-sources
12510 (lambda _
12511 (setenv "GEVENTSETUP_EMBED" "0")
12512
12513 ;; Prevent building bundled libev.
12514 (substitute* "setup.py"
12515 (("run_make=_BUILDING")
12516 "run_make=False"))
12517 #t))
12518 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12519 (lambda* (#:key inputs #:allow-other-keys)
12520 (let ((greenlet (string-append
12521 (assoc-ref inputs "python-greenlet")
12522 "/include")))
12523 (match (scandir greenlet
12524 (lambda (item)
12525 (string-prefix? "python" item)))
12526 ((python)
12527 (setenv "C_INCLUDE_PATH"
12528 (string-append greenlet "/" python ":"
12529 (or (getenv "C_INCLUDE_PATH")
12530 ""))))))
12531 #t))
12532 (add-before 'check 'pretend-to-be-CI
12533 (lambda _
12534 ;; A few tests are skipped due to network constraints or
12535 ;; get longer timeouts when running in a CI environment.
12536 ;; Piggy-back on that, as we need the same adjustments.
12537 (setenv "TRAVIS" "1")
12538 (setenv "APPVEYOR" "1")
12539 #t))
12540 (add-before 'check 'adjust-tests
12541 (lambda _
12542 (let ((disabled-tests
12543 '(;; These tests rely on networking which is not
12544 ;; available in the build container.
12545 "test_urllib2net.py"
12546 "test__server.py"
12547 "test__server_pywsgi.py"
12548 "test_socket.py"
12549 "test__socket.py"
12550 "test__socket_ssl.py"
12551 "test__socket_dns.py"
12552 "test__socket_dns6.py"
12553 "test___example_servers.py"
12554 "test__getaddrinfo_import.py"
12555 "test__examples.py"
12556 "test_httplib.py"
12557 "test_https.py"
12558 "test_urllib2_localnet.py"
12559 "test_ssl.py"
12560 "test__ssl.py"
12561 ;; XXX: These tests borrow functionality from the
12562 ;; Python builtin 'test' module, but it is not
12563 ;; installed with the Guix Python distribution.
12564 "test_smtpd.py"
12565 "test_wsgiref.py"
12566 "test_urllib2.py"
12567 "test_thread.py"
12568 "test_threading.py"
12569 "test__threading_2.py"
12570 ;; These tests rely on KeyboardInterrupts which do not
12571 ;; work inside the build container for some reason
12572 ;; (lack of controlling terminal?).
12573 "test_subprocess.py"
12574 "test__issues461_471.py"
12575 ;; TODO: Patch out the tests that use getprotobyname, etc
12576 ;; instead of disabling all the tests from these files.
12577 "test__resolver_dnspython.py"
12578 "test__doctests.py"
12579 "test__all__.py"
12580 "test___config.py"
12581 "test__execmodules.py")))
12582 (call-with-output-file "skipped_tests.txt"
12583 (lambda (port)
12584 (format port "~a~%"
12585 (string-join disabled-tests "\n"))))
12586 #t)))
12587 (replace 'check
12588 (lambda _
12589 ;; Make sure the build directory is on PYTHONPATH.
12590 (setenv "PYTHONPATH"
12591 (string-append
12592 (getenv "PYTHONPATH") ":"
12593 (getcwd) "/build/"
12594 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12595
12596 ;; Use the build daemons configured number of workers.
12597 (setenv "NWORKERS" (number->string (parallel-job-count)))
12598
12599 (invoke "python" "-m" "gevent.tests" "--config"
12600 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12601 (propagated-inputs
12602 `(("python-greenlet" ,python-greenlet)
12603 ("python-objgraph" ,python-objgraph)
12604 ("python-zope.event" ,python-zope-event)
12605 ("python-zope.interface" ,python-zope-interface)))
12606 (native-inputs
12607 `(("python-six" ,python-six)
12608
12609 ;; For tests.
12610 ("python-dnspython" ,python-dnspython)
12611 ("python-psutil" ,python-psutil)))
12612 (inputs
12613 `(("c-ares" ,c-ares)
12614 ("libev" ,libev)))
12615 (home-page "http://www.gevent.org/")
12616 (synopsis "Coroutine-based network library")
12617 (description
12618 "gevent is a coroutine-based Python networking library that uses greenlet
12619 to provide a high-level synchronous API on top of the libev event loop.")
12620 (license license:expat)
12621 (properties `((python2-variant . ,(delay python2-gevent))))))
12622
12623 (define-public python2-gevent
12624 (let ((base (package-with-python2
12625 (strip-python2-variant python-gevent))))
12626 (package
12627 (inherit base)
12628 (native-inputs `(,@(package-native-inputs base)
12629 ("python-mock" ,python2-mock)
12630 ("python2-selectors2" ,python2-selectors2))))))
12631
12632 (define-public python-fastimport
12633 (package
12634 (name "python-fastimport")
12635 (version "0.9.8")
12636 (source
12637 (origin
12638 (method url-fetch)
12639 (uri (pypi-uri "fastimport" version))
12640 (sha256
12641 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12642 (build-system python-build-system)
12643 (home-page "https://github.com/jelmer/python-fastimport")
12644 (synopsis "VCS fastimport parser and generator in Python")
12645 (description "This package provides a parser for and generator of the Git
12646 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12647 format.")
12648 (license license:gpl2+)))
12649
12650 (define-public python2-fastimport
12651 (package-with-python2 python-fastimport))
12652
12653 (define-public python-twisted
12654 (package
12655 (name "python-twisted")
12656 (version "19.7.0")
12657 (source (origin
12658 (method url-fetch)
12659 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12660 (sha256
12661 (base32
12662 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12663 (build-system python-build-system)
12664 (arguments
12665 '(#:tests? #f)) ; FIXME: some tests fail
12666 (propagated-inputs
12667 `(("python-zope-interface" ,python-zope-interface)
12668 ("python-pyhamcrest" ,python-pyhamcrest)
12669 ("python-incremental" ,python-incremental)
12670 ("python-hyperlink" ,python-hyperlink)
12671 ("python-constantly" ,python-constantly)
12672 ("python-automat" ,python-automat)))
12673 (home-page "https://twistedmatrix.com/")
12674 (synopsis "Asynchronous networking framework written in Python")
12675 (description
12676 "Twisted is an extensible framework for Python programming, with special
12677 focus on event-based network programming and multiprotocol integration.")
12678 (license license:expat)))
12679
12680 (define-public python2-twisted
12681 (package-with-python2 python-twisted))
12682
12683 (define-public python-pika
12684 (package
12685 (name "python-pika")
12686 (version "0.12.0")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "pika" version))
12691 (sha256
12692 (base32
12693 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12694 (build-system python-build-system)
12695 (native-inputs
12696 `(("python-pyev" ,python-pyev)
12697 ("python-tornado" ,python-tornado)
12698 ("python-twisted" ,python-twisted)))
12699 (home-page "https://pika.readthedocs.org")
12700 (synopsis "Pure Python AMQP Client Library")
12701 (description
12702 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12703 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12704 network support library.")
12705 (license license:bsd-3)))
12706
12707 (define-public python2-pika
12708 (package-with-python2 python-pika))
12709
12710 (define-public python-ply
12711 (package
12712 (name "python-ply")
12713 (version "3.11")
12714 (source
12715 (origin
12716 (method url-fetch)
12717 (uri (pypi-uri "ply" version))
12718 (sha256
12719 (base32
12720 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12721 (build-system python-build-system)
12722 (home-page "http://www.dabeaz.com/ply/")
12723 (synopsis "Python Lex & Yacc")
12724 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12725 It uses LR parsing and does extensive error checking.")
12726 (license license:bsd-3)))
12727
12728 (define-public python-tabulate
12729 (package
12730 (name "python-tabulate")
12731 (version "0.8.7")
12732 (source (origin
12733 (method url-fetch)
12734 (uri (pypi-uri "tabulate" version))
12735 (sha256
12736 (base32
12737 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12738 (build-system python-build-system)
12739 (arguments
12740 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12741 ;; and the latest release is not tagged in the upstream repository.
12742 '(#:tests? #f))
12743 (home-page "https://bitbucket.org/astanin/python-tabulate")
12744 (synopsis "Pretty-print tabular data")
12745 (description
12746 "Tabulate is a library and command-line utility to pretty-print tabular
12747 data in Python.")
12748 (license license:expat)))
12749
12750 (define-public python2-tabulate
12751 (package-with-python2 python-tabulate))
12752
12753 (define-public python-kazoo
12754 (package
12755 (name "python-kazoo")
12756 (version "2.4.0")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "kazoo" version))
12761 (sha256
12762 (base32
12763 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12764 (build-system python-build-system)
12765 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12766 (propagated-inputs
12767 `(("python-six" ,python-six)))
12768 (home-page "https://kazoo.readthedocs.org")
12769 (synopsis "High-level Zookeeper client library")
12770 (description
12771 "Kazoo is a Python client library for the Apache Zookeeper distributed
12772 application service. It is designed to be easy to use and to avoid common
12773 programming errors.")
12774 (license license:asl2.0)))
12775
12776 (define-public python2-kazoo
12777 (package-with-python2 python-kazoo))
12778
12779 (define-public python-pykafka
12780 (package
12781 (name "python-pykafka")
12782 (version "2.4.0")
12783 (source (origin
12784 (method url-fetch)
12785 (uri (pypi-uri "pykafka" version))
12786 (sha256
12787 (base32
12788 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12789 (build-system python-build-system)
12790 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12791 (propagated-inputs
12792 `(("python-gevent" ,python-gevent)
12793 ("python-kazoo" ,python-kazoo)
12794 ("python-tabulate" ,python-tabulate)))
12795 (inputs
12796 `(("librdkafka" ,librdkafka)))
12797 (home-page "https://pykafka.readthedocs.io/")
12798 (synopsis "Apache Kafka client for Python")
12799 (description
12800 "PyKafka is a client for the Apache Kafka distributed messaging system.
12801 It includes Python implementations of Kafka producers and consumers, which
12802 are optionally backed by a C extension built on librdkafka.")
12803 (license license:asl2.0)))
12804
12805 (define-public python2-pykafka
12806 (package-with-python2 python-pykafka))
12807
12808 (define-public python-wcwidth
12809 (package
12810 (name "python-wcwidth")
12811 (version "0.1.8")
12812 (source (origin
12813 (method url-fetch)
12814 (uri (pypi-uri "wcwidth" version))
12815 (sha256
12816 (base32
12817 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12818 (build-system python-build-system)
12819 (home-page "https://github.com/jquast/wcwidth")
12820 (synopsis "Measure number of terminal column cells of wide-character codes")
12821 (description "Wcwidth measures the number of terminal column cells of
12822 wide-character codes. It is useful for those implementing a terminal emulator,
12823 or programs that carefully produce output to be interpreted by one. It is a
12824 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12825 specified in POSIX.1-2001 and POSIX.1-2008.")
12826 (license license:expat)))
12827
12828 (define-public python2-wcwidth
12829 (package-with-python2 python-wcwidth))
12830
12831 (define-public python2-jsonrpclib
12832 (package
12833 (name "python2-jsonrpclib")
12834 (version "0.1.7")
12835 (source (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "jsonrpclib" version))
12838 (sha256
12839 (base32
12840 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12841 (build-system python-build-system)
12842 (arguments
12843 `(#:tests? #f
12844 #:python ,python-2))
12845 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12846 (synopsis "Implementation of JSON-RPC specification for Python")
12847 (description
12848 "This library is an implementation of the JSON-RPC specification.
12849 It supports both the original 1.0 specification, as well as the
12850 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12851 etc.")
12852 (license license:asl2.0)))
12853
12854 (define-public python-chai
12855 (package
12856 (name "python-chai")
12857 (version "1.1.2")
12858 (source (origin
12859 (method url-fetch)
12860 (uri (pypi-uri "chai" version))
12861 (sha256
12862 (base32
12863 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12864 (build-system python-build-system)
12865 (home-page "https://github.com/agoragames/chai")
12866 (synopsis "Mocking framework for Python")
12867 (description
12868 "Chai provides an api for mocking, stubbing and spying your python
12869 objects, patterned after the Mocha library for Ruby.")
12870 (license license:bsd-3)))
12871
12872 (define-public python2-chai
12873 (package-with-python2 python-chai))
12874
12875 (define-public python-inflection
12876 (package
12877 (name "python-inflection")
12878 (version "0.3.1")
12879 (source
12880 (origin (method url-fetch)
12881 (uri (pypi-uri "inflection" version))
12882 (sha256
12883 (base32
12884 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12885 (build-system python-build-system)
12886 (native-inputs
12887 `(("python-pytest" ,python-pytest)))
12888 (home-page "https://github.com/jpvanhal/inflection")
12889 (synopsis "Python string transformation library")
12890 (description
12891 "Inflection is a string transformation library. It singularizes
12892 and pluralizes English words, and transforms strings from CamelCase to
12893 underscored string.")
12894 (license license:expat)))
12895
12896 (define-public python2-inflection
12897 (package-with-python2 python-inflection))
12898
12899 (define-public python-pylev
12900 (package
12901 (name "python-pylev")
12902 (version "1.3.0")
12903 (source (origin
12904 (method url-fetch)
12905 (uri (pypi-uri "pylev" version))
12906 (sha256
12907 (base32
12908 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12909 (build-system python-build-system)
12910 (home-page "https://github.com/toastdriven/pylev")
12911 (synopsis "Levenshtein distance implementation in Python")
12912 (description "Pure Python Levenshtein implementation, based off the
12913 Wikipedia code samples at
12914 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12915 (license license:bsd-3)))
12916
12917 (define-public python2-pylev
12918 (package-with-python2 python-pylev))
12919
12920 (define-public python-cleo
12921 (package
12922 (name "python-cleo")
12923 (version "0.8.1")
12924 (source (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "cleo" version))
12927 (sha256
12928 (base32
12929 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12930 (build-system python-build-system)
12931 (native-inputs
12932 `( ;; For testing
12933 ("python-mock" ,python-mock)
12934 ("python-pytest-mock" ,python-pytest-mock)
12935 ("python-pytest" ,python-pytest)))
12936 (propagated-inputs
12937 `(("python-backpack" ,python-backpack)
12938 ("python-clikit" ,python-clikit)
12939 ("python-pastel" ,python-pastel)
12940 ("python-pylev" ,python-pylev)))
12941 (home-page "https://github.com/sdispater/cleo")
12942 (synopsis "Command-line arguments library for Python")
12943 (description
12944 "Cleo allows you to create command-line commands with signature in
12945 docstring and colored output.")
12946 (license license:expat)))
12947
12948 (define-public python2-cleo
12949 (package-with-python2 python-cleo))
12950
12951 (define-public python-tomlkit
12952 (package
12953 (name "python-tomlkit")
12954 (version "0.6.0")
12955 (source
12956 (origin
12957 (method url-fetch)
12958 (uri (pypi-uri "tomlkit" version))
12959 (sha256
12960 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12961 (build-system python-build-system)
12962 (native-inputs
12963 `(("python-pytest" ,python-pytest)))
12964 (home-page "https://github.com/sdispater/tomlkit")
12965 (synopsis "Style-preserving TOML library")
12966 (description
12967 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12968 preserves all comments, indentations, whitespace and internal element ordering,
12969 and makes them accessible and editable via an intuitive API. It can also
12970 create new TOML documents from scratch using the provided helpers. Part of the
12971 implementation has been adapted, improved, and fixed from Molten.")
12972 (license license:expat)))
12973
12974 (define-public python-shellingham
12975 (package
12976 (name "python-shellingham")
12977 (version "1.3.2")
12978 (source
12979 (origin
12980 (method url-fetch)
12981 (uri (pypi-uri "shellingham" version))
12982 (sha256
12983 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12984 (build-system python-build-system)
12985 (arguments
12986 `(#:phases
12987 (modify-phases %standard-phases
12988 (add-after 'unpack 'restore-setup.py
12989 ;; setup.py will return in the next release.
12990 ;; <https://github.com/sarugaku/shellingham/issues/33>
12991 (lambda _
12992 (with-output-to-file "setup.py"
12993 (lambda _
12994 (display "from setuptools import setup\nsetup()\n")))
12995 #t)))))
12996 (home-page "https://github.com/sarugaku/shellingham")
12997 (synopsis "Tool to detect surrounding shell")
12998 (description
12999 "Shellingham detects what shell the current Python executable is
13000 running in.")
13001 (license license:isc)))
13002
13003 (define-public python-memcached
13004 (package
13005 (name "python-memcached")
13006 (version "1.59")
13007 (source
13008 (origin
13009 (method url-fetch)
13010 (uri (pypi-uri "python-memcached" version))
13011 (sha256
13012 (base32
13013 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13014 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13015 (build-system python-build-system)
13016 (propagated-inputs `(("python-six" ,python-six)))
13017 (home-page
13018 "https://github.com/linsomniac/python-memcached")
13019 (synopsis "Pure python memcached client")
13020 (description
13021 "This software is a pure Python interface to the memcached memory cache
13022 daemon. It is the client side software which allows storing values in one or
13023 more, possibly remote, memcached servers.")
13024 (license license:psfl)))
13025
13026 (define-public python-clikit
13027 (package
13028 (name "python-clikit")
13029 (version "0.6.2")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "clikit" version))
13034 (sha256
13035 (base32
13036 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13037 (build-system python-build-system)
13038 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13039 (propagated-inputs
13040 `(("python-crashtest" ,python-crashtest)
13041 ("python-pastel" ,python-pastel)
13042 ("python-pylev" ,python-pylev)))
13043 (home-page "https://github.com/sdispater/clikit")
13044 (synopsis "Group of utilities to build command line interfaces")
13045 (description
13046 "CliKit is a group of utilities to build testable command line
13047 interfaces.")
13048 (properties `((python2-variant . ,(delay python2-clikit))))
13049 (license license:expat)))
13050
13051 (define-public python2-clikit
13052 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13053 (package/inherit
13054 base
13055 (propagated-inputs
13056 `(("python-enum34" ,python2-enum34)
13057 ("python-typing" ,python2-typing)
13058 ,@(package-propagated-inputs base))))))
13059
13060 (define-public python-msgpack-python
13061 (package
13062 (name "python-msgpack-python")
13063 (version "0.5.6")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "msgpack-python" version))
13068 (sha256
13069 (base32
13070 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13071 (build-system python-build-system)
13072 (home-page "http://msgpack.org/")
13073 (synopsis "Package to deserialize messages in MessagePack binary format")
13074 (description
13075 "MessagePack is an efficient binary serialization format. It lets you
13076 exchange data among multiple languages like JSON. But it's faster and
13077 smaller. Small integers are encoded into a single byte, and typical short
13078 strings require only one extra byte in addition to the strings themselves.")
13079 (license license:asl2.0)))
13080
13081 (define-public python-cachy
13082 (package
13083 (name "python-cachy")
13084 (version "0.3.0")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "cachy" version))
13089 (sha256
13090 (base32
13091 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13092 (build-system python-build-system)
13093 (arguments
13094 '(#:phases
13095 (modify-phases %standard-phases
13096 (replace 'check
13097 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13098 "pytest"))))))
13099 (native-inputs
13100 `(("memcached" ,memcached)
13101 ("python-fakeredis" ,python-fakeredis)
13102 ("python-flexmock" ,python-flexmock)
13103 ("python-pifpaf" ,python-pifpaf)
13104 ("python-pytest" ,python-pytest)))
13105 (propagated-inputs
13106 `(("python-memcached" ,python-memcached)
13107 ("python-msgpack-python" ,python-msgpack-python)
13108 ("python-redis" ,python-redis)))
13109 (home-page "https://github.com/sdispater/cachy")
13110 (synopsis "Simple yet effective caching library")
13111 (description
13112 "Cachy provides a simple yet effective caching library. A simple but
13113 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13114 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13115 (license license:expat)))
13116
13117 (define-public poetry
13118 (package
13119 (name "poetry")
13120 (version "1.0.10")
13121 ;; Poetry can only be built from source with Poetry.
13122 (source
13123 (origin
13124 (method url-fetch)
13125 (uri (pypi-uri "poetry" version))
13126 (sha256
13127 (base32
13128 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
13129 (build-system python-build-system)
13130 (arguments
13131 `(#:tests? #f ;; Pypi does not have tests.
13132 #:phases
13133 (modify-phases %standard-phases
13134 (add-before 'build 'patch-setup-py
13135 (lambda _
13136 (substitute* "setup.py"
13137 ;; poetry won't update version as 21.0.0 relies on python > 3.6
13138 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
13139 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
13140 ;; Reported upstream:
13141 ;; <https://github.com/python-poetry/poetry/issues/2752>.
13142 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
13143 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
13144 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
13145 #t)))))
13146 (propagated-inputs
13147 `(("python-cachecontrol" ,python-cachecontrol)
13148 ("python-cachy" ,python-cachy)
13149 ("python-cleo" ,python-cleo)
13150 ("python-clikit" ,python-clikit)
13151 ("python-html5lib" ,python-html5lib)
13152 ("python-jsonschema" ,python-jsonschema)
13153 ("python-keyring" ,python-keyring)
13154 ("python-msgpack-transitional" ,python-msgpack-transitional)
13155 ("python-pexpect" ,python-pexpect)
13156 ("python-pkginfo" ,python-pkginfo)
13157 ("python-pyparsing" ,python-pyparsing)
13158 ("python-pyrsistent" ,python-pyrsistent)
13159 ("python-requests" ,python-requests)
13160 ("python-requests-toolbelt" ,python-requests-toolbelt)
13161 ("python-shellingham" ,python-shellingham)
13162 ("python-tomlkit" ,python-tomlkit)
13163 ("python-virtualenv" ,python-virtualenv)))
13164 (home-page "https://python-poetry.org")
13165 (synopsis "Python dependency management and packaging made easy")
13166 (description "Poetry is a tool for dependency management and packaging
13167 in Python. It allows you to declare the libraries your project depends on and
13168 it will manage (install/update) them for you.")
13169 (license license:expat)))
13170
13171 (define-public python-lark-parser
13172 (package
13173 (name "python-lark-parser")
13174 (version "0.9.0")
13175 (source (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "lark-parser" version))
13178 (sha256
13179 (base32
13180 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13181 (build-system python-build-system)
13182 (home-page "https://github.com/lark-parser/lark")
13183 (synopsis "Multi-language parser for Python")
13184 (description
13185 "Lark is a parser built with a focus on ergonomics, performance and
13186 resilience. Lark can parse all context-free languages. That means it is
13187 capable of parsing almost any programming language out there, and to
13188 some degree most natural languages too.")
13189 (license license:expat)))
13190
13191 (define-public python-libcst
13192 (package
13193 (name "python-libcst")
13194 (version "0.3.8")
13195 (source (origin
13196 (method url-fetch)
13197 (uri (pypi-uri "libcst" version))
13198 (sha256
13199 (base32
13200 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13201 (build-system python-build-system)
13202 (arguments
13203 `(#:phases
13204 (modify-phases %standard-phases
13205 (add-after 'unpack 'remove-failing-tests
13206 (lambda _
13207 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13208 (delete-file "libcst/tests/test_fuzz.py")
13209 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13210 (delete-file "libcst/tests/test_pyre_integration.py")
13211 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13212 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13213 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13214 #t))
13215 (add-before 'check 'generate-test-data
13216 (lambda _
13217 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13218 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13219 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13220 (replace 'check
13221 (lambda _
13222 (invoke "python" "-m" "unittest")
13223 #t)))))
13224 (native-inputs
13225 `(("python-black" ,python-black)
13226 ("python-isort" ,python-isort)))
13227 (propagated-inputs
13228 `(("python-typing-extensions" ,python-typing-extensions)
13229 ("python-typing-inspect" ,python-typing-inspect)
13230 ("python-pyyaml" ,python-pyyaml)))
13231 (home-page "https://github.com/Instagram/LibCST")
13232 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13233 (description
13234 "LibCST parses Python source code as a CST tree that keeps all
13235 formatting details (comments, whitespaces, parentheses, etc). It's useful
13236 for building automated refactoring (codemod) applications and linters.
13237 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13238 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13239 naming node types and fields, LibCST creates a lossless CST that looks and
13240 feels like an AST.")
13241 (license (list license:expat
13242 ;; Some files unde libcst/_parser/ are under Python Software
13243 ;; Foundation license (see LICENSE file for details)
13244 license:psfl
13245 ;; libcst/_add_slots.py
13246 license:asl2.0))))
13247
13248 (define-public python-typing-inspect
13249 (package
13250 (name "python-typing-inspect")
13251 (version "0.6.0")
13252 (source (origin
13253 (method url-fetch)
13254 (uri (pypi-uri "typing_inspect" version))
13255 (sha256
13256 (base32
13257 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13258 (build-system python-build-system)
13259 (propagated-inputs
13260 `(("python-mypy-extensions" ,python-mypy-extensions)
13261 ("python-typing-extensions" ,python-typing-extensions)))
13262 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13263 (synopsis "API for inspection of types in the Python @code{typing} module")
13264 (description
13265 "The @code{typing_inspect} module defines experimental API for runtime
13266 inspection of types defined in the Python standard typing module.")
13267 (license license:expat)))
13268
13269 (define-public python-lazy-object-proxy
13270 (package
13271 (name "python-lazy-object-proxy")
13272 (version "1.5.1")
13273 (source (origin
13274 (method url-fetch)
13275 (uri (pypi-uri "lazy-object-proxy" version))
13276 (sha256
13277 (base32
13278 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13279 (native-inputs
13280 `(("python-setuptools-scm" ,python-setuptools-scm)))
13281 (build-system python-build-system)
13282 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13283 (synopsis "Lazy object proxy for python")
13284 (description
13285 "Lazy object proxy is an object that wraps a callable but defers the call
13286 until the object is actually required, and caches the result of said call.")
13287 (license license:bsd-2)))
13288
13289 (define-public python2-lazy-object-proxy
13290 (package-with-python2 python-lazy-object-proxy))
13291
13292 (define-public python-dnspython
13293 (package
13294 (name "python-dnspython")
13295 (version "1.16.0")
13296 (source (origin
13297 (method url-fetch)
13298 (uri (string-append "http://www.dnspython.org/kits/"
13299 version "/dnspython-" version ".tar.gz"))
13300 (sha256
13301 (base32
13302 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13303 (build-system python-build-system)
13304 (arguments '(#:tests? #f)) ; XXX: requires internet access
13305 (home-page "http://www.dnspython.org")
13306 (synopsis "DNS toolkit for Python")
13307 (description
13308 "dnspython is a DNS toolkit for Python. It supports almost all record
13309 types. It can be used for queries, zone transfers, and dynamic updates.
13310 It supports TSIG authenticated messages and EDNS0.")
13311 (license license:expat)))
13312
13313 (define-public python2-dnspython
13314 (package-with-python2 python-dnspython))
13315
13316 (define-public python-py3dns
13317 (package
13318 (name "python-py3dns")
13319 (version "3.2.1")
13320 (source
13321 (origin
13322 (method url-fetch)
13323 (uri (pypi-uri "py3dns" version))
13324 (sha256
13325 (base32
13326 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13327 (build-system python-build-system)
13328 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13329 ;; removing functionality so we copy from Nix and "just don't build it".
13330 (arguments
13331 `(#:phases
13332 (modify-phases %standard-phases
13333 (add-after 'unpack 'patch-source
13334 (lambda _
13335 (substitute* "setup.py"
13336 (("import DNS") "")
13337 (("DNS.__version__") (string-append "\"" ,version "\"")))
13338 #t)))
13339 #:tests? #f)) ; Also skip the tests.
13340 (home-page "https://launchpad.net/py3dns")
13341 (synopsis "Python 3 DNS library")
13342 (description "This Python 3 module provides a DNS API for looking up DNS
13343 entries from within Python 3 modules and applications. This module is a
13344 simple, lightweight implementation.")
13345 (license license:psfl)))
13346
13347 (define-public python-email-validator
13348 (package
13349 (name "python-email-validator")
13350 (version "1.0.2")
13351 (source
13352 (origin (method url-fetch)
13353 (uri (pypi-uri "email_validator" version))
13354 (sha256
13355 (base32
13356 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13357 (build-system python-build-system)
13358 (arguments
13359 '(#:phases
13360 (modify-phases %standard-phases
13361 (add-before 'build 'use-dnspython
13362 (lambda _
13363 (substitute* "setup.py"
13364 (("dnspython3") "dnspython"))
13365 #t)))))
13366 (propagated-inputs
13367 `(("python-dnspython" ,python-dnspython)
13368 ("python-idna" ,python-idna)))
13369 (home-page "https://github.com/JoshData/python-email-validator")
13370 (synopsis "Email address validation library for Python")
13371 (description
13372 "This library validates email address syntax and deliverability.")
13373 (license license:cc0)))
13374
13375 (define-public python2-email-validator
13376 (package-with-python2 python-email-validator))
13377
13378 (define-public python-ukpostcodeparser
13379 (package
13380 (name "python-ukpostcodeparser")
13381 (version "1.0.3")
13382 (source (origin
13383 (method url-fetch)
13384 (uri (pypi-uri "UkPostcodeParser" version))
13385 (sha256
13386 (base32
13387 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13388 (build-system python-build-system)
13389 (home-page "https://github.com/hamstah/ukpostcodeparser")
13390 (synopsis "UK Postcode parser for Python")
13391 (description
13392 "This library provides the @code{parse_uk_postcode} function for
13393 parsing UK postcodes.")
13394 (license license:expat)))
13395
13396 (define-public python2-ukpostcodeparser
13397 (package-with-python2 python-ukpostcodeparser))
13398
13399 (define-public python-faker
13400 (package
13401 (name "python-faker")
13402 (version "4.0.2")
13403 (source (origin
13404 (method url-fetch)
13405 (uri (pypi-uri "Faker" version))
13406 (sha256
13407 (base32
13408 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13409 (build-system python-build-system)
13410 (arguments
13411 '(#:phases
13412 (modify-phases %standard-phases
13413 (replace 'check
13414 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13415 (native-inputs
13416 `(;; For testing
13417 ("python-freezegun" ,python-freezegun)
13418 ("python-pytest" ,python-pytest)
13419 ("python-random2" ,python-random2)
13420 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13421 ("python-validators" ,python-validators)))
13422 (propagated-inputs
13423 `(("python-dateutil" ,python-dateutil)
13424 ("python-text-unidecode" ,python-text-unidecode)))
13425 (home-page "https://github.com/joke2k/faker")
13426 (synopsis "Python package that generates fake data")
13427 (description
13428 "Faker is a Python package that generates fake data such as names,
13429 addresses, and phone numbers.")
13430 (license license:expat)
13431 (properties `((python2-variant . ,(delay python2-faker))))))
13432
13433 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13434 (define-public python2-faker
13435 (let ((base (package-with-python2 (strip-python2-variant
13436 python-faker))))
13437 (package
13438 (inherit base)
13439 (version "3.0.1")
13440 (source (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "Faker" version))
13443 (sha256
13444 (base32
13445 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13446 (native-inputs
13447 `(("python-mock" ,python2-mock)
13448 ,@(package-native-inputs base)))
13449 (propagated-inputs
13450 `(("python2-ipaddress" ,python2-ipaddress)
13451 ("python2-six" ,python2-six)
13452 ,@(package-propagated-inputs base))))))
13453
13454 (define-public python-pyaml
13455 (package
13456 (name "python-pyaml")
13457 (version "18.11.0")
13458 (source (origin
13459 (method url-fetch)
13460 (uri (pypi-uri "pyaml" version))
13461 (sha256
13462 (base32
13463 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13464 (build-system python-build-system)
13465 (native-inputs
13466 `(("python-unidecode" ,python-unidecode)))
13467 (propagated-inputs
13468 `(("python-pyyaml" ,python-pyyaml)))
13469 (home-page "https://github.com/mk-fg/pretty-yaml")
13470 (synopsis "YAML pretty-print library for Python")
13471 (description
13472 "pyaml is a PyYAML based python module to produce pretty and readable
13473 YAML-serialized data.")
13474 (license license:wtfpl2)))
13475
13476 (define-public python2-pyaml
13477 (package-with-python2 python-pyaml))
13478
13479 (define-public python-backpack
13480 (package
13481 (name "python-backpack")
13482 (version "0.1")
13483 (source
13484 (origin
13485 (method url-fetch)
13486 (uri (pypi-uri "backpack" version))
13487 (sha256
13488 (base32
13489 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13490 (build-system python-build-system)
13491 (native-inputs
13492 `(("python-pytest" ,python-pytest)
13493 ("python-nose" ,python-nose)))
13494 (propagated-inputs
13495 `(("python-simplejson" ,python-simplejson)))
13496 (home-page "https://github.com/sdispater/backpack")
13497 (synopsis "Utilities for working with Python collections")
13498 (description "Backpack provides some useful utilities for working with
13499 collections of data.")
13500 (license license:expat)))
13501
13502 (define-public python2-backpack
13503 (package-with-python2 python-backpack))
13504
13505 (define-public python-prompt-toolkit
13506 (package
13507 (name "python-prompt-toolkit")
13508 (version "3.0.7")
13509 (source
13510 (origin
13511 (method url-fetch)
13512 (uri (pypi-uri "prompt_toolkit" version))
13513 (sha256
13514 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13515 (build-system python-build-system)
13516 (arguments
13517 `(#:phases
13518 (modify-phases %standard-phases
13519 (delete 'check)
13520 (add-after 'install 'post-install-check
13521 (lambda* (#:key inputs outputs #:allow-other-keys)
13522 ;; HOME is needed for the test
13523 ;; "test_pathcompleter_can_expanduser".
13524 (setenv "HOME" "/tmp")
13525 (add-installed-pythonpath inputs outputs)
13526 (invoke "py.test"))))))
13527 (propagated-inputs
13528 `(("python-wcwidth" ,python-wcwidth)))
13529 (native-inputs
13530 `(("python-pytest" ,python-pytest)))
13531 (home-page
13532 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13533 (synopsis "Library for building command line interfaces in Python")
13534 (description
13535 "Prompt-Toolkit is a library for building interactive command line
13536 interfaces in Python. It's like GNU Readline but it also features syntax
13537 highlighting while typing, out-of-the-box multi-line input editing, advanced
13538 code completion, incremental search, support for Chinese double-width
13539 characters, mouse support, and auto suggestions.")
13540 (license license:bsd-3)
13541 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13542
13543 (define-public python-prompt-toolkit-2
13544 (package (inherit python-prompt-toolkit)
13545 (name "python-prompt-toolkit")
13546 (version "2.0.7")
13547 (source
13548 (origin
13549 (method url-fetch)
13550 (uri (pypi-uri "prompt_toolkit" version))
13551 (sha256
13552 (base32
13553 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13554 (propagated-inputs
13555 `(("python-wcwidth" ,python-wcwidth)
13556 ("python-six" ,python-six)
13557 ("python-pygments" ,python-pygments)))
13558 (properties '())))
13559
13560 (define-public python2-prompt-toolkit
13561 (package-with-python2 python-prompt-toolkit-2))
13562
13563 (define-public python-prompt-toolkit-1
13564 (package (inherit python-prompt-toolkit-2)
13565 (version "1.0.15")
13566 (source
13567 (origin
13568 (method url-fetch)
13569 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13570 (sha256
13571 (base32
13572 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13573
13574 (define-public python2-prompt-toolkit-1
13575 (package-with-python2 python-prompt-toolkit-1))
13576
13577 (define-public python-jedi
13578 (package
13579 (name "python-jedi")
13580 (version "0.17.2")
13581 (source
13582 (origin
13583 (method url-fetch)
13584 (uri (pypi-uri "jedi" version))
13585 (sha256
13586 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13587 (build-system python-build-system)
13588 (arguments
13589 `(#:phases
13590 (modify-phases %standard-phases
13591 (replace 'check
13592 (lambda _
13593 (setenv "HOME" "/tmp")
13594 (invoke "python" "-m" "pytest" "-vv"))))))
13595 (native-inputs
13596 `(("python-pytest" ,python-pytest)
13597 ("python-docopt" ,python-docopt)))
13598 (propagated-inputs
13599 `(("python-parso" ,python-parso)))
13600 (home-page "https://github.com/davidhalter/jedi")
13601 (synopsis "Autocompletion and static analysis library for Python")
13602 (description
13603 "Jedi is a static analysis tool for Python that can be used in Integrated
13604 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13605 on a deeper level than many other static analysis frameworks for Python.
13606
13607 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13608 well.")
13609 (license license:expat)))
13610
13611 (define-public python2-jedi
13612 (package-with-python2 python-jedi))
13613
13614 (define-public ptpython
13615 (package
13616 (name "ptpython")
13617 (version "3.0.5")
13618 (source (origin
13619 (method url-fetch)
13620 (uri (pypi-uri "ptpython" version))
13621 (sha256
13622 (base32
13623 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13624 (build-system python-build-system)
13625 (arguments
13626 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13627 (propagated-inputs
13628 `(("python-appdirs" ,python-appdirs)
13629 ("python-jedi" ,python-jedi)
13630 ("python-prompt-toolkit" ,python-prompt-toolkit)
13631 ("python-pygments" ,python-pygments)))
13632 (home-page "https://github.com/jonathanslenders/ptpython")
13633 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13634 (description
13635 "ptpython is a Python read-eval-print loop with IDE-like features.
13636 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13637 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13638 etc.")
13639 (license license:bsd-3)
13640 (properties `((python2-variant . ,(delay ptpython-2))))))
13641
13642 (define-public ptpython-2
13643 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13644 (package
13645 (inherit base)
13646 (name "ptpython2"))))
13647
13648 (define-public python-stem
13649 (package
13650 (name "python-stem")
13651 (version "1.8.0")
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "stem" version))
13656 (sha256
13657 (base32
13658 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13659 (build-system python-build-system)
13660 (arguments
13661 `(#:phases
13662 (modify-phases %standard-phases
13663 (replace 'check
13664 (lambda _
13665 (invoke "./run_tests.py" "--unit")
13666 #t)))))
13667 (native-inputs
13668 `(("python-mock" ,python-mock)
13669 ("python-pycodestyle" ,python-pycodestyle)
13670 ("python-pyflakes" ,python-pyflakes)))
13671 (home-page "https://stem.torproject.org/")
13672 (synopsis
13673 "Python controller library that allows applications to interact with Tor")
13674 (description
13675 "Stem is a Python controller library for Tor. With it you can use Tor's
13676 control protocol to script against the Tor process and read descriptor data
13677 relays publish about themselves.")
13678 (license license:lgpl3)))
13679
13680 (define-public python2-stem
13681 (package-with-python2 python-stem))
13682
13683 (define-public python-pyserial
13684 (package
13685 (name "python-pyserial")
13686 (version "3.4")
13687 (source
13688 (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "pyserial" version))
13691 (sha256
13692 (base32
13693 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13694 (build-system python-build-system)
13695 (arguments
13696 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13697 ;; #:phases
13698 ;; (modify-phases %standard-phases
13699 ;; (replace 'check
13700 ;; (lambda _
13701 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13702 (home-page
13703 "https://github.com/pyserial/pyserial")
13704 (synopsis "Python Serial Port Bindings")
13705 (description "@code{pyserial} provide serial port bindings for Python. It
13706 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13707 and/or Xon/Xoff. The port is accessed in RAW mode.")
13708 (license license:bsd-3)))
13709
13710 (define-public python2-pyserial
13711 (package-with-python2 python-pyserial))
13712
13713 (define-public python-kivy
13714 (package
13715 (name "python-kivy")
13716 (version "1.10.1")
13717 (source
13718 (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "Kivy" version))
13721 (file-name (string-append name "-" version ".tar.gz"))
13722 (sha256
13723 (base32
13724 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13725 (build-system python-build-system)
13726 (arguments
13727 `(#:tests? #f ; Tests require many optional packages
13728 #:phases
13729 (modify-phases %standard-phases
13730 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13731 (lambda* (#:key inputs #:allow-other-keys)
13732 (setenv "KIVY_SDL2_PATH"
13733 (string-append (assoc-ref inputs "sdl-union")
13734 "/include/SDL2"))
13735 #t)))))
13736 (native-inputs
13737 `(("pkg-config" ,pkg-config)
13738 ("python-cython" ,python-cython)))
13739 (inputs
13740 `(("gstreamer" ,gstreamer)
13741 ("mesa" ,mesa)
13742 ("sdl-union"
13743 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13744 (home-page "https://kivy.org")
13745 (synopsis
13746 "Multitouch application framework")
13747 (description
13748 "A software library for rapid development of
13749 hardware-accelerated multitouch applications.")
13750 (license license:expat)))
13751
13752 (define-public python2-kivy
13753 (package-with-python2 python-kivy))
13754
13755 (define-public python-binaryornot
13756 (package
13757 (name "python-binaryornot")
13758 (version "0.4.4")
13759 (source (origin
13760 (method url-fetch)
13761 (uri (pypi-uri "binaryornot" version))
13762 (sha256
13763 (base32
13764 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13765 (build-system python-build-system)
13766 (arguments
13767 `(#:phases
13768 (modify-phases %standard-phases
13769 (add-after 'unpack 'patch-tests
13770 (lambda _
13771 ;; TypeError: binary() got an unexpected keyword argument
13772 ;; 'average_size'.
13773 (substitute* "tests/test_check.py"
13774 (("average_size=512") ""))
13775 #t)))))
13776 (propagated-inputs
13777 `(("python-chardet" ,python-chardet)
13778 ("python-hypothesis" ,python-hypothesis)))
13779 (home-page "https://github.com/audreyr/binaryornot")
13780 (synopsis "Package to check if a file is binary or text")
13781 (description "Ultra-lightweight pure Python package to check if a file is
13782 binary or text.")
13783 (license license:bsd-3)
13784 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13785
13786 (define-public python2-binaryornot
13787 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13788 (package (inherit base)
13789 (propagated-inputs
13790 `(("python2-enum34" ,python2-enum34)
13791 ,@(package-propagated-inputs base))))))
13792
13793 (define-public python-binwalk
13794 (package
13795 (name "python-binwalk")
13796 (version "2.2.0")
13797 (source
13798 (origin
13799 (method git-fetch)
13800 (uri (git-reference
13801 (url "https://github.com/ReFirmLabs/binwalk")
13802 (commit (string-append "v" version))))
13803 (file-name (git-file-name name version))
13804 (sha256
13805 (base32
13806 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13807 (build-system python-build-system)
13808 (arguments
13809 `(#:phases
13810 (modify-phases %standard-phases
13811 (add-before 'check 'set-pythonpath
13812 (lambda _
13813 (setenv "PYTHONPATH"
13814 (string-append
13815 (getcwd) "/src/"
13816 ":" (getenv "PYTHONPATH")))
13817 (setenv "HOME" "")
13818 #t)))))
13819 (native-inputs
13820 `(("python-coverage" ,python-coverage)
13821 ("python-nose" ,python-nose)))
13822 (home-page "https://github.com/ReFirmLabs/binwalk")
13823 (synopsis "Firmware analysis tool")
13824 (description "Binwalk is a tool for analyzing, reverse engineering, and
13825 extracting firmware images")
13826 (license license:expat)))
13827
13828 (define-public python-nltk
13829 (package
13830 (name "python-nltk")
13831 (version "3.2.1")
13832 (source (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "nltk" version))
13835 (sha256
13836 (base32
13837 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13838 (build-system python-build-system)
13839 (arguments
13840 '(;; The tests require some extra resources to be downloaded.
13841 ;; TODO Try packaging these resources.
13842 #:tests? #f))
13843 (home-page "http://nltk.org/")
13844 (synopsis "Natural Language Toolkit")
13845 (description "It provides interfaces to over 50 corpora and lexical
13846 resources such as WordNet, along with a suite of text processing libraries
13847 for classification, tokenization, stemming, tagging, parsing, and semantic
13848 reasoning, wrappers for natural language processing libraries.")
13849 (license license:asl2.0)))
13850
13851 (define-public python2-nltk
13852 (package-with-python2 python-nltk))
13853
13854 (define-public python-pymongo
13855 (package
13856 (name "python-pymongo")
13857 (version "3.7.2")
13858 (source (origin
13859 (method url-fetch)
13860 (uri (pypi-uri "pymongo" version))
13861 (sha256
13862 (base32
13863 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13864 (build-system python-build-system)
13865 (propagated-inputs
13866 `(("python-certifi" ,python-certifi)))
13867 (home-page "https://github.com/mongodb/mongo-python-driver")
13868 (synopsis "Python driver for MongoDB")
13869 (description "Python driver for MongoDB.")
13870 (license license:asl2.0)))
13871
13872 (define-public python2-pymongo
13873 (package-with-python2 python-pymongo))
13874
13875 (define-public python-consul
13876 (package
13877 (name "python-consul")
13878 (version "0.6.1")
13879 (source
13880 (origin
13881 (method url-fetch)
13882 (uri (pypi-uri "python-consul" version))
13883 (sha256
13884 (base32
13885 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13886 (build-system python-build-system)
13887 (arguments
13888 '(#:tests? #f)) ; The tests are not distributed
13889 (propagated-inputs
13890 `(("python-requests" ,python-requests)
13891 ("python-six" ,python-six)))
13892 (home-page "https://github.com/cablehead/python-consul")
13893 (synopsis "Python client for Consul")
13894 (description
13895 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13896 discovery, monitoring and configuration.")
13897 (license license:expat)))
13898
13899 (define-public python2-consul
13900 (package-with-python2 python-consul))
13901
13902 (define-public python-schematics
13903 (package
13904 (name "python-schematics")
13905 (version "1.1.1")
13906 (source
13907 (origin
13908 (method git-fetch)
13909 (uri (git-reference
13910 (url "https://github.com/schematics/schematics")
13911 (commit (string-append "v" version))))
13912 (file-name (git-file-name name version))
13913 (sha256
13914 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13915 (build-system python-build-system)
13916 (propagated-inputs
13917 `(("python-six" ,python-six)))
13918 (arguments
13919 ;; The tests require a bunch of not very nice packages with fixed
13920 ;; version requirements (e.g. python-coveralls).
13921 `(#:tests? #f))
13922 (home-page "https://github.com/schematics/schematics")
13923 (synopsis "Python Data Structures for Humans")
13924 (description "Python Data Structures for Humans.")
13925 (license license:bsd-3)))
13926
13927 (define-public python2-schematics
13928 (package-with-python2 python-schematics))
13929
13930 (define-public python-odfpy
13931 (package
13932 (name "python-odfpy")
13933 (version "1.4.1")
13934 (source (origin
13935 (method url-fetch)
13936 (uri (pypi-uri "odfpy" version))
13937 (sha256
13938 (base32
13939 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13940 (arguments
13941 `(#:phases
13942 (modify-phases %standard-phases
13943 (replace 'check
13944 (lambda _
13945 (setenv "PYTHONPATH" (string-append "./build/lib:"
13946 (getenv "PYTHONPATH")))
13947 (invoke "pytest" "-vv"))))))
13948 (build-system python-build-system)
13949 (native-inputs
13950 `(("python-pytest" ,python-pytest)))
13951 (propagated-inputs
13952 `(("python-defusedxml" ,python-defusedxml)))
13953 (home-page "https://github.com/eea/odfpy")
13954 (synopsis "Python API and tools to manipulate OpenDocument files")
13955 (description "Collection of libraries and utility programs written in
13956 Python to manipulate OpenDocument 1.2 files.")
13957 (license
13958 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13959 ;; number of files with other licenses.
13960 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13961
13962 (define-public python2-odfpy
13963 (package-with-python2 python-odfpy))
13964
13965 (define-public python-natsort
13966 (package
13967 (name "python-natsort")
13968 (version "7.0.1")
13969 (source (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "natsort" version))
13972 (sha256
13973 (base32
13974 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13975 (build-system python-build-system)
13976 (arguments
13977 `(#:modules ((guix build utils)
13978 (guix build python-build-system)
13979 (srfi srfi-1)
13980 (srfi srfi-26)
13981 (ice-9 ftw))
13982 #:phases
13983 (modify-phases %standard-phases
13984 (add-before 'check 'set-cachedir
13985 ;; Tests require write access to $HOME by default
13986 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13987 (replace 'check
13988 (lambda _
13989 (let ((cwd (getcwd)))
13990 (setenv "PYTHONPATH"
13991 (string-append
13992 cwd "/build/"
13993 (find (cut string-prefix? "lib" <>)
13994 (scandir (string-append cwd "/build")))
13995 ":"
13996 (getenv "PYTHONPATH")))
13997 (invoke "pytest" "-v")))))))
13998 (native-inputs
13999 `(("python-hypothesis" ,python-hypothesis)
14000 ("python-pytest-cov" ,python-pytest-cov)
14001 ("python-pytest-mock" ,python-pytest-mock)
14002 ("python-pytest" ,python-pytest)))
14003 (propagated-inputs ; TODO: Add python-fastnumbers.
14004 `(("python-pyicu" ,python-pyicu)))
14005 (home-page "https://github.com/SethMMorton/natsort")
14006 (synopsis "Natural sorting for python and shell")
14007 (description
14008 "Natsort lets you apply natural sorting on lists instead of
14009 lexicographical. If you use the built-in @code{sorted} method in python
14010 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14011 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14012 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14013 identifies numbers and sorts them separately from strings. It can also sort
14014 version numbers, real numbers, mixed types and more, and comes with a shell
14015 command @command{natsort} that exposes this functionality in the command line.")
14016 (license license:expat)
14017 (properties `((python2-variant . ,(delay python2-natsort))))))
14018
14019 ;; Natsort 6.x are the last versions with support for Python 2.
14020 (define-public python2-natsort
14021 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14022 (package (inherit base)
14023 (version "6.2.1")
14024 (source (origin
14025 (method url-fetch)
14026 (uri (pypi-uri "natsort" version))
14027 (sha256
14028 (base32
14029 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14030 (native-inputs
14031 `(("python2-pathlib" ,python2-pathlib)
14032 ,@(package-native-inputs base))))))
14033
14034 (define-public glances
14035 (package
14036 (name "glances")
14037 (version "3.1.4")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "Glances" version))
14042 (sha256
14043 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14044 (modules '((guix build utils)))
14045 (snippet
14046 '(begin
14047 ;; Glances phones PyPI for weekly update checks by default.
14048 ;; Disable these. The user can re-enable them if desired.
14049 (substitute* "glances/outdated.py"
14050 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14051 (string-append indentation
14052 "self.args.disable_check_update = True\n"
14053 line)))
14054 #t))))
14055 (build-system python-build-system)
14056 (propagated-inputs
14057 `(("python-future" ,python-future)
14058 ("python-psutil" ,python-psutil)))
14059 (home-page "https://github.com/nicolargo/glances")
14060 (synopsis "Cross-platform curses-based monitoring tool")
14061 (description
14062 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14063 Glances uses the PsUtil library to get information from your system. It
14064 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14065 (license license:lgpl3+)))
14066
14067 (define-public python-glances
14068 (deprecated-package "python-glances" glances))
14069
14070 (define-public python-graphql-core
14071 (package
14072 (name "python-graphql-core")
14073 (version "0.5.3")
14074 (source
14075 (origin
14076 (method url-fetch)
14077 (uri (pypi-uri "graphql-core" version))
14078 (sha256
14079 (base32
14080 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14081 (build-system python-build-system)
14082 (arguments
14083 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14084 #:phases
14085 (modify-phases %standard-phases
14086 (add-after 'unpack 'patch-hardcoded-version
14087 (lambda _ (substitute*
14088 "setup.py"
14089 (("'gevent==1.1rc1'") "'gevent'"))
14090 #t)))))
14091 (native-inputs
14092 `(("python-gevent" ,python-gevent)
14093 ("python-mock" ,python-mock)
14094 ("python-pytest-mock" ,python-pytest-mock)))
14095 (propagated-inputs
14096 `(("python-promise" ,python-promise)
14097 ("python-six" ,python-six)))
14098 (home-page "https://github.com/graphql-python/graphql-core")
14099 (synopsis "GraphQL implementation for Python")
14100 (description
14101 "GraphQL implementation for Python. GraphQL is a data query language and
14102 runtime designed and used to request and deliver data to mobile and web apps.
14103 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14104 to Python.")
14105 (license license:expat)))
14106
14107 (define-public python2-graphql-core
14108 (package-with-python2 python-graphql-core))
14109
14110 (define-public python-graphql-relay
14111 (package
14112 (name "python-graphql-relay")
14113 (version "0.4.5")
14114 (source
14115 (origin
14116 (method url-fetch)
14117 (uri (pypi-uri "graphql-relay" version))
14118 (sha256
14119 (base32
14120 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14121 (build-system python-build-system)
14122 (arguments
14123 '(#:tests? #f)) ; The tests are not distributed
14124 (propagated-inputs
14125 `(("python-graphql-core" ,python-graphql-core)
14126 ("python-promise" ,python-promise)
14127 ("python-six" ,python-six)))
14128 (home-page "https://github.com/graphql-python/graphql-relay-py")
14129 (synopsis "Relay implementation for Python")
14130 (description
14131 "This is a library to allow the easy creation of Relay-compliant servers
14132 using the GraphQL Python reference implementation of a GraphQL server. It
14133 should be noted that the code is a exact port of the original
14134 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14135 from Facebook.")
14136 (license license:expat)))
14137
14138 (define-public python2-graphql-relay
14139 (package-with-python2 python-graphql-relay))
14140
14141 (define-public python-graphene
14142 (package
14143 (name "python-graphene")
14144 (version "0.10.2")
14145 (source
14146 (origin
14147 (method url-fetch)
14148 (uri (pypi-uri "graphene" version))
14149 (sha256
14150 (base32
14151 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14152 (build-system python-build-system)
14153 (propagated-inputs
14154 `(("python-graphql-core" ,python-graphql-core)
14155 ("python-graphql-relay" ,python-graphql-relay)
14156 ("python-iso8601" ,python-iso8601)
14157 ("python-promise" ,python-promise)
14158 ("python-six" ,python-six)))
14159 (arguments
14160 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14161 (home-page "https://graphene-python.org/")
14162 (synopsis "GraphQL Framework for Python")
14163 (description
14164 "Graphene is a Python library for building GraphQL schemas/types.
14165 A GraphQL schema describes your data model, and provides a GraphQL server
14166 with an associated set of resolve methods that know how to fetch data.")
14167 (properties `((python2-variant . ,(delay python2-graphene))))
14168 (license license:expat)))
14169
14170 (define-public python2-graphene
14171 (let ((base (package-with-python2
14172 (strip-python2-variant python-graphene))))
14173 (package (inherit base)
14174 (native-inputs
14175 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14176 ,@(package-native-inputs base))))))
14177
14178 (define-public python-nautilus
14179 (package
14180 (name "python-nautilus")
14181 (version "0.4.9")
14182 (source
14183 (origin
14184 (method url-fetch)
14185 (uri (pypi-uri "nautilus" version))
14186 (sha256
14187 (base32
14188 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14189 (build-system python-build-system)
14190 (arguments `(#:tests? #f)) ; fails to import test modules
14191 (propagated-inputs
14192 `(("python-bcrypt" ,python-bcrypt)
14193 ("python-click" ,python-click)
14194 ("python-consul" ,python-consul)
14195 ("python-graphene" ,python-graphene)
14196 ("python-jinja2" ,python-jinja2)
14197 ("python-peewee" ,python-peewee)
14198 ("python-pika" ,python-pika)
14199 ("python-tornado" ,python-tornado)
14200 ("python-wtforms" ,python-wtforms)))
14201 (native-inputs
14202 `(("python-nose2" ,python-nose2)))
14203 (home-page "https://github.com/AlecAivazis/nautilus")
14204 (synopsis "Library for creating microservice applications")
14205 (description
14206 "Nautilus is a framework for flux based microservices that looks to
14207 provide extendible implementations of common aspects of a cloud so that you can
14208 focus on building massively scalable web applications.")
14209 (license license:expat)))
14210
14211 (define-public python-random2
14212 (package
14213 (name "python-random2")
14214 (version "1.0.1")
14215 (source (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "random2" version ".zip"))
14218 (sha256
14219 (base32
14220 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14221 (build-system python-build-system)
14222 (native-inputs `(("unzip" ,unzip)))
14223 (home-page "http://pypi.python.org/pypi/random2")
14224 (synopsis "Python 3 version of the Python 2 @code{random} module")
14225 (description
14226 "This package provides a Python 3 ported version of Python 2.7’s
14227 @code{random} module. It has also been back-ported to work in Python 2.6.
14228
14229 In Python 3, the implementation of @code{randrange()} was changed, so that
14230 even with the same seed you get different sequences in Python 2 and 3.
14231
14232 This package closes that gap, allowing stable random number generation
14233 between the different Python versions.")
14234 (license license:psfl)))
14235
14236 (define-public python2-random2
14237 (package-with-python2 python-random2))
14238
14239 (define-public python-snowballstemmer
14240 (package
14241 (name "python-snowballstemmer")
14242 (version "2.0.0")
14243 (source (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "snowballstemmer" version))
14246 (sha256
14247 (base32
14248 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14249 (build-system python-build-system)
14250 (arguments
14251 `(;; No tests exist
14252 #:tests? #f))
14253 (home-page "https://github.com/shibukawa/snowball_py")
14254 (synopsis "Snowball stemming library collection for Python")
14255 (description "This package provides 16 word stemmer algorithms generated
14256 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14257 English stemmer.")
14258 (license license:bsd-3)))
14259
14260 (define-public python2-snowballstemmer
14261 (package-with-python2 python-snowballstemmer))
14262
14263 (define-public python-setproctitle
14264 (package
14265 (name "python-setproctitle")
14266 (version "1.1.10")
14267 (source
14268 (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "setproctitle" version))
14271 (sha256
14272 (base32
14273 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14274 (build-system python-build-system)
14275 (arguments
14276 '(#:phases
14277 (modify-phases %standard-phases
14278 (add-before 'check 'patch-Makefile
14279 ;; Stricly this is only required for the python2 variant.
14280 ;; But adding a phase in an inherited package seems to be
14281 ;; cumbersum. So we patch even for python3.
14282 (lambda _
14283 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14284 (when nose
14285 (substitute* "Makefile"
14286 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14287 (string-append nose "/bin/nosetests "))))
14288 #t)))
14289 (replace 'check
14290 (lambda _
14291 (setenv "PYTHON" (or (which "python3") (which "python")))
14292 (setenv "PYCONFIG" (if (which "python3-config")
14293 "python3-config --embed"
14294 "python-config"))
14295 (setenv "CC" "gcc")
14296 ;; No need to extend PYTHONPATH to find the built package, since
14297 ;; the Makefile will build anyway
14298 (invoke "make" "check"))))))
14299 (native-inputs
14300 `(("procps" ,procps))) ; required for tests
14301 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14302 (synopsis
14303 "Setproctitle implementation for Python to customize the process title")
14304 (description "The library allows a process to change its title (as displayed
14305 by system tools such as ps and top).
14306
14307 Changing the title is mostly useful in multi-process systems, for
14308 example when a master process is forked: changing the children's title
14309 allows identifying the task each process is busy with. The technique
14310 is used by PostgreSQL and the OpenSSH Server for example.")
14311 (license license:bsd-3)
14312 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14313
14314 (define-public python2-setproctitle
14315 (let ((base (package-with-python2
14316 (strip-python2-variant python-setproctitle))))
14317 (package
14318 (inherit base)
14319 (native-inputs `(("python2-nose" ,python2-nose)
14320 ,@(package-native-inputs base))))))
14321
14322 (define-public python-validictory
14323 (package
14324 (name "python-validictory")
14325 (version "1.0.1")
14326 (source
14327 (origin
14328 (method url-fetch)
14329 (uri (pypi-uri "validictory" version))
14330 (sha256
14331 (base32
14332 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14333 (build-system python-build-system)
14334 (arguments
14335 '(#:phases
14336 (modify-phases %standard-phases
14337 (add-after 'unpack 'bootstrap
14338 ;; Move the tests out of the package directory to avoid
14339 ;; packaging them.
14340 (lambda* _
14341 (rename-file "validictory/tests" "tests")
14342 (delete-file "tests/__init__.py")))
14343 (replace 'check
14344 (lambda _
14345 ;; Extend PYTHONPATH so the built package will be found.
14346 (setenv "PYTHONPATH"
14347 (string-append (getcwd) "/build/lib:"
14348 (getenv "PYTHONPATH")))
14349 (invoke "py.test" "-vv" ))))))
14350 (native-inputs
14351 `(("python-pytest" ,python-pytest)))
14352 (home-page
14353 "https://github.com/jamesturk/validictory")
14354 (synopsis "General purpose Python data validator")
14355 (description "It allows validation of arbitrary Python data structures.
14356
14357 The schema format is based on the JSON Schema
14358 proposal (http://json-schema.org), so combined with json the library is also
14359 useful as a validator for JSON data.")
14360 (license license:expat)))
14361
14362 (define-public python2-validictory
14363 (package-with-python2 python-validictory))
14364
14365 (define-public python-pyelftools
14366 (package
14367 (name "python-pyelftools")
14368 (version "0.25")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "pyelftools" version))
14373 (sha256
14374 (base32
14375 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14376 (build-system python-build-system)
14377 (arguments
14378 `(#:phases
14379 (modify-phases %standard-phases
14380 (add-before 'check 'set-pythonpath
14381 (lambda _
14382 (setenv "PYTHONPATH"
14383 (string-append
14384 (getcwd) "/test/"
14385 ":" (getenv "PYTHONPATH")))
14386 #t)))))
14387 (home-page
14388 "https://github.com/eliben/pyelftools")
14389 (synopsis
14390 "Analyze binary and library file information")
14391 (description "This Python library provides interfaces for parsing and
14392 analyzing two binary and library file formats; the Executable and Linking
14393 Format (ELF), and debugging information in the Debugging With Attributed
14394 Record Format (DWARF).")
14395 (license license:public-domain)))
14396
14397 (define-public python-pyev
14398 (package
14399 (name "python-pyev")
14400 (version "0.9.0")
14401 (source
14402 (origin
14403 (method url-fetch)
14404 (uri (pypi-uri "pyev" version))
14405 (sha256
14406 (base32
14407 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14408 (build-system python-build-system)
14409 (arguments
14410 `(#:tests? #f ; no test suite
14411 #:phases
14412 (modify-phases %standard-phases
14413 (add-after 'unpack 'patch
14414 (lambda* (#:key inputs #:allow-other-keys)
14415 (let ((libev (string-append (assoc-ref inputs "libev")
14416 "/lib/libev.so.4")))
14417 (substitute* "setup.py"
14418 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14419 (string-append "libev_dll_name = \"" libev "\"")))))))))
14420 (inputs
14421 `(("libev" ,libev)))
14422 (home-page "http://pythonhosted.org/pyev/")
14423 (synopsis "Python libev interface")
14424 (description "Pyev provides a Python interface to libev.")
14425 (license license:gpl3)))
14426
14427 (define-public python2-pyev
14428 (package-with-python2 python-pyev))
14429
14430 (define-public python-imagesize
14431 (package
14432 (name "python-imagesize")
14433 (version "1.2.0")
14434 (source
14435 (origin
14436 (method url-fetch)
14437 (uri (pypi-uri "imagesize" version))
14438 (sha256
14439 (base32
14440 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14441 (build-system python-build-system)
14442 (home-page "https://github.com/shibukawa/imagesize_py")
14443 (synopsis "Gets image size of files in various formats in Python")
14444 (description
14445 "This package allows determination of image size from
14446 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14447 (license license:expat)))
14448
14449 (define-public python2-imagesize
14450 (package-with-python2 python-imagesize))
14451
14452 (define-public python-termstyle
14453 (package
14454 (name "python-termstyle")
14455 (version "0.1.11")
14456 (source
14457 (origin
14458 (method url-fetch)
14459 (uri (pypi-uri "termstyle" version))
14460 (sha256
14461 (base32
14462 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14463 (build-system python-build-system)
14464 (arguments
14465 '(#:phases
14466 (modify-phases %standard-phases
14467 (replace 'check
14468 (lambda _
14469 (invoke "python" "test3.py"))))))
14470 (home-page "https://github.com/gfxmonk/termstyle")
14471 (synopsis "Console text coloring for Python")
14472 (description "This package provides console text coloring for Python.")
14473 (license license:bsd-3)))
14474
14475 (define-public python-argcomplete
14476 (package
14477 (name "python-argcomplete")
14478 (version "1.11.1")
14479 (source
14480 (origin
14481 (method url-fetch)
14482 (uri (pypi-uri "argcomplete" version))
14483 (sha256
14484 (base32
14485 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14486 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14487 (build-system python-build-system)
14488 (native-inputs
14489 `(("python-coverage" ,python-coverage)
14490 ("python-flake8" ,python-flake8)
14491 ("python-pexpect" ,python-pexpect)
14492 ("python-wheel" ,python-wheel)
14493 ("tcsh" ,tcsh)
14494 ("fish" ,fish)
14495 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14496 (home-page "https://github.com/kislyuk/argcomplete")
14497 (synopsis "Shell tab completion for Python argparse")
14498 (description "argcomplete provides extensible command line tab completion
14499 of arguments and options for Python scripts using @code{argparse}. It's
14500 particularly useful for programs with many options or sub-parsers that can
14501 dynamically suggest completions; for example, when browsing resources over the
14502 network.")
14503 (license license:asl2.0)))
14504
14505 (define-public python2-argcomplete
14506 (package-with-python2 python-argcomplete))
14507
14508 (define-public python-csscompressor
14509 (package
14510 (name "python-csscompressor")
14511 (version "0.9.5")
14512 (source
14513 (origin
14514 (method url-fetch)
14515 (uri (pypi-uri "csscompressor" version))
14516 (sha256
14517 (base32
14518 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14519 (build-system python-build-system)
14520 (arguments
14521 '(#:phases
14522 (modify-phases %standard-phases
14523 (replace 'check
14524 (lambda _
14525 (invoke "py.test"))))))
14526 (native-inputs
14527 `(("python-pytest" ,python-pytest)))
14528 (home-page "https://github.com/sprymix/csscompressor")
14529 (synopsis "Python port of YUI CSS Compressor")
14530 (description
14531 "This package provides a python port of YUI CSS Compressor.")
14532 (license license:bsd-3)))
14533
14534 (define-public python-rcssmin
14535 (package
14536 (name "python-rcssmin")
14537 (version "1.0.6")
14538 (source
14539 (origin
14540 (method url-fetch)
14541 (uri (pypi-uri "rcssmin" version))
14542 (sha256
14543 (base32
14544 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14545 (build-system python-build-system)
14546 (arguments
14547 '(#:phases
14548 (modify-phases %standard-phases
14549 (replace 'check
14550 (lambda _
14551 (invoke "python" "run_tests.py" "tests"))))))
14552 (home-page "http://opensource.perlig.de/rcssmin/")
14553 (synopsis "CSS Minifier")
14554 (description "The minifier is based on the semantics of the YUI compressor,
14555 which itself is based on the rule list by Isaac Schlueter.")
14556 (license license:asl2.0)))
14557
14558 (define-public python-rjsmin
14559 (package
14560 (name "python-rjsmin")
14561 (version "1.1.0")
14562 (source
14563 (origin
14564 (method url-fetch)
14565 (uri (pypi-uri "rjsmin" version))
14566 (sha256
14567 (base32
14568 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14569 (modules '((guix build utils)))
14570 (snippet
14571 '(begin
14572 (for-each delete-file (find-files "bench" "\\.js$"))
14573 #t))))
14574 (build-system python-build-system)
14575 (arguments
14576 '(#:tests? #f ; Not all test files included.
14577 #:phases
14578 (modify-phases %standard-phases
14579 (replace 'check
14580 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14581 (add-installed-pythonpath inputs outputs)
14582 (if tests?
14583 (invoke "py.test" "-vv" "tests")
14584 #t))))))
14585 (native-inputs
14586 `(("python-pytest" ,python-pytest)))
14587 (home-page "http://opensource.perlig.de/rjsmin/")
14588 (synopsis "Javascript Minifier")
14589 (description "@code{rJSmin} is a javascript minifier written in Python. The
14590 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14591 is a re-implementation aiming for speed, so it can be used at runtime (rather
14592 than during a preprocessing step).")
14593 (license license:asl2.0)))
14594
14595 (define-public python-xopen
14596 (package
14597 (name "python-xopen")
14598 (version "0.5.0")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "xopen" version))
14603 (sha256
14604 (base32
14605 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14606 (build-system python-build-system)
14607 (propagated-inputs
14608 `(("python-setuptools-scm" ,python-setuptools-scm)))
14609 (home-page "https://github.com/marcelm/xopen/")
14610 (synopsis "Open compressed files transparently")
14611 (description "This module provides an @code{xopen} function that works like
14612 Python's built-in @code{open} function, but can also deal with compressed files.
14613 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14614 recognized by their file extensions. The focus is on being as efficient as
14615 possible on all supported Python versions.")
14616 (license license:expat)))
14617
14618 (define-public python2-xopen
14619 (let ((base (package-with-python2
14620 (strip-python2-variant python-xopen))))
14621 (package
14622 (inherit base)
14623 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14624 ,@(package-propagated-inputs base))))))
14625
14626 (define-public python-cheetah
14627 (package
14628 (name "python-cheetah")
14629 (version "3.2.4")
14630 (source
14631 (origin
14632 (method url-fetch)
14633 (uri (pypi-uri "Cheetah3" version))
14634 (sha256
14635 (base32
14636 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14637 (build-system python-build-system)
14638 (arguments
14639 `(#:modules ((guix build utils)
14640 (guix build python-build-system)
14641 (ice-9 ftw)
14642 (srfi srfi-1)
14643 (srfi srfi-26))
14644 #:phases (modify-phases %standard-phases
14645 (add-after 'unpack 'use-absolute-python
14646 (lambda _
14647 (substitute* "Cheetah/CheetahWrapper.py"
14648 (("#!/usr/bin/env python")
14649 (string-append "#!" (which "python"))))
14650 #t))
14651 (add-after 'unpack 'fix-tests
14652 (lambda _
14653 (substitute* "Cheetah/Tests/ImportHooks.py"
14654 (("os.path.dirname\\(__file__\\)")
14655 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14656 #t))
14657 (replace 'check
14658 (lambda _
14659 (let ((cwd (getcwd)))
14660 (setenv "PYTHONPATH"
14661 (string-append
14662 cwd "/build/"
14663 (find (cut string-prefix? "lib" <>)
14664 (scandir (string-append cwd "/build")))
14665 ":" (getenv "PYTHONPATH")))
14666 (setenv "PATH"
14667 (string-append (getenv "PATH")
14668 ":" cwd "/bin"))
14669 (setenv "TMPDIR" "/tmp")
14670
14671 (substitute* "Cheetah/Tests/Test.py"
14672 (("unittest.TextTestRunner\\(\\)")
14673 "unittest.TextTestRunner(verbosity=2)"))
14674
14675 (invoke "python" "Cheetah/Tests/Test.py")))))))
14676 (propagated-inputs
14677 `(("python-markdown" ,python-markdown))) ;optional
14678 (home-page "https://cheetahtemplate.org/")
14679 (synopsis "Template engine")
14680 (description "Cheetah is a text-based template engine and Python code
14681 generator.
14682
14683 Cheetah can be used as a standalone templating utility or referenced as
14684 a library from other Python applications. It has many potential uses,
14685 but web developers looking for a viable alternative to ASP, JSP, PHP and
14686 PSP are expected to be its principle user group.
14687
14688 Features:
14689 @enumerate
14690 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14691 text-based format.
14692 @item Cleanly separates content, graphic design, and program code.
14693 @item Blends the power and flexibility of Python with a simple template language
14694 that non-programmers can understand.
14695 @item Gives template writers full access to any Python data structure, module,
14696 function, object, or method in their templates.
14697 @item Makes code reuse easy by providing an object-orientated interface to
14698 templates that is accessible from Python code or other Cheetah templates.
14699 One template can subclass another and selectively reimplement sections of it.
14700 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14701 improve the performance of a dynamic website.
14702 @item Compiles templates into optimized, yet readable, Python code.
14703 @end enumerate")
14704 (license (license:x11-style "file://LICENSE"))))
14705
14706 (define-public python2-cheetah
14707 (package-with-python2 python-cheetah))
14708
14709 (define-public python-dulwich
14710 (package
14711 (name "python-dulwich")
14712 (version "0.19.16")
14713 (source
14714 (origin
14715 (method url-fetch)
14716 (uri (list (string-append "https://www.dulwich.io/releases/"
14717 "dulwich-" version ".tar.gz")
14718 (pypi-uri "dulwich" version)))
14719 (sha256
14720 (base32
14721 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14722 (build-system python-build-system)
14723 (arguments
14724 `(#:phases
14725 (modify-phases %standard-phases
14726 (add-before 'check 'fix-tests
14727 (lambda* (#:key inputs #:allow-other-keys)
14728 ;; The tests use Popen with a custom environment which doesn't
14729 ;; include PATH.
14730 (substitute* "dulwich/tests/compat/utils.py"
14731 (("'git'") (string-append "'"
14732 (which "git")
14733 "'")))
14734 (substitute* '("dulwich/tests/test_repository.py"
14735 "dulwich/tests/test_hooks.py")
14736 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14737 (setenv "TEST_RUNNER" "unittest")
14738 (setenv "PYTHONHASHSEED" "random")
14739 #t)))))
14740 (propagated-inputs
14741 `(("python-fastimport" ,python-fastimport)
14742 ("python-urllib3" ,python-urllib3)))
14743 (native-inputs
14744 `(("python-mock" ,python-mock)
14745 ("python-geventhttpclient" ,python-geventhttpclient)
14746 ("git" ,git)))
14747 (home-page "https://www.dulwich.io/")
14748 (synopsis "Git implementation in Python")
14749 (description "Dulwich is an implementation of the Git file formats and
14750 protocols written in pure Python.")
14751 ;; Can be used with either license.
14752 (license (list license:asl2.0 license:gpl2+))))
14753
14754 (define-public python2-dulwich
14755 (package-with-python2 python-dulwich))
14756
14757 (define-public python-pbkdf2
14758 (package
14759 (name "python-pbkdf2")
14760 (version "1.3")
14761 (source
14762 (origin
14763 (method url-fetch)
14764 (uri (pypi-uri "pbkdf2" version))
14765 (sha256
14766 (base32
14767 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14768 (build-system python-build-system)
14769 (arguments
14770 '(#:phases
14771 (modify-phases %standard-phases
14772 (replace 'check
14773 (lambda _
14774 (setenv "PYTHONPATH"
14775 (string-append (getcwd) "/build/lib:"
14776 (getenv "PYTHONPATH")))
14777 (invoke "python" "test/test_pbkdf2.py"))))))
14778 (propagated-inputs
14779 `(("python-pycrypto" ,python-pycrypto))) ; optional
14780 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14781 (synopsis "Password-based key derivation")
14782 (description "This module implements the password-based key derivation
14783 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14784
14785 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14786 is part of the RSA Public Key Cryptography Standards series. The provided
14787 implementation takes a password or a passphrase and a salt value (and
14788 optionally a iteration count, a digest module, and a MAC module) and provides
14789 a file-like object from which an arbitrarily-sized key can be read.")
14790 (license license:expat)))
14791
14792 (define-public python2-pbkdf2
14793 (package-with-python2 python-pbkdf2))
14794
14795 (define-public python-qrcode
14796 (package
14797 (name "python-qrcode")
14798 (version "6.1")
14799 (source
14800 (origin
14801 (method url-fetch)
14802 (uri (pypi-uri "qrcode" version))
14803 (sha256
14804 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14805 (build-system python-build-system)
14806 (arguments
14807 ;; FIXME: Tests require packaging 'pymaging'.
14808 '(#:tests? #f))
14809 (propagated-inputs
14810 `(("python-lxml" ,python-lxml) ; for SVG output
14811 ("python-pillow" ,python-pillow) ; for PNG output
14812 ("python-six" ,python-six)))
14813 (home-page "https://github.com/lincolnloop/python-qrcode")
14814 (synopsis "QR Code image generator")
14815 (description "This package provides a pure Python QR Code generator
14816 module. It uses the Python Imaging Library (PIL) to allow for the generation
14817 of QR Codes.
14818
14819 In addition this package provides a command line tool to generate QR codes and
14820 either write these QR codes to a file or do the output as ascii art at the
14821 console.")
14822 (license license:bsd-3)))
14823
14824 (define-public python2-qrcode
14825 (package-with-python2 python-qrcode))
14826
14827 (define-public python-rst2ansi
14828 (package
14829 (name "python-rst2ansi")
14830 (version "0.1.5")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "rst2ansi" version))
14835 (sha256
14836 (base32
14837 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14838 (build-system python-build-system)
14839 (propagated-inputs
14840 `(("python-docutils" ,python-docutils)))
14841 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14842 (synopsis "Convert RST to ANSI-decorated console output")
14843 (description
14844 "Python module dedicated to rendering RST (reStructuredText) documents
14845 to ansi-escaped strings suitable for display in a terminal.")
14846 (license license:expat)))
14847
14848 (define-public python-ansi2html
14849 (package
14850 (name "python-ansi2html")
14851 (version "1.2.0")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "ansi2html" version))
14856 (sha256
14857 (base32
14858 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14859 (build-system python-build-system)
14860 (native-inputs
14861 `(("python-mock" ,python-mock)
14862 ("python-nose" ,python-nose)))
14863 (propagated-inputs
14864 `(("python-six" ,python-six)))
14865 (home-page "https://github.com/ralphbean/ansi2html")
14866 (synopsis "Convert ANSI-decorated console output to HTML")
14867 (description
14868 "@command{ansi2html} is a Python library and command line utility for
14869 converting text with ANSI color codes to HTML or LaTeX.")
14870 (license license:gpl3+)))
14871
14872 (define-public python2-ansi2html
14873 (package-with-python2 python-ansi2html))
14874
14875 (define-public python-ddt
14876 (package
14877 (name "python-ddt")
14878 (version "1.4.1")
14879 (source
14880 (origin
14881 (method url-fetch)
14882 (uri (pypi-uri "ddt" version))
14883 (sha256
14884 (base32
14885 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14886 (build-system python-build-system)
14887 (native-inputs
14888 `(("python-pytest" ,python-pytest)))
14889 (propagated-inputs
14890 `(("python-pyyaml" ,python-pyyaml)))
14891 (home-page "https://github.com/datadriventests/ddt")
14892 (synopsis "Data-Driven Tests")
14893 (description
14894 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14895 running it with different test data, and make it appear as multiple test
14896 cases.")
14897 (license license:expat)))
14898
14899 (define-public python-pycountry
14900 (package
14901 (name "python-pycountry")
14902 (version "18.5.26")
14903 (source
14904 (origin
14905 (method url-fetch)
14906 (uri (pypi-uri "pycountry" version))
14907 (sha256
14908 (base32
14909 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14910 (build-system python-build-system)
14911 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14912 (synopsis "ISO databases for languages, countries, currencies, etc.")
14913 (description
14914 "@code{pycountry} provides the ISO databases for the standards:
14915 @enumerate
14916 @item 639-3 (Languages)
14917 @item 3166 (Countries)
14918 @item 3166-3 (Deleted Countries)
14919 @item 3166-2 (Subdivisions of countries)
14920 @item 4217 (Currencies)
14921 @item 15924 (Scripts)
14922 @end enumerate
14923 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14924 through a Python API.")
14925 (license license:lgpl2.1+)))
14926
14927 (define-public python2-pycountry
14928 (package-with-python2 python-pycountry))
14929
14930 (define-public python-pycosat
14931 (package
14932 (name "python-pycosat")
14933 (version "0.6.3")
14934 (source
14935 (origin
14936 (method url-fetch)
14937 (uri (pypi-uri "pycosat" version ".zip"))
14938 (sha256
14939 (base32
14940 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14941 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14942 (build-system python-build-system)
14943 (native-inputs
14944 `(("unzip" ,unzip)))
14945 (home-page "https://github.com/ContinuumIO/pycosat")
14946 (synopsis "Bindings to picosat (a SAT solver)")
14947 (description
14948 "This package provides efficient Python bindings to @code{picosat} on
14949 the C level. When importing pycosat, the @code{picosat} solver becomes part
14950 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14951 Problem} (SAT) solver.")
14952 (license license:expat)))
14953
14954 (define-public python2-pycosat
14955 (package-with-python2 python-pycosat))
14956
14957 (define-public python2-ruamel.ordereddict
14958 (package
14959 (name "python2-ruamel.ordereddict")
14960 (version "0.4.9")
14961 (source
14962 (origin
14963 (method url-fetch)
14964 (uri (pypi-uri "ruamel.ordereddict" version))
14965 (sha256
14966 (base32
14967 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14968 (build-system python-build-system)
14969 (arguments
14970 `(#:python ,python-2
14971 #:phases
14972 (modify-phases %standard-phases
14973 (delete 'check)
14974 (add-after 'install 'check
14975 (lambda* (#:key inputs outputs #:allow-other-keys)
14976 (add-installed-pythonpath inputs outputs)
14977 (invoke "python" "test/testordereddict.py"))))))
14978 (home-page "https://bitbucket.org/ruamel/ordereddict")
14979 (synopsis "Version of dict that keeps keys in insertion order")
14980 (description
14981 "This is an implementation of an ordered dictionary with @dfn{Key
14982 Insertion Order} (KIO: updates of values do not affect the position of the
14983 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14984 removed and put at the back). The standard library module @code{OrderedDict},
14985 implemented later, implements a subset of @code{ordereddict} functionality.
14986 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14987 Order} (KSO, no sorting function can be specified, but a transform can be
14988 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14989 (license license:expat)))
14990
14991 (define-public python-pypeg2
14992 (package
14993 (name "python-pypeg2")
14994 (version "2.15.2")
14995 (source
14996 (origin
14997 (method url-fetch)
14998 (uri (pypi-uri "pyPEG2" version))
14999 (sha256
15000 (base32
15001 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15002 (build-system python-build-system)
15003 (propagated-inputs `(("python-lxml" ,python-lxml)))
15004 (arguments
15005 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15006 '(#:tests? #f))
15007 (home-page "https://fdik.org/pyPEG/")
15008 (synopsis "Parsering Expression Grammars in Python")
15009 (description "PyPEG is an intrinsic parser interpreter framework for
15010 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15011 parse many formal languages.")
15012 (license license:gpl2)))
15013
15014 (define-public python-incremental
15015 (package
15016 (name "python-incremental")
15017 (version "17.5.0")
15018 (source
15019 (origin
15020 (method url-fetch)
15021 (uri (pypi-uri "incremental" version))
15022 (sha256
15023 (base32
15024 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15025 (build-system python-build-system)
15026 (home-page "https://github.com/hawkowl/incremental")
15027 (synopsis "Library for versioning Python projects")
15028 (description "Incremental is a small library that versions your Python
15029 projects.")
15030 (license license:expat)))
15031
15032 (define-public python2-incremental
15033 (package-with-python2 python-incremental))
15034
15035 (define-public python-invoke
15036 (package
15037 (name "python-invoke")
15038 (home-page "https://www.pyinvoke.org/")
15039 (version "1.4.1")
15040 (source (origin
15041 (method url-fetch)
15042 (uri (pypi-uri "invoke" version))
15043 (sha256
15044 (base32
15045 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15046 (build-system python-build-system)
15047 (arguments
15048 ;; XXX: Requires many dependencies that are not yet in Guix.
15049 `(#:tests? #f))
15050 (synopsis "Pythonic task execution")
15051 (description
15052 "Invoke is a Python task execution tool and library, drawing inspiration
15053 from various sources to arrive at a powerful and clean feature set. It is
15054 evolved from the Fabric project, but focuses on local and abstract concerns
15055 instead of servers and network commands.")
15056 (license license:bsd-3)))
15057
15058 (define-public python2-invoke
15059 (package-with-python2 python-invoke))
15060
15061 (define-public python-automat
15062 (package
15063 (name "python-automat")
15064 (version "20.2.0")
15065 (source (origin
15066 (method url-fetch)
15067 (uri (pypi-uri "Automat" version))
15068 (sha256
15069 (base32
15070 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15071 (build-system python-build-system)
15072 ;; We disable the tests because they require python-twisted, while
15073 ;; python-twisted depends on python-automat. Twisted is optional, but the
15074 ;; tests fail if it is not available. Also see
15075 ;; <https://github.com/glyph/automat/issues/71>.
15076 (arguments '(#:tests? #f))
15077 (native-inputs
15078 `(("python-m2r" ,python-m2r)
15079 ("python-setuptools-scm" ,python-setuptools-scm)
15080 ("python-graphviz" ,python-graphviz)))
15081 (propagated-inputs
15082 `(("python-six" ,python-six)
15083 ("python-attrs" ,python-attrs)))
15084 (home-page "https://github.com/glyph/Automat")
15085 (synopsis "Self-service finite-state machines")
15086 (description "Automat is a library for concise, idiomatic Python
15087 expression of finite-state automata (particularly deterministic finite-state
15088 transducers).")
15089 (license license:expat)))
15090
15091 (define-public python2-automat
15092 (package-with-python2 python-automat))
15093
15094 (define-public python-m2r
15095 (package
15096 (name "python-m2r")
15097 (version "0.2.1")
15098 (source (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "m2r" version))
15101 (sha256
15102 (base32
15103 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15104 (build-system python-build-system)
15105 (propagated-inputs
15106 `(("python-docutils" ,python-docutils)
15107 ("python-mistune" ,python-mistune)))
15108 (native-inputs
15109 `(("python-pygments" ,python-pygments)
15110 ("python-mock" ,python-mock)))
15111 (home-page "https://github.com/miyakogi/m2r")
15112 (synopsis "Markdown to reStructuredText converter")
15113 (description "M2R converts a markdown file including reST markups to valid
15114 reST format.")
15115 (license license:expat)))
15116
15117 (define-public python2-m2r
15118 (package-with-python2 python-m2r))
15119
15120 (define-public python-constantly
15121 (package
15122 (name "python-constantly")
15123 (version "15.1.0")
15124 (source (origin
15125 (method url-fetch)
15126 (uri (pypi-uri "constantly" version))
15127 (sha256
15128 (base32
15129 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15130 (build-system python-build-system)
15131 (home-page "https://github.com/twisted/constantly")
15132 (synopsis "Symbolic constants in Python")
15133 (description "Constantly is a Python library that provides symbolic
15134 constant support. It includes collections and constants with text, numeric,
15135 and bit flag values.")
15136 (license license:expat)))
15137
15138 (define-public python2-constantly
15139 (package-with-python2 python-constantly))
15140
15141 (define-public python-attrs
15142 (package
15143 (name "python-attrs")
15144 (version "19.3.0")
15145 (source (origin
15146 (method url-fetch)
15147 (uri (pypi-uri "attrs" version))
15148 (sha256
15149 (base32
15150 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15151 (build-system python-build-system)
15152 (arguments
15153 `(#:modules ((guix build utils)
15154 (guix build python-build-system)
15155 (ice-9 ftw)
15156 (srfi srfi-1)
15157 (srfi srfi-26))
15158 #:phases (modify-phases %standard-phases
15159 (replace 'check
15160 (lambda _
15161 (let ((cwd (getcwd)))
15162 (setenv "PYTHONPATH"
15163 (string-append
15164 cwd "/build/"
15165 (find (cut string-prefix? "lib" <>)
15166 (scandir (string-append cwd "/build")))
15167 ":"
15168 (getenv "PYTHONPATH")))
15169 (invoke "python" "-m" "pytest")))))))
15170 (native-inputs
15171 `(("python-coverage" ,python-coverage)
15172 ("python-hypothesis" ,python-hypothesis)
15173 ("python-pympler" ,python-pympler)
15174 ("python-pytest" ,python-pytest)
15175 ("python-six" ,python-six)
15176 ("python-sphinx" ,python-sphinx)
15177 ("python-zope-interface" ,python-zope-interface)))
15178 (home-page "https://github.com/python-attrs/attrs/")
15179 (synopsis "Attributes without boilerplate")
15180 (description "@code{attrs} is a Python package with class decorators that
15181 ease the chores of implementing the most common attribute-related object
15182 protocols.")
15183 (license license:expat)))
15184
15185 (define-public python2-attrs
15186 (package-with-python2 python-attrs))
15187
15188 (define-public python-attrs-bootstrap
15189 (package
15190 (inherit python-attrs)
15191 (name "python-attrs-bootstrap")
15192 (native-inputs `())
15193 (arguments `(#:tests? #f))))
15194
15195 (define-public python2-attrs-bootstrap
15196 (package-with-python2 python-attrs-bootstrap))
15197
15198 (define-public python2-cliapp
15199 (package
15200 (name "python2-cliapp")
15201 (version "1.20180812.1")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (string-append
15206 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15207 version ".tar.gz"))
15208 (sha256
15209 (base32
15210 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15211 (build-system python-build-system)
15212 (arguments
15213 `(#:python ,python-2
15214 #:phases
15215 (modify-phases %standard-phases
15216 ;; check phase needs to be run before the build phase. If not,
15217 ;; coverage-test-runner looks for tests for the built source files,
15218 ;; and fails.
15219 (delete 'check)
15220 (add-before 'build 'check
15221 (lambda _
15222 ;; Disable python3 tests
15223 (substitute* "check"
15224 (("python3") "# python3"))
15225 (invoke "./check"))))))
15226 (native-inputs
15227 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15228 ("python2-pep8" ,python2-pep8)))
15229 (propagated-inputs
15230 `(("python2-pyaml" ,python2-pyaml)))
15231 (home-page "https://liw.fi/cliapp/")
15232 (synopsis "Python framework for command line programs")
15233 (description "@code{python2-cliapp} is a python framework for
15234 command line programs. It contains the typical stuff such programs
15235 need to do, such as parsing the command line for options, and
15236 iterating over input files.")
15237 (license license:gpl2+)))
15238
15239 (define-public python2-ttystatus
15240 (package
15241 (name "python2-ttystatus")
15242 (version "0.38")
15243 (source
15244 (origin
15245 (method git-fetch)
15246 (uri (git-reference
15247 (url "http://git.liw.fi/ttystatus")
15248 ;; There are no tags after ttystatus-0.36.
15249 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15250 (sha256
15251 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15252 (file-name (git-file-name name version))))
15253 (build-system python-build-system)
15254 (native-inputs
15255 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15256 ("python2-pep8" ,python2-pep8)))
15257 (arguments
15258 `(#:python ,python-2
15259 #:phases
15260 (modify-phases %standard-phases
15261 ;; check phase needs to be run before the build phase. If not,
15262 ;; coverage-test-runner looks for tests for the built source files,
15263 ;; and fails.
15264 (delete 'check)
15265 (add-before 'build 'check
15266 (lambda _ (invoke "make" "check"))))))
15267 (home-page "https://liw.fi/ttystatus/")
15268 (synopsis "Python library for showing progress reporting and
15269 status updates on terminals")
15270 (description "@code{python2-ttystatus} is a python library for
15271 showing progress reporting and status updates on terminals, for
15272 command line programs. Output is automatically adapted to the width
15273 of the terminal: truncated if it does not fit, and resized if the
15274 terminal size changes.")
15275 (license license:gpl3+)))
15276
15277 (define-public python2-tracing
15278 (package
15279 (name "python2-tracing")
15280 (version "0.10")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (string-append
15285 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15286 version ".tar.gz"))
15287 (sha256
15288 (base32
15289 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15290 (build-system python-build-system)
15291 (arguments
15292 `(#:python ,python-2))
15293 (home-page "https://liw.fi/tracing/")
15294 (synopsis "Python debug logging helper")
15295 (description "@code{python2-tracing} is a python library for
15296 logging debug messages. It provides a way to turn debugging messages
15297 on and off, based on the filename they occur in. It is much faster
15298 than using @code{logging.Filter} to accomplish the same thing, which
15299 matters when code is run in production mode. The actual logging still
15300 happens using the @code{logging} library.")
15301 (license license:gpl3+)))
15302
15303 (define-public python2-larch
15304 (package
15305 (name "python2-larch")
15306 (version "1.20151025")
15307 (source
15308 (origin
15309 (method url-fetch)
15310 (uri (string-append
15311 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15312 version ".tar.gz"))
15313 (patches (search-patches
15314 "python2-larch-coverage-4.0a6-compatibility.patch"))
15315 (sha256
15316 (base32
15317 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15318 (build-system python-build-system)
15319 (arguments
15320 `(#:python ,python-2
15321 #:phases
15322 (modify-phases %standard-phases
15323 ;; check phase needs to be run before the build phase. If not,
15324 ;; coverage-test-runner looks for tests for the built source files,
15325 ;; and fails.
15326 (delete 'check)
15327 (add-before 'build 'check
15328 (lambda _ (invoke "make" "check"))))))
15329 (native-inputs
15330 `(("cmdtest" ,cmdtest)
15331 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15332 (propagated-inputs
15333 `(("python2-tracing" ,python2-tracing)))
15334 (home-page "https://liw.fi/larch/")
15335 (synopsis "Python copy-on-write B-tree library")
15336 (description "@code{python2-larch} is an implementation of
15337 particular kind of B-tree, based on research by Ohad Rodeh. See
15338 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15339 on the data structure.
15340
15341 The distinctive feature of this B-tree is that a node is never
15342 (conceptually) modified. Instead, all updates are done by
15343 copy-on-write. This makes it easy to clone a tree, and modify only the
15344 clone, while other processes access the original tree.")
15345 (license license:gpl3+)))
15346
15347 (define-public python-astroid
15348 (package
15349 (name "python-astroid")
15350 (version "2.4.2")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (pypi-uri "astroid" version))
15355 (sha256
15356 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15357 (modules '((guix build utils)))
15358 (snippet
15359 '(begin
15360 ;; Check to see if the version pinning has been removed.
15361 (substitute* "astroid/__pkginfo__.py"
15362 (("==1\\.4\\.\\*") ">=1.4.0"))
15363 #t))))
15364 (build-system python-build-system)
15365 (propagated-inputs
15366 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15367 ("python-six" ,python-six)
15368 ("python-wrapt" ,python-wrapt)))
15369 (native-inputs
15370 `(("python-dateutil" ,python-dateutil)
15371 ("python-pytest" ,python-pytest)
15372 ("python-pytest-runner" ,python-pytest-runner)))
15373 (home-page "https://github.com/PyCQA/astroid")
15374 (synopsis "Common base representation of python source code for pylint and
15375 other projects")
15376 (description "@code{python-astroid} provides a common base representation
15377 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15378
15379 It provides a compatible representation which comes from the _ast module. It
15380 rebuilds the tree generated by the builtin _ast module by recursively walking
15381 down the AST and building an extended ast. The new node classes have
15382 additional methods and attributes for different usages. They include some
15383 support for static inference and local name scopes. Furthermore, astroid
15384 builds partial trees by inspecting living objects.")
15385 (license license:lgpl2.1+)
15386 (properties `((python2-variant . ,(delay python2-astroid))))))
15387
15388 (define-public python2-astroid
15389 (let ((base (package-with-python2
15390 (strip-python2-variant python-astroid))))
15391 (package (inherit base)
15392 ;; Version 2.x removes python2 support.
15393 (version "1.6.5")
15394 (source
15395 (origin
15396 (method url-fetch)
15397 (uri (pypi-uri "astroid" version))
15398 (sha256
15399 (base32
15400 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15401 (arguments
15402 (substitute-keyword-arguments (package-arguments base)
15403 ((#:phases phases)
15404 `(modify-phases ,phases
15405 (add-after 'unpack 'remove-spurious-test
15406 (lambda _
15407 ;; https://github.com/PyCQA/astroid/issues/276
15408 (delete-file "astroid/tests/unittest_brain.py")
15409 #t))
15410 (replace 'check
15411 (lambda _
15412 (invoke"python" "-m" "unittest" "discover"
15413 "-p" "unittest*.py")))))))
15414 (native-inputs `())
15415 (propagated-inputs
15416 `(("python2-backports-functools-lru-cache"
15417 ,python2-backports-functools-lru-cache)
15418 ("python2-enum34" ,python2-enum34)
15419 ("python2-singledispatch" ,python2-singledispatch)
15420 ,@(alist-delete "python-typed-ast"
15421 (package-propagated-inputs base)))))))
15422
15423 (define-public python-isbnlib
15424 (package
15425 (name "python-isbnlib")
15426 (version "3.10.4")
15427 (source
15428 (origin
15429 (method url-fetch)
15430 (uri (pypi-uri "isbnlib" version))
15431 (sha256
15432 (base32
15433 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15434 (build-system python-build-system)
15435 (arguments '(#:tests? #f)) ; No test
15436 (home-page "https://github.com/xlcnd/isbnlib")
15437 (synopsis "Python library to work with ISBN strings")
15438 (description "@code{python-isbnlib} is a (pure) python library that provides
15439 several useful methods and functions to validate, clean, transform, hyphenate and
15440 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15441 version, is suitable to be include as a dependency in other projects.")
15442 (license license:lgpl3+)))
15443
15444 (define-public python-isort
15445 (package
15446 (name "python-isort")
15447 (version "4.3.4")
15448 (source
15449 (origin
15450 (method git-fetch)
15451 (uri (git-reference
15452 ;; Tests pass only from the Github sources
15453 (url "https://github.com/timothycrosley/isort")
15454 (commit version)))
15455 (file-name (git-file-name name version))
15456 (sha256
15457 (base32
15458 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15459 (build-system python-build-system)
15460 (native-inputs
15461 `(("python-mock" ,python-mock)
15462 ("python-pytest" ,python-pytest)))
15463 (home-page "https://github.com/timothycrosley/isort")
15464 (synopsis "Python utility/library to sort python imports")
15465 (description "@code{python-isort} is a python utility/library to sort
15466 imports alphabetically, and automatically separated into sections. It
15467 provides a command line utility, a python library and plugins for various
15468 editors.")
15469 (license license:expat)
15470 (properties `((python2-variant . ,(delay python2-isort))))))
15471
15472 (define-public python2-isort
15473 (let ((base (package-with-python2
15474 (strip-python2-variant python-isort))))
15475 (package (inherit base)
15476 (native-inputs
15477 `(("python2-futures" ,python2-futures)
15478 ,@(package-native-inputs base))))))
15479
15480 (define-public python2-backports-functools-lru-cache
15481 (package
15482 (name "python2-backports-functools-lru-cache")
15483 (version "1.6.1")
15484 (source
15485 (origin
15486 (method url-fetch)
15487 ;; only the pypi tarballs contain the necessary metadata
15488 (uri (pypi-uri "backports.functools_lru_cache" version))
15489 (sha256
15490 (base32
15491 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15492 (build-system python-build-system)
15493 (native-inputs
15494 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15495 (arguments
15496 `(#:python ,python-2))
15497 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15498 (synopsis "Backport of functools.lru_cache from Python 3.3")
15499 (description "@code{python2-backports-functools-lru-cache} is a backport
15500 of @code{functools.lru_cache} from python 3.3.")
15501 (license license:expat)))
15502
15503 (define-public python-configparser
15504 (package
15505 (name "python-configparser")
15506 (version "4.0.2")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "configparser" version))
15511 (sha256
15512 (base32
15513 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15514 (native-inputs
15515 `(("python-setuptools_scm" ,python-setuptools-scm)))
15516 (build-system python-build-system)
15517 (home-page "https://github.com/jaraco/configparser/")
15518 (synopsis "Backport of configparser from python 3.5")
15519 (description "@code{python-configparser} is a backport of
15520 @code{configparser} from Python 3.5 so that it can be used directly
15521 in other versions.")
15522 (license license:expat)))
15523
15524 (define-public python2-configparser
15525 (package-with-python2 python-configparser))
15526
15527 (define-public python-mamba
15528 (package
15529 (name "python-mamba")
15530 (version "0.11.2")
15531 (source (origin
15532 (method url-fetch)
15533 (uri (pypi-uri "mamba" version))
15534 (sha256
15535 (base32
15536 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15537 (build-system python-build-system)
15538 (arguments `(#:tests? #f)) ; No test
15539 (propagated-inputs
15540 `(("python-clint" ,python-clint)
15541 ("python-coverage" ,python-coverage)))
15542 (home-page "https://nestorsalceda.com/mamba/")
15543 (synopsis "Test runner for Python")
15544 (description
15545 "Mamba is a Behaviour-Driven Development tool for Python developers.
15546 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15547 (license license:expat)))
15548
15549 (define-public python-mando
15550 (package
15551 (name "python-mando")
15552 (version "0.6.4")
15553 (source (origin
15554 (method url-fetch)
15555 (uri (pypi-uri "mando" version))
15556 (sha256
15557 (base32
15558 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15559 (build-system python-build-system)
15560 (propagated-inputs
15561 `(("python-rst2ansi" ,python-rst2ansi)
15562 ("python-six" ,python-six)))
15563 (native-inputs
15564 `(("python-pytest" ,python-pytest)))
15565 (home-page "https://mando.readthedocs.org/")
15566 (synopsis
15567 "Wrapper around argparse, allowing creation of complete CLI applications")
15568 (description
15569 "This package is a wrapper around argparse, allowing you to write complete CLI
15570 applications in seconds while maintaining all the flexibility.")
15571 (license license:expat)))
15572
15573 (define-public python2-mando
15574 (package-with-python2 python-mando))
15575
15576 (define-public python2-argparse
15577 (package
15578 (name "python2-argparse")
15579 (version "1.4.0")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "argparse" version))
15584 (sha256
15585 (base32
15586 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15587 (build-system python-build-system)
15588 (arguments
15589 `(#:python ,python-2))
15590 (home-page "https://github.com/ThomasWaldmann/argparse/")
15591 (synopsis "Python command-line parsing library")
15592 (description
15593 "This package is mostly for people who want to have @code{argparse} on
15594 older Pythons because it was not part of the standard library back then.")
15595 (license license:psfl)))
15596
15597 (define-public python-fudge
15598 (package
15599 (name "python-fudge")
15600 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15601 ;; package, which is currently the only use of this package.
15602 (version "0.9.6")
15603 (source
15604 (origin
15605 (method url-fetch)
15606 (uri (pypi-uri "fudge" version))
15607 (sha256
15608 (base32
15609 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15610 (build-system python-build-system)
15611 (arguments
15612 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15613 (home-page "https://github.com/fudge-py/fudge")
15614 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15615 (description
15616 "Fudge is a Python module for using fake objects (mocks and stubs) to
15617 test real ones.
15618
15619 In readable Python code, you declare the methods available on your fake object
15620 and how they should be called. Then you inject that into your application and
15621 start testing. This declarative approach means you don’t have to record and
15622 playback actions and you don’t have to inspect your fakes after running code.
15623 If the fake object was used incorrectly then you’ll see an informative
15624 exception message with a traceback that points to the culprit.")
15625 (license license:expat)))
15626
15627 (define-public python2-fudge
15628 (package-with-python2 python-fudge))
15629
15630 (define-public python-mwclient
15631 (package
15632 (name "python-mwclient")
15633 (version "0.10.1")
15634 (source
15635 (origin
15636 (method git-fetch)
15637 ;; The PyPI version wouldn't contain tests.
15638 (uri (git-reference
15639 (url "https://github.com/mwclient/mwclient")
15640 (commit (string-append "v" version))))
15641 (file-name (git-file-name name version))
15642 (sha256
15643 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15644 (build-system python-build-system)
15645 (propagated-inputs
15646 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15647 ("python-six" ,python-six)))
15648 (native-inputs
15649 `(("python-mock" ,python-mock)
15650 ("python-pytest" ,python-pytest)
15651 ("python-pytest-cov" ,python-pytest-cov)
15652 ("python-pytest-runner" ,python-pytest-runner)
15653 ("python-responses" ,python-responses)))
15654 (home-page "https://github.com/btongminh/mwclient")
15655 (synopsis "MediaWiki API client")
15656 (description "This package provides a MediaWiki API client.")
15657 (license license:expat)))
15658
15659 (define-public python2-mwclient
15660 (package-with-python2 python-mwclient))
15661
15662 (define-public python-utils
15663 (package
15664 (name "python-utils")
15665 (version "2.4.0")
15666 (source (origin
15667 (method url-fetch)
15668 (uri (pypi-uri "python-utils" version))
15669 (sha256
15670 (base32
15671 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15672 (build-system python-build-system)
15673 (arguments
15674 `(#:phases
15675 (modify-phases %standard-phases
15676 (replace 'check
15677 (lambda* (#:key inputs outputs #:allow-other-keys)
15678 (add-installed-pythonpath inputs outputs)
15679 (delete-file "pytest.ini")
15680 (invoke "pytest" "-vv"))))))
15681 (native-inputs
15682 `(("pytest-runner" ,python-pytest-runner)
15683 ("pytest" ,python-pytest)
15684 ("six" ,python-six)))
15685 (home-page "https://github.com/WoLpH/python-utils")
15686 (synopsis "Convenient utilities not included with the standard Python install")
15687 (description
15688 "Python Utils is a collection of small Python functions and classes which
15689 make common patterns shorter and easier.")
15690 (license license:bsd-2)))
15691
15692 (define-public python2-utils
15693 (package-with-python2 python-utils))
15694
15695 (define-public python-diff-match-patch
15696 (package
15697 (name "python-diff-match-patch")
15698 (version "20121119")
15699 (source
15700 (origin
15701 (method url-fetch)
15702 (uri (pypi-uri "diff-match-patch" version))
15703 (sha256
15704 (base32
15705 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15706 (build-system python-build-system)
15707 (home-page "https://code.google.com/p/google-diff-match-patch")
15708 (synopsis "Synchronize plain text")
15709 (description "Diff Match and Patch libraries offer robust algorithms to
15710 perform the operations required for synchronizing plain text.")
15711 (license license:asl2.0)))
15712
15713 (define-public python2-diff-match-patch
15714 (package-with-python2 python-diff-match-patch))
15715
15716 (define-public python-dirsync
15717 (package
15718 (name "python-dirsync")
15719 (version "2.2.5")
15720 (source
15721 (origin
15722 (method url-fetch)
15723 (uri (pypi-uri "dirsync" version))
15724 (sha256
15725 (base32
15726 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15727 (build-system python-build-system)
15728 (propagated-inputs
15729 `(("six" ,python-six)))
15730 (home-page "https://github.com/tkhyn/dirsync")
15731 (synopsis "Advanced directory tree synchronisation tool")
15732 (description "Advanced directory tree synchronisation tool.")
15733 (license license:expat)))
15734
15735 (define-public python2-dirsync
15736 (package-with-python2 python-dirsync))
15737
15738 (define-public python-levenshtein
15739 (package
15740 (name "python-levenshtein")
15741 (version "0.12.0")
15742 (source
15743 (origin
15744 (method url-fetch)
15745 (uri (pypi-uri "python-Levenshtein" version))
15746 (sha256
15747 (base32
15748 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15749 (build-system python-build-system)
15750 (home-page "https://github.com/ztane/python-Levenshtein")
15751 (synopsis "Fast computation of Levenshtein distance and string similarity")
15752 (description
15753 "The Levenshtein Python C extension module contains functions for fast computation of
15754 @enumerate
15755 @item Levenshtein (edit) distance, and edit operations
15756 @item string similarity
15757 @item approximate median strings, and generally string averaging
15758 @item string sequence and set similarity
15759 @end enumerate
15760 It supports both normal and Unicode strings.")
15761 (license license:gpl2+)))
15762
15763 (define-public python2-levenshtein
15764 (package-with-python2 python-levenshtein))
15765
15766 (define-public python-scandir
15767 (package
15768 (name "python-scandir")
15769 (version "1.10.0")
15770 (source
15771 (origin
15772 (method url-fetch)
15773 (uri (pypi-uri "scandir" version))
15774 (sha256
15775 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15776 (build-system python-build-system)
15777 (arguments
15778 `(#:phases (modify-phases %standard-phases
15779 (replace 'check
15780 (lambda _
15781 (invoke "python" "test/run_tests.py"))))))
15782 (home-page "https://github.com/benhoyt/scandir")
15783 (synopsis "Directory iteration function")
15784 (description
15785 "Directory iteration function like os.listdir(), except that instead of
15786 returning a list of bare filenames, it yields DirEntry objects that include
15787 file type and stat information along with the name. Using scandir() increases
15788 the speed of os.walk() by 2-20 times (depending on the platform and file
15789 system) by avoiding unnecessary calls to os.stat() in most cases.
15790
15791 This package is part of the Python standard library since version 3.5.")
15792 (license license:bsd-3)))
15793
15794 (define-public python2-scandir
15795 (package-with-python2 python-scandir))
15796
15797 (define-public python2-stemming
15798 (package
15799 (name "python2-stemming")
15800 (version "1.0.1")
15801 (source
15802 (origin
15803 (method url-fetch)
15804 (uri (pypi-uri "stemming" version))
15805 (sha256
15806 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15807 (build-system python-build-system)
15808 (arguments
15809 `(#:python ,python-2))
15810 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15811 (synopsis "Python implementations of various stemming algorithms")
15812 (description
15813 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15814 stemming algorithms for English. These implementations are straightforward and
15815 efficient, unlike some Python versions of the same algorithms available on the
15816 Web. This package is an extraction of the stemming code included in the Whoosh
15817 search engine.")
15818 (license license:public-domain)))
15819
15820 (define-public python-factory-boy
15821 (package
15822 (name "python-factory-boy")
15823 (version "2.8.1")
15824 (source
15825 (origin
15826 (method url-fetch)
15827 (uri (pypi-uri "factory_boy" version))
15828 (sha256
15829 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15830 (build-system python-build-system)
15831 (arguments
15832 ;; Tests are not included in the tarball.
15833 `(#:tests? #f))
15834 (propagated-inputs
15835 `(("faker" ,python-faker)))
15836 (home-page "https://github.com/benhoyt/scandir")
15837 (synopsis "Versatile test fixtures replacement")
15838 (description
15839 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15840
15841 As a fixtures replacement tool, it aims to replace static, hard to maintain
15842 fixtures with easy-to-use factories for complex object.
15843
15844 Instead of building an exhaustive test setup with every possible combination
15845 of corner cases, factory_boy allows you to use objects customized for the
15846 current test, while only declaring the test-specific fields")
15847 (license license:expat)))
15848
15849 (define-public python2-factory-boy
15850 (package-with-python2 python-factory-boy))
15851
15852 (define-public python-translate-toolkit
15853 (package
15854 (name "python-translate-toolkit")
15855 (version "2.1.0")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15860 (sha256
15861 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15862 (build-system python-build-system)
15863 (native-inputs
15864 `(("python-pytest" ,python-pytest)
15865 ("python-sphinx" ,python-sphinx)))
15866 (propagated-inputs
15867 `(("python-babel" ,python-babel)
15868 ("python-beautifulsoup4" ,python-beautifulsoup4)
15869 ("python-chardet" ,python-chardet)
15870 ("python-diff-match-patch" ,python-diff-match-patch)
15871 ("python-levenshtein" ,python-levenshtein)
15872 ("python-lxml" ,python-lxml)
15873 ("python-six" ,python-six)
15874 ("python-vobject" ,python-vobject)
15875 ("python-pyyaml" ,python-pyyaml)))
15876 (arguments
15877 ;; TODO: tests are not run, because they end with
15878 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15879 ;; 'parse_funcs'
15880 ;; during test setup.
15881 `(#:tests? #f))
15882 (home-page "https://toolkit.translatehouse.org")
15883 (synopsis "Tools and API for translation and localization engineering")
15884 (description
15885 "Tools and API for translation and localization engineering. It contains
15886 several utilities, as well as an API for building localization tools.")
15887 (license license:gpl2+)))
15888
15889 (define-public python2-translate-toolkit
15890 (package-with-python2 python-translate-toolkit))
15891
15892 (define-public python-packaging
15893 (package
15894 (name "python-packaging")
15895 (version "20.0")
15896 (source
15897 (origin
15898 (method url-fetch)
15899 (uri (pypi-uri "packaging" version))
15900 ;; XXX: The URL in the patch file is wrong, it should be
15901 ;; <https://github.com/pypa/packaging/pull/256>.
15902 (patches (search-patches "python-packaging-test-arch.patch"))
15903 (sha256
15904 (base32
15905 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15906 (build-system python-build-system)
15907 (arguments
15908 `(#:phases (modify-phases %standard-phases
15909 (replace 'check
15910 (lambda* (#:key tests? #:allow-other-keys)
15911 (if tests?
15912 (invoke "py.test" "-vv")
15913 (format #t "test suite not run~%"))
15914 #t)))))
15915 (native-inputs
15916 `(("python-pretend" ,python-pretend)
15917 ("python-pytest" ,python-pytest)))
15918 (propagated-inputs
15919 `(("python-pyparsing" ,python-pyparsing)
15920 ("python-six" ,python-six)))
15921 (home-page "https://github.com/pypa/packaging")
15922 (synopsis "Core utilities for Python packages")
15923 (description "Packaging is a Python module for dealing with Python packages.
15924 It offers an interface for working with package versions, names, and dependency
15925 information.")
15926 ;; From 'LICENSE': This software is made available under the terms of
15927 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15928 ;; Contributions to this software is made under the terms of *both* these
15929 ;; licenses.
15930 (license (list license:asl2.0 license:bsd-2))))
15931
15932 (define-public python2-packaging
15933 (package-with-python2 python-packaging))
15934
15935 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15936 (define-public python-packaging-bootstrap
15937 (hidden-package
15938 (package/inherit
15939 python-packaging
15940 (name "python-packaging-bootstrap")
15941 (native-inputs '())
15942 (propagated-inputs
15943 `(("python-pyparsing" ,python-pyparsing)))
15944 (arguments '(#:tests? #f)))))
15945
15946 (define-public python2-packaging-bootstrap
15947 (hidden-package
15948 (package/inherit
15949 python2-packaging
15950 (name "python2-packaging-bootstrap")
15951 (native-inputs '())
15952 (propagated-inputs
15953 `(("python-pyparsing" ,python2-pyparsing)))
15954 (arguments
15955 `(#:tests? #f
15956 ,@(package-arguments python2-packaging))))))
15957
15958 (define-public python-relatorio
15959 (package
15960 (name "python-relatorio")
15961 (version "0.8.0")
15962 (source
15963 (origin
15964 (method url-fetch)
15965 (uri (pypi-uri "relatorio" version))
15966 (sha256
15967 (base32
15968 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15969 (build-system python-build-system)
15970 (propagated-inputs
15971 `(("python-lxml" ,python-lxml)
15972 ("python-genshi" ,python-genshi)))
15973 (native-inputs
15974 `(("python-magic" ,python-magic)))
15975 (home-page "https://relatorio.tryton.org/")
15976 (synopsis "Templating library able to output ODT and PDF files")
15977 (description "Relatorio is a templating library which provides a way to
15978 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15979 for more filetypes can be easily added by creating plugins for them.")
15980 (license license:gpl3+)))
15981
15982 (define-public python2-relatorio
15983 (package-with-python2 python-relatorio))
15984
15985 (define-public python-radon
15986 (package
15987 (name "python-radon")
15988 (version "4.1.0")
15989 (source
15990 (origin
15991 (method url-fetch)
15992 (uri (pypi-uri "radon" version))
15993 (sha256
15994 (base32
15995 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15996 (build-system python-build-system)
15997 (arguments
15998 `(#:phases (modify-phases %standard-phases
15999 (replace 'check
16000 (lambda _
16001 (invoke "python" "radon/tests/run.py"))))))
16002 (propagated-inputs
16003 `(("python-colorama" ,python-colorama)
16004 ("python-flake8-polyfill" ,python-flake8-polyfill)
16005 ("python-mando" ,python-mando)))
16006 (native-inputs
16007 `(("python-pytest" ,python-pytest)
16008 ("python-pytest-mock" ,python-pytest-mock)))
16009 (home-page "https://radon.readthedocs.org/")
16010 (synopsis "Code Metrics in Python")
16011 (description "Radon is a Python tool which computes various code metrics.
16012 Supported metrics are:
16013 @itemize @bullet
16014 @item raw metrics: SLOC, comment lines, blank lines, &c.
16015 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16016 @item Halstead metrics (all of them)
16017 @item the Maintainability Index (a Visual Studio metric)
16018 @end itemize")
16019 (properties `((python2-variant . ,(delay python2-radon))))
16020 (license license:expat)))
16021
16022 (define-public python2-radon
16023 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16024 (package
16025 (inherit base)
16026 (propagated-inputs
16027 `(("python-configparser" ,python2-configparser)
16028 ("python-future" ,python2-future)
16029 ,@(package-propagated-inputs base))))))
16030
16031 (define-public python-sure
16032 (package
16033 (name "python-sure")
16034 (version "1.4.11")
16035 (source
16036 (origin
16037 (method url-fetch)
16038 (uri (pypi-uri "sure" version))
16039 (sha256
16040 (base32
16041 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16042 (build-system python-build-system)
16043 (propagated-inputs
16044 `(("python-mock" ,python-mock)
16045 ("python-six" ,python-six)))
16046 (native-inputs
16047 `(("python-nose" ,python-nose)))
16048 (home-page "https://github.com/gabrielfalcao/sure")
16049 (synopsis "Automated testing library in python for python")
16050 (description
16051 "Sure is a python library that leverages a DSL for writing assertions.
16052 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16053 (license license:gpl3+)))
16054
16055 (define-public python2-sure
16056 (package-with-python2 python-sure))
16057
16058 (define-public python2-couleur
16059 ;; This package does not seem to support python3 at all, hence,
16060 ;; only the python2 variant definition is provided.
16061 (package
16062 (name "python2-couleur")
16063 (version "0.6.2")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "couleur" version))
16068 (sha256
16069 (base32
16070 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16071 (build-system python-build-system)
16072 (arguments
16073 `(#:python ,python-2))
16074 (home-page "https://github.com/gabrielfalcao/couleur")
16075 (synopsis
16076 "ANSI terminal tool for python, colored shell and other handy fancy features")
16077 (description
16078 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16079 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16080 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16081 ;; https://github.com/gabrielfalcao/couleur/issues/11
16082 (license license:lgpl3+)))
16083
16084 (define-public python-misaka
16085 (package
16086 (name "python-misaka")
16087 (version "2.1.1")
16088 (source
16089 (origin
16090 (method url-fetch)
16091 (uri (pypi-uri "misaka" version))
16092 (sha256
16093 (base32
16094 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16095 (build-system python-build-system)
16096 (arguments
16097 `(;; Line 37 of setup.py calls self.run_command('develop')
16098 ;; in the 'check' phase. This command seems to be trying
16099 ;; to write to
16100 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16101 ;; for which it does not have the permission to write.
16102 #:tests? #f))
16103 (propagated-inputs
16104 `(("python-cffi" ,python-cffi)))
16105 (home-page "https://github.com/FSX/misaka")
16106 (synopsis "Python binding for Hoedown")
16107 (description
16108 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16109 library written in C. It features a fast HTML renderer and functionality to make custom
16110 renderers (e.g. man pages or LaTeX).")
16111 (license license:expat)))
16112
16113 (define-public python2-misaka
16114 (package-with-python2 python-misaka))
16115
16116 (define-public python2-steadymark
16117 ;; This is forced into being a python2 only variant
16118 ;; due to its dependence on couleur that has no support
16119 ;; for python3
16120 (package
16121 (name "python2-steadymark")
16122 (version "0.7.3")
16123 (source
16124 (origin
16125 (method url-fetch)
16126 (uri (pypi-uri "steadymark" version))
16127 (sha256
16128 (base32
16129 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16130 (build-system python-build-system)
16131 (native-inputs
16132 `(("python-couleur" ,python2-couleur)
16133 ("python-sure" ,python2-sure)
16134 ("python-misaka" ,python2-misaka)))
16135 (arguments
16136 `(#:python ,python-2
16137 #:phases
16138 (modify-phases %standard-phases
16139 (add-before 'build 'patch-setup-py
16140 (lambda _
16141 ;; Update requirements from dependency==version
16142 ;; to dependency>=version
16143 (substitute* "setup.py"
16144 (("==") ">="))
16145 #t)))))
16146 (home-page "https://github.com/gabrielfalcao/steadymark")
16147 (synopsis "Markdown-based test runner for python")
16148 (description
16149 "@code{Steadymark} allows documentation to be written in github-flavoured
16150 markdown. The documentation may contain snippets of code surrounded by python
16151 code blocks and @code{Steadymark} will find these snippets and run them, making
16152 sure that there are no old malfunctional examples in the documentation examples.")
16153 (license license:expat)))
16154
16155 (define-public python-jsonpointer
16156 (package
16157 (name "python-jsonpointer")
16158 (version "1.10")
16159 (source
16160 (origin
16161 (method url-fetch)
16162 (uri (pypi-uri "jsonpointer" version))
16163 (sha256
16164 (base32
16165 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16166 (build-system python-build-system)
16167 (home-page "https://github.com/stefankoegl/python-json-pointer")
16168 (synopsis "Identify specific nodes in a JSON document")
16169 (description "@code{jsonpointer} allows you to access specific nodes
16170 by path in a JSON document (see RFC 6901).")
16171 (license license:bsd-3)))
16172
16173 (define-public python2-jsonpointer
16174 (package-with-python2 python-jsonpointer))
16175
16176 (define-public python-jsonpatch
16177 (package
16178 (name "python-jsonpatch")
16179 (version "1.16")
16180 (source
16181 (origin
16182 (method git-fetch)
16183 ;; pypi version lacks tests.js
16184 (uri (git-reference
16185 (url "https://github.com/stefankoegl/python-json-patch")
16186 (commit (string-append "v" version))))
16187 (file-name (git-file-name name version))
16188 (sha256
16189 (base32
16190 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16191 (build-system python-build-system)
16192 (propagated-inputs
16193 `(("python-jsonpointer" ,python-jsonpointer)))
16194 (home-page "https://github.com/stefankoegl/python-json-patch")
16195 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16196 (description "@code{jsonpatch} is a library and program that allows
16197 applying JSON Patches according to RFC 6902.")
16198 (license license:bsd-3)))
16199
16200 (define-public python2-jsonpatch
16201 (package-with-python2 python-jsonpatch))
16202
16203 (define-public python-jsonpatch-0.4
16204 (package (inherit python-jsonpatch)
16205 (name "python-jsonpatch")
16206 (version "0.4")
16207 (source
16208 (origin
16209 (method git-fetch)
16210 (uri (git-reference
16211 (url "https://github.com/stefankoegl/python-json-patch")
16212 (commit (string-append "v" version))))
16213 (file-name (git-file-name name version))
16214 (sha256
16215 (base32
16216 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16217
16218 (define-public python2-jsonpatch-0.4
16219 (package-with-python2 python-jsonpatch-0.4))
16220
16221 (define-public python-rfc3986
16222 (package
16223 (name "python-rfc3986")
16224 (version "1.4.0")
16225 (source (origin
16226 (method url-fetch)
16227 (uri (pypi-uri "rfc3986" version))
16228 (sha256
16229 (base32
16230 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16231 (build-system python-build-system)
16232 (arguments
16233 `(#:modules ((guix build utils)
16234 (guix build python-build-system)
16235 (ice-9 ftw)
16236 (srfi srfi-1)
16237 (srfi srfi-26))
16238 #:phases
16239 (modify-phases %standard-phases
16240 (replace 'check
16241 (lambda _
16242 (let ((cwd (getcwd)))
16243 (setenv "PYTHONPATH"
16244 (string-append cwd "/build/"
16245 (find (cut string-prefix? "lib" <>)
16246 (scandir (string-append cwd "/build")))
16247 ":"
16248 (getenv "PYTHONPATH")))
16249 (invoke "pytest" "-v")))))))
16250 (native-inputs
16251 `(("python-pytest" ,python-pytest)))
16252 (home-page "https://rfc3986.readthedocs.io/")
16253 (synopsis "Parse and validate URI references")
16254 (description
16255 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16256 validation and authority parsing. This module also supports RFC@tie{}6874
16257 which adds support for zone identifiers to IPv6 addresses.")
16258 (license license:asl2.0)))
16259
16260 (define-public python2-rfc3986
16261 (package-with-python2 python-rfc3986))
16262
16263 (define-public python-rfc3987
16264 (package
16265 (name "python-rfc3987")
16266 (version "1.3.7")
16267 (source
16268 (origin
16269 (method url-fetch)
16270 (uri (pypi-uri "rfc3987" version))
16271 (sha256
16272 (base32
16273 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16274 (build-system python-build-system)
16275 (home-page "https://pypi.org/project/rfc3987/")
16276 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16277 (description "@code{rfc3987} provides routines for parsing and
16278 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16279 (license license:gpl3+)))
16280
16281 (define-public python2-rfc3987
16282 (package-with-python2 python-rfc3987))
16283
16284 ;; The latest commit contains fixes for building with both python3 and python2.
16285 (define-public python-rfc6555
16286 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16287 (revision "1"))
16288 (package
16289 (name "python-rfc6555")
16290 (version (git-version "0.0.0" revision commit))
16291 (source (origin
16292 (method git-fetch)
16293 (uri (git-reference
16294 (url "https://github.com/sethmlarson/rfc6555")
16295 (commit commit)))
16296 (file-name (git-file-name name version))
16297 (sha256
16298 (base32
16299 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16300 (build-system python-build-system)
16301 (arguments
16302 '(#:phases
16303 (modify-phases %standard-phases
16304 (replace 'check
16305 (lambda* (#:key tests? #:allow-other-keys)
16306 (if tests?
16307 ;; Other tests require network access.
16308 (invoke "pytest" "tests/test_ipv6.py")
16309 #t))))))
16310 (native-inputs
16311 `(("python-pytest" ,python-pytest)))
16312 (home-page "https://pypi.org/project/rfc6555/")
16313 (synopsis "Python implementation of RFC 6555")
16314 (description
16315 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16316 6555. Provided with a single file and dead-simple API to allow easy vendoring
16317 and integration into other projects.")
16318 (properties `((python2-variant . ,(delay python2-rfc6555))))
16319 (license license:asl2.0))))
16320
16321 (define-public python2-rfc6555
16322 (let ((base (package-with-python2
16323 (strip-python2-variant python-rfc6555))))
16324 (package
16325 (inherit base)
16326 (propagated-inputs
16327 `(("python2-selectors2" ,python2-selectors2))))))
16328
16329 (define-public python-bagit
16330 (package
16331 (name "python-bagit")
16332 (version "1.7.0")
16333 (source
16334 (origin
16335 (method url-fetch)
16336 (uri (pypi-uri "bagit" version))
16337 (sha256
16338 (base32
16339 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16340 (build-system python-build-system)
16341 (native-inputs
16342 `(("python-setuptools-scm" ,python-setuptools-scm)
16343 ("python-coverage" ,python-coverage)
16344 ("python-mock" ,python-mock)))
16345 (home-page "https://libraryofcongress.github.io/bagit-python/")
16346 (synopsis "Create and validate BagIt packages")
16347 (description "Bagit is a Python library and command line utility for working
16348 with BagIt style packages. BagIt is a minimalist packaging format for digital
16349 preservation.")
16350 (license license:cc0)))
16351
16352 (define-public python-prov
16353 (package
16354 (name "python-prov")
16355 (version "2.0.0")
16356 (source
16357 (origin
16358 (method url-fetch)
16359 (uri (pypi-uri "prov" version))
16360 (sha256
16361 (base32
16362 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16363 (build-system python-build-system)
16364 (propagated-inputs
16365 `(("python-dateutil" ,python-dateutil)
16366 ("python-lxml" ,python-lxml)
16367 ("python-networkx" ,python-networkx)
16368 ("python-rdflib" ,python-rdflib)))
16369 (native-inputs
16370 `(("graphviz" ,graphviz)
16371 ("python-pydot" ,python-pydot)))
16372 (home-page "https://github.com/trungdong/prov")
16373 (synopsis
16374 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16375 (description
16376 "This package provides a library for W3C Provenance Data Model supporting
16377 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16378 (license license:expat)))
16379
16380 (define-public python-arcp
16381 (package
16382 (name "python-arcp")
16383 (version "0.2.1")
16384 (source
16385 (origin
16386 (method url-fetch)
16387 (uri (pypi-uri "arcp" version))
16388 (sha256
16389 (base32
16390 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16391 (build-system python-build-system)
16392 (native-inputs
16393 `(("python-pytest" ,python-pytest)))
16394 (home-page "http://arcp.readthedocs.io/")
16395 (synopsis
16396 "Archive and Package URI parser and generator")
16397 (description
16398 "@acronym{arcp, Archive and Package} provides functions for creating
16399 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16400 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16401 consume or reference hypermedia resources bundled inside a file archive or an
16402 application package, as well as to resolve URIs for archive resources within a
16403 programmatic framework. This URI scheme provides mechanisms to generate a
16404 unique base URI to represent the root of the archive, so that relative URI
16405 references in a bundled resource can be resolved within the archive without
16406 having to extract the archive content on the local file system. An arcp URI can
16407 be used for purposes of isolation (e.g. when consuming multiple archives),
16408 security constraints (avoiding \"climb out\" from the archive), or for
16409 externally identiyfing sub-resources referenced by hypermedia formats.")
16410 (license license:asl2.0)))
16411
16412 (define-public python-shellescape
16413 (package
16414 (name "python-shellescape")
16415 (version "3.8.1")
16416 (source
16417 (origin
16418 (method git-fetch)
16419 (uri (git-reference
16420 (url "https://github.com/chrissimpkins/shellescape")
16421 (commit (string-append "v" version))))
16422 (file-name (git-file-name name version))
16423 (sha256
16424 (base32
16425 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16426 (build-system python-build-system)
16427 (arguments
16428 '(#:phases
16429 (modify-phases %standard-phases
16430 (replace 'check
16431 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16432 (when tests?
16433 (add-installed-pythonpath inputs outputs)
16434 (invoke "python" "tests/test_shellescape.py"))
16435 #t)))))
16436 (native-inputs
16437 `(("python-pytest" ,python-pytest)))
16438 (home-page "https://github.com/chrissimpkins/shellescape")
16439 (synopsis
16440 "Shell escape a string to safely use it as a token in a shell command")
16441 (description
16442 "The shellescape Python module defines the @code{shellescape.quote()}
16443 function that returns a shell-escaped version of a Python string. This is a
16444 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16445 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16446 (license license:expat)))
16447
16448 (define-public python-validators
16449 (package
16450 (name "python-validators")
16451 (version "0.14.2")
16452 (source (origin
16453 (method url-fetch)
16454 (uri (pypi-uri "validators" version))
16455 (sha256
16456 (base32
16457 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16458 (build-system python-build-system)
16459 (arguments
16460 '(#:phases (modify-phases %standard-phases
16461 (replace 'check
16462 (lambda _
16463 (invoke "pytest" "-vv"))))))
16464 (propagated-inputs
16465 `(("python-decorator" ,python-decorator)
16466 ("python-six" ,python-six)))
16467 (native-inputs
16468 `(("python-flake8" ,python-flake8)
16469 ("python-isort" ,python-isort)
16470 ("python-pytest" ,python-pytest)))
16471 (home-page "https://github.com/kvesteri/validators")
16472 (synopsis "Data validation library")
16473 (description
16474 "This package contains validators for different things such as email
16475 addresses, IP addresses, URLs, hashes and more. It has been designed to
16476 be easy to use and not require defining a schema or form just to validate
16477 some input.")
16478 (license license:expat)))
16479
16480 (define-public python2-validators
16481 (package-with-python2 python-validators))
16482
16483 (define-public python-validate-email
16484 (package
16485 (name "python-validate-email")
16486 (version "1.3")
16487 (source
16488 (origin
16489 (method url-fetch)
16490 (uri (pypi-uri "validate_email" version))
16491 (sha256
16492 (base32
16493 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16494 (build-system python-build-system)
16495 (home-page "https://github.com/syrusakbary/validate_email")
16496 (synopsis "Verifies if an email address is valid and really exists")
16497 (description "@code{validate_email} can be used to verify if an email
16498 address is valid and really exists.")
16499 (license license:lgpl3+)))
16500
16501 (define-public python2-validate-email
16502 (package-with-python2 python-validate-email))
16503
16504 (define-public python-flex
16505 (package
16506 (name "python-flex")
16507 (version "6.10.0")
16508 (source
16509 (origin
16510 (method url-fetch)
16511 (uri (pypi-uri "flex" version))
16512 (sha256
16513 (base32
16514 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16515 (build-system python-build-system)
16516 (propagated-inputs
16517 `(("python-click" ,python-click)
16518 ("python-iso8601" ,python-iso8601)
16519 ("python-jsonpointer" ,python-jsonpointer)
16520 ("python-pyyaml" ,python-pyyaml)
16521 ("python-requests" ,python-requests)
16522 ("python-rfc3987" ,python-rfc3987)
16523 ("python-six" ,python-six)
16524 ("python-validate-email" ,python-validate-email)))
16525 (home-page "https://github.com/pipermerriam/flex")
16526 (synopsis "Validates Swagger schemata")
16527 (description "@code{flex} can be used to validate Swagger schemata.")
16528 (license license:bsd-3)))
16529
16530 (define-public python2-flex
16531 (package-with-python2 python-flex))
16532
16533 (define-public python-marshmallow
16534 (package
16535 (name "python-marshmallow")
16536 (version "3.9.1")
16537 (source
16538 (origin
16539 (method url-fetch)
16540 (uri (pypi-uri "marshmallow" version))
16541 (sha256
16542 (base32
16543 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16544 (build-system python-build-system)
16545 (propagated-inputs
16546 `(("python-dateutil" ,python-dateutil)
16547 ("python-simplejson" ,python-simplejson)))
16548 (native-inputs
16549 `(("python-pytest" ,python-pytest)
16550 ("python-pytz" ,python-pytz)))
16551 (home-page "https://github.com/marshmallow-code/marshmallow")
16552 (synopsis "Convert complex datatypes to and from native
16553 Python datatypes.")
16554 (description "@code{marshmallow} provides a library for converting
16555 complex datatypes to and from native Python datatypes.")
16556 (license license:expat)))
16557
16558 (define-public python-apispec
16559 (package
16560 (name "python-apispec")
16561 (version "4.0.0")
16562 (source
16563 (origin
16564 (method url-fetch)
16565 (uri (pypi-uri "apispec" version))
16566 (sha256
16567 (base32
16568 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16569 (build-system python-build-system)
16570 (arguments
16571 '(#:phases (modify-phases %standard-phases
16572 (add-after 'unpack 'disable-prance-tests
16573 (lambda _
16574 ;; Disable validation tests since they require the
16575 ;; optional 'prance' library which is not yet in Guix.
16576 (substitute* "tests/test_ext_marshmallow_openapi.py"
16577 (("def test_openapi_tools_validate.*" all)
16578 (string-append "@pytest.mark.xfail\n" all)))))
16579 (replace 'check
16580 (lambda _
16581 (setenv "PYTHONPATH"
16582 (string-append "./build/lib:"
16583 (getenv "PYTHONPATH")))
16584 (invoke "pytest" "-vv"))))))
16585 (propagated-inputs
16586 `(("python-pyyaml" ,python-pyyaml)))
16587 (native-inputs
16588 `(("python-pytest" ,python-pytest)
16589 ("python-marshmallow" ,python-marshmallow)))
16590 (home-page "https://github.com/marshmallow-code/apispec")
16591 (synopsis "Swagger/OpenAPI specification generator")
16592 (description "@code{python-apispec} is a pluggable API specification
16593 generator. It currently supports the OpenAPI specification, formerly known
16594 as Swagger.")
16595 (license license:expat)))
16596
16597 (define-public python-flasgger
16598 (package
16599 (name "python-flasgger")
16600 (version "0.6.3")
16601 (source
16602 (origin
16603 (method git-fetch)
16604 (uri (git-reference
16605 (url "https://github.com/rochacbruno/flasgger")
16606 (commit version)))
16607 (file-name (git-file-name name version))
16608 (sha256
16609 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16610 (build-system python-build-system)
16611 (arguments
16612 `(#:phases
16613 (modify-phases %standard-phases
16614 (replace 'check
16615 (lambda* (#:key inputs outputs #:allow-other-keys)
16616 (substitute* "Makefile"
16617 (("flake8 flasgger --ignore=F403")
16618 "flake8 flasgger --ignore=E731,F403"))
16619 (setenv "PYTHONPATH" (string-append (getcwd)
16620 ":"
16621 (getenv "PYTHONPATH")))
16622 (invoke "py.test"))))))
16623 (propagated-inputs
16624 `(("python-flask" ,python-flask)
16625 ("python-pyyaml" ,python-pyyaml)
16626 ("python-jsonschema" ,python-jsonschema)
16627 ("python-mistune" ,python-mistune)
16628 ("python-six" ,python-six)))
16629 (native-inputs
16630 `(("python-decorator" ,python-decorator)
16631 ("python-flake8" ,python-flake8)
16632 ("python-flask-restful" ,python-flask-restful)
16633 ("python-flex" ,python-flex)
16634 ("python-pytest" ,python-pytest)
16635 ("python-pytest-cov" ,python-pytest-cov)
16636 ("python-marshmallow" ,python-marshmallow)
16637 ("python-apispec" ,python-apispec)))
16638 (home-page "https://github.com/rochacbruno/flasgger/")
16639 (synopsis "Extract Swagger specs from your Flask project")
16640 (description "@code{python-flasgger} allows extracting Swagger specs
16641 from your Flask project. It is a fork of Flask-Swagger.")
16642 (license license:expat)))
16643
16644 (define-public python-swagger-spec-validator
16645 (package
16646 (name "python-swagger-spec-validator")
16647 (version "2.4.3")
16648 (source
16649 (origin
16650 (method url-fetch)
16651 (uri (pypi-uri "swagger-spec-validator" version))
16652 (sha256
16653 (base32
16654 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16655 (build-system python-build-system)
16656 (propagated-inputs
16657 `(("python-jsonschema" ,python-jsonschema)
16658 ("python-pyyaml" ,python-pyyaml)
16659 ("python-six" ,python-six)))
16660 (home-page
16661 "https://github.com/Yelp/swagger_spec_validator")
16662 (synopsis "Validation of Swagger specifications")
16663 (description "@code{swagger_spec_validator} provides a library for
16664 validating Swagger API specifications.")
16665 (license license:asl2.0)))
16666
16667 (define-public python2-swagger-spec-validator
16668 (package-with-python2 python-swagger-spec-validator))
16669
16670 (define-public python-apache-libcloud
16671 (package
16672 (name "python-apache-libcloud")
16673 (version "3.1.0")
16674 (source
16675 (origin
16676 (method url-fetch)
16677 (uri (pypi-uri "apache-libcloud" version))
16678 (sha256
16679 (base32
16680 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16681 (build-system python-build-system)
16682 (arguments
16683 `(#:phases
16684 (modify-phases %standard-phases
16685 (add-after 'unpack 'patch-ssh
16686 (lambda* (#:key inputs #:allow-other-keys)
16687 (substitute* "libcloud/compute/ssh.py"
16688 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16689 "/bin/ssh" "'")))
16690 #t))
16691 (add-after 'unpack 'patch-tests
16692 (lambda _
16693 (substitute* "libcloud/test/compute/test_ssh_client.py"
16694 (("class ShellOutSSHClientTests")
16695 "@unittest.skip(\"Guix container doesn't have ssh service\")
16696 class ShellOutSSHClientTests"))
16697 #t))
16698 (add-before 'check 'copy-secret
16699 (lambda _
16700 (copy-file "libcloud/test/secrets.py-dist"
16701 "libcloud/test/secrets.py")
16702 #t)))))
16703 (inputs
16704 `(("openssh" ,openssh)))
16705 (propagated-inputs
16706 `(("python-paramiko" ,python-paramiko)
16707 ("python-requests" ,python-requests)))
16708 (native-inputs
16709 `(("python-lockfile" ,python-lockfile)
16710 ("python-mock" ,python-mock)
16711 ("python-pytest" ,python-pytest)
16712 ("python-pytest-runner" ,python-pytest-runner)
16713 ("python-requests-mock" ,python-requests-mock)))
16714 (home-page "https://libcloud.apache.org/")
16715 (synopsis "Unified Cloud API")
16716 (description "@code{libcloud} is a Python library for interacting with
16717 many of the popular cloud service providers using a unified API.")
16718 (license license:asl2.0)))
16719
16720 (define-public python2-apache-libcloud
16721 (package-with-python2 python-apache-libcloud))
16722
16723 (define-public python-smmap
16724 (package
16725 (name "python-smmap")
16726 (version "3.0.1")
16727 (source
16728 (origin
16729 (method url-fetch)
16730 (uri (pypi-uri "smmap" version))
16731 (sha256
16732 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16733 (build-system python-build-system)
16734 (native-inputs
16735 `(("python-nosexcover" ,python-nosexcover)))
16736 (home-page "https://github.com/Byron/smmap")
16737 (synopsis "Python sliding window memory map manager")
16738 (description "@code{smmap} is a pure Python implementation of a sliding
16739 window memory map manager.")
16740 (license license:bsd-3)))
16741
16742 (define-public python-smmap2
16743 (deprecated-package "python-smmap2" python-smmap))
16744
16745 (define-public python2-smmap
16746 (package-with-python2 python-smmap))
16747
16748 (define-public python2-smmap2
16749 (deprecated-package "python2-smmap2" python2-smmap))
16750
16751 (define-public python-regex
16752 (package
16753 (name "python-regex")
16754 (version "2020.6.8")
16755 (source (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "regex" version))
16758 (sha256
16759 (base32
16760 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16761 (build-system python-build-system)
16762 (arguments
16763 '(#:phases
16764 (modify-phases %standard-phases
16765 (replace 'check
16766 (lambda* (#:key inputs outputs #:allow-other-keys)
16767 (add-installed-pythonpath inputs outputs)
16768 (invoke "python" "-c"
16769 "from regex.test_regex import test_main; test_main()"))))))
16770 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16771 (synopsis "Alternative regular expression module")
16772 (description "This regular expression implementation is backwards-
16773 compatible with the standard @code{re} module, but offers additional
16774 functionality like full case-folding for case-insensitive matches in Unicode.")
16775 (license license:psfl)))
16776
16777 (define-public python2-regex
16778 (package-with-python2 python-regex))
16779
16780 (define-public python-pyopengl
16781 (package
16782 (name "python-pyopengl")
16783 (version "3.1.5")
16784 (source
16785 (origin
16786 (method url-fetch)
16787 (uri (pypi-uri "PyOpenGL" version))
16788 (sha256
16789 (base32
16790 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16791 (build-system python-build-system)
16792 (inputs
16793 `(("mesa" ,mesa)
16794 ("freeglut" ,freeglut)
16795 ("glu" ,glu)))
16796 (arguments
16797 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16798 ;attribute 'OSMesa'
16799 #:phases
16800 (modify-phases %standard-phases
16801 (add-before 'build 'fix-paths
16802 (lambda* (#:key inputs outputs #:allow-other-keys)
16803 (substitute* '("OpenGL/platform/ctypesloader.py")
16804 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16805 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16806 (("'GL'")
16807 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16808 (("'GLU'")
16809 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16810 (("'glut',")
16811 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16812 (("'GLESv1_CM'")
16813 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16814 (("'GLESv2'")
16815 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16816 ;; Not providing libgle. It seems to be very old.
16817 #t)))))
16818 (home-page "http://pyopengl.sourceforge.net")
16819 (synopsis "Standard OpenGL bindings for Python")
16820 (description
16821 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16822 related APIs. The binding is created using the standard @code{ctypes}
16823 library.")
16824 (license license:bsd-3)))
16825
16826 (define-public python-pyopengl-accelerate
16827 (package
16828 (inherit python-pyopengl)
16829 (name "python-pyopengl-accelerate")
16830 (version "3.1.5")
16831 (source
16832 (origin
16833 (method url-fetch)
16834 (uri (pypi-uri "PyOpenGL-accelerate" version))
16835 (sha256
16836 (base32
16837 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16838 (inputs
16839 `(("mesa" ,mesa)
16840 ("python-numpy" ,python-numpy))) ; for cython module
16841 ; numpy_formathandler, thus not propagated
16842 (arguments
16843 `(#:tests? #f
16844 #:phases
16845 (modify-phases %standard-phases
16846 (delete 'fix-paths))))
16847 (synopsis "Acceleration code for PyOpenGL")
16848 (description
16849 "This is the Cython-coded accelerator module for PyOpenGL.")))
16850
16851 (define-public python-rencode
16852 (package
16853 (name "python-rencode")
16854 (version "1.0.5")
16855 (source
16856 (origin
16857 (method url-fetch)
16858 (uri (pypi-uri "rencode" version))
16859 (sha256
16860 (base32
16861 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16862 (build-system python-build-system)
16863 (arguments
16864 `(#:phases
16865 (modify-phases %standard-phases
16866 (add-before 'check 'delete-bogus-test
16867 ;; This test requires /home/aresch/Downloads, which is not provided by
16868 ;; the build environment.
16869 (lambda _
16870 (delete-file "rencode/t.py")
16871 #t)))))
16872 (native-inputs `(("pkg-config" ,pkg-config)
16873 ("python-cython" ,python-cython)))
16874 (home-page "https://github.com/aresch/rencode")
16875 (synopsis "Serialization of heterogeneous data structures")
16876 (description
16877 "The @code{rencode} module is a data structure serialization library,
16878 similar to @code{bencode} from the BitTorrent project. For complex,
16879 heterogeneous data structures with many small elements, r-encoding stake up
16880 significantly less space than b-encodings. This version of rencode is a
16881 complete rewrite in Cython to attempt to increase the performance over the
16882 pure Python module.")
16883 (license license:bsd-3)))
16884
16885 (define-public python2-rencode
16886 (package-with-python2 python-rencode))
16887
16888 (define-public python-xenon
16889 (package
16890 (name "python-xenon")
16891 (version "0.7.0")
16892 (source
16893 (origin
16894 (method url-fetch)
16895 (uri (pypi-uri "xenon" version))
16896 (sha256
16897 (base32
16898 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16899 (build-system python-build-system)
16900 (native-inputs
16901 `(("python-pyyaml" ,python-pyyaml)
16902 ("python-radon" ,python-radon)
16903 ("python-requests" ,python-requests)
16904 ("python-flake8" ,python-flake8)
16905 ("python-tox" ,python-tox)))
16906 (arguments
16907 `(#:tests? #f ;test suite not shipped with the PyPI archive
16908 #:phases
16909 (modify-phases %standard-phases
16910 (add-before 'build 'patch-test-requirements
16911 (lambda _
16912 ;; Remove httpretty dependency for tests.
16913 (substitute* "setup.py"
16914 (("httpretty") ""))
16915 #t)))))
16916 (home-page "https://xenon.readthedocs.org/")
16917 (synopsis "Monitor code metrics for Python on your CI server")
16918 (description
16919 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16920 Ideally, @code{xenon} is run every time code is committed. Through command
16921 line options, various thresholds can be set for the complexity of code. It
16922 will fail (i.e. it will exit with a non-zero exit code) when any of these
16923 requirements is not met.")
16924 (license license:expat)))
16925
16926 (define-public python2-xenon
16927 (package-with-python2 python-xenon))
16928
16929 (define-public python-pysocks
16930 (package
16931 (name "python-pysocks")
16932 (version "1.7.1")
16933 (source
16934 (origin
16935 (method url-fetch)
16936 (uri (pypi-uri "PySocks" version))
16937 (sha256
16938 (base32
16939 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
16940 (build-system python-build-system)
16941 (arguments `(#:tests? #f))
16942 (home-page "https://github.com/Anorov/PySocks")
16943 (synopsis "SOCKS client module")
16944 (description "@code{pysocks} is an updated and semi-actively maintained
16945 version of @code{SocksiPy} with bug fixes and extra features.")
16946 (license license:bsd-3)))
16947
16948 (define-public python2-pysocks
16949 (package-with-python2 python-pysocks))
16950
16951 (define-public python-pydiff
16952 (package
16953 (name "python-pydiff")
16954 (version "0.2")
16955 (source
16956 (origin
16957 (method url-fetch)
16958 (uri (pypi-uri "pydiff" version))
16959 (sha256
16960 (base32
16961 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16962 (build-system python-build-system)
16963 (home-page "https://github.com/myint/pydiff")
16964 (synopsis "Library to diff two Python files at the bytecode level")
16965 (description
16966 "@code{pydiff} makes it easy to look for actual code changes while
16967 ignoring formatting changes.")
16968 (license license:expat)))
16969
16970 (define-public python2-pydiff
16971 (package-with-python2 python-pydiff))
16972
16973 (define-public python-pydub
16974 (package
16975 (name "python-pydub")
16976 (version "0.24.1")
16977 (source
16978 (origin
16979 (method url-fetch)
16980 (uri (pypi-uri "pydub" version))
16981 (sha256
16982 (base32
16983 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16984 (build-system python-build-system)
16985 (arguments
16986 `(#:phases
16987 (modify-phases %standard-phases
16988 (add-after 'unpack 'fix-ffmpeg-path
16989 (lambda* (#:key inputs #:allow-other-keys)
16990 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16991 (substitute* '("pydub/utils.py")
16992 (("return \"ffmpeg\"")
16993 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16994 (("return \"ffplay\"")
16995 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16996 (("return \"ffprobe\"")
16997 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16998 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16999 #t))))))
17000 (home-page "https://pydub.com")
17001 (inputs
17002 `(("ffmpeg" ,ffmpeg)))
17003 (propagated-inputs
17004 `(("python-scipy" ,python-scipy)))
17005 (synopsis "Manipulate audio with a high level interface in Python")
17006 (description
17007 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17008 @code{ffmpeg} to open various audio formats.")
17009 (license license:expat))) ; MIT license
17010
17011 (define-public python-tqdm
17012 (package
17013 (name "python-tqdm")
17014 (version "4.43.0")
17015 (source
17016 (origin
17017 (method url-fetch)
17018 (uri (pypi-uri "tqdm" version))
17019 (sha256
17020 (base32
17021 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17022 (build-system python-build-system)
17023 (arguments
17024 '(#:phases (modify-phases %standard-phases
17025 (replace 'check
17026 (lambda* (#:key inputs outputs #:allow-other-keys)
17027 (add-installed-pythonpath inputs outputs)
17028 ;; This invokation is taken from tox.ini.
17029 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17030 "-d" "-v" "tqdm/"))))))
17031 (native-inputs
17032 `(("python-nose" ,python-nose)))
17033 (home-page "https://github.com/tqdm/tqdm")
17034 (synopsis "Fast, extensible progress meter")
17035 (description
17036 "Make loops show a progress bar on the console by just wrapping any
17037 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17038 design and layout.")
17039 (license (list license:mpl2.0 license:expat))))
17040
17041 (define-public python2-tqdm
17042 (package-with-python2 python-tqdm))
17043
17044 (define-public python-pkginfo
17045 (package
17046 (name "python-pkginfo")
17047 (version "1.4.2")
17048 (source
17049 (origin
17050 (method url-fetch)
17051 (uri (pypi-uri "pkginfo" version))
17052 (sha256
17053 (base32
17054 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17055 (build-system python-build-system)
17056 (arguments
17057 ;; The tests are broken upstream.
17058 '(#:tests? #f))
17059 (home-page
17060 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17061 (synopsis
17062 "Query metadatdata from sdists, bdists, and installed packages")
17063 (description
17064 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17065 source distriubtion (an sdist) or a binary distribution (e.g., created by
17066 running bdist_egg). It can also query the EGG-INFO directory of an installed
17067 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17068 created by running @code{python setup.py develop}).")
17069 (license license:expat)))
17070
17071 (define-public python2-pkginfo
17072 (package-with-python2 python-pkginfo))
17073
17074 (define-public python-twine
17075 (package
17076 (name "python-twine")
17077 (version "1.15.0")
17078 (source
17079 (origin
17080 (method url-fetch)
17081 (uri (pypi-uri "twine" version))
17082 (sha256
17083 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17084 (build-system python-build-system)
17085 (propagated-inputs
17086 `(("python-tqdm" ,python-tqdm)
17087 ("python-packaging" ,python-packaging)
17088 ("python-pkginfo" ,python-pkginfo)
17089 ("python-readme-renderer" ,python-readme-renderer)
17090 ("python-requests" ,python-requests)
17091 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17092 (home-page "https://github.com/pypa/twine")
17093 (synopsis "Collection of utilities for interacting with PyPI")
17094 (description
17095 "@code{twine} currently supports registering projects and uploading
17096 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17097 their files and supports any packaging format (including wheels).")
17098 (license license:asl2.0)))
17099
17100 (define-public python2-twine
17101 (package-with-python2 python-twine))
17102
17103 (define-public python-linecache2
17104 (package
17105 (name "python-linecache2")
17106 (version "1.0.0")
17107 (source
17108 (origin
17109 (method url-fetch)
17110 (uri (pypi-uri "linecache2" version))
17111 (sha256
17112 (base32
17113 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17114 (build-system python-build-system)
17115 (arguments
17116 `(;; The tests depend on unittest2, and our version is a bit too old.
17117 #:tests? #f))
17118 (native-inputs
17119 `(("python-pbr" ,python-pbr-minimal)))
17120 (home-page
17121 "https://github.com/testing-cabal/linecache2")
17122 (synopsis "Backports of the linecache module")
17123 (description
17124 "The linecache module allows one to get any line from any file, while
17125 attempting to optimize internally, using a cache, the common case where many
17126 lines are read from a single file.")
17127 (license license:psfl)))
17128
17129 (define-public python2-linecache2
17130 (package-with-python2 python-linecache2))
17131
17132 (define-public python-traceback2
17133 (package
17134 (name "python-traceback2")
17135 (version "1.4.0")
17136 (source
17137 (origin
17138 (method url-fetch)
17139 (uri (pypi-uri "traceback2" version))
17140 (sha256
17141 (base32
17142 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17143 (build-system python-build-system)
17144 (arguments
17145 `(;; python-traceback2 and python-unittest2 depend on one another.
17146 #:tests? #f))
17147 (native-inputs
17148 `(("python-pbr" ,python-pbr-minimal)))
17149 (propagated-inputs
17150 `(("python-linecache2" ,python-linecache2)))
17151 (home-page
17152 "https://github.com/testing-cabal/traceback2")
17153 (synopsis "Backports of the traceback module")
17154 (description
17155 "This module provides a standard interface to extract, format and print
17156 stack traces of Python programs. It exactly mimics the behavior of the Python
17157 interpreter when it prints a stack trace.")
17158 (license license:psfl)))
17159
17160 (define-public python2-traceback2
17161 (package-with-python2 python-traceback2))
17162
17163 (define-public python-ratelimiter
17164 (package
17165 (name "python-ratelimiter")
17166 (version "1.2.0")
17167 (source
17168 (origin
17169 (method url-fetch)
17170 (uri (pypi-uri "ratelimiter" version))
17171 (sha256
17172 (base32
17173 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17174 (build-system python-build-system)
17175 (arguments
17176 '(#:tests? #f)) ; There are no tests in the pypi archive.
17177 (home-page "https://github.com/RazerM/ratelimiter")
17178 (synopsis "Simple rate limiting object")
17179 (description
17180 "The @code{ratelimiter} module ensures that an operation will not be
17181 executed more than a given number of times during a given period.")
17182 (license license:asl2.0)))
17183
17184 (define-public python2-ratelimiter
17185 (package-with-python2 python-ratelimiter))
17186
17187 (define-public python-dukpy
17188 (package
17189 (name "python-dukpy")
17190 (version "0.3")
17191 (source
17192 (origin
17193 (method git-fetch)
17194 (uri (git-reference
17195 (url "https://github.com/kovidgoyal/dukpy")
17196 (commit (string-append "v" version))))
17197 (file-name (git-file-name name version))
17198 (sha256
17199 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17200 (build-system python-build-system)
17201 (home-page "https://github.com/kovidgoyal/dukpy")
17202 (synopsis "Run JavaScript in python")
17203 (description
17204 "dukpy is a JavaScript runtime environment for Python using the duktape
17205 embeddable JavaScript engine.")
17206 ;; Dukpy is licensed under MIT like the embedded duktape library,
17207 ;; with 'errors.c' as GPL3.
17208 (license (list license:expat license:gpl3))))
17209
17210 (define-public python2-dukpy
17211 (package-with-python2 python-dukpy))
17212
17213 (define-public python-jsonrpclib-pelix
17214 (package
17215 (name "python-jsonrpclib-pelix")
17216 (version "0.3.2")
17217 (source
17218 (origin
17219 (method url-fetch)
17220 (uri (pypi-uri "jsonrpclib-pelix" version))
17221 (sha256
17222 (base32
17223 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17224 (build-system python-build-system)
17225 (arguments
17226 `(#:tests? #f)) ; no tests in PyPI tarball
17227 (home-page "https://github.com/tcalmant/jsonrpclib/")
17228 (synopsis "JSON-RPC 2.0 client library for Python")
17229 (description
17230 "This library implements the JSON-RPC v2.0
17231 specification (backwards-compatible) as a client library for Python. This
17232 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17233 services.")
17234 (license license:asl2.0)))
17235
17236 (define-public python2-jsonrpclib-pelix
17237 (package-with-python2 python-jsonrpclib-pelix))
17238
17239 (define-public python-setuptools-scm-git-archive
17240 (package
17241 (name "python-setuptools-scm-git-archive")
17242 (version "1.0")
17243 (source
17244 (origin
17245 (method url-fetch)
17246 (uri (pypi-uri "setuptools_scm_git_archive" version))
17247 (sha256
17248 (base32
17249 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17250 (build-system python-build-system)
17251 (native-inputs
17252 `(("python-pytest" ,python-pytest)))
17253 (propagated-inputs
17254 `(("python-setuptools-scm" ,python-setuptools-scm)))
17255 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17256 (synopsis "Setuptools_scm plugin for git archives")
17257 (description
17258 "The setuptools_scm_git_archive package is a plugin to
17259 setuptools_scm, which supports obtaining versions from git archives that
17260 belong to tagged versions.")
17261 (license license:expat)))
17262
17263 (define-public python2-setuptools-scm-git-archive
17264 (package-with-python2 python-setuptools-scm-git-archive))
17265
17266 (define-public python-setuptools-git
17267 (package
17268 (name "python-setuptools-git")
17269 (version "1.2")
17270 (source
17271 (origin
17272 (method url-fetch)
17273 (uri (pypi-uri "setuptools-git" version))
17274 (sha256
17275 (base32
17276 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17277 (build-system python-build-system)
17278 (arguments
17279 `(#:phases
17280 (modify-phases %standard-phases
17281 ;; This is needed for tests.
17282 (add-after 'unpack 'configure-git
17283 (lambda _
17284 (setenv "HOME" "/tmp")
17285 (invoke "git" "config" "--global" "user.email" "guix")
17286 (invoke "git" "config" "--global" "user.name" "guix")
17287 #t)))))
17288 (native-inputs
17289 `(("git" ,git-minimal)))
17290 (home-page "https://github.com/msabramo/setuptools-git")
17291 (synopsis "Setuptools revision control system plugin for Git")
17292 (description
17293 "This package provides a plugin for Setuptools for revision control with
17294 Git.")
17295 (license license:bsd-3)))
17296
17297 (define-public python-pyclipper
17298 (package
17299 (name "python-pyclipper")
17300 (version "1.1.0.post3")
17301 (source
17302 (origin
17303 (method url-fetch)
17304 (uri (pypi-uri "pyclipper" version ".zip"))
17305 (sha256
17306 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17307 (modules '((guix build utils)))
17308 (snippet
17309 '(begin
17310 ;; This file is generated by Cython.
17311 (delete-file "pyclipper/pyclipper.cpp") #t))))
17312 (build-system python-build-system)
17313 (arguments
17314 `(#:phases
17315 (modify-phases %standard-phases
17316 (add-before 'build 'cythonize-sources
17317 (lambda _
17318 (with-directory-excursion "pyclipper"
17319 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17320 (propagated-inputs
17321 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17322 (native-inputs
17323 `(("python-cython" ,python-cython)
17324 ("python-pytest" ,python-pytest)
17325 ("python-pytest-runner" ,python-pytest-runner)
17326 ("python-unittest2" ,python-unittest2)
17327 ("unzip" ,unzip)))
17328 (home-page "https://github.com/greginvm/pyclipper")
17329 (synopsis "Wrapper for Angus Johnson's Clipper library")
17330 (description
17331 "Pyclipper is a Cython wrapper for the C++ translation of the
17332 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17333 (license license:expat)))
17334
17335 (define-public python2-pyclipper
17336 (package-with-python2 python-pyclipper))
17337
17338 (define-public python2-booleanoperations
17339 (package
17340 (name "python2-booleanoperations")
17341 (version "0.7.1")
17342 (source
17343 (origin
17344 (method url-fetch)
17345 (uri (pypi-uri "booleanOperations" version ".zip"))
17346 (sha256
17347 (base32
17348 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17349 (build-system python-build-system)
17350 (arguments
17351 `(#:python ,python-2))
17352 (native-inputs
17353 `(("unzip" ,unzip)
17354 ("python2-pytest" ,python2-pytest)
17355 ("python2-pytest-runner" ,python2-pytest-runner)))
17356 (propagated-inputs
17357 `(("python-fonttools" ,python2-fonttools)
17358 ("python-pyclipper" ,python2-pyclipper)
17359 ("python-ufolib" ,python2-ufolib)))
17360 (home-page "https://github.com/typemytype/booleanOperations")
17361 (synopsis "Boolean operations on paths")
17362 (description
17363 "BooleanOperations provides a Python library that enables
17364 boolean operations on paths.")
17365 (license license:expat)))
17366
17367 (define-public python-tempdir
17368 (package
17369 (name "python-tempdir")
17370 (version "0.7.1")
17371 (source
17372 (origin
17373 (method url-fetch)
17374 (uri (pypi-uri "tempdir" version))
17375 (sha256
17376 (base32
17377 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17378 (build-system python-build-system)
17379 (home-page "https://pypi.org/project/tempdir/")
17380 (arguments
17381 ;; the package has no tests
17382 '(#:tests? #f))
17383 (synopsis "Python library for managing temporary directories")
17384 (description
17385 "This library manages temporary directories that are automatically
17386 deleted with all their contents when they are no longer needed. It is
17387 particularly convenient for use in tests.")
17388 (license license:expat)))
17389
17390 (define-public python2-tempdir
17391 (package-with-python2 python-tempdir))
17392
17393 (define-public python-activepapers
17394 (package
17395 (name "python-activepapers")
17396 (version "0.2.2")
17397 (source
17398 (origin
17399 (method url-fetch)
17400 (uri (pypi-uri "ActivePapers.Py" version))
17401 (sha256
17402 (base32
17403 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17404 (build-system python-build-system)
17405 (arguments
17406 `(#:modules ((ice-9 ftw)
17407 (srfi srfi-1)
17408 (guix build utils)
17409 (guix build python-build-system))
17410
17411 #:phases
17412 (modify-phases %standard-phases
17413 (add-after 'unpack 'delete-python2-code
17414 (lambda _
17415 (for-each delete-file
17416 '("lib/activepapers/builtins2.py"
17417 "lib/activepapers/standardlib2.py"
17418 "lib/activepapers/utility2.py"))))
17419 (replace 'check
17420 (lambda _
17421 ;; Deactivate the test cases that download files
17422 (setenv "NO_NETWORK_ACCESS" "1")
17423 ;; For some strange reason, some tests fail if nosetests runs all
17424 ;; test modules in a single execution. They pass if each test
17425 ;; module is run individually.
17426 (for-each (lambda (filename)
17427 (invoke "nosetests"
17428 (string-append "tests/" filename)))
17429 (scandir "tests"
17430 (lambda (filename)
17431 (string-suffix? ".py" filename)))))))))
17432 (native-inputs
17433 `(("python-tempdir" ,python-tempdir)
17434 ("python-nose" ,python-nose)))
17435 (propagated-inputs
17436 `(("python-h5py" ,python-h5py)))
17437 (home-page "https://www.activepapers.org/")
17438 (synopsis "Executable papers for scientific computing")
17439 (description
17440 "ActivePapers is a tool for working with executable papers, which
17441 combine data, code, and documentation in single-file packages,
17442 suitable for publication as supplementary material or on repositories
17443 such as figshare or Zenodo.")
17444 (properties `((python2-variant . ,(delay python2-activepapers))))
17445 (license license:bsd-3)))
17446
17447 (define-public python2-activepapers
17448 (let ((base (package-with-python2
17449 (strip-python2-variant python-activepapers))))
17450 (package
17451 (inherit base)
17452 (arguments
17453 (substitute-keyword-arguments (package-arguments base)
17454 ((#:phases phases)
17455 `(modify-phases ,phases
17456 (delete 'delete-python2-code)
17457 (add-after 'unpack 'delete-python3-code
17458 (lambda _
17459 (for-each delete-file
17460 '("lib/activepapers/builtins3.py"
17461 "lib/activepapers/standardlib3.py"
17462 "lib/activepapers/utility3.py")))))))))))
17463
17464 (define-public python-semver
17465 (package
17466 (name "python-semver")
17467 (version "2.9.0")
17468 (source
17469 (origin
17470 (method url-fetch)
17471 (uri (pypi-uri "semver" version))
17472 (sha256
17473 (base32
17474 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17475 (build-system python-build-system)
17476 (arguments
17477 `(#:phases (modify-phases %standard-phases
17478 (replace 'check
17479 (lambda _
17480 (delete-file "setup.cfg")
17481 (invoke "py.test"))))))
17482 (native-inputs
17483 `(("python-pytest" ,python-pytest)))
17484 (home-page "https://github.com/k-bx/python-semver")
17485 (synopsis "Python helper for Semantic Versioning")
17486 (description "This package provides a Python library for
17487 @url{Semantic Versioning, http://semver.org/}.")
17488 (license license:bsd-3)))
17489
17490 (define-public python2-semver
17491 (package-with-python2 python-semver))
17492
17493 (define-public python-pyro4
17494 (package
17495 (name "python-pyro4")
17496 (version "4.77")
17497 (source
17498 (origin
17499 (method url-fetch)
17500 (uri (pypi-uri "Pyro4" version))
17501 (sha256
17502 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17503 (build-system python-build-system)
17504 (arguments
17505 '(#:tests? #f)) ;FIXME: Some tests require network access.
17506 (native-inputs
17507 `(("python-cloudpickle" ,python-cloudpickle)
17508 ("python-dill" ,python-dill)
17509 ("python-msgpack" ,python-msgpack)))
17510 (propagated-inputs
17511 `(("python-serpent" ,python-serpent)))
17512 (home-page "https://pyro4.readthedocs.io")
17513 (synopsis "Distributed object middleware for Python")
17514 (description
17515 "Pyro enables you to build applications in which objects can talk to each
17516 other over the network. You can just use normal Python method calls to call
17517 objects on other machines, also known as remote procedure calls (RPC).")
17518 (license license:expat)))
17519
17520 (define-public python2-pyro
17521 (package
17522 (name "python2-pyro")
17523 (version "3.16")
17524 (source
17525 (origin
17526 (method url-fetch)
17527 (uri (pypi-uri "Pyro" version))
17528 (file-name (string-append "Pyro-" version ".tar.gz"))
17529 (sha256
17530 (base32
17531 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17532 (build-system python-build-system)
17533 (arguments
17534 ;; Pyro is not compatible with Python 3
17535 `(#:python ,python-2
17536 ;; Pyro has no test cases for automatic execution
17537 #:tests? #f))
17538 (home-page "https://pythonhosted.org/Pyro/")
17539 (synopsis "Distributed object manager for Python")
17540 (description "Pyro is a Distributed Object Technology system
17541 written in Python that is designed to be easy to use. It resembles
17542 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17543 which is a system and language independent Distributed Object Technology
17544 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17545 longer maintained. New projects should use Pyro4 instead, which
17546 is the new Pyro version that is actively developed.")
17547 (license license:expat)))
17548
17549 (define-public python2-scientific
17550 (package
17551 (name "python2-scientific")
17552 (version "2.9.4")
17553 (source
17554 (origin
17555 (method git-fetch)
17556 (uri (git-reference
17557 (url "https://github.com/khinsen/ScientificPython")
17558 (commit (string-append "rel" version))))
17559 (file-name (git-file-name name version))
17560 (sha256
17561 (base32
17562 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17563 (build-system python-build-system)
17564 (inputs
17565 `(("netcdf" ,netcdf)))
17566 (propagated-inputs
17567 `(("python-numpy" ,python2-numpy-1.8)
17568 ("python-pyro" ,python2-pyro)))
17569 (arguments
17570 ;; ScientificPython is not compatible with Python 3
17571 `(#:python ,python-2
17572 #:tests? #f ; No test suite
17573 #:phases
17574 (modify-phases %standard-phases
17575 (replace 'build
17576 (lambda* (#:key inputs #:allow-other-keys)
17577 (invoke "python" "setup.py" "build"
17578 (string-append "--netcdf_prefix="
17579 (assoc-ref inputs "netcdf"))))))))
17580 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17581 (synopsis "Python modules for scientific computing")
17582 (description "ScientificPython is a collection of Python modules that are
17583 useful for scientific computing. Most modules are rather general (Geometry,
17584 physical units, automatic derivatives, ...) whereas others are more
17585 domain-specific (e.g. netCDF and PDB support). The library is currently
17586 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17587 (license license:cecill-c)))
17588
17589 (define-public python2-mmtk
17590 (package
17591 (name "python2-mmtk")
17592 (version "2.7.12")
17593 (source
17594 (origin
17595 (method git-fetch)
17596 (uri (git-reference
17597 (url "https://github.com/khinsen/MMTK")
17598 (commit (string-append "rel" version))))
17599 (file-name (git-file-name name version))
17600 (sha256
17601 (base32
17602 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17603 (build-system python-build-system)
17604 (native-inputs
17605 `(("netcdf" ,netcdf)))
17606 (propagated-inputs
17607 `(("python-scientific" ,python2-scientific)
17608 ("python-tkinter" ,python-2 "tk")))
17609 (arguments
17610 `(#:python ,python-2
17611 #:tests? #f
17612 #:phases
17613 (modify-phases %standard-phases
17614 (add-before 'build 'includes-from-scientific
17615 (lambda* (#:key inputs #:allow-other-keys)
17616 (mkdir-p "Include/Scientific")
17617 (copy-recursively
17618 (string-append
17619 (assoc-ref inputs "python-scientific")
17620 "/include/python2.7/Scientific")
17621 "Include/Scientific"))))))
17622 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17623 (synopsis "Python library for molecular simulation")
17624 (description "MMTK is a library for molecular simulations with an emphasis
17625 on biomolecules. It provides widely used methods such as Molecular Dynamics
17626 and normal mode analysis, but also basic routines for implementing new methods
17627 for simulation and analysis. The library is currently not actively maintained
17628 and works only with Python 2 and NumPy < 1.9.")
17629 (license license:cecill-c)))
17630
17631 (define-public python-phonenumbers
17632 (package
17633 (name "python-phonenumbers")
17634 (version "8.9.1")
17635 (source
17636 (origin
17637 (method url-fetch)
17638 (uri (pypi-uri "phonenumbers" version))
17639 (sha256
17640 (base32
17641 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17642 (build-system python-build-system)
17643 (home-page
17644 "https://github.com/daviddrysdale/python-phonenumbers")
17645 (synopsis
17646 "Python library for dealing with international phone numbers")
17647 (description
17648 "This package provides a Python port of Google's libphonenumber library.")
17649 (license license:asl2.0)))
17650
17651 (define-public python2-phonenumbers
17652 (package-with-python2 python-phonenumbers))
17653
17654 (define-public python-send2trash
17655 (package
17656 (name "python-send2trash")
17657 (version "1.5.0")
17658 (source
17659 (origin (method git-fetch)
17660 ;; Source tarball on PyPI doesn't include tests.
17661 (uri (git-reference
17662 (url "https://github.com/hsoft/send2trash")
17663 (commit version)))
17664 (file-name (git-file-name name version))
17665 (sha256
17666 (base32
17667 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17668 (build-system python-build-system)
17669 (arguments
17670 '(#:phases
17671 (modify-phases %standard-phases
17672 (add-before 'check 'pre-check
17673 (lambda _
17674 (mkdir-p "/tmp/foo")
17675 (setenv "HOME" "/tmp/foo")
17676 #t)))))
17677 (home-page "https://github.com/hsoft/send2trash")
17678 (synopsis "Send files to the user's @file{~/Trash} directory")
17679 (description "This package provides a Python library to send files to the
17680 user's @file{~/Trash} directory.")
17681 (properties `((python2-variant . ,(delay python2-send2trash))))
17682 (license license:bsd-3)))
17683
17684 (define-public python2-send2trash
17685 (package
17686 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17687 (arguments
17688 (substitute-keyword-arguments (package-arguments python-send2trash)
17689 ((#:phases phases)
17690 `(modify-phases ,phases
17691 (add-before 'check 'setenv
17692 (lambda _
17693 (setenv "PYTHONPATH"
17694 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17695 #t))))))))
17696
17697 (define-public python-pyfavicon
17698 (package
17699 (name "python-pyfavicon")
17700 (version "0.1.1")
17701 (source
17702 (origin
17703 (method url-fetch)
17704 (uri (pypi-uri "pyfavicon" version))
17705 (sha256
17706 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17707 (build-system python-build-system)
17708 (arguments
17709 ;; There are no tests in the PyPI tarball and the tests from the
17710 ;; repository require online data.
17711 '(#:tests? #f))
17712 (propagated-inputs
17713 `(("python-aiohttp" ,python-aiohttp)
17714 ("python-beautifulsoup4" ,python-beautifulsoup4)
17715 ("python-pillow" ,python-pillow)))
17716 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17717 (synopsis "Async favicon fetcher")
17718 (description
17719 "@code{pyfavicon} is an async favicon fetcher.")
17720 (license license:expat)))
17721
17722 (define-public python-yapf
17723 (package
17724 (name "python-yapf")
17725 (version "0.29.0")
17726 (source
17727 (origin
17728 (method url-fetch)
17729 (uri (pypi-uri "yapf" version))
17730 (sha256
17731 (base32
17732 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17733 (build-system python-build-system)
17734 (home-page "https://github.com/google/yapf")
17735 (synopsis "Formatter for Python code")
17736 (description "YAPF is a formatter for Python code. It's based off of
17737 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17738 takes the code and reformats it to the best formatting that conforms to the
17739 style guide, even if the original code didn't violate the style guide.")
17740 (license license:asl2.0)))
17741
17742 (define-public python2-yapf
17743 (package-with-python2 python-yapf))
17744
17745 (define-public python-yq
17746 (package
17747 (name "python-yq")
17748 (version "2.11.1")
17749 (source
17750 (origin
17751 (method url-fetch)
17752 (uri (pypi-uri "yq" version))
17753 (sha256
17754 (base32
17755 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17756 (build-system python-build-system)
17757 (arguments
17758 '(#:phases
17759 (modify-phases %standard-phases
17760 (add-after 'unpack 'patch
17761 (lambda* (#:key inputs #:allow-other-keys)
17762 (substitute* "yq/__init__.py"
17763 (("Popen\\(\\[\"jq")
17764 (string-append
17765 "Popen([\""
17766 (assoc-ref inputs "jq")
17767 "/bin/jq")))
17768 #t)))))
17769 (inputs
17770 `(("python-argcomplete" ,python-argcomplete)
17771 ("python-pyyaml" ,python-pyyaml)
17772 ("python-xmltodict" ,python-xmltodict)
17773 ("jq" ,jq)))
17774 (native-inputs
17775 `(("python-coverage" ,python-coverage)
17776 ("python-flake8" ,python-flake8)
17777 ("python-wheel" ,python-wheel)))
17778 (home-page "https://github.com/kislyuk/yq")
17779 (synopsis "Command-line YAML/XML processor")
17780 (description
17781 "This package provides @command{yq} and @command{xq} for processing YAML
17782 and XML respectively. The processing is done through @{jq}, @command{jq}
17783 filters can be used to process the data as it passes through.")
17784 (license license:asl2.0)))
17785
17786 (define-public python-gyp
17787 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17788 (revision "0"))
17789 (package
17790 (name "python-gyp")
17791 ;; Google does not release versions,
17792 ;; based on second most recent commit date.
17793 (version (git-version "0.0.0" revision commit))
17794 (source
17795 (origin
17796 ;; Google does not release tarballs,
17797 ;; git checkout is needed.
17798 (method git-fetch)
17799 (uri (git-reference
17800 (url "https://chromium.googlesource.com/external/gyp")
17801 (commit commit)))
17802 (file-name (git-file-name name version))
17803 (sha256
17804 (base32
17805 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17806 (build-system python-build-system)
17807 (home-page "https://gyp.gsrc.io/")
17808 (synopsis "GYP is a Meta-Build system")
17809 (description
17810 "GYP builds build systems for large, cross platform applications.
17811 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17812 files, and Makefiles.")
17813 (license license:bsd-3))))
17814
17815 (define-public python2-gyp
17816 (package-with-python2 python-gyp))
17817
17818 (define-public python-whatever
17819 (package
17820 (name "python-whatever")
17821 (version "0.6")
17822 (source
17823 (origin
17824 (method git-fetch)
17825 (uri (git-reference
17826 (url "https://github.com/Suor/whatever")
17827 (commit version)))
17828 (file-name (git-file-name name version))
17829 (sha256
17830 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17831 (build-system python-build-system)
17832 (arguments
17833 `(#:phases
17834 (modify-phases %standard-phases
17835 (replace 'check
17836 (lambda _
17837 (invoke "py.test"))))))
17838 (native-inputs
17839 `(("python-pytest" ,python-pytest)))
17840 (home-page "https://github.com/Suor/whatever")
17841 (synopsis "Make anonymous functions by partial application of operators")
17842 (description "@code{whatever} provides an easy way to make anonymous
17843 functions by partial application of operators.")
17844 (license license:bsd-3)))
17845
17846 (define-public python2-whatever
17847 (package-with-python2 python-whatever))
17848
17849 (define-public python-funcy
17850 (package
17851 (name "python-funcy")
17852 (version "1.11")
17853 (source
17854 (origin
17855 (method git-fetch)
17856 (uri (git-reference
17857 (url "https://github.com/Suor/funcy")
17858 (commit version)))
17859 (sha256
17860 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17861 (file-name (git-file-name name version))))
17862 (build-system python-build-system)
17863 (arguments
17864 `(#:phases
17865 (modify-phases %standard-phases
17866 (replace 'check
17867 (lambda _
17868 (invoke "py.test"))))))
17869 (native-inputs
17870 `(("python-pytest" ,python-pytest)
17871 ("python-whatever" ,python-whatever)))
17872 (home-page "https://github.com/Suor/funcy")
17873 (synopsis "Functional tools")
17874 (description "@code{funcy} is a library that provides functional tools.
17875 Examples are:
17876 @enumerate
17877 @item merge - Merges collections of the same type
17878 @item walk - Type-preserving map
17879 @item select - Selects a part of a collection
17880 @item take - Takes the first n items of a collection
17881 @item first - Takes the first item of a collection
17882 @item remove - Predicated-removes items of a collection
17883 @item concat - Concatenates two collections
17884 @item flatten - Flattens a collection with subcollections
17885 @item distinct - Returns only distinct items
17886 @item split - Predicated-splits a collection
17887 @item split_at - Splits a collection at a given item
17888 @item group_by - Groups items by group
17889 @item pairwise - Pairs off adjacent items
17890 @item partial - Partially-applies a function
17891 @item curry - Curries a function
17892 @item compose - Composes functions
17893 @item complement - Complements a predicate
17894 @item all_fn - \"all\" with predicate
17895 @end enumerate")
17896 (license license:bsd-3)))
17897
17898 (define-public python2-funcy
17899 (package-with-python2 python-funcy))
17900
17901 (define-public python-isoweek
17902 (package
17903 (name "python-isoweek")
17904 (version "1.3.3")
17905 (source
17906 (origin
17907 (method url-fetch)
17908 (uri (pypi-uri "isoweek" version))
17909 (sha256
17910 (base32
17911 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17912 (build-system python-build-system)
17913 (home-page "https://github.com/gisle/isoweek")
17914 (synopsis "Objects representing a week")
17915 (description "The @code{isoweek} module provide the class Week that
17916 implements the week definition of ISO 8601. This standard also defines
17917 a notation for identifying weeks; yyyyWww (where the W is a literal).
17918 Week instances stringify to this form.")
17919 (license license:bsd-3)))
17920
17921 (define-public python2-isoweek
17922 (package-with-python2 python-isoweek))
17923
17924 (define-public python-pyzbar
17925 (package
17926 (name "python-pyzbar")
17927 (version "0.1.8")
17928 (source
17929 (origin
17930 ;; There's no source tarball on PyPI.
17931 (method git-fetch)
17932 (uri (git-reference
17933 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17934 (commit (string-append "v" version))))
17935 (file-name (git-file-name name version))
17936 (sha256
17937 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17938 (build-system python-build-system)
17939 (arguments
17940 `(#:phases
17941 (modify-phases %standard-phases
17942 (add-after 'unpack 'remove-failing-test
17943 (lambda _
17944 ;; This tests if find_library was called once, but we remove
17945 ;; the call in the stage below to make the library find libzbar.
17946 (delete-file "pyzbar/tests/test_zbar_library.py")
17947 #t))
17948 (add-before 'build 'set-library-file-name
17949 (lambda* (#:key inputs #:allow-other-keys)
17950 (let ((libzbar (assoc-ref inputs "zbar")))
17951 (substitute* "pyzbar/zbar_library.py"
17952 (("find_library\\('zbar'\\)")
17953 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17954 #t))))))
17955 (native-inputs
17956 `(("pkg-config" ,pkg-config)
17957 ("python-numpy" ,python-numpy)
17958 ("python-pillow" ,python-pillow)))
17959 (inputs
17960 `(("zbar" ,zbar)))
17961 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17962 (synopsis "Read one-dimensional barcodes and QR codes")
17963 (description
17964 "Read one-dimensional barcodes and QR codes using the zbar library.
17965
17966 Features:
17967
17968 @itemize
17969 @item Pure python
17970 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17971 @item Decodes locations of barcodes
17972 @item No dependencies, other than the zbar library itself
17973 @end itemize")
17974 (license license:expat)))
17975
17976 (define-public python-tokenize-rt
17977 (package
17978 (name "python-tokenize-rt")
17979 (version "2.0.1")
17980 (source
17981 (origin
17982 (method url-fetch)
17983 (uri (pypi-uri "tokenize-rt" version))
17984 (sha256
17985 (base32
17986 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17987 (build-system python-build-system)
17988 (home-page "https://github.com/asottile/tokenize-rt")
17989 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17990 (description
17991 "This Python library is a wrapper around @code{tokenize} from the Python
17992 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17993 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17994 and @code{tokens_to_src} to roundtrip.")
17995 (license license:expat)))
17996
17997 (define-public python-future-fstrings
17998 (package
17999 (name "python-future-fstrings")
18000 (version "0.4.1")
18001 (source
18002 (origin
18003 (method url-fetch)
18004 (uri (pypi-uri "future_fstrings" version))
18005 (sha256
18006 (base32
18007 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18008 (build-system python-build-system)
18009 (propagated-inputs
18010 `(("python-tokenize-rt" ,python-tokenize-rt)))
18011 (home-page "https://github.com/asottile/future-fstrings")
18012 (synopsis "Backport of fstrings to Python < 3.6")
18013 (description
18014 "This package provides a UTF-8 compatible encoding
18015 @code{future_fstrings}, which performs source manipulation. It decodes the
18016 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18017 @code{f} strings.")
18018 (license license:expat)))
18019
18020 (define-public python-typed-ast
18021 (package
18022 (name "python-typed-ast")
18023 (version "1.4.0")
18024 (source
18025 (origin
18026 (method git-fetch)
18027 (uri (git-reference
18028 (url "https://github.com/python/typed_ast")
18029 (commit version)))
18030 (sha256
18031 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18032 (file-name (git-file-name name version))))
18033 (build-system python-build-system)
18034 (arguments
18035 `(#:modules ((guix build utils)
18036 (guix build python-build-system)
18037 (ice-9 ftw)
18038 (srfi srfi-1)
18039 (srfi srfi-26))
18040 #:phases
18041 (modify-phases %standard-phases
18042 (replace 'check
18043 (lambda _
18044 (let ((cwd (getcwd)))
18045 (setenv "PYTHONPATH"
18046 (string-append cwd "/build/"
18047 (find (cut string-prefix? "lib" <>)
18048 (scandir (string-append cwd "/build")))
18049 ":"
18050 (getenv "PYTHONPATH"))))
18051 (invoke "pytest")
18052 #t)))))
18053 (native-inputs `(("python-pytest" ,python-pytest)))
18054 (home-page "https://github.com/python/typed_ast")
18055 (synopsis "Fork of Python @code{ast} modules with type comment support")
18056 (description "This package provides a parser similar to the standard
18057 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18058 include PEP 484 type comments and are independent of the version of Python
18059 under which they are run. The @code{typed_ast} parsers produce the standard
18060 Python AST (plus type comments), and are both fast and correct, as they are
18061 based on the CPython 2.7 and 3.7 parsers.")
18062 ;; See the file "LICENSE" for the details.
18063 (license (list license:psfl
18064 license:asl2.0
18065 license:expat)))) ;ast27/Parser/spark.py
18066
18067 (define-public python-typing
18068 (package
18069 (name "python-typing")
18070 (version "3.7.4.3")
18071 (source
18072 (origin
18073 (method url-fetch)
18074 (uri (pypi-uri "typing" version))
18075 (sha256
18076 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18077 (build-system python-build-system)
18078 (home-page "https://docs.python.org/3/library/typing.html")
18079 (synopsis "Type hints for Python")
18080 (description "This is a backport of the standard library @code{typing}
18081 module to Python versions older than 3.5. Typing defines a standard notation
18082 for Python function and variable type annotations. The notation can be used
18083 for documenting code in a concise, standard format, and it has been designed
18084 to also be used by static and runtime type checkers, static analyzers, IDEs
18085 and other tools.")
18086 (license license:psfl)))
18087
18088 (define-public python2-typing
18089 (package-with-python2 python-typing))
18090
18091 (define-public python-typing-extensions
18092 (package
18093 (name "python-typing-extensions")
18094 (version "3.7.4.2")
18095 (source
18096 (origin
18097 (method url-fetch)
18098 (uri (pypi-uri "typing_extensions" version))
18099 (sha256
18100 (base32
18101 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
18102 (build-system python-build-system)
18103 (home-page
18104 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18105 (synopsis "Experimental type hints for Python")
18106 (description
18107 "The typing_extensions module contains additional @code{typing} hints not
18108 yet present in the of the @code{typing} standard library.
18109 Included are implementations of:
18110 @enumerate
18111 @item ClassVar
18112 @item ContextManager
18113 @item Counter
18114 @item DefaultDict
18115 @item Deque
18116 @item NewType
18117 @item NoReturn
18118 @item overload
18119 @item Protocol
18120 @item runtime
18121 @item Text
18122 @item Type
18123 @item TYPE_CHECKING
18124 @item AsyncGenerator
18125 @end enumerate\n")
18126 (license license:psfl)))
18127
18128 (define-public bpython
18129 (package
18130 (name "bpython")
18131 (version "0.18")
18132 (source
18133 (origin
18134 (method url-fetch)
18135 (uri (pypi-uri "bpython" version))
18136 (sha256
18137 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18138 (build-system python-build-system)
18139 (arguments
18140 `(#:phases
18141 (modify-phases %standard-phases
18142 (add-after 'unpack 'remove-failing-test
18143 (lambda _
18144 ;; Remove failing test. FIXME: make it pass
18145 (delete-file "bpython/test/test_args.py")
18146 #t))
18147 (add-after 'wrap 'add-aliases
18148 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18149 (lambda* (#:key outputs #:allow-other-keys)
18150 (let ((out (assoc-ref outputs "out")))
18151 (for-each
18152 (lambda (old new)
18153 (symlink old (string-append out "/bin/" new)))
18154 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18155 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18156 #t)))))
18157 (propagated-inputs
18158 `(("python-pygments" ,python-pygments)
18159 ("python-requests" ,python-requests)
18160 ("python-babel" ,python-babel) ; optional, for internationalization
18161 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18162 ("python-greenlet" ,python-greenlet)
18163 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18164 ("python-six" ,python-six)))
18165 (native-inputs
18166 `(("python-sphinx" ,python-sphinx)
18167 ("python-mock" ,python-mock)))
18168 (home-page "https://bpython-interpreter.org/")
18169 (synopsis "Fancy interface to the Python interpreter")
18170 (description "Bpython is a fancy interface to the Python
18171 interpreter. bpython's main features are
18172
18173 @enumerate
18174 @item in-line syntax highlighting,
18175 @item readline-like autocomplete with suggestions displayed as you type,
18176 @item expected parameter list for any Python function,
18177 @item \"rewind\" function to pop the last line of code from memory and
18178 re-evaluate,
18179 @item send the code you've entered off to a pastebin,
18180 @item save the code you've entered to a file, and
18181 @item auto-indentation.
18182 @end enumerate")
18183 (license license:expat)))
18184
18185 (define-public bpython2
18186 (let ((base (package-with-python2
18187 (strip-python2-variant bpython))))
18188 (package (inherit base)
18189 (name "bpython2")
18190 (arguments
18191 `(#:python ,python-2
18192 #:phases
18193 (modify-phases %standard-phases
18194 (add-after 'unpack 'remove-failing-test
18195 (lambda _
18196 ;; Remove failing test. FIXME: make it pass
18197 (delete-file "bpython/test/test_args.py")
18198 ;; Disable failing test-cases (renaming inhibits they are
18199 ;; discovered)
18200 (substitute* "bpython/test/test_curtsies_repl.py"
18201 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18202 (string-append a "xxx_off_" b))
18203 (("^(\\s*def )(test_complex\\W)" _ a b)
18204 (string-append a "xxx_off_" b)))
18205 #t))
18206 (add-before 'build 'rename-scripts
18207 ;; rename the scripts to bypthon2, bpdb2, etc.
18208 (lambda _
18209 (substitute* "setup.py"
18210 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18211 (string-append name "2" rest "\n"))
18212 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18213 (string-append name "2" (or sub "") rest "\n")))
18214 #t))))))))
18215
18216 (define-public python-pyinotify
18217 (package
18218 (name "python-pyinotify")
18219 (version "0.9.6")
18220 (source (origin
18221 (method url-fetch)
18222 (uri (pypi-uri "pyinotify" version))
18223 (sha256
18224 (base32
18225 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18226 (build-system python-build-system)
18227 (arguments `(#:tests? #f)) ;no tests
18228 (home-page "https://github.com/seb-m/pyinotify")
18229 (synopsis "Python library for monitoring inotify events")
18230 (description
18231 "@code{pyinotify} provides a Python interface for monitoring
18232 file system events on Linux.")
18233 (license license:expat)))
18234
18235 (define-public python2-pyinotify
18236 (package-with-python2 python-pyinotify))
18237
18238 ;; Ada parser uses this version.
18239 (define-public python2-quex-0.67.3
18240 (package
18241 (name "python2-quex")
18242 (version "0.67.3")
18243 (source
18244 (origin
18245 (method url-fetch)
18246 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18247 (version-major+minor version)
18248 "/quex-" version ".zip"))
18249 (sha256
18250 (base32
18251 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18252 (build-system python-build-system)
18253 (native-inputs
18254 `(("unzip" ,unzip)))
18255 (arguments
18256 `(#:python ,python-2
18257 #:tests? #f
18258 #:phases
18259 (modify-phases %standard-phases
18260 (delete 'configure)
18261 (delete 'build)
18262 (replace 'install
18263 (lambda* (#:key outputs #:allow-other-keys)
18264 (let* ((out (assoc-ref outputs "out"))
18265 (share/quex (string-append out "/share/quex"))
18266 (bin (string-append out "/bin")))
18267 (copy-recursively "." share/quex)
18268 (mkdir-p bin)
18269 (symlink (string-append share/quex "/quex-exe.py")
18270 (string-append bin "/quex"))
18271 #t))))))
18272 (native-search-paths
18273 (list (search-path-specification
18274 (variable "QUEX_PATH")
18275 (files '("share/quex")))))
18276 (home-page "http://quex.sourceforge.net/")
18277 (synopsis "Lexical analyzer generator in Python")
18278 (description "@code{quex} is a lexical analyzer generator in Python.")
18279 (license license:lgpl2.1+))) ; Non-military
18280
18281 (define-public python2-quex
18282 (package (inherit python2-quex-0.67.3)
18283 (name "python2-quex")
18284 (version "0.68.1")
18285 (source
18286 (origin
18287 (method url-fetch)
18288 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18289 (sha256
18290 (base32
18291 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18292 (file-name (string-append name "-" version ".tar.gz"))))))
18293
18294 (define-public python-more-itertools
18295 (package
18296 (name "python-more-itertools")
18297 (version "8.2.0")
18298 (source
18299 (origin
18300 (method url-fetch)
18301 (uri (pypi-uri "more-itertools" version))
18302 (sha256
18303 (base32
18304 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18305 (build-system python-build-system)
18306 (home-page "https://github.com/erikrose/more-itertools")
18307 (synopsis "More routines for operating on iterables, beyond itertools")
18308 (description "Python's built-in @code{itertools} module implements a
18309 number of iterator building blocks inspired by constructs from APL, Haskell,
18310 and SML. @code{more-itertools} includes additional building blocks for
18311 working with iterables.")
18312 (properties `((python2-variant . ,(delay python2-more-itertools))))
18313 (license license:expat)))
18314
18315 ;; The 5.x series are the last versions supporting Python 2.7.
18316 (define-public python2-more-itertools
18317 (package
18318 (inherit python-more-itertools)
18319 (name "python2-more-itertools")
18320 (version "5.0.0")
18321 (source (origin
18322 (method url-fetch)
18323 (uri (pypi-uri "more-itertools" version))
18324 (sha256
18325 (base32
18326 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18327 (arguments
18328 `(#:python ,python-2))
18329 (propagated-inputs
18330 `(("python2-six" ,python2-six-bootstrap)))))
18331
18332 (define-public python-latexcodec
18333 (package
18334 (name "python-latexcodec")
18335 (version "1.0.7")
18336 (source
18337 (origin
18338 (method url-fetch)
18339 (uri (pypi-uri "latexcodec" version))
18340 (sha256
18341 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18342 (build-system python-build-system)
18343 (inputs
18344 `(("python-six" ,python-six)))
18345 (home-page "https://readthedocs.org/projects/latexcodec/")
18346 (synopsis "Work with LaTeX code in Python")
18347 (description "Lexer and codec to work with LaTeX code in Python.")
18348 (license license:expat)))
18349
18350 (define-public python-pybtex
18351 (package
18352 (name "python-pybtex")
18353 (version "0.22.2")
18354 (source
18355 (origin
18356 (method url-fetch)
18357 (uri (pypi-uri "pybtex" version))
18358 (sha256
18359 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18360 (build-system python-build-system)
18361 (native-inputs
18362 `(("python-nose" ,python-nose)))
18363 (inputs
18364 `(("python-latexcodec" ,python-latexcodec)
18365 ("python-pyyaml" ,python-pyyaml)
18366 ("python-six" ,python-six)))
18367 (arguments
18368 `(#:test-target "nosetests"))
18369 (home-page "https://pybtex.org/")
18370 (synopsis "BibTeX-compatible bibliography processor")
18371 (description "Pybtex is a BibTeX-compatible bibliography processor written
18372 in Python. You can simply type pybtex instead of bibtex.")
18373 (license license:expat)))
18374
18375 (define-public python-onetimepass
18376 (package
18377 (name "python-onetimepass")
18378 (version "1.0.1")
18379 (source
18380 (origin
18381 (method url-fetch)
18382 (uri (pypi-uri "onetimepass" version))
18383 (sha256
18384 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18385 (build-system python-build-system)
18386 (propagated-inputs `(("python-six" ,python-six)))
18387 (home-page "https://github.com/tadeck/onetimepass/")
18388 (synopsis "One-time password library")
18389 (description "Python one-time password library for HMAC-based (HOTP) and
18390 time-based (TOTP) passwords.")
18391 (license license:expat)))
18392
18393 (define-public python-parso
18394 (package
18395 (name "python-parso")
18396 (version "0.7.1")
18397 (source
18398 (origin
18399 (method url-fetch)
18400 (uri (pypi-uri "parso" version))
18401 (sha256
18402 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18403 (native-inputs
18404 `(("python-pytest" ,python-pytest)))
18405 (build-system python-build-system)
18406 (arguments
18407 `(#:phases (modify-phases %standard-phases
18408 (replace 'check
18409 (lambda _ (invoke "pytest" "-vv"))))))
18410 (home-page "https://github.com/davidhalter/parso")
18411 (synopsis "Python Parser")
18412 (description "Parso is a Python parser that supports error recovery and
18413 round-trip parsing for different Python versions (in multiple Python versions).
18414 Parso is also able to list multiple syntax errors in your Python file.")
18415 (license license:expat)))
18416
18417 (define-public python2-parso
18418 (package-with-python2 python-parso))
18419
18420 (define-public python-async-generator
18421 (package
18422 (name "python-async-generator")
18423 (version "1.10")
18424 (source
18425 (origin
18426 (method url-fetch)
18427 (uri (pypi-uri "async_generator" version))
18428 (sha256
18429 (base32
18430 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18431 (build-system python-build-system)
18432 (native-inputs
18433 `(("python-pytest" ,python-pytest)))
18434 (home-page "https://github.com/python-trio/async_generator")
18435 (synopsis "Async generators and context managers for Python 3.5+")
18436 (description "@code{async_generator} back-ports Python 3.6's native async
18437 generators and Python 3.7's context managers into Python 3.5.")
18438 ;; Dual licensed.
18439 (license (list license:expat license:asl2.0))))
18440
18441 (define-public python-async-timeout
18442 (package
18443 (name "python-async-timeout")
18444 (version "3.0.1")
18445 (source
18446 (origin
18447 (method url-fetch)
18448 (uri (pypi-uri "async-timeout" version))
18449 (sha256
18450 (base32
18451 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18452 (build-system python-build-system)
18453 (home-page "https://github.com/aio-libs/async_timeout/")
18454 (synopsis "Timeout context manager for asyncio programs")
18455 (description "@code{async-timeout} provides a timeout timeout context
18456 manager compatible with @code{asyncio}.")
18457 (license license:asl2.0)))
18458
18459 (define-public python-glob2
18460 (package
18461 (name "python-glob2")
18462 (version "0.7")
18463 (source
18464 (origin
18465 (method git-fetch)
18466 (uri (git-reference
18467 (url "https://github.com/miracle2k/python-glob2")
18468 (commit (string-append "v" version))))
18469 (file-name (git-file-name name version))
18470 (sha256
18471 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18472 (build-system python-build-system)
18473 (home-page "https://github.com/miracle2k/python-glob2/")
18474 (synopsis "Extended Version of the python buildin glob module")
18475 (description "This is an extended version of the Python
18476 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18477 adds:
18478
18479 @itemize
18480 @item The ability to capture the text matched by glob patterns, and return
18481 those matches alongside the file names.
18482 @item A recursive @code{**} globbing syntax, akin for example to the
18483 @code{globstar} option of Bash.
18484 @item The ability to replace the file system functions used, in order to glob
18485 on virtual file systems.
18486 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18487 @end itemize
18488
18489 Glob2 currently based on the glob code from Python 3.3.1.")
18490 (license license:bsd-2)))
18491
18492 (define-public python2-glob2
18493 (package-with-python2 python-glob2))
18494
18495 (define-public python-gipc
18496 (package
18497 (name "python-gipc")
18498 (version "0.6.0")
18499 (source
18500 (origin
18501 (method url-fetch)
18502 (uri (pypi-uri "gipc" version ".zip"))
18503 (sha256
18504 (base32
18505 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18506 (build-system python-build-system)
18507 (native-inputs
18508 `(("unzip" ,unzip)))
18509 (propagated-inputs
18510 `(("python-gevent" ,python-gevent)))
18511 (home-page "https://gehrcke.de/gipc/")
18512 (synopsis "Child process management in the context of gevent")
18513 (description "Usage of Python's multiprocessing package in a
18514 gevent-powered application may raise problems. With @code{gipc},
18515 process-based child processes can safely be created anywhere within a
18516 gevent-powered application.")
18517 (license license:expat)))
18518
18519 (define-public python2-gipc
18520 (package-with-python2 python-gipc))
18521
18522 (define-public python-beautifultable
18523 (package
18524 (name "python-beautifultable")
18525 (version "1.0.0")
18526 (source
18527 (origin
18528 (method url-fetch)
18529 (uri (pypi-uri "beautifultable" version))
18530 (sha256
18531 (base32
18532 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18533 (build-system python-build-system)
18534 (propagated-inputs
18535 `(("python-wcwidth" ,python-wcwidth)))
18536 (arguments
18537 `(#:phases
18538 (modify-phases %standard-phases
18539 (add-after 'unpack 'patch-setup.py
18540 (lambda _
18541 (substitute* "setup.py"
18542 (("setup\\(")
18543 "setup(\n test_suite=\"test\",")))))))
18544 (home-page "https://github.com/pri22296/beautifultable")
18545 (synopsis "Print ASCII tables for terminals")
18546 (description "@code{python-beautifultable} provides a class for easily
18547 printing tabular data in a visually appealing ASCII format to a terminal.
18548
18549 Features include, but are not limited to:
18550 @itemize
18551 @item Full customization of the look and feel of the table
18552 @item Row and column accessors.
18553 @item Full support for colors using ANSI sequences or any library.
18554 @item Plenty of predefined styles and option to create custom ones.
18555 @item Support for Unicode characters.
18556 @item Supports streaming table when data is slow to retrieve.
18557 @end itemize")
18558 (license license:expat)))
18559
18560 (define-public python-globber
18561 (package
18562 (name "python-globber")
18563 (version "0.2.1")
18564 (source
18565 (origin
18566 (method git-fetch)
18567 (uri (git-reference
18568 (url "https://github.com/asharov/globber")
18569 (commit version)))
18570 (file-name (git-file-name name version))
18571 (sha256
18572 (base32
18573 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18574 (build-system python-build-system)
18575 (home-page "https://github.com/asharov/globber")
18576 (synopsis "Library for string matching with glob patterns")
18577 (description
18578 "Globber is a Python library for matching file names against glob patterns.
18579 In contrast to other glob-matching libraries, it matches arbitrary strings and
18580 doesn't require the matched names to be existing files. In addition, it
18581 supports the globstar @code{**} operator to match an arbitrary number of
18582 path components.")
18583 (license license:asl2.0)))
18584
18585 (define-public python-git-hammer
18586 (package
18587 (name "python-git-hammer")
18588 (version "0.3.1")
18589 (source
18590 (origin
18591 (method git-fetch)
18592 (uri (git-reference
18593 (url "https://github.com/asharov/git-hammer")
18594 (commit version)))
18595 (file-name (git-file-name name version))
18596 (sha256
18597 (base32
18598 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18599 (build-system python-build-system)
18600 (arguments
18601 `(#:phases
18602 (modify-phases %standard-phases
18603 (add-after 'unpack 'patch-setup.py
18604 (lambda _
18605 (substitute* "setup.py"
18606 (("setup\\(")
18607 "setup(\n test_suite=\"test\",")))))))
18608 (propagated-inputs
18609 `(("python-beautifultable" ,python-beautifultable)
18610 ("python-dateutil" ,python-dateutil)
18611 ("python-gitpython" ,python-gitpython)
18612 ("python-globber" ,python-globber)
18613 ("python-matplotlib" ,python-matplotlib)
18614 ("python-sqlalchemy" ,python-sqlalchemy)
18615 ("python-sqlalchemy-utils"
18616 ,python-sqlalchemy-utils)))
18617 (home-page "https://github.com/asharov/git-hammer")
18618 (synopsis "Provide statistics for git repositories")
18619 (description
18620 "Git Hammer is a statistics tool for projects in git repositories.
18621 Its major feature is tracking the number of lines authored by each person for every
18622 commit, but it also includes some other useful statistics.")
18623 (license license:asl2.0)))
18624
18625 (define-public python-fusepy
18626 (package
18627 (name "python-fusepy")
18628 (version "2.0.4")
18629 (source
18630 (origin
18631 (method url-fetch)
18632 (uri (pypi-uri "fusepy" version))
18633 (sha256
18634 (base32
18635 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18636 (build-system python-build-system)
18637 (arguments
18638 `(#:phases
18639 (modify-phases %standard-phases
18640 (add-before 'build 'set-library-file-name
18641 (lambda* (#:key inputs #:allow-other-keys)
18642 (let ((fuse (assoc-ref inputs "fuse")))
18643 (substitute* "fuse.py"
18644 (("find_library\\('fuse'\\)")
18645 (string-append "'" fuse "/lib/libfuse.so'")))
18646 #t))))))
18647 (propagated-inputs
18648 `(("fuse" ,fuse)))
18649 (home-page "https://github.com/fusepy/fusepy")
18650 (synopsis "Simple ctypes bindings for FUSE")
18651 (description "Python module that provides a simple interface to FUSE and
18652 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18653 (license license:isc)))
18654
18655 (define-public python2-fusepy
18656 (package-with-python2 python-fusepy))
18657
18658 (define-public python-fusepyng
18659 (package
18660 (name "python-fusepyng")
18661 (version "1.0.7")
18662 (source
18663 (origin
18664 (method url-fetch)
18665 (uri (pypi-uri "fusepyng" version))
18666 (sha256
18667 (base32
18668 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18669 (build-system python-build-system)
18670 (arguments
18671 '(#:phases
18672 (modify-phases %standard-phases
18673 (add-after 'unpack 'set-libfuse-path
18674 (lambda* (#:key inputs #:allow-other-keys)
18675 (let ((fuse (assoc-ref inputs "fuse")))
18676 (substitute* "fusepyng.py"
18677 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18678 (string-append "\"" fuse "/lib/libfuse.so\""))))
18679 #t)))))
18680 (inputs
18681 `(("fuse" ,fuse)))
18682 (propagated-inputs
18683 `(("python-paramiko" ,python-paramiko)))
18684 (home-page "https://github.com/rianhunter/fusepyng")
18685 (synopsis "Simple ctypes bindings for FUSE")
18686 (description "@code{fusepyng} is a Python module that provides a simple
18687 interface to FUSE on various operating systems. It's just one file and is
18688 implemented using @code{ctypes}.")
18689 (license license:isc)))
18690
18691 (define-public python2-gdrivefs
18692 (package
18693 (name "python2-gdrivefs")
18694 (version "0.14.9")
18695 (source
18696 (origin
18697 (method url-fetch)
18698 (uri (pypi-uri "gdrivefs" version))
18699 (sha256
18700 (base32
18701 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18702 (build-system python-build-system)
18703 (arguments
18704 `(#:python ,python-2
18705 #:phases
18706 (modify-phases %standard-phases
18707 (add-before 'build 'patch-setup-py
18708 (lambda _
18709 ;; Update requirements from dependency==version
18710 ;; to dependency>=version
18711 (substitute* "gdrivefs/resources/requirements.txt"
18712 (("==") ">="))
18713 #t)))))
18714 (native-inputs
18715 `(("python2-gipc" ,python2-gipc)
18716 ("python2-gevent" ,python2-gevent)
18717 ("python2-greenlet" ,python2-greenlet)
18718 ("python2-httplib2" ,python2-httplib2)
18719 ("python2-uritemplate" ,python2-uritemplate)
18720 ("python2-oauth2client" ,python2-oauth2client)
18721 ("python2-six" ,python2-six)))
18722 (propagated-inputs
18723 `(("python2-dateutil" ,python2-dateutil)
18724 ("python2-fusepy" ,python2-fusepy)
18725 ("python2-google-api-client" ,python2-google-api-client)))
18726 (home-page "https://github.com/dsoprea/GDriveFS")
18727 (synopsis "Mount Google Drive as a local file system")
18728 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18729 under Python 2.7.")
18730 (license license:gpl2)))
18731
18732 (define-public python-userspacefs
18733 (package
18734 (name "python-userspacefs")
18735 (version "1.0.13")
18736 (source
18737 (origin
18738 (method url-fetch)
18739 (uri (pypi-uri "userspacefs" version))
18740 (sha256
18741 (base32
18742 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18743 (build-system python-build-system)
18744 (propagated-inputs
18745 `(("python-fusepyng" ,python-fusepyng)))
18746 (home-page "https://github.com/rianhunter/userspacefs")
18747 (synopsis "User-space file systems for Python")
18748 (description
18749 "@code{userspacefs} is a library that allows you to easily write
18750 user-space file systems in Python.")
18751 (license license:gpl3+)))
18752
18753 (define-public pybind11
18754 (package
18755 (name "pybind11")
18756 (version "2.4.3")
18757 (source (origin
18758 (method git-fetch)
18759 (uri (git-reference
18760 (url "https://github.com/pybind/pybind11")
18761 (commit (string-append "v" version))))
18762 (sha256
18763 (base32
18764 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18765 (file-name (git-file-name name version))))
18766 (build-system cmake-build-system)
18767 (native-inputs
18768 `(("python" ,python-wrapper)
18769
18770 ;; The following dependencies are used for tests.
18771 ("python-pytest" ,python-pytest)
18772 ("catch" ,catch-framework2-1)
18773 ("eigen" ,eigen)))
18774 (arguments
18775 `(#:configure-flags
18776 (list (string-append "-DCATCH_INCLUDE_DIR="
18777 (assoc-ref %build-inputs "catch")
18778 "/include/catch"))
18779
18780 #:phases (modify-phases %standard-phases
18781 (add-after 'install 'install-python
18782 (lambda* (#:key outputs #:allow-other-keys)
18783 (let ((out (assoc-ref outputs "out")))
18784 (with-directory-excursion "../source"
18785 (setenv "PYBIND11_USE_CMAKE" "yes")
18786 (invoke "python" "setup.py" "install"
18787 "--single-version-externally-managed"
18788 "--root=/"
18789 (string-append "--prefix=" out)))))))
18790
18791 #:test-target "check"))
18792 (home-page "https://github.com/pybind/pybind11/")
18793 (synopsis "Seamless operability between C++11 and Python")
18794 (description
18795 "@code{pybind11} is a lightweight header-only library that exposes C++
18796 types in Python and vice versa, mainly to create Python bindings of existing
18797 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18798 library: to minimize boilerplate code in traditional extension modules by
18799 inferring type information using compile-time introspection.")
18800 (license license:bsd-3)))
18801
18802 (define-public python-fasteners
18803 (package
18804 (name "python-fasteners")
18805 (version "0.15")
18806 (source
18807 (origin
18808 (method url-fetch)
18809 (uri (pypi-uri "fasteners" version))
18810 (sha256
18811 (base32
18812 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18813 (build-system python-build-system)
18814 (propagated-inputs
18815 `(("python-monotonic" ,python-monotonic)
18816 ("python-six" ,python-six)))
18817 (native-inputs
18818 `(("python-testtools" ,python-testtools)))
18819 (home-page "https://github.com/harlowja/fasteners")
18820 (synopsis "Python package that provides useful locks")
18821 (description
18822 "This package provides a Python program that provides following locks:
18823
18824 @itemize
18825 @item Locking decorator
18826 @item Reader-writer locks
18827 @item Inter-process locks
18828 @item Generic helpers
18829 @end itemize\n")
18830 (properties `((python2-variant . ,(delay python2-fasteners))))
18831 (license license:asl2.0)))
18832
18833 (define-public python2-fasteners
18834 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18835 (package
18836 (inherit base)
18837 (propagated-inputs
18838 `(("python2-futures" ,python2-futures)
18839 ,@(package-propagated-inputs base))))))
18840
18841 (define-public python-requests-file
18842 (package
18843 (name "python-requests-file")
18844 (version "1.4.3")
18845 (source
18846 (origin
18847 (method url-fetch)
18848 (uri (pypi-uri "requests-file" version))
18849 (sha256
18850 (base32
18851 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18852 (build-system python-build-system)
18853 (propagated-inputs
18854 `(("python-requests" ,python-requests)
18855 ("python-six" ,python-six)))
18856 (home-page
18857 "https://github.com/dashea/requests-file")
18858 (synopsis "File transport adapter for Requests")
18859 (description
18860 "Requests-File is a transport adapter for use with the Requests Python
18861 library to allow local file system access via @code{file://} URLs.")
18862 (license license:asl2.0)))
18863
18864 (define-public python2-requests-file
18865 (package-with-python2 python-requests-file))
18866
18867 (define-public python-identify
18868 (package
18869 (name "python-identify")
18870 (version "1.4.25")
18871 (source
18872 (origin
18873 ;; There are no tests in the PyPI tarball.
18874 (method git-fetch)
18875 (uri (git-reference
18876 (url "https://github.com/chriskuehl/identify")
18877 (commit (string-append "v" version))))
18878 (file-name (git-file-name name version))
18879 (sha256
18880 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18881 (build-system python-build-system)
18882 (arguments
18883 `(#:phases
18884 (modify-phases %standard-phases
18885 (replace 'check
18886 (lambda _
18887 (invoke "pytest" "-vv"))))))
18888 (native-inputs
18889 `(("python-coverage" ,python-coverage)
18890 ("python-pytest" ,python-pytest)))
18891 (propagated-inputs
18892 `(("python-editdistance" ,python-editdistance)))
18893 (home-page "https://github.com/chriskuehl/identify")
18894 (synopsis "File identification library for Python")
18895 (description
18896 "@code{identify} is a file identification library for Python. Given
18897 a file (or some information about a file), return a set of standardized tags
18898 identifying what the file is.")
18899 (license license:expat)))
18900
18901 (define-public python-tldextract
18902 (package
18903 (name "python-tldextract")
18904 (version "2.2.0")
18905 (source
18906 (origin
18907 (method url-fetch)
18908 (uri (pypi-uri "tldextract" version))
18909 (sha256
18910 (base32
18911 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18912 (build-system python-build-system)
18913 (native-inputs
18914 `(("python-pytest" ,python-pytest)
18915 ("python-responses" ,python-responses)))
18916 (propagated-inputs
18917 `(("python-idna" ,python-idna)
18918 ("python-requests" ,python-requests)
18919 ("python-requests-file" ,python-requests-file)))
18920 (home-page
18921 "https://github.com/john-kurkowski/tldextract")
18922 (synopsis
18923 "Separate the TLD from the registered domain and subdomains of a URL")
18924 (description
18925 "TLDExtract accurately separates the TLD from the registered domain and
18926 subdomains of a URL, using the Public Suffix List. By default, this includes
18927 the public ICANN TLDs and their exceptions. It can optionally support the
18928 Public Suffix List's private domains as well.")
18929 (license license:bsd-3)))
18930
18931 (define-public python2-tldextract
18932 (package-with-python2 python-tldextract))
18933
18934 (define-public python-nodeenv
18935 (package
18936 (name "python-nodeenv")
18937 (version "1.4.0")
18938 (source
18939 (origin
18940 ;; There's no tarball in PyPI.
18941 (method git-fetch)
18942 (uri (git-reference
18943 (url "https://github.com/ekalinin/nodeenv")
18944 (commit version)))
18945 (file-name (git-file-name name version))
18946 (sha256
18947 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18948 (build-system python-build-system)
18949 (arguments
18950 `(#:phases
18951 (modify-phases %standard-phases
18952 (replace 'check
18953 (lambda _
18954 ;; This test fails. It tries to open a network socket.
18955 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18956 (native-inputs
18957 `(("python-coverage" ,python-coverage)
18958 ("python-mock" ,python-mock)
18959 ("python-pytest" ,python-pytest)))
18960 (home-page "https://ekalinin.github.io/nodeenv/")
18961 (synopsis "Create isolated node.js environments")
18962 (description
18963 "Nodeenv (node.js virtual environment) is a tool to create isolated
18964 node.js environments. It creates an environment that has its own installation
18965 directories, that doesn't share libraries with other node.js virtual
18966 environments.")
18967 (license license:bsd-3)))
18968
18969 (define-public python-pynamecheap
18970 (package
18971 (name "python-pynamecheap")
18972 (version "0.0.3")
18973 (source
18974 (origin
18975 (method url-fetch)
18976 (uri (pypi-uri "PyNamecheap" version))
18977 (sha256
18978 (base32
18979 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18980 (build-system python-build-system)
18981 (propagated-inputs
18982 `(("python-requests" ,python-requests)))
18983 (home-page
18984 "https://github.com/Bemmu/PyNamecheap")
18985 (synopsis
18986 "Namecheap API client in Python")
18987 (description
18988 "PyNamecheap is a Namecheap API client in Python.")
18989 (license license:expat)))
18990
18991 (define-public python2-pynamecheap
18992 (package-with-python2 python-pynamecheap))
18993
18994 (define-public python-dns-lexicon
18995 (package
18996 (name "python-dns-lexicon")
18997 (version "2.4.0")
18998 (source
18999 (origin
19000 (method url-fetch)
19001 (uri (pypi-uri "dns-lexicon" version))
19002 (sha256
19003 (base32
19004 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19005 (build-system python-build-system)
19006 (arguments
19007 `(#:tests? #f)) ;requires internet access
19008 (propagated-inputs
19009 `(("python-future" ,python-future)
19010 ("python-pynamecheap" ,python-pynamecheap)
19011 ("python-requests" ,python-requests)
19012 ("python-tldextract" ,python-tldextract)
19013 ("python-urllib3" ,python-urllib3)))
19014 (home-page "https://github.com/AnalogJ/lexicon")
19015 (synopsis
19016 "Manipulate DNS records on various DNS providers")
19017 (description
19018 "Lexicon provides a way to manipulate DNS records on multiple DNS
19019 providers in a standardized way. It has a CLI but it can also be used as a
19020 Python library. It was designed to be used in automation, specifically with
19021 Let's Encrypt.")
19022 (license license:expat)))
19023
19024 (define-public python2-dns-lexicon
19025 (package-with-python2 python-dns-lexicon))
19026
19027 (define-public python-cfgv
19028 (package
19029 (name "python-cfgv")
19030 (version "3.1.0")
19031 (source
19032 (origin
19033 ;; There are no tests in the PyPI tarball.
19034 (method git-fetch)
19035 (uri (git-reference
19036 (url "https://github.com/asottile/cfgv")
19037 (commit (string-append "v" version))))
19038 (file-name (git-file-name name version))
19039 (sha256
19040 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19041 (build-system python-build-system)
19042 (arguments
19043 `(#:phases
19044 (modify-phases %standard-phases
19045 (replace 'check
19046 (lambda _
19047 (invoke "pytest" "-vv"))))))
19048 (native-inputs
19049 `(("python-covdefaults" ,python-covdefaults)
19050 ("python-coverage" ,python-coverage)
19051 ("python-pytest" ,python-pytest)))
19052 (home-page "https://github.com/asottile/cfgv")
19053 (synopsis "Configuration validation library")
19054 (description
19055 "This library helps to validate configuration files and produce human
19056 readable error messages.")
19057 (license license:expat)))
19058
19059 (define-public python-commandlines
19060 (package
19061 (name "python-commandlines")
19062 (version "0.4.1")
19063 (source
19064 (origin
19065 (method url-fetch)
19066 (uri (pypi-uri "commandlines" version))
19067 (sha256
19068 (base32
19069 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19070 (build-system python-build-system)
19071 (home-page "https://github.com/chrissimpkins/commandlines")
19072 (synopsis "Command line argument to object parsing library")
19073 (description
19074 "@code{Commandlines} is a Python library for command line application
19075 development that supports command line argument parsing, command string
19076 validation testing and application logic.")
19077 (license license:expat)))
19078
19079 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19080 ;; python-numba. They have a very unflexible relationship.
19081 (define-public python-numba
19082 (package
19083 (name "python-numba")
19084 (version "0.51.2")
19085 (source
19086 (origin
19087 (method url-fetch)
19088 (uri (pypi-uri "numba" version))
19089 (sha256
19090 (base32
19091 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19092 (build-system python-build-system)
19093 (arguments
19094 `(#:phases
19095 (modify-phases %standard-phases
19096 (add-after 'unpack 'disable-proprietary-features
19097 (lambda _
19098 (setenv "NUMBA_DISABLE_HSA" "1")
19099 (setenv "NUMBA_DISABLE_CUDA" "1")
19100 #t))
19101 (replace 'check
19102 (lambda* (#:key inputs outputs #:allow-other-keys)
19103 (add-installed-pythonpath inputs outputs)
19104 ;; Something is wrong with the PYTHONPATH when running the
19105 ;; tests from the build directory, as it complains about not being
19106 ;; able to import certain modules.
19107 (with-directory-excursion "/tmp"
19108 (setenv "HOME" (getcwd))
19109 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19110 (propagated-inputs
19111 `(("python-llvmlite" ,python-llvmlite)
19112 ("python-numpy" ,python-numpy)
19113 ("python-singledispatch" ,python-singledispatch)))
19114 (native-inputs ;for tests
19115 `(("python-jinja2" ,python-jinja2)
19116 ("python-pygments" ,python-pygments)))
19117 (home-page "https://numba.pydata.org")
19118 (synopsis "Compile Python code using LLVM")
19119 (description "Numba gives you the power to speed up your applications with
19120 high performance functions written directly in Python. With a few
19121 annotations, array-oriented and math-heavy Python code can be just-in-time
19122 compiled to native machine instructions, similar in performance to C, C++ and
19123 Fortran, without having to switch languages or Python interpreters.
19124
19125 Numba works by generating optimized machine code using the LLVM compiler
19126 infrastructure at import time, runtime, or statically (using the included pycc
19127 tool).")
19128 (license license:bsd-3)))
19129
19130 (define-public python-numcodecs
19131 (package
19132 (name "python-numcodecs")
19133 (version "0.6.4")
19134 (source
19135 (origin
19136 (method url-fetch)
19137 (uri (pypi-uri "numcodecs" version))
19138 (sha256
19139 (base32
19140 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19141 (build-system python-build-system)
19142 (propagated-inputs
19143 `(("python-numpy" ,python-numpy)
19144 ("python-msgpack" ,python-msgpack)))
19145 (native-inputs
19146 `(("python-pytest" ,python-pytest)
19147 ("python-setuptools-scm" ,python-setuptools-scm)))
19148 (home-page "https://github.com/zarr-developers/numcodecs")
19149 (synopsis "Buffer compression and transformation codecs")
19150 (description
19151 "This Python package provides buffer compression and transformation
19152 codecs for use in data storage and communication applications.")
19153 (license license:expat)))
19154
19155 (define-public python-asciitree
19156 (package
19157 (name "python-asciitree")
19158 (version "0.3.3")
19159 (source
19160 (origin
19161 (method url-fetch)
19162 (uri (pypi-uri "asciitree" version))
19163 (sha256
19164 (base32
19165 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19166 (build-system python-build-system)
19167 (home-page "https://github.com/mbr/asciitree")
19168 (synopsis "Draws ASCII trees")
19169 (description "This package draws tree structures using characters.")
19170 (license license:expat)))
19171
19172 (define-public python-zarr
19173 (package
19174 (name "python-zarr")
19175 (version "2.4.0")
19176 (source
19177 (origin
19178 (method url-fetch)
19179 (uri (pypi-uri "zarr" version))
19180 (sha256
19181 (base32
19182 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19183 (build-system python-build-system)
19184 (arguments
19185 `(#:phases
19186 (modify-phases %standard-phases
19187 (add-after 'unpack 'disable-service-tests
19188 (lambda _
19189 (setenv "ZARR_TEST_ABS" "0")
19190 (setenv "ZARR_TEST_MONGO" "0")
19191 (setenv "ZARR_TEST_REDIS" "0")
19192 #t))
19193 (replace 'check
19194 (lambda _
19195 (invoke "pytest" "-vv" "-k" "not lmdb")
19196 #t)))))
19197 (propagated-inputs
19198 `(("python-asciitree" ,python-asciitree)
19199 ("python-fasteners" ,python-fasteners)
19200 ("python-numcodecs" ,python-numcodecs)
19201 ("python-numpy" ,python-numpy)))
19202 (native-inputs
19203 `(("python-pytest" ,python-pytest)
19204 ("python-setuptools-scm" ,python-setuptools-scm)))
19205 (home-page "https://github.com/zarr-developers/zarr-python")
19206 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19207 (description
19208 "This package provides an implementation of chunked, compressed,
19209 N-dimensional arrays for Python.")
19210 (license license:expat)))
19211
19212 (define-public python-anndata
19213 (package
19214 (name "python-anndata")
19215 (version "0.7.1")
19216 (source
19217 (origin
19218 (method url-fetch)
19219 (uri (pypi-uri "anndata" version))
19220 (sha256
19221 (base32
19222 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19223 (build-system python-build-system)
19224 (arguments
19225 `(#:phases
19226 (modify-phases %standard-phases
19227 (add-after 'unpack 'delete-inconvenient-tests
19228 (lambda _
19229 ;; This test depends on python-scikit-learn.
19230 (delete-file "anndata/tests/test_inplace_subset.py")
19231 #t))
19232 (delete 'check)
19233 (add-after 'install 'check
19234 (lambda* (#:key inputs outputs #:allow-other-keys)
19235 (add-installed-pythonpath inputs outputs)
19236 (invoke "pytest" "-vv"))))))
19237 (propagated-inputs
19238 `(("python-h5py" ,python-h5py)
19239 ("python-importlib-metadata" ,python-importlib-metadata)
19240 ("python-natsort" ,python-natsort)
19241 ("python-numcodecs" ,python-numcodecs)
19242 ("python-packaging" ,python-packaging)
19243 ("python-pandas" ,python-pandas)
19244 ("python-scipy" ,python-scipy)
19245 ("python-zarr" ,python-zarr)))
19246 (native-inputs
19247 `(("python-joblib" ,python-joblib)
19248 ("python-pytest" ,python-pytest)
19249 ("python-setuptools-scm" ,python-setuptools-scm)))
19250 (home-page "https://github.com/theislab/anndata")
19251 (synopsis "Annotated data for data analysis pipelines")
19252 (description "Anndata is a package for simple (functional) high-level APIs
19253 for data analysis pipelines. In this context, it provides an efficient,
19254 scalable way of keeping track of data together with learned annotations and
19255 reduces the code overhead typically encountered when using a mostly
19256 object-oriented library such as @code{scikit-learn}.")
19257 (license license:bsd-3)))
19258
19259 (define-public python-dill
19260 (package
19261 (name "python-dill")
19262 (version "0.3.1.1")
19263 (source
19264 (origin
19265 (method url-fetch)
19266 (uri (pypi-uri "dill" version))
19267 (sha256
19268 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19269 (build-system python-build-system)
19270 (arguments
19271 `(#:phases
19272 (modify-phases %standard-phases
19273 (replace 'check
19274 (lambda _
19275 (with-directory-excursion "/tmp"
19276 (invoke "nosetests" "-v"))
19277 #t)))))
19278 (native-inputs
19279 `(("python-nose" ,python-nose)))
19280 (home-page "https://pypi.org/project/dill/")
19281 (synopsis "Serialize all of Python")
19282 (description "Dill extends Python's @code{pickle} module for serializing
19283 and de-serializing Python objects to the majority of the built-in Python
19284 types. Dill provides the user the same interface as the @code{pickle} module,
19285 and also includes some additional features. In addition to pickling Python
19286 objects, @code{dill} provides the ability to save the state of an interpreter
19287 session in a single command. Hence, it would be feasible to save a
19288 interpreter session, close the interpreter, ship the pickled file to another
19289 computer, open a new interpreter, unpickle the session and thus continue from
19290 the saved state of the original interpreter session.")
19291 (license license:bsd-3)))
19292
19293 (define-public python-multiprocess
19294 (package
19295 (name "python-multiprocess")
19296 (version "0.70.9")
19297 (source
19298 (origin
19299 (method url-fetch)
19300 (uri (pypi-uri "multiprocess" version))
19301 (sha256
19302 (base32
19303 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19304 (build-system python-build-system)
19305 (arguments
19306 `(#:phases
19307 (modify-phases %standard-phases
19308 (add-after 'unpack 'disable-broken-tests
19309 (lambda _
19310 ;; This test is broken as there is no keyboard interrupt.
19311 (substitute* "py3.7/multiprocess/tests/__init__.py"
19312 (("^(.*)def test_wait_result"
19313 line indent)
19314 (string-append indent
19315 "@unittest.skip(\"Disabled by Guix\")\n"
19316 line)))
19317 #t))
19318 ;; Tests must be run after installation.
19319 (delete 'check)
19320 (add-after 'install 'check
19321 (lambda* (#:key inputs outputs #:allow-other-keys)
19322 (add-installed-pythonpath inputs outputs)
19323 (invoke "python" "-m" "multiprocess.tests")
19324 #t)))))
19325 (propagated-inputs
19326 `(("python-dill" ,python-dill)))
19327 (home-page "https://pypi.org/project/multiprocess/")
19328 (synopsis "Multiprocessing and multithreading in Python")
19329 (description
19330 "This package is a fork of the multiprocessing Python package, a package
19331 which supports the spawning of processes using the API of the standard
19332 library's @code{threading} module.")
19333 (license license:bsd-3)))
19334
19335 (define-public python-toolz
19336 (package
19337 (name "python-toolz")
19338 (version "0.9.0")
19339 (source
19340 (origin
19341 (method url-fetch)
19342 (uri (pypi-uri "toolz" version))
19343 (sha256
19344 (base32
19345 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19346 (build-system python-build-system)
19347 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19348 ;; unregistered loader type"
19349 (arguments '(#:tests? #f))
19350 (home-page "https://github.com/pytoolz/toolz/")
19351 (synopsis "List processing tools and functional utilities")
19352 (description
19353 "This package provides a set of utility functions for iterators,
19354 functions, and dictionaries.")
19355 (license license:bsd-3)))
19356
19357 (define-public python2-toolz
19358 (package-with-python2 python-toolz))
19359
19360 (define-public python-cytoolz
19361 (package
19362 (name "python-cytoolz")
19363 (version "0.9.0.1")
19364 (source
19365 (origin
19366 (method url-fetch)
19367 (uri (pypi-uri "cytoolz" version))
19368 (sha256
19369 (base32
19370 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19371 (build-system python-build-system)
19372 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19373 ;; 'exceptions'"
19374 (arguments '(#:tests? #f))
19375 (propagated-inputs
19376 `(("python-toolz" ,python-toolz)))
19377 (native-inputs
19378 `(("python-cython" ,python-cython)))
19379 (home-page "https://github.com/pytoolz/cytoolz")
19380 (synopsis "High performance functional utilities")
19381 (description
19382 "The cytoolz package implements the same API as provided by toolz. The
19383 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19384 that is accessible to other projects developed in Cython.")
19385 (license license:bsd-3)))
19386
19387 (define-public python-sortedcontainers
19388 (package
19389 (name "python-sortedcontainers")
19390 (version "2.1.0")
19391 (source
19392 (origin
19393 (method url-fetch)
19394 (uri (pypi-uri "sortedcontainers" version))
19395 (sha256
19396 (base32
19397 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19398 (build-system python-build-system)
19399 (arguments
19400 ;; FIXME: Tests require many extra dependencies, and would introduce
19401 ;; a circular dependency on hypothesis, which uses this package.
19402 '(#:tests? #f))
19403 (propagated-inputs
19404 `(("python-appdirs" ,python-appdirs)
19405 ("python-distlib" ,python-distlib)
19406 ("python-filelock" ,python-filelock)
19407 ("python-six" ,python-six-bootstrap)))
19408 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19409 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19410 (description
19411 "This package provides a sorted collections library, written in
19412 pure-Python.")
19413 (license license:asl2.0)))
19414
19415 (define-public python2-sortedcontainers
19416 (package-with-python2 python-sortedcontainers))
19417
19418 (define-public python-cloudpickle
19419 (package
19420 (name "python-cloudpickle")
19421 (version "1.3.0")
19422 (source
19423 (origin
19424 (method url-fetch)
19425 (uri (pypi-uri "cloudpickle" version))
19426 (sha256
19427 (base32
19428 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19429 (build-system python-build-system)
19430 (arguments
19431 '(#:phases (modify-phases %standard-phases
19432 (add-before 'check 'do-not-override-PYTHONPATH
19433 (lambda _
19434 ;; Append to PYTHONPATH instead of overriding it so
19435 ;; that dependencies from Guix can be found.
19436 (substitute* "tests/testutils.py"
19437 (("env\\['PYTHONPATH'\\] = pythonpath")
19438 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19439 #t))
19440 (replace 'check
19441 (lambda* (#:key tests? #:allow-other-keys)
19442 (if tests?
19443 (invoke "pytest" "-s" "-vv")
19444 (format #t "test suite not run~%"))
19445 #t)))))
19446 (native-inputs
19447 `(;; For tests.
19448 ("python-psutil" ,python-psutil)
19449 ("python-pytest" ,python-pytest)
19450 ("python-tornado" ,python-tornado)))
19451 (home-page "https://github.com/cloudpipe/cloudpickle")
19452 (synopsis "Extended pickling support for Python objects")
19453 (description
19454 "Cloudpickle makes it possible to serialize Python constructs not
19455 supported by the default pickle module from the Python standard library. It
19456 is especially useful for cluster computing where Python expressions are
19457 shipped over the network to execute on remote hosts, possibly close to the
19458 data.")
19459 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19460 (license license:bsd-3)))
19461
19462 (define-public python2-cloudpickle
19463 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19464 (package
19465 (inherit base)
19466 (native-inputs
19467 `(("python-mock" ,python2-mock)
19468 ,@(package-native-inputs base)))
19469 (propagated-inputs
19470 `(("python-futures" ,python2-futures)
19471 ,@(package-propagated-inputs base))))))
19472
19473 (define-public python-locket
19474 (package
19475 (name "python-locket")
19476 (version "0.2.0")
19477 (source
19478 (origin
19479 (method url-fetch)
19480 (uri (pypi-uri "locket" version))
19481 (sha256
19482 (base32
19483 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19484 (build-system python-build-system)
19485 (home-page "https://github.com/mwilliamson/locket.py")
19486 (synopsis "File-based locks for Python")
19487 (description
19488 "Locket implements a lock that can be used by multiple processes provided
19489 they use the same path.")
19490 (license license:bsd-2)))
19491
19492 (define-public python2-locket
19493 (package-with-python2 python-locket))
19494
19495 (define-public python-blosc
19496 (package
19497 (name "python-blosc")
19498 (version "1.5.1")
19499 (source
19500 (origin
19501 (method url-fetch)
19502 (uri (pypi-uri "blosc" version))
19503 (sha256
19504 (base32
19505 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19506 (build-system python-build-system)
19507 ;; FIXME: all tests pass, but then this error is printed:
19508 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19509 (arguments '(#:tests? #f))
19510 (propagated-inputs
19511 `(("python-numpy" ,python-numpy)))
19512 (home-page "https://github.com/blosc/python-blosc")
19513 (synopsis "Python wrapper for the Blosc data compressor library")
19514 (description "Blosc is a high performance compressor optimized for binary
19515 data. It has been designed to transmit data to the processor cache faster
19516 than the traditional, non-compressed, direct memory fetch approach via a
19517 @code{memcpy()} system call.
19518
19519 Blosc works well for compressing numerical arrays that contains data with
19520 relatively low entropy, like sparse data, time series, grids with
19521 regular-spaced values, etc.
19522
19523 This Python package wraps the Blosc library.")
19524 (license license:bsd-3)))
19525
19526 (define-public python2-blosc
19527 (package-with-python2 python-blosc))
19528
19529 (define-public python-partd
19530 (package
19531 (name "python-partd")
19532 (version "0.3.9")
19533 (source
19534 (origin
19535 (method url-fetch)
19536 (uri (pypi-uri "partd" version))
19537 (sha256
19538 (base32
19539 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19540 (build-system python-build-system)
19541 (propagated-inputs
19542 `(("python-blosc" ,python-blosc)
19543 ("python-locket" ,python-locket)
19544 ("python-numpy" ,python-numpy)
19545 ("python-pandas" ,python-pandas)
19546 ("python-pyzmq" ,python-pyzmq)
19547 ("python-toolz" ,python-toolz)))
19548 (home-page "https://github.com/dask/partd/")
19549 (synopsis "Appendable key-value storage")
19550 (description "Partd stores key-value pairs. Values are raw bytes. We
19551 append on old values. Partd excels at shuffling operations.")
19552 (license license:bsd-3)))
19553
19554 (define-public python2-partd
19555 (package-with-python2 python-partd))
19556
19557 (define-public python-fsspec
19558 (package
19559 (name "python-fsspec")
19560 (version "0.6.1")
19561 (source
19562 (origin
19563 (method url-fetch)
19564 (uri (pypi-uri "fsspec" version))
19565 (sha256
19566 (base32
19567 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19568 (build-system python-build-system)
19569 (arguments '(#:tests? #f)) ; there are none
19570 (home-page "https://github.com/intake/filesystem_spec")
19571 (synopsis "File-system specification")
19572 (description "The purpose of this package is to produce a template or
19573 specification for a file-system interface, that specific implementations
19574 should follow, so that applications making use of them can rely on a common
19575 behavior and not have to worry about the specific internal implementation
19576 decisions with any given backend.")
19577 (license license:bsd-3)))
19578
19579 (define-public python-dask
19580 (package
19581 (name "python-dask")
19582 (version "2.14.0")
19583 (source
19584 (origin
19585 (method url-fetch)
19586 (uri (pypi-uri "dask" version))
19587 (sha256
19588 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19589 (build-system python-build-system)
19590 (arguments
19591 `(#:phases
19592 (modify-phases %standard-phases
19593 (add-after 'unpack 'disable-broken-tests
19594 (lambda _
19595 ;; This test is marked as xfail when pytest-xdist is used.
19596 (substitute* "dask/tests/test_threaded.py"
19597 (("def test_interrupt\\(\\)" m)
19598 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19599 m)))
19600 ;; This one fails with a type error:
19601 ;; TypeError: Already tz-aware, use tz_convert to convert.
19602 (substitute* "dask/dataframe/tests/test_shuffle.py"
19603 (("def test_set_index_timestamp\\(\\)" m)
19604 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19605 m)))
19606 #t))
19607 (replace 'check
19608 (lambda _ (invoke "pytest" "-vv"))))))
19609 (propagated-inputs
19610 `(("python-cloudpickle" ,python-cloudpickle)
19611 ("python-fsspec" ,python-fsspec)
19612 ("python-numpy" ,python-numpy)
19613 ("python-packaging" ,python-packaging)
19614 ("python-pandas" ,python-pandas)
19615 ("python-partd" ,python-partd)
19616 ("python-toolz" ,python-toolz)
19617 ("python-pyyaml" ,python-pyyaml)))
19618 (native-inputs
19619 `(("python-pytest" ,python-pytest)
19620 ("python-pytest-runner" ,python-pytest-runner)))
19621 (home-page "https://github.com/dask/dask/")
19622 (synopsis "Parallel computing with task scheduling")
19623 (description
19624 "Dask is a flexible parallel computing library for analytics. It
19625 consists of two components: dynamic task scheduling optimized for computation,
19626 and large data collections like parallel arrays, dataframes, and lists that
19627 extend common interfaces like NumPy, Pandas, or Python iterators to
19628 larger-than-memory or distributed environments. These parallel collections
19629 run on top of the dynamic task schedulers. ")
19630 (license license:bsd-3)))
19631
19632 (define-public python-ilinkedlist
19633 (package
19634 (name "python-ilinkedlist")
19635 (version "0.4.0")
19636 (source
19637 (origin
19638 (method url-fetch)
19639 (uri (pypi-uri "ilinkedlist" version))
19640 (sha256
19641 (base32
19642 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19643 (build-system python-build-system)
19644 (native-inputs `(("python-pytest" ,python-pytest)))
19645 (inputs `(("python" ,python)))
19646 (home-page "https://github.com/luther9/ilinkedlist-py")
19647 (synopsis "Immutable linked list library")
19648 (description
19649 "This is a implementation of immutable linked lists for Python. It
19650 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19651 Since a linked list is treated as immutable, it is hashable, and its length
19652 can be retrieved in constant time. Some of the terminology is inspired by
19653 LISP. It is possible to create an improper list by creating a @code{Pair}
19654 with a non-list @code{cdr}.")
19655 (license license:gpl3+)))
19656
19657 (define-public python-readlike
19658 (package
19659 (name "python-readlike")
19660 (version "0.1.3")
19661 (source
19662 (origin
19663 (method url-fetch)
19664 (uri (pypi-uri "readlike" version))
19665 (sha256
19666 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19667 (build-system python-build-system)
19668 (home-page "https://github.com/jangler/readlike")
19669 (synopsis "GNU Readline-like line editing module")
19670 (description
19671 "This Python module provides line editing functions similar to the default
19672 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19673 @code{readline} package, this one allows access to those capabilities in settings
19674 outside of a standard command-line interface. It is especially well-suited to
19675 interfacing with Urwid, due to a shared syntax for describing key inputs.
19676
19677 Currently, all stateless Readline commands are implemented. Yanking and history
19678 are not supported.")
19679 (license license:expat)))
19680
19681 (define-public python2-readlike
19682 (package-with-python2 python-readlike))
19683
19684 (define-public python-reparser
19685 (package
19686 (name "python-reparser")
19687 (version "1.4.3")
19688 (source
19689 (origin
19690 (method url-fetch)
19691 (uri (pypi-uri "ReParser" version))
19692 (sha256
19693 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19694 (build-system python-build-system)
19695 (home-page "https://github.com/xmikos/reparser")
19696 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19697 (description
19698 "This Python library provides a simple lexer/parser for inline markup based
19699 on regular expressions.")
19700 (license license:expat)))
19701
19702 (define-public python2-reparser
19703 (let ((reparser (package-with-python2
19704 (strip-python2-variant python-reparser))))
19705 (package (inherit reparser)
19706 (propagated-inputs
19707 `(("python2-enum34" ,python2-enum34)
19708 ,@(package-propagated-inputs reparser))))))
19709
19710 (define-public python-retrying
19711 (package
19712 (name "python-retrying")
19713 (version "1.3.3")
19714 (source
19715 (origin
19716 (method git-fetch)
19717 (uri (git-reference
19718 (url "https://github.com/rholder/retrying")
19719 (commit (string-append "v" version))))
19720 (file-name (git-file-name name version))
19721 (sha256
19722 (base32
19723 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19724 (build-system python-build-system)
19725 (propagated-inputs
19726 `(("python-six" ,python-six)))
19727 (home-page "https://github.com/rholder/retrying")
19728 (synopsis "Library for adding retry behavior")
19729 (description "Retrying is a general-purpose retrying library to simplify
19730 the task of adding retry behavior to just about anything.
19731
19732 Features:
19733
19734 @itemize
19735 @item Generic Decorator API.
19736 @item Specify stop condition (i.e. limit by number of attempts).
19737 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19738 @item Customize retrying on Exceptions.
19739 @item Customize retrying on expected returned result.
19740 @end itemize")
19741 (license license:asl2.0)))
19742
19743 (define-public python-precis-i18n
19744 (package
19745 (name "python-precis-i18n")
19746 (version "1.0.0")
19747 (source
19748 (origin
19749 (method url-fetch)
19750 (uri (pypi-uri "precis_i18n" version))
19751 (sha256
19752 (base32
19753 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19754 (build-system python-build-system)
19755 (home-page "https://github.com/byllyfish/precis_i18n")
19756 (synopsis "Implementation of the PRECIS framework")
19757 (description
19758 "This module implements the PRECIS Framework as described in RFC 8264,
19759 RFC 8265 and RFC 8266.")
19760 (license license:expat)))
19761
19762 (define-public python-absl-py
19763 (package
19764 (name "python-absl-py")
19765 (version "0.6.1")
19766 (source
19767 (origin
19768 (method url-fetch)
19769 (uri (pypi-uri "absl-py" version))
19770 (sha256
19771 (base32
19772 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19773 (build-system python-build-system)
19774 (propagated-inputs
19775 `(("python-six" ,python-six)))
19776 (home-page "https://github.com/abseil/abseil-py")
19777 (synopsis "Abseil Python common libraries")
19778 (description
19779 "This package provides the Abseil Python Common Libraries, a collection
19780 of Python libraries for building Python applications.")
19781 (license license:asl2.0)))
19782
19783 (define-public python-astor
19784 (package
19785 (name "python-astor")
19786 (version "0.7.1")
19787 (source
19788 (origin
19789 (method url-fetch)
19790 (uri (pypi-uri "astor" version))
19791 (sha256
19792 (base32
19793 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19794 (build-system python-build-system)
19795 ;; FIXME: There are two errors and two test failures.
19796 (arguments `(#:tests? #f))
19797 (home-page "https://github.com/berkerpeksag/astor")
19798 (synopsis "Read and write Python ASTs")
19799 (description "Astor is designed to allow easy manipulation of Python
19800 source via the Abstract Syntax Tree.")
19801 (license license:bsd-3)))
19802
19803 (define-public python2-astor
19804 (package-with-python2 python-astor))
19805
19806 (define-public python-astunparse
19807 (package
19808 (name "python-astunparse")
19809 (version "1.6.2")
19810 (source
19811 (origin
19812 (method url-fetch)
19813 (uri (pypi-uri "astunparse" version))
19814 (sha256
19815 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19816 (build-system python-build-system)
19817 (arguments '(#:tests? #f)) ; there are none
19818 (propagated-inputs
19819 `(("python-six" ,python-six)
19820 ("python-wheel" ,python-wheel)))
19821 (home-page "https://github.com/simonpercivall/astunparse")
19822 (synopsis "AST unparser for Python")
19823 (description "This package provides an AST unparser for Python. It is a
19824 factored out version of @code{unparse} found in the Python source
19825 distribution.")
19826 (license license:bsd-3)))
19827
19828 (define-public python-gast
19829 (package
19830 (name "python-gast")
19831 (version "0.3.3")
19832 (source
19833 (origin
19834 (method url-fetch)
19835 (uri (pypi-uri "gast" version))
19836 (sha256
19837 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19838 (build-system python-build-system)
19839 (propagated-inputs
19840 `(("python-astunparse" ,python-astunparse)))
19841 (home-page "https://pypi.org/project/gast/")
19842 (synopsis "Generic Python AST that abstracts the underlying Python version")
19843 (description
19844 "GAST provides a compatibility layer between the AST of various Python
19845 versions, as produced by @code{ast.parse} from the standard @code{ast}
19846 module.")
19847 (license license:bsd-3)))
19848
19849 (define-public python-wikidata
19850 (package
19851 (name "python-wikidata")
19852 (version "0.6.1")
19853 (source
19854 (origin
19855 (method url-fetch)
19856 (uri (pypi-uri "Wikidata" version))
19857 (sha256
19858 (base32
19859 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19860 (build-system python-build-system)
19861 (propagated-inputs
19862 `(("python-babel" ,python-babel)))
19863 (home-page "https://github.com/dahlia/wikidata")
19864 (synopsis "Wikidata client library")
19865 (description
19866 "This package provides a Python interface to
19867 @url{https://www.wikidata.org/, Wikidata}.")
19868 (properties '((upstream-name . "Wikidata")))
19869 (license license:gpl3+)))
19870
19871 (define-public python-doctest-ignore-unicode
19872 (package
19873 (name "python-doctest-ignore-unicode")
19874 (version "0.1.2")
19875 (source
19876 (origin
19877 (method url-fetch)
19878 (uri (pypi-uri "doctest-ignore-unicode" version))
19879 (sha256
19880 (base32
19881 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19882 (build-system python-build-system)
19883 (native-inputs
19884 `(("python-nose" ,python-nose)))
19885 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19886 (synopsis "Ignore Unicode literal prefixes in doctests")
19887 (description
19888 "This package adds support for a flag to ignore Unicode literal prefixes
19889 in doctests.")
19890 (license license:asl2.0)))
19891
19892 (define-public python-attr
19893 (package
19894 (name "python-attr")
19895 (version "0.3.1")
19896 (source
19897 (origin
19898 (method url-fetch)
19899 (uri (pypi-uri "attr" version))
19900 (sha256
19901 (base32
19902 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19903 (build-system python-build-system)
19904 (home-page "https://github.com/denis-ryzhkov/attr")
19905 (synopsis "Decorator for attributes of target function or class")
19906 (description "Simple decorator to set attributes of target function or
19907 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19908 (license license:expat)))
19909
19910 (define-public python-construct
19911 (package
19912 (name "python-construct")
19913 (version "2.10.56")
19914 (source
19915 (origin
19916 (method url-fetch)
19917 (uri (pypi-uri "construct" version))
19918 (sha256
19919 (base32
19920 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19921 (build-system python-build-system)
19922 (arguments
19923 `(#:tests? #f)) ; No tests exist.
19924 (propagated-inputs
19925 `(("python-extras" ,python-extras)
19926 ("python-arrow" ,python-arrow)
19927 ("python-numpy" ,python-numpy)
19928 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19929 (home-page "https://construct.readthedocs.io")
19930 (synopsis "Declarative and symmetrical parser and builder for binary data")
19931 (description
19932 "This package provides both simple, atomic constructs (such as
19933 integers of various sizes), as well as composite ones which allow you
19934 form hierarchical and sequential structures of increasing complexity.
19935 It features bit and byte granularity, easy debugging and testing, an
19936 easy-to-extend subclass system, and lots of primitive constructs to
19937 make your work easier.")
19938 (license license:expat)))
19939
19940 (define-public python-outcome
19941 (package
19942 (name "python-outcome")
19943 (version "1.0.1")
19944 (source
19945 (origin
19946 (method url-fetch)
19947 (uri (pypi-uri "outcome" version))
19948 (sha256
19949 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19950 (build-system python-build-system)
19951 (arguments
19952 `(#:phases
19953 (modify-phases %standard-phases
19954 (replace 'check
19955 (lambda* (#:key inputs outputs #:allow-other-keys)
19956 (add-installed-pythonpath inputs outputs)
19957 (invoke "pytest" "-vv"))))))
19958 (native-inputs
19959 `(("python-pytest" ,python-pytest)
19960 ("python-pytest-cov" ,python-pytest-cov)
19961 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19962 (propagated-inputs
19963 `(("python-async-generator" ,python-async-generator)
19964 ("python-attrs" ,python-attrs)))
19965 (home-page "https://github.com/python-trio/outcome")
19966 (synopsis "Capture the outcome of Python function calls")
19967 (description
19968 "Capture the outcome of Python function calls. Extracted from the Trio
19969 project.")
19970 ;; Either license applies.
19971 (license (list license:expat license:asl2.0))))
19972
19973 (define-public python-trio
19974 (package
19975 (name "python-trio")
19976 (version "0.17.0")
19977 (source
19978 (origin
19979 (method url-fetch)
19980 (uri (pypi-uri "trio" version))
19981 (sha256
19982 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19983 (build-system python-build-system)
19984 (arguments
19985 `(#:phases
19986 (modify-phases %standard-phases
19987 (add-before 'check 'change-home
19988 (lambda _
19989 ;; Tests require a writable home.
19990 (setenv "HOME" "/tmp")
19991 #t))
19992 (replace 'check
19993 (lambda _
19994 (invoke "pytest" "-vv" "-k"
19995 (string-append
19996 ;; This test times out.
19997 "not test_ki_protection_works"
19998 ;; Assertion errors.
19999 " and not test_guest_mode_ki"
20000 " and not test_run_in_trio_thread_ki"
20001 ;; These try to raise KeyboardInterrupt which does not work
20002 ;; in the build environment.
20003 " and not test_ki_self"
20004 " and not test_ki_wakes_us_up"
20005 ;; Failure in name resolution.
20006 " and not test_getnameinfo"
20007 " and not test_SocketType_resolve"
20008 ;; OSError: protocol not found.
20009 " and not test_getprotobyname")))))))
20010 (native-inputs
20011 `(("python-astor" ,python-astor)
20012 ("python-ipython" ,python-ipython)
20013 ("python-jedi" ,python-jedi)
20014 ("python-pylint" ,python-pylint)
20015 ("python-pyopenssl" ,python-pyopenssl)
20016 ("python-pytest" ,python-pytest)
20017 ("python-pytest-cov" ,python-pytest-cov)
20018 ("python-trustme" ,python-trustme)))
20019 (propagated-inputs
20020 `(("python-attrs" ,python-attrs)
20021 ("python-idna" ,python-idna)
20022 ("python-outcome" ,python-outcome)
20023 ("python-sniffio" ,python-sniffio)
20024 ("python-sortedcontainers"
20025 ,python-sortedcontainers)))
20026 (home-page "https://github.com/python-trio/trio")
20027 (synopsis "Friendly Python library for async concurrency and I/O")
20028 (description
20029 "Trio strives to be a production-quality, async/await-native I/O library
20030 for Python. Like all async libraries, its main purpose is to help you write
20031 programs that do multiple things at the same time with parallelized I/O.")
20032 ;; Either license applies.
20033 (license (list license:expat license:asl2.0))))
20034
20035 (define-public python-trio-typing
20036 (package
20037 (name "python-trio-typing")
20038 (version "0.5.0")
20039 (source
20040 (origin
20041 (method url-fetch)
20042 (uri (pypi-uri "trio-typing" version))
20043 (sha256
20044 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20045 (build-system python-build-system)
20046 (arguments
20047 `(#:phases
20048 (modify-phases %standard-phases
20049 (replace 'check
20050 (lambda _
20051 (invoke "pytest" "-vv"))))))
20052 (native-inputs
20053 `(("python-attrs" ,python-attrs)
20054 ("python-pytest" ,python-pytest)))
20055 (propagated-inputs
20056 `(("python-mypy" ,python-mypy)
20057 ("python-mypy-extensions"
20058 ,python-mypy-extensions)
20059 ("python-trio" ,python-trio)
20060 ("python-typing-extensions"
20061 ,python-typing-extensions)))
20062 (home-page "https://github.com/python-trio/trio-typing")
20063 (synopsis "Static type checking support for Trio and related projects")
20064 (description
20065 "This package provides:
20066
20067 @itemize
20068 @item PEP 561 typing stubs packages for the Trio project packages:
20069
20070 @itemize
20071 @item trio (@code{trio-stubs})
20072 @item outcome (@code{outcome-stubs})
20073 @item async_generator (@code{async_generator-stubs})
20074 @end itemize
20075
20076 @item A package @code{trio_typing} containing types that Trio programs often
20077 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20078 a mypy plugin that smooths over some limitations in the basic type hints.
20079 @end itemize")
20080 ;; Either license applies.
20081 (license (list license:expat license:asl2.0))))
20082
20083 (define-public python-humanize
20084 (package
20085 (name "python-humanize")
20086 (version "0.5.1")
20087 (source
20088 (origin
20089 (method url-fetch)
20090 (uri (pypi-uri "humanize" version))
20091 (sha256
20092 (base32
20093 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20094 (arguments
20095 '(#:tests? #f)) ; tests not in pypi archive
20096 (build-system python-build-system)
20097 (home-page "https://github.com/jmoiron/humanize")
20098 (synopsis "Print numerical information in a human-readable form")
20099 (description "This package provides a Python module that displays numbers
20100 and dates in \"human readable\" forms. For example, it would display
20101 \"12345591313\" as \"12.3 billion\".")
20102 (license license:expat)))
20103
20104 (define-public python-txaio
20105 (package
20106 (name "python-txaio")
20107 (version "18.8.1")
20108 (source
20109 (origin
20110 (method url-fetch)
20111 (uri (pypi-uri "txaio" version))
20112 (sha256
20113 (base32
20114 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20115 (build-system python-build-system)
20116 (propagated-inputs
20117 `(("python-twisted" ,python-twisted)
20118 ("python-six" ,python-six)))
20119 (home-page "https://github.com/crossbario/txaio")
20120 (synopsis "Compatibility layer between Python asyncio and Twisted")
20121 (description "Txaio provides a compatibility layer between the Python
20122 @code{asyncio} module and @code{Twisted}.")
20123 (license license:expat)))
20124
20125 (define-public python-toolshed
20126 (package
20127 (name "python-toolshed")
20128 (version "0.4.6")
20129 (source
20130 (origin
20131 (method url-fetch)
20132 (uri (pypi-uri "toolshed" version))
20133 (sha256
20134 (base32
20135 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20136 (build-system python-build-system)
20137 (native-inputs
20138 `(("python-nose" ,python-nose)))
20139 (home-page "https://github.com/brentp/toolshed/")
20140 (synopsis "Collection of modules and functions for working with data")
20141 (description "This is a collection of well-tested, simple modules and
20142 functions that aim to reduce boilerplate when working with data.")
20143 (license license:bsd-2)))
20144
20145 (define-public python-annoy
20146 (package
20147 (name "python-annoy")
20148 (version "1.15.1")
20149 (source
20150 (origin
20151 (method url-fetch)
20152 (uri (pypi-uri "annoy" version))
20153 (sha256
20154 (base32
20155 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20156 (build-system python-build-system)
20157 (native-inputs
20158 `(("python-nose" ,python-nose)))
20159 (home-page "https://github.com/spotify/annoy/")
20160 (synopsis "Approximate nearest neighbors library")
20161 (description
20162 "Annoy is a C++ library with Python bindings to search for points in
20163 space that are close to a given query point. It also creates large read-only
20164 file-based data structures that are @code{mmap}ped into memory so that many
20165 processes may share the same data.")
20166 (license license:asl2.0)))
20167
20168 (define-public python-croniter
20169 (package
20170 (name "python-croniter")
20171 (version "0.3.34")
20172 (source (origin
20173 (method url-fetch)
20174 (uri (pypi-uri "croniter" version))
20175 (sha256
20176 (base32
20177 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20178 (build-system python-build-system)
20179 (propagated-inputs
20180 `(("python-dateutil" ,python-dateutil)
20181 ("python-natsort" ,python-natsort)))
20182 (home-page "https://github.com/kiorky/croniter")
20183 (synopsis "Iterate datetime objects with cron-like syntax")
20184 (description
20185 "@code{croniter} provides iteration for datetime object with cron-like
20186 format.")
20187 (license license:expat)))
20188
20189 (define-public python-pylzma
20190 (package
20191 (name "python-pylzma")
20192 (version "0.5.0")
20193 (source
20194 (origin
20195 (method url-fetch)
20196 (uri (pypi-uri "pylzma" version))
20197 (sha256
20198 (base32
20199 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20200 (build-system python-build-system)
20201 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20202 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20203 (description "This package provides Python bindings for the LZMA library
20204 by Igor Pavlov.")
20205 (license license:lgpl2.1+)))
20206
20207 (define-public python2-pylzma
20208 (package-with-python2 python-pylzma))
20209
20210 (define-public python2-zeroconf
20211 (package
20212 (name "python2-zeroconf")
20213
20214 ;; This is the last version that supports Python 2.x.
20215 (version "0.19.1")
20216 (source
20217 (origin
20218 (method url-fetch)
20219 (uri (pypi-uri "zeroconf" version))
20220 (sha256
20221 (base32
20222 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20223 (build-system python-build-system)
20224 (arguments
20225 `(#:python ,python-2
20226 #:phases
20227 (modify-phases %standard-phases
20228 (add-after 'unpack 'patch-requires
20229 (lambda* (#:key inputs #:allow-other-keys)
20230 (substitute* "setup.py"
20231 (("enum-compat")
20232 "enum34"))
20233 #t)))))
20234 (native-inputs
20235 `(("python2-six" ,python2-six)
20236 ("python2-enum32" ,python2-enum34)
20237 ("python2-netifaces" ,python2-netifaces)
20238 ("python2-typing" ,python2-typing)))
20239 (home-page "https://github.com/jstasiak/python-zeroconf")
20240 (synopsis "Pure Python mDNS service discovery")
20241 (description
20242 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20243 compatible).")
20244 (license license:lgpl2.1+)))
20245
20246 (define-public python-bsddb3
20247 (package
20248 (name "python-bsddb3")
20249 (version "6.2.6")
20250 (source
20251 (origin
20252 (method url-fetch)
20253 (uri (pypi-uri "bsddb3" version))
20254 (sha256
20255 (base32
20256 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20257 (build-system python-build-system)
20258 (inputs
20259 `(("bdb" ,bdb)))
20260 (arguments
20261 '(#:phases
20262 (modify-phases %standard-phases
20263 (add-after 'unpack 'configure-locations
20264 (lambda* (#:key inputs #:allow-other-keys)
20265 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20266 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20267 #t))
20268 (replace 'check
20269 (lambda _
20270 (invoke "python3" "test3.py" "-v"))))))
20271 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20272 (synopsis "Python bindings for Oracle Berkeley DB")
20273 (description
20274 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20275 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20276 Transaction objects, and each of these is exposed as a Python type in the
20277 bsddb3.db module. The database objects can use various access methods: btree,
20278 hash, recno, and queue. Complete support of Berkeley DB distributed
20279 transactions. Complete support for Berkeley DB Replication Manager.
20280 Complete support for Berkeley DB Base Replication. Support for RPC.")
20281 (license license:bsd-3)))
20282
20283 (define-public python-dbfread
20284 (package
20285 (name "python-dbfread")
20286 (version "2.0.7")
20287 (source (origin
20288 (method url-fetch)
20289 (uri (pypi-uri "dbfread" version))
20290 (sha256
20291 (base32
20292 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20293 (build-system python-build-system)
20294 (native-inputs
20295 `(("python-pytest" ,python-pytest)))
20296 (home-page "https://dbfread.readthedocs.io")
20297 (synopsis "Read DBF Files with Python")
20298 (description
20299 "This library reads DBF files and returns the data as native Python data
20300 types for further processing. It is primarily intended for batch jobs and
20301 one-off scripts.")
20302 (license license:expat)))
20303
20304 (define-public python-cached-property
20305 (package
20306 (name "python-cached-property")
20307 (version "1.5.1")
20308 (source
20309 (origin
20310 (method url-fetch)
20311 (uri (pypi-uri "cached-property" version))
20312 (sha256
20313 (base32
20314 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20315 (build-system python-build-system)
20316 (arguments
20317 `(#:phases
20318 (modify-phases %standard-phases
20319 ;; https://github.com/pydanny/cached-property/issues/131
20320 ;; recent versions of freezegun break one test
20321 (add-after 'unpack 'disable-broken-test
20322 (lambda _
20323 (substitute* "tests/test_cached_property.py"
20324 (("def test_threads_ttl_expiry\\(self\\)" m)
20325 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20326 " " m)))
20327 #t)))))
20328 (native-inputs
20329 `(("python-freezegun" ,python-freezegun)))
20330 (home-page
20331 "https://github.com/pydanny/cached-property")
20332 (synopsis
20333 "Decorator for caching properties in classes")
20334 (description
20335 "This package provides a decorator which makes caching
20336 time-or-computationally-expensive properties quick and easy and works in Python
20337 2 or 3.")
20338 (license license:bsd-3)))
20339
20340 (define-public python-folium
20341 (package
20342 (name "python-folium")
20343 (version "0.11.0")
20344 (source
20345 (origin
20346 (method url-fetch)
20347 (uri (pypi-uri "folium" version))
20348 (sha256
20349 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20350 (build-system python-build-system)
20351 (propagated-inputs
20352 `(("python-branca" ,python-branca)
20353 ("python-jinja2" ,python-jinja2)
20354 ("python-numpy" ,python-numpy)
20355 ("python-requests" ,python-requests)))
20356 (native-inputs
20357 `(("python-pytest" ,python-pytest)))
20358 (home-page "https://github.com/python-visualization/folium")
20359 (synopsis "Make beautiful maps with Leaflet.js & Python")
20360 (description "@code{folium} makes it easy to visualize data that’s been
20361 manipulated in Python on an interactive leaflet map. It enables both the
20362 binding of data to a map for @code{choropleth} visualizations as well as
20363 passing rich vector/raster/HTML visualizations as markers on the map.
20364
20365 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20366 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20367 supports Image, Video, GeoJSON and TopoJSON overlays.")
20368 (license license:expat)))
20369
20370 (define-public jube
20371 (package
20372 ;; This is a command-line tool, so no "python-" prefix.
20373 (name "jube")
20374 (version "2.2.2")
20375 (source (origin
20376 (method url-fetch)
20377 (uri (string-append
20378 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20379 version))
20380 (sha256
20381 (base32
20382 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20383 (file-name (string-append "jube-" version ".tar.gz"))))
20384 (build-system python-build-system)
20385 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20386 (synopsis "Benchmarking environment")
20387 (description
20388 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20389 benchmarked application, benchmark data is stored in a format that allows JUBE
20390 to deduct the desired information. This data can be parsed by automatic pre-
20391 and post-processing scripts that draw information and store it more densely
20392 for manual interpretation.")
20393 (license license:gpl3+)))
20394
20395 (define-public python-pyroutelib3
20396 (package
20397 (name "python-pyroutelib3")
20398 (version "1.3.post1")
20399 (source
20400 (origin
20401 (method url-fetch)
20402 (uri (pypi-uri "pyroutelib3" version))
20403 (sha256
20404 (base32
20405 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20406 (build-system python-build-system)
20407 (propagated-inputs
20408 `(("python-dateutil" ,python-dateutil)))
20409 (home-page "https://github.com/MKuranowski/pyroutelib3")
20410 (synopsis "Library for simple routing on OSM data")
20411 (description "Library for simple routing on OSM data")
20412 (license license:gpl3+)))
20413
20414 (define-public python-bibtexparser
20415 (package
20416 (name "python-bibtexparser")
20417 (version "1.1.0")
20418 (source
20419 (origin
20420 (method url-fetch)
20421 (uri (pypi-uri "bibtexparser" version))
20422 (sha256
20423 (base32
20424 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20425 (build-system python-build-system)
20426 (propagated-inputs
20427 `(("python-pyparsing" ,python-pyparsing)))
20428 (native-inputs
20429 `(("python-future" ,python-future)))
20430 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20431 (synopsis "Python library to parse BibTeX files")
20432 (description "BibtexParser is a Python library to parse BibTeX files.")
20433 (license (list license:bsd-3 license:lgpl3))))
20434
20435 (define-public python-distro
20436 (package
20437 (name "python-distro")
20438 (version "1.4.0")
20439 (source
20440 (origin
20441 (method url-fetch)
20442 (uri (pypi-uri "distro" version))
20443 (sha256
20444 (base32
20445 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20446 (build-system python-build-system)
20447 (native-inputs
20448 `(("python-pytest" ,python-pytest)))
20449 (home-page "https://github.com/nir0s/distro")
20450 (synopsis
20451 "OS platform information API")
20452 (description
20453 "@code{distro} provides information about the OS distribution it runs on,
20454 such as a reliable machine-readable ID, or version information.
20455
20456 It is the recommended replacement for Python's original
20457 `platform.linux_distribution` function (which will be removed in Python 3.8).
20458 @code{distro} also provides a command-line interface to output the platform
20459 information in various formats.")
20460 (license license:asl2.0)))
20461
20462 (define-public python-cairosvg
20463 (package
20464 (name "python-cairosvg")
20465 (version "2.4.2")
20466 (source
20467 (origin
20468 (method url-fetch)
20469 (uri (pypi-uri "CairoSVG" version))
20470 (sha256
20471 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20472 (build-system python-build-system)
20473 (arguments
20474 `(#:phases
20475 (modify-phases %standard-phases
20476 (replace 'check
20477 (lambda _ (invoke "pytest"))))))
20478 (propagated-inputs
20479 `(("python-cairocffi" ,python-cairocffi)
20480 ("python-cssselect2" ,python-cssselect2)
20481 ("python-defusedxml" ,python-defusedxml)
20482 ("python-pillow" ,python-pillow)
20483 ("python-tinycss2" ,python-tinycss2)))
20484 (native-inputs
20485 `(("python-pytest-flake8" ,python-pytest-flake8)
20486 ("python-pytest-isort" ,python-pytest-isort)
20487 ("python-pytest-runner" ,python-pytest-runner)))
20488 (home-page "https://cairosvg.org/")
20489 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20490 (description "CairoSVG is a SVG converter based on Cairo. It can export
20491 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20492 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20493 parsed, the result is drawn to a Cairo surface that can be exported to
20494 qvarious formats: PDF, PostScript, PNG and even SVG.")
20495 (license license:lgpl3+)))
20496
20497 (define-public python-pyphen
20498 (package
20499 (name "python-pyphen")
20500 (version "0.9.5")
20501 (source
20502 (origin
20503 (method url-fetch)
20504 (uri (pypi-uri "Pyphen" version))
20505 (sha256
20506 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20507 (build-system python-build-system)
20508 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20509 ;; embedded set provided by upstream - like Debian does.
20510 (home-page "https://github.com/Kozea/Pyphen")
20511 (synopsis "Pure Python module to hyphenate text")
20512 (description "Pyphen is a pure Python module to hyphenate text using
20513 existing Hunspell hyphenation dictionaries.")
20514 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20515
20516 (define-public python-intelhex
20517 (package
20518 (name "python-intelhex")
20519 (version "2.2.1")
20520 (source
20521 (origin
20522 (method url-fetch)
20523 (uri (pypi-uri "intelhex" version))
20524 (sha256
20525 (base32
20526 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20527 (build-system python-build-system)
20528 (arguments '(#:tests? #f)) ;issue with version
20529 (home-page "https://pypi.org/project/IntelHex/")
20530 (synopsis "Python library for Intel HEX files manipulations")
20531 (description "The Intel HEX file format is widely used in microprocessors
20532 and microcontrollers area (embedded systems etc.) as the de facto standard for
20533 representation of code to be programmed into microelectronic devices. This
20534 package provides an intelhex Python library to read, write, create from
20535 scratch and manipulate data from Intel HEX file format. It also includes
20536 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20537 converters and more, those based on the library itself.")
20538 (license license:bsd-3)))
20539
20540 (define-public python-pykwalify
20541 (package
20542 (name "python-pykwalify")
20543 (version "1.7.0")
20544 (source
20545 (origin
20546 (method url-fetch)
20547 (uri (pypi-uri "pykwalify" version))
20548 (sha256
20549 (base32
20550 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20551 (build-system python-build-system)
20552 (arguments '(#:tests? #f)) ;missing dependencies
20553 (propagated-inputs
20554 `(("python-dateutil" ,python-dateutil)
20555 ("python-docopt" ,python-docopt)
20556 ("python-pyyaml" ,python-pyyaml)))
20557 (home-page "https://github.com/grokzen/pykwalify")
20558 (synopsis
20559 "Python lib/cli for JSON/YAML schema validation")
20560 (description
20561 "This package provides a parser, schema validator, and data binding tool
20562 for YAML and JSON.")
20563 (license license:expat)))
20564
20565 (define-public python-dbusmock
20566 (package
20567 (name "python-dbusmock")
20568 (version "0.18.3")
20569 (source
20570 (origin
20571 (method url-fetch)
20572 (uri (pypi-uri "python-dbusmock" version))
20573 (sha256
20574 (base32
20575 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20576 (build-system python-build-system)
20577 (arguments
20578 '(#:phases
20579 (modify-phases %standard-phases
20580 (add-after 'unpack 'patch-shell-path
20581 (lambda _
20582 (substitute* "tests/test_code.py"
20583 (("/bin/bash") (which "bash")))
20584 #t)))))
20585 (native-inputs
20586 `(;; For tests.
20587 ("dbus" ,dbus) ; for dbus-daemon
20588 ("python-nose" ,python-nose)
20589 ("which" ,which)))
20590 (propagated-inputs
20591 `(("python-dbus" ,python-dbus)
20592 ("python-pygobject" ,python-pygobject)))
20593 (home-page "https://github.com/martinpitt/python-dbusmock")
20594 (synopsis "Python library for mock D-Bus objects")
20595 (description "python-dbusmock allows for the easy creation of mock objects on
20596 D-Bus. This is useful for writing tests for software which talks to D-Bus
20597 services such as upower, systemd, logind, gnome-session or others, and it is
20598 hard (or impossible without root privileges) to set the state of the real
20599 services to what you expect in your tests.")
20600 (license license:lgpl3+)))
20601
20602 (define-public python-jsonplus
20603 (package
20604 (name "python-jsonplus")
20605 (version "0.8.0")
20606 (home-page "https://github.com/randomir/jsonplus")
20607 (source (origin
20608 (method url-fetch)
20609 (uri (pypi-uri "jsonplus" version))
20610 (sha256
20611 (base32
20612 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20613 (build-system python-build-system)
20614 ;; XXX: No tests on PyPI, and the repository has no tags.
20615 (arguments '(#:tests? #f))
20616 (propagated-inputs
20617 `(("python-dateutil" ,python-dateutil)
20618 ("python-simplejson" ,python-simplejson)
20619 ("python-sortedcontainers" ,python-sortedcontainers)))
20620 (synopsis "Serialize Python types to/from JSON")
20621 (description
20622 "This package provides functionality to serialize arbitrary data types
20623 to and from JSON. Common data types are implemented and it is easy to
20624 register custom encoders and decoders.")
20625 (license license:expat)))
20626
20627 (define-public python-ujson
20628 (package
20629 (name "python-ujson")
20630 (version "4.0.1")
20631 (source
20632 (origin
20633 (method url-fetch)
20634 (uri (pypi-uri "ujson" version))
20635 (sha256
20636 (base32
20637 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20638 (modules '((guix build utils)))
20639 (snippet
20640 '(begin (delete-file-recursively "deps") #t))))
20641 (build-system python-build-system)
20642 (arguments
20643 `(#:phases
20644 (modify-phases %standard-phases
20645 (add-after 'unpack 'link-to-system-double-conversion
20646 (lambda* (#:key inputs #:allow-other-keys)
20647 (let ((d-c (assoc-ref inputs "double-conversion")))
20648 (substitute* "setup.py"
20649 (("./deps/double-conversion/double-conversion\"")
20650 (string-append d-c "/include/double-conversion\""))
20651 (("-lstdc++" stdc)
20652 (string-append "-L" d-c "/lib\","
20653 " \"-ldouble-conversion\","
20654 " \"" stdc)))
20655 #t)))
20656 (replace 'check
20657 (lambda* (#:key inputs outputs #:allow-other-keys)
20658 (add-installed-pythonpath inputs outputs)
20659 (invoke "pytest"))))))
20660 (native-inputs
20661 `(("double-conversion" ,double-conversion)
20662 ("python-setuptools-scm" ,python-setuptools-scm)
20663 ("python-pytest" ,python-pytest)))
20664 (home-page "https://github.com/ultrajson/ultrajson")
20665 (synopsis "Ultra fast JSON encoder and decoder for Python")
20666 (description
20667 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20668 bindings for Python 3.")
20669 (license license:bsd-3)))
20670
20671 (define-public python-iocapture
20672 ;; The latest release is more than a year older than this commit.
20673 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20674 (revision "1"))
20675 (package
20676 (name "python-iocapture")
20677 (version "0.1.2")
20678 (source
20679 (origin
20680 (method git-fetch)
20681 (uri (git-reference
20682 (url "https://github.com/oinume/iocapture")
20683 (commit commit)))
20684 (file-name (git-file-name name version))
20685 (sha256
20686 (base32
20687 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20688 (build-system python-build-system)
20689 (arguments
20690 `(#:phases
20691 (modify-phases %standard-phases
20692 (delete 'check)
20693 (add-after 'install 'check
20694 (lambda* (#:key inputs outputs #:allow-other-keys)
20695 (add-installed-pythonpath inputs outputs)
20696 (invoke "py.test" "-v" "tests")
20697 #t)))))
20698 (propagated-inputs
20699 `(("python-flexmock" ,python-flexmock)
20700 ("python-pytest" ,python-pytest)
20701 ("python-pytest-cov" ,python-pytest-cov)
20702 ("python-six" ,python-six)))
20703 (home-page "https://github.com/oinume/iocapture")
20704 (synopsis "Python capturing tool for stdout and stderr")
20705 (description
20706 "This package helps you to capture the standard out (stdout) and the
20707 standard error channel (stderr) in your program.")
20708 (license license:expat))))
20709
20710 (define-public python-argh
20711 ;; There are 21 commits since the latest release containing important
20712 ;; improvements.
20713 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20714 (revision "1"))
20715 (package
20716 (name "python-argh")
20717 (version (git-version "0.26.2" revision commit))
20718 (source
20719 (origin
20720 (method git-fetch)
20721 (uri (git-reference
20722 (url "https://github.com/neithere/argh")
20723 (commit commit)))
20724 (file-name (git-file-name name version))
20725 (sha256
20726 (base32
20727 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20728 (build-system python-build-system)
20729 (propagated-inputs
20730 `(("python-iocapture" ,python-iocapture)
20731 ("python-mock" ,python-mock)
20732 ("python-pytest" ,python-pytest)
20733 ("python-pytest-cov" ,python-pytest-cov)
20734 ("python-pytest-xdist" ,python-pytest-xdist)
20735 ("python-tox" ,python-tox)))
20736 (home-page "https://github.com/neithere/argh/")
20737 (synopsis "Argparse wrapper with natural syntax")
20738 (description
20739 "python-argh is a small library that provides several layers of
20740 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20741 always possible to declare a command with the highest possible (and least
20742 flexible) layer and then tune the behaviour with any of the lower layers
20743 including the native API of @code{python-argparse}.")
20744 (license license:lgpl3+))))
20745
20746 (define-public python-ppft
20747 (package
20748 (name "python-ppft")
20749 (version "1.6.6.1")
20750 (source
20751 (origin
20752 (method url-fetch)
20753 (uri (pypi-uri "ppft" version))
20754 (sha256
20755 (base32
20756 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20757 (build-system python-build-system)
20758 (arguments '(#:tests? #f)) ; there are none
20759 (propagated-inputs
20760 `(("python-six" ,python-six)))
20761 (home-page "https://pypi.org/project/ppft/")
20762 (synopsis "Fork of Parallel Python")
20763 (description
20764 "This package is a fork of Parallel Python. The Parallel Python
20765 module (@code{pp}) provides an easy and efficient way to create
20766 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20767 computers and clusters. It features cross-platform portability and dynamic
20768 load balancing.")
20769 (license license:bsd-3)))
20770
20771 (define-public python-pox
20772 (package
20773 (name "python-pox")
20774 (version "0.2.7")
20775 (source
20776 (origin
20777 (method url-fetch)
20778 (uri (pypi-uri "pox" version))
20779 (sha256
20780 (base32
20781 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20782 (build-system python-build-system)
20783 (arguments
20784 `(#:phases
20785 (modify-phases %standard-phases
20786 (replace 'check
20787 (lambda _
20788 (mkdir-p "/tmp/guix")
20789 (setenv "SHELL" "bash")
20790 (setenv "USERNAME" "guix")
20791 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20792 (invoke "py.test" "-vv")
20793 #t)))))
20794 (native-inputs
20795 `(("python-pytest" ,python-pytest)
20796 ("which" ,which)))
20797 (home-page "https://pypi.org/project/pox/")
20798 (synopsis "Python utilities for file system exploration and automated builds")
20799 (description
20800 "Pox provides a collection of utilities for navigating and manipulating
20801 file systems. This module is designed to facilitate some of the low-level
20802 operating system interactions that are useful when exploring a file system on a
20803 remote host. Pox provides Python equivalents of several shell commands such
20804 as @command{which} and @command{find}. These commands allow automated
20805 discovery of what has been installed on an operating system, and where the
20806 essential tools are located.")
20807 (license license:bsd-3)))
20808
20809 (define-public python-pathos
20810 (package
20811 (name "python-pathos")
20812 (version "0.2.5")
20813 (source
20814 (origin
20815 (method url-fetch)
20816 (uri (pypi-uri "pathos" version))
20817 (sha256
20818 (base32
20819 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20820 (build-system python-build-system)
20821 (arguments
20822 '(#:phases
20823 (modify-phases %standard-phases
20824 (replace 'check
20825 (lambda _
20826 (setenv "PYTHONPATH"
20827 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20828 (invoke "python" "./tests/__main__.py"))))))
20829 (propagated-inputs
20830 `(("python-dill" ,python-dill)
20831 ("python-multiprocess" ,python-multiprocess)
20832 ("python-pox" ,python-pox)
20833 ("python-ppft" ,python-ppft)))
20834 (native-inputs
20835 `(("python-pytest" ,python-pytest)))
20836 (home-page "https://pypi.org/project/pathos/")
20837 (synopsis
20838 "Parallel graph management and execution in heterogeneous computing")
20839 (description
20840 "Python-pathos is a framework for heterogeneous computing. It provides a
20841 consistent high-level interface for configuring and launching parallel
20842 computations across heterogeneous resources. Python-pathos provides configurable
20843 launchers for parallel and distributed computing, where each launcher contains
20844 the syntactic logic to configure and launch jobs in an execution environment.")
20845 (license license:bsd-3)))
20846
20847 (define-public python-flit
20848 (package
20849 (name "python-flit")
20850 (version "2.1.0")
20851 (source
20852 (origin
20853 (method url-fetch)
20854 (uri (pypi-uri "flit" version))
20855 (sha256
20856 (base32
20857 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20858 (build-system python-build-system)
20859 (arguments
20860 `(#:tests? #f)) ; XXX: Check requires network access.
20861 (home-page "https://flit.readthedocs.io/")
20862 (synopsis
20863 "Simple packaging tool for simple packages")
20864 (description
20865 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20866 packages a single importable module or package at a time, using the import
20867 name as the name on PyPI. All subpackages and data files within a package
20868 are included automatically.")
20869 (license license:bsd-3)))
20870
20871 (define-public python-pathtools
20872 (package
20873 (name "python-pathtools")
20874 (version "0.1.2")
20875 (source
20876 (origin
20877 (method url-fetch)
20878 (uri (pypi-uri "pathtools" version))
20879 (sha256
20880 (base32
20881 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20882 (build-system python-build-system)
20883 (home-page
20884 "https://github.com/gorakhargosh/pathtools")
20885 (synopsis "Path utilities for Python")
20886 (description "Pattern matching and various utilities for file systems
20887 paths.")
20888 (license license:expat)))
20889
20890 (define-public python-fastentrypoints
20891 (package
20892 (name "python-fastentrypoints")
20893 (version "0.12")
20894 (source
20895 (origin
20896 (method url-fetch)
20897 (uri (pypi-uri "fastentrypoints" version))
20898 (sha256
20899 (base32
20900 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20901 (build-system python-build-system)
20902 (home-page
20903 "https://github.com/ninjaaron/fast-entry_points")
20904 (synopsis
20905 "Makes entry_points specified in setup.py load more quickly")
20906 (description
20907 "Using entry_points in your setup.py makes scripts that start really
20908 slowly because it imports pkg_resources. This package allows such setup
20909 scripts to load entry points more quickly.")
20910 (license license:bsd-3)))
20911
20912 (define-public python-funcparserlib
20913 (package
20914 (name "python-funcparserlib")
20915 (version "0.3.6")
20916 (source
20917 (origin
20918 (method url-fetch)
20919 (uri (pypi-uri "funcparserlib" version))
20920 (sha256
20921 (base32
20922 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20923 (native-inputs
20924 `(("python-tox" ,python-tox)))
20925 (arguments
20926 `(#:phases
20927 (modify-phases %standard-phases
20928 (replace 'check
20929 (lambda _
20930 (invoke "tox"))))))
20931 (build-system python-build-system)
20932 (home-page
20933 "https://github.com/vlasovskikh/funcparserlib")
20934 (synopsis
20935 "Recursive descent parsing library based on functional combinators")
20936 (description
20937 "This package is a recursive descent parsing library for Python based on
20938 functional combinators. Parser combinators are just higher-order functions
20939 that take parsers as their arguments and return them as result values.")
20940 (license license:expat)))
20941
20942 (define-public python-speg
20943 (package
20944 (name "python-speg")
20945 (version "0.3")
20946 (source
20947 (origin
20948 (method url-fetch)
20949 (uri (pypi-uri "speg" version ".zip"))
20950 (sha256
20951 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20952 (arguments
20953 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20954 (native-inputs
20955 `(("unzip" ,unzip)))
20956 (build-system python-build-system)
20957 (home-page "https://github.com/avakar/speg")
20958 (synopsis "PEG-based parser interpreter with memoization")
20959 (description "This package is a PEG-based parser and interpreter with
20960 memoization.")
20961 (license license:expat)))
20962
20963 (define-public python-cson
20964 (package
20965 (name "python-cson")
20966 (version "0.8")
20967 (source
20968 (origin
20969 (method url-fetch)
20970 (uri (pypi-uri "cson" version))
20971 (sha256
20972 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20973 (build-system python-build-system)
20974 (propagated-inputs
20975 `(("python-speg" ,python-speg)))
20976 (home-page "https://github.com/avakar/pycson")
20977 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20978 (description "This package is a parser for Coffeescript Object
20979 Notation (CSON).")
20980 (license license:expat)))
20981
20982 (define-public python-asynctest
20983 (package
20984 (name "python-asynctest")
20985 (version "0.13.0")
20986 (source
20987 (origin
20988 (method url-fetch)
20989 (uri (pypi-uri "asynctest" version))
20990 (sha256
20991 (base32
20992 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20993 (build-system python-build-system)
20994 (arguments
20995 '(#:phases
20996 (modify-phases %standard-phases
20997 (replace 'check
20998 (lambda _
20999 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21000 (add-after 'unpack 'disable-tests
21001 (lambda* _
21002 ;; XXX: 7 tests fail out of 220. Disable them for now.
21003 (substitute* (list "test/test_selector.py"
21004 "test/test_mock.py")
21005 (("def test_events_watched_outside_test_are_ignored")
21006 "@unittest.skip('disabled by guix')
21007 def test_events_watched_outside_test_are_ignored")
21008 (("def test_awaited_from_autospec_mock.*" line)
21009 (string-append line " return True\n"))
21010 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21011 (string-append line " return True\n"))
21012 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21013 (string-append line " return True\n"))
21014 (("def test_multiple_patches_on_coroutine.*" line)
21015 (string-append line " return True\n"))
21016 (("def test_patch_coroutine_only_when_running.*" line)
21017 (string-append line " return True\n")))
21018 #t)))))
21019 (home-page "https://github.com/Martiusweb/asynctest")
21020 (synopsis "Extension of unittest for testing asyncio libraries")
21021 (description
21022 "The package asynctest is built on top of the standard unittest module
21023 and cuts down boilerplate code when testing libraries for asyncio.")
21024 (license license:asl2.0)))
21025
21026 (define-public python-aionotify
21027 (package
21028 (name "python-aionotify")
21029 (version "0.2.0")
21030 (source
21031 (origin
21032 ;; Source tarball on PyPi lacks tests
21033 (method git-fetch)
21034 (uri (git-reference
21035 (url "https://github.com/rbarrois/aionotify")
21036 (commit (string-append "v" version))))
21037 (file-name (git-file-name name version))
21038 (sha256
21039 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21040 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21041 (build-system python-build-system)
21042 (home-page "https://github.com/rbarrois/aionotify")
21043 (synopsis "Asyncio-powered inotify library")
21044 (description
21045 "@code{aionotify} is a simple, asyncio-based inotify library.")
21046 (license license:bsd-3)))
21047
21048 (define-public python-forbiddenfruit
21049 (package
21050 (name "python-forbiddenfruit")
21051 (version "0.1.3")
21052 (source
21053 (origin
21054 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21055 (method git-fetch)
21056 (uri (git-reference
21057 (url "https://github.com/clarete/forbiddenfruit")
21058 (commit version)))
21059 (file-name (git-file-name name version))
21060 (sha256
21061 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21062 (build-system python-build-system)
21063 (arguments
21064 '(#:phases
21065 (modify-phases %standard-phases
21066 (replace 'check
21067 (lambda _
21068 (invoke "make" "SKIP_DEPS=1"))))))
21069 (native-inputs
21070 `(("python-nose" ,python-nose)
21071 ("python-coverage" ,python-coverage)))
21072 (home-page "https://github.com/clarete/forbiddenfruit")
21073 (synopsis "Patch python built-in objects")
21074 (description "This project allows Python code to extend built-in types.")
21075 (license (list license:gpl3+ license:expat))))
21076
21077 (define-public python-shouldbe
21078 (package
21079 (name "python-shouldbe")
21080 (version "0.1.2")
21081 (source
21082 (origin
21083 (method url-fetch)
21084 (uri (pypi-uri "shouldbe" version))
21085 (sha256
21086 (base32
21087 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21088 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21089 (build-system python-build-system)
21090 (propagated-inputs
21091 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21092 (native-inputs
21093 `(("python-nose" ,python-nose)))
21094 (home-page "https://github.com/directxman12/should_be")
21095 (synopsis "Python Assertion Helpers inspired by Shouldly")
21096 (description
21097 "Python Assertion Helpers inspired by Shouldly.")
21098 (license license:isc)))
21099
21100 (define-public python-k5test
21101 (package
21102 (name "python-k5test")
21103 (version "0.9.2")
21104 (source
21105 (origin
21106 (method url-fetch)
21107 (uri (pypi-uri "k5test" version))
21108 (sha256
21109 (base32
21110 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21111 (build-system python-build-system)
21112 (propagated-inputs
21113 `(("python-six" ,python-six)
21114 ;; `which`, `kadmin.local` binaries called inside library
21115 ("which" ,which)
21116 ("mit-krb5" ,mit-krb5)))
21117 (native-inputs `(("mit-krb5" ,mit-krb5)))
21118 (arguments
21119 '(#:phases
21120 (modify-phases %standard-phases
21121 (add-after 'unpack 'patch-paths
21122 (lambda* _
21123 (substitute* "k5test/realm.py"
21124 (("'kadmin_local'") "'kadmin.local'")))))))
21125 (home-page "https://github.com/pythongssapi/k5test")
21126 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21127 (description
21128 "@code{k5test} is a library for setting up self-contained Kerberos 5
21129 environments, and running Python unit tests inside those environments. It is
21130 based on the file of the same name found alongside the MIT Kerberos 5 unit
21131 tests.")
21132 (license license:isc)))
21133
21134 (define-public python-gssapi
21135 (package
21136 (name "python-gssapi")
21137 (version "1.6.9")
21138 (source
21139 (origin
21140 (method url-fetch)
21141 (uri (pypi-uri "gssapi" version))
21142 (sha256
21143 (base32
21144 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21145 (build-system python-build-system)
21146 (arguments
21147 `(#:phases
21148 (modify-phases %standard-phases
21149 ;; Work around
21150 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21151 (add-before 'check 'disable-failing-tests
21152 (lambda _
21153 (let ((reason "Disabled failing test (see: \
21154 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21155 (substitute* "gssapi/tests/test_high_level.py"
21156 ((".*def test_add_with_impersonate.*" all)
21157 (string-append all " self.skipTest('" reason "')\n")))
21158 (substitute* "gssapi/tests/test_raw.py"
21159 ((".*def test_.*impersonate_name.*" all)
21160 (string-append all " self.skipTest('" reason "')\n")))
21161 #t))))))
21162 (propagated-inputs
21163 `(("python-decorator" ,python-decorator)
21164 ("python-six" ,python-six)))
21165 (inputs
21166 `(("mit-krb5" ,mit-krb5)))
21167 ;; for tests
21168 (native-inputs
21169 `(("python-shouldbe" ,python-shouldbe)
21170 ("python-parameterized" ,python-parameterized)
21171 ("python-k5test" ,python-k5test)
21172 ("python-nose" ,python-nose)))
21173 (home-page "https://github.com/pythongssapi/python-gssapi")
21174 (synopsis "Python GSSAPI Wrapper")
21175 (description
21176 "Python-GSSAPI provides both low-level and high level wrappers around the
21177 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21178 also be usable with other GSSAPI mechanisms.")
21179 (license license:isc)))
21180
21181 (define-public python-check-manifest
21182 (package
21183 (name "python-check-manifest")
21184 (version "0.37")
21185 (source
21186 (origin
21187 (method url-fetch)
21188 (uri (pypi-uri "check-manifest" version))
21189 (sha256
21190 (base32
21191 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21192 (build-system python-build-system)
21193 (native-inputs
21194 `(("python-mock" ,python-mock)
21195 ("git" ,git)))
21196 (home-page "https://github.com/mgedmin/check-manifest")
21197 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21198 (description "Python package can include a MANIFEST.in file to help with
21199 sending package files to the Python Package Index. This package checks that
21200 file to ensure it completely and accurately describes your project.")
21201 (license license:expat)))
21202
21203 (define-public python-android-stringslib
21204 (package
21205 (name "python-android-stringslib")
21206 (version "0.1.2")
21207 (source
21208 (origin
21209 (method git-fetch)
21210 (uri (git-reference
21211 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21212 (commit (string-append "v" version))))
21213 (file-name (git-file-name name version))
21214 (sha256
21215 (base32
21216 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21217 (build-system python-build-system)
21218 (arguments
21219 `(#:tests? #f))
21220 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21221 (synopsis "Android strings.xml support")
21222 (description "Android Strings Lib provides support for android's strings.xml
21223 files. These files are used to translate strings in android apps.")
21224 (license license:expat)))
21225
21226 (define-public python-watchdog
21227 (package
21228 (name "python-watchdog")
21229 (version "0.9.0")
21230 (source
21231 (origin
21232 (method url-fetch)
21233 (uri (pypi-uri "watchdog" version))
21234 (sha256
21235 (base32
21236 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21237 (build-system python-build-system)
21238 (arguments
21239 `(#:phases
21240 (modify-phases %standard-phases
21241 (add-before 'check 'remove-failing
21242 (lambda _
21243 (delete-file "tests/test_inotify_buffer.py")
21244 (delete-file "tests/test_snapshot_diff.py")
21245 #t)))))
21246 (propagated-inputs
21247 `(("python-argh" ,python-argh)
21248 ("python-pathtools" ,python-pathtools)
21249 ("python-pyyaml" ,python-pyyaml)))
21250 (native-inputs
21251 `(("python-pytest-cov" ,python-pytest-cov)
21252 ("python-pytest-timeout" ,python-pytest-timeout)))
21253 (home-page "https://github.com/gorakhargosh/watchdog")
21254 (synopsis "File system events monitoring")
21255 (description "This package provides a way to monitor file system events
21256 such as a file modification and trigger an action. This is similar to inotify,
21257 but portable.")
21258 (license license:asl2.0)))
21259
21260 (define-public python-watchgod
21261 (package
21262 (name "python-watchgod")
21263 (version "0.6")
21264 (source
21265 (origin
21266 ;; There are no tests in the PyPI tarball.
21267 (method git-fetch)
21268 (uri (git-reference
21269 (url "https://github.com/samuelcolvin/watchgod")
21270 (commit (string-append "v" version))))
21271 (file-name (git-file-name name version))
21272 (sha256
21273 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21274 (build-system python-build-system)
21275 (arguments
21276 `(#:phases
21277 (modify-phases %standard-phases
21278 (replace 'check
21279 (lambda _
21280 (invoke "pytest" "-vv"))))))
21281 (native-inputs
21282 `(("python-coverage" ,python-coverage)
21283 ("python-docutils" ,python-docutils)
21284 ("python-flake8" ,python-flake8)
21285 ("python-isort" ,python-isort)
21286 ("python-pycodestyle" ,python-pycodestyle)
21287 ("python-pyflakes" ,python-pyflakes)
21288 ("python-pygments" ,python-pygments)
21289 ("python-pytest" ,python-pytest)
21290 ("python-pytest-cov" ,python-pytest-cov)
21291 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21292 ("python-pytest-mock" ,python-pytest-mock)
21293 ("python-pytest-sugar" ,python-pytest-sugar)
21294 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21295 (home-page "https://github.com/samuelcolvin/watchgod")
21296 (synopsis "Simple, modern file watching and code reload in Python")
21297 (description
21298 "Simple, modern file watching and code reload in Python inspired by
21299 @code{watchdog}. Among the differences are a unified approach for each
21300 operating systems and an elegant approach to concurrency using threading.")
21301 (license license:expat)))
21302
21303 (define-public python-wget
21304 (package
21305 (name "python-wget")
21306 (version "3.2")
21307 (source
21308 (origin
21309 (method url-fetch)
21310 (uri (pypi-uri "wget" version ".zip"))
21311 (sha256
21312 (base32
21313 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21314 (build-system python-build-system)
21315 (native-inputs `(("unzip" ,unzip)))
21316 (home-page "https://bitbucket.org/techtonik/python-wget/")
21317 (synopsis "Pure Python download utility")
21318 (description "The python-wget library provides an API to download files
21319 with features similar to the @command{wget} utility.")
21320 (license license:unlicense)))
21321
21322 (define-public offlate
21323 (package
21324 (name "offlate")
21325 (version "0.5")
21326 (source
21327 (origin
21328 (method git-fetch)
21329 (uri (git-reference
21330 (url "https://framagit.org/tyreunom/offlate")
21331 (commit version)))
21332 (file-name (git-file-name name version))
21333 (sha256
21334 (base32
21335 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21336 (build-system python-build-system)
21337 (arguments
21338 ;; No tests
21339 `(#:tests? #f))
21340 (propagated-inputs
21341 `(("python-android-stringslib" ,python-android-stringslib)
21342 ("python-dateutil" ,python-dateutil)
21343 ("python-gitlab" ,python-gitlab)
21344 ("python-lxml" ,python-lxml)
21345 ("python-polib" ,python-polib)
21346 ("python-pyenchant" ,python-pyenchant)
21347 ("python-pygit2" ,python-pygit2)
21348 ("python-pygithub" ,python-pygithub)
21349 ("python-pyqt" ,python-pyqt)
21350 ("python-requests" ,python-requests)
21351 ("python-ruamel.yaml" ,python-ruamel.yaml)
21352 ("python-translation-finder" ,python-translation-finder)
21353 ("python-watchdog" ,python-watchdog)))
21354 (native-inputs
21355 `(("qttools" ,qttools)))
21356 (home-page "https://framagit.org/tyreunom/offlate")
21357 (synopsis "Offline translation interface for online translation tools")
21358 (description "Offlate offers a unified interface for different translation
21359 file formats, as well as many different online translation platforms. You can
21360 use it to get work from online platforms, specialized such as the Translation
21361 Project, or not such a gitlab instance when your upstream doesn't use any
21362 dedicated platform. The tool proposes a unified interface for any format and
21363 an upload option to send your work back to the platform.")
21364 (license license:gpl3+)))
21365
21366 (define-public python-titlecase
21367 (package
21368 (name "python-titlecase")
21369 (version "0.12.0")
21370 (source
21371 (origin
21372 (method url-fetch)
21373 (uri (pypi-uri "titlecase" version))
21374 (sha256
21375 (base32
21376 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21377 (build-system python-build-system)
21378 (native-inputs
21379 `(("python-nose" ,python-nose)))
21380 (home-page "https://github.com/ppannuto/python-titlecase")
21381 (synopsis "Capitalize strings similar to book titles")
21382 (description
21383 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21384 It capitalizes (predominantly English) strings in a way that is similar to
21385 book titles, using the New York Times Manual of Style to leave certain words
21386 lowercase.")
21387 (license license:expat)))
21388
21389 (define-public python-pypng
21390 (package
21391 (name "python-pypng")
21392 (version "0.0.20")
21393 (source
21394 (origin
21395 (method url-fetch)
21396 (uri (pypi-uri "pypng" version))
21397 (sha256
21398 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21399 (build-system python-build-system)
21400 (home-page "https://github.com/drj11/pypng")
21401 (synopsis "Pure Python PNG image encoder/decoder")
21402 (description
21403 "The PyPNG module implements support for PNG images. It reads and writes
21404 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21405 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21406 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21407 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21408 A number of optional chunks can be specified (when writing) and
21409 understood (when reading): tRNS, bKGD, gAMA.
21410
21411 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21412 aim at being a replacement or competitor. Its strength lies in fine-grained
21413 extensive support of PNG features. It can also read and write Netpbm PAM
21414 files, with a focus on its use as an intermediate format for implementing
21415 custom PNG processing.")
21416 (license license:expat)))
21417
21418 (define-public python-fuzzywuzzy
21419 (package
21420 (name "python-fuzzywuzzy")
21421 (version "0.18.0")
21422 (source
21423 (origin
21424 (method url-fetch)
21425 (uri (pypi-uri "fuzzywuzzy" version))
21426 (sha256
21427 (base32
21428 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21429 (build-system python-build-system)
21430 (native-inputs
21431 `(("python-hypothesis" ,python-hypothesis)
21432 ("python-pycodestyle" ,python-pycodestyle)
21433 ("python-pytest" ,python-pytest)))
21434 (propagated-inputs
21435 `(("python-levenshtein" ,python-levenshtein)))
21436 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21437 (synopsis "Fuzzy string matching in Python")
21438 (description "Approximate string matching using
21439 @emph{Levenshtein Distance} to calculate the differences between
21440 sequences.")
21441 (license license:gpl2)))
21442
21443 (define-public python2-fuzzywuzzy
21444 (package-with-python2 python-fuzzywuzzy))
21445
21446 (define-public python-block-tracing
21447 (package
21448 (name "python-block-tracing")
21449 (version "1.0.1")
21450 (source
21451 (origin
21452 (method url-fetch)
21453 (uri (pypi-uri "block_tracing" version))
21454 (sha256
21455 (base32
21456 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21457 (build-system python-build-system)
21458 (arguments '(#:tests? #f)) ; no tests
21459 (home-page "https://github.com/rianhunter/block_tracing")
21460 (synopsis "Protect process memory")
21461 (description
21462 "@code{block_tracing} is a tiny Python library that can be used to
21463 prevent debuggers and other applications from inspecting the memory within
21464 your process.")
21465 (license license:expat)))
21466
21467 (define-public python-gcovr
21468 (package
21469 (name "python-gcovr")
21470 (version "4.2")
21471 (source
21472 (origin
21473 (method url-fetch)
21474 (uri (pypi-uri "gcovr" version))
21475 (sha256
21476 (base32
21477 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21478 (build-system python-build-system)
21479 (propagated-inputs
21480 `(("python-lxml" ,python-lxml)
21481 ("python-jinja2" ,python-jinja2)))
21482 (home-page "https://gcovr.com/")
21483 (synopsis "Utility for generating code coverage results")
21484 (description
21485 "Gcovr provides a utility for managing the use of the GNU gcov
21486 utility and generating summarized code coverage results. It is inspired
21487 by the Python coverage.py package, which provides a similar utility for
21488 Python.")
21489 (license license:bsd-3)))
21490
21491 (define-public python-owslib
21492 (package
21493 (name "python-owslib")
21494 (version "0.19.2")
21495 (source
21496 (origin
21497 (method url-fetch)
21498 (uri (pypi-uri "OWSLib" version))
21499 (sha256
21500 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21501 (build-system python-build-system)
21502 (arguments
21503 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21504 (synopsis "Interface for Open Geospatial Consortium web service")
21505 (description
21506 "OWSLib is a Python package for client programming with Open Geospatial
21507 Consortium (OGC) web service (hence OWS) interface standards, and their related
21508 content models.")
21509 (home-page "https://geopython.github.io/OWSLib/")
21510 (license license:bsd-3)))
21511
21512 (define-public python-docusign-esign
21513 (package
21514 (name "python-docusign-esign")
21515 (version "3.1.0")
21516 (source (origin
21517 (method url-fetch)
21518 (uri (pypi-uri "docusign_esign" version))
21519 (sha256
21520 (base32
21521 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21522 (build-system python-build-system)
21523 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21524 (arguments `(#:tests? #f))
21525 (propagated-inputs
21526 `(("python-certifi" ,python-certifi)
21527 ("python-six" ,python-six)
21528 ("python-dateutil" ,python-dateutil)
21529 ("python-urllib3" ,python-urllib3)
21530 ("python-pyjwt" ,python-pyjwt)
21531 ("python-cryptography" ,python-cryptography)
21532 ("python-nose" ,python-nose)))
21533 (synopsis "DocuSign Python Client")
21534 (description "The Official DocuSign Python Client Library used to interact
21535 with the eSign REST API. Send, sign, and approve documents using this client.")
21536 (home-page "https://www.docusign.com/devcenter")
21537 (license license:expat)))
21538
21539 (define-public python-xattr
21540 (package
21541 (name "python-xattr")
21542 (version "0.9.7")
21543 (source
21544 (origin
21545 (method url-fetch)
21546 (uri (pypi-uri "xattr" version))
21547 (sha256
21548 (base32
21549 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21550 (build-system python-build-system)
21551 (propagated-inputs
21552 `(("python-cffi" ,python-cffi)))
21553 (home-page "https://github.com/xattr/xattr")
21554 (synopsis
21555 "Python wrapper for extended file system attributes")
21556 (description "This package provides a Python wrapper for using extended
21557 file system attributes. Extended attributes extend the basic attributes of files
21558 and directories in the file system. They are stored as name:data pairs
21559 associated with file system objects (files, directories, symlinks, etc).")
21560 (license license:expat)))
21561
21562 (define-public python-json-logger
21563 (package
21564 (name "python-json-logger")
21565 (version "0.1.11")
21566 (source
21567 (origin
21568 (method url-fetch)
21569 (uri (pypi-uri "python-json-logger" version))
21570 (sha256
21571 (base32
21572 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21573 (build-system python-build-system)
21574 (home-page
21575 "https://github.com/madzak/python-json-logger")
21576 (synopsis "JSON log formatter in Python")
21577 (description "This library allows standard Python logging to output log data
21578 as JSON objects. With JSON we can make our logs more readable by machines and
21579 we can stop writing custom parsers for syslog-type records.")
21580 (license license:bsd-3)))
21581
21582 (define-public python-daiquiri
21583 (package
21584 (name "python-daiquiri")
21585 (version "2.1.1")
21586 (source
21587 (origin
21588 (method url-fetch)
21589 (uri (pypi-uri "daiquiri" version))
21590 (sha256
21591 (base32
21592 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21593 (build-system python-build-system)
21594 (propagated-inputs
21595 `(("python-json-logger" ,python-json-logger)))
21596 (native-inputs
21597 `(("python-mock" ,python-mock)
21598 ("python-pytest" ,python-pytest)
21599 ("python-setuptools-scm" ,python-setuptools-scm)
21600 ("python-six" ,python-six)))
21601 (home-page "https://github.com/jd/daiquiri")
21602 (synopsis
21603 "Library to configure Python logging easily")
21604 (description "The daiquiri library provides an easy way to configure
21605 logging in Python. It also provides some custom formatters and handlers.")
21606 (license license:asl2.0)))
21607
21608 (define-public python-pifpaf
21609 (package
21610 (name "python-pifpaf")
21611 (version "2.5.0")
21612 (source
21613 (origin
21614 (method url-fetch)
21615 (uri (pypi-uri "pifpaf" version))
21616 (sha256
21617 (base32
21618 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21619 (build-system python-build-system)
21620 (arguments
21621 '(#:phases
21622 (modify-phases %standard-phases
21623 (replace 'check
21624 (lambda _
21625 (invoke "python" "setup.py" "testr" "--slowest"
21626 "--testr-args=until-failure"))))))
21627 (propagated-inputs
21628 `(("python-click" ,python-click)
21629 ("python-daiquiri" ,python-daiquiri)
21630 ("python-fixtures" ,python-fixtures)
21631 ("python-jinja2" ,python-jinja2)
21632 ("python-pbr" ,python-pbr)
21633 ("python-psutil" ,python-psutil)
21634 ("python-six" ,python-six)
21635 ("python-xattr" ,python-xattr)))
21636 (native-inputs
21637 `(("python-mock" ,python-mock)
21638 ("python-os-testr" ,python-os-testr)
21639 ("python-requests" ,python-requests)
21640 ("python-testrepository" ,python-testrepository)
21641 ("python-testtools" ,python-testtools)))
21642 (home-page "https://github.com/jd/pifpaf")
21643 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21644 (description "Pifpaf is a suite of fixtures and a command-line tool that
21645 starts and stops daemons for a quick throw-away usage. This is typically
21646 useful when needing these daemons to run integration testing. It originally
21647 evolved from its precursor @code{overtest}.")
21648 (license license:asl2.0)))
21649
21650 (define-public python-pytest-check-links
21651 (package
21652 (name "python-pytest-check-links")
21653 (version "0.3.0")
21654 (source
21655 (origin
21656 (method url-fetch)
21657 ;; URI uses underscores
21658 (uri (pypi-uri "pytest_check_links" version))
21659 (sha256
21660 (base32
21661 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21662 (build-system python-build-system)
21663 (propagated-inputs
21664 `(("python-docutils" ,python-docutils)
21665 ("python-html5lib" ,python-html5lib)
21666 ("python-nbconvert" ,python-nbconvert)
21667 ("python-nbformat" ,python-nbformat)
21668 ("python-pytest" ,python-pytest)
21669 ("python-six" ,python-six)))
21670 (native-inputs
21671 `(("python-pbr-minimal" ,python-pbr-minimal)))
21672 (home-page "https://github.com/minrk/pytest-check-links")
21673 (synopsis "Check links in files")
21674 (description "This package provides a pytest plugin that checks URLs for
21675 HTML-containing files.")
21676 (license license:bsd-3)))
21677
21678 (define-public python-json5
21679 (package
21680 (name "python-json5")
21681 (version "0.8.5")
21682 (source
21683 (origin
21684 ;; sample.json5 is missing from PyPi source tarball
21685 (method git-fetch)
21686 (uri (git-reference
21687 (url "https://github.com/dpranke/pyjson5")
21688 (commit (string-append "v" version))))
21689 (file-name (git-file-name name version))
21690 (sha256
21691 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21692 (build-system python-build-system)
21693 (home-page "https://github.com/dpranke/pyjson5")
21694 (synopsis
21695 "Python implementation of the JSON5 data format")
21696 (description
21697 "JSON5 extends the JSON data interchange format to make it slightly more
21698 usable as a configuration language. This Python package implements parsing and
21699 dumping of JSON5 data structures.")
21700 (license license:asl2.0)))
21701
21702 (define-public python-frozendict
21703 (package
21704 (name "python-frozendict")
21705 (version "1.2")
21706 (source
21707 (origin
21708 (method url-fetch)
21709 (uri (pypi-uri "frozendict" version))
21710 (sha256
21711 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21712 (build-system python-build-system)
21713 (home-page "https://github.com/slezica/python-frozendict")
21714 (synopsis "Simple immutable mapping for Python")
21715 (description
21716 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21717 implements the complete mapping interface. It can be used as a drop-in
21718 replacement for dictionaries where immutability is desired.")
21719 (license license:expat)))
21720
21721 (define-public python-unpaddedbase64
21722 (package
21723 (name "python-unpaddedbase64")
21724 (version "1.1.0")
21725 (source
21726 (origin
21727 (method git-fetch)
21728 (uri (git-reference
21729 (url "https://github.com/matrix-org/python-unpaddedbase64")
21730 (commit (string-append "v" version))))
21731 (file-name (git-file-name name version))
21732 (sha256
21733 (base32
21734 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21735 (build-system python-build-system)
21736 (home-page "https://pypi.org/project/unpaddedbase64/")
21737 (synopsis "Encode and decode Base64 without “=” padding")
21738 (description
21739 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21740 using “=” characters. However this conveys no benefit so many protocols
21741 choose to use Base64 without the “=” padding.")
21742 (license license:asl2.0)))
21743
21744 (define-public python-py-cpuinfo
21745 (package
21746 (name "python-py-cpuinfo")
21747 (version "5.0.0")
21748 (source
21749 (origin
21750 (method url-fetch)
21751 (uri (pypi-uri "py-cpuinfo" version))
21752 (sha256
21753 (base32
21754 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21755 (build-system python-build-system)
21756 (home-page "https://github.com/workhorsy/py-cpuinfo")
21757 (synopsis "Get CPU info with Python")
21758 (description
21759 "This Python module returns the CPU info by using the best sources of
21760 information for your operating system.")
21761 (license license:expat)))
21762
21763 (define-public python-canonicaljson
21764 (package
21765 (name "python-canonicaljson")
21766 (version "1.4.0")
21767 (source
21768 (origin
21769 (method url-fetch)
21770 (uri (pypi-uri "canonicaljson" version))
21771 (sha256
21772 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21773 (build-system python-build-system)
21774 (propagated-inputs
21775 `(("python-six" ,python-six)
21776 ("python-frozendict" ,python-frozendict)
21777 ("python-simplejson" ,python-simplejson)))
21778 (home-page "https://github.com/matrix-org/python-canonicaljson")
21779 (synopsis "Canonical JSON")
21780 (description
21781 "Deterministically encode JSON.
21782
21783 @itemize
21784 @item Encodes objects and arrays as RFC 7159 JSON.
21785 @item Sorts object keys so that you get the same result each time.
21786 @item Has no insignificant whitespace to make the output as small as possible.
21787 @item Escapes only the characters that must be escaped, U+0000 to
21788 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21789 @item Uses the shortest escape sequence for each escaped character.
21790 @item Encodes the JSON as UTF-8.
21791 @item Can encode frozendict immutable dictionaries.
21792 @end itemize")
21793 (license license:asl2.0)))
21794
21795 (define-public python-signedjson
21796 (package
21797 (name "python-signedjson")
21798 (version "1.1.1")
21799 (source
21800 (origin
21801 (method url-fetch)
21802 (uri (pypi-uri "signedjson" version))
21803 (sha256
21804 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21805 (build-system python-build-system)
21806 (propagated-inputs
21807 `(("python-canonicaljson" ,python-canonicaljson)
21808 ("python-importlib-metadata" ,python-importlib-metadata)
21809 ("python-pynacl" ,python-pynacl)
21810 ("python-typing-extensions" ,python-typing-extensions)
21811 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21812 (native-inputs
21813 `(("python-setuptools-scm" ,python-setuptools-scm)))
21814 (home-page "https://github.com/matrix-org/python-signedjson")
21815 (synopsis "Sign JSON objects with ED25519 signatures")
21816 (description
21817 "Sign JSON objects with ED25519 signatures.
21818
21819 @itemize
21820 @item More than one entity can sign the same object.
21821 @item Each entity can sign the object with more than one key making it easier to
21822 rotate keys
21823 @item ED25519 can be replaced with a different algorithm.
21824 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21825 key.
21826 @end itemize")
21827 (license license:asl2.0)))
21828
21829 (define-public python-daemonize
21830 (package
21831 (name "python-daemonize")
21832 (version "2.5.0")
21833 (source
21834 (origin
21835 (method url-fetch)
21836 (uri (pypi-uri "daemonize" version))
21837 (sha256
21838 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21839 (build-system python-build-system)
21840 (home-page "https://github.com/thesharp/daemonize")
21841 (synopsis "Library for writing system daemons in Python")
21842 (description "Daemonize is a library for writing system daemons in Python.")
21843 (license license:expat)))
21844
21845 (define-public python-pymacaroons
21846 (package
21847 (name "python-pymacaroons")
21848 (version "0.13.0")
21849 (source
21850 (origin
21851 (method url-fetch)
21852 (uri (pypi-uri "pymacaroons" version))
21853 (sha256
21854 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21855 (build-system python-build-system)
21856 (propagated-inputs
21857 `(("python-six" ,python-six)
21858 ("python-pynacl" ,python-pynacl)))
21859 (home-page "https://github.com/ecordell/pymacaroons")
21860 (synopsis "Python Macaroon Library")
21861 (description
21862 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21863 tokens, macaroons embed caveats that define specific authorization
21864 requirements for the target service, the service that issued the root macaroon
21865 and which is capable of verifying the integrity of macaroons it receives.
21866
21867 Macaroons allow for delegation and attenuation of authorization. They are
21868 simple and fast to verify, and decouple authorization policy from the
21869 enforcement of that policy.")
21870 (license license:expat)))
21871
21872 (define-public python-ldap3
21873 (package
21874 (name "python-ldap3")
21875 (version "2.7")
21876 (home-page "https://github.com/cannatag/ldap3")
21877 (source
21878 (origin
21879 (method git-fetch)
21880 (uri (git-reference (url home-page)
21881 (commit (string-append "v" version))))
21882 (file-name (git-file-name name version))
21883 (sha256
21884 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21885 (build-system python-build-system)
21886 (arguments
21887 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21888 #:phases (modify-phases %standard-phases
21889 (replace 'check
21890 (lambda* (#:key tests? #:allow-other-keys)
21891 (when tests?
21892 (invoke "nosetests" "-s" "test"))
21893 #t)))))
21894 (native-inputs
21895 `(("python-nose" ,python-nose)))
21896 (propagated-inputs
21897 `(("python-gssapi" ,python-gssapi)
21898 ("python-pyasn1" ,python-pyasn1)))
21899 (synopsis "Python LDAP client")
21900 (description
21901 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21902 library.")
21903 (license license:lgpl3+)))
21904
21905 (define-public python-boltons
21906 (package
21907 (name "python-boltons")
21908 (version "20.0.0")
21909 (source
21910 (origin
21911 (method url-fetch)
21912 (uri (pypi-uri "boltons" version))
21913 (sha256
21914 (base32
21915 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21916 (build-system python-build-system)
21917 (home-page "https://github.com/mahmoud/boltons")
21918 (synopsis "Extensions to the Python standard library")
21919 (description
21920 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21921 as — and yet conspicuously missing from — the standard library, including:
21922
21923 @itemize
21924 @item Atomic file saving, bolted on with fileutils
21925 @item A highly-optimized OrderedMultiDict, in dictutils
21926 @item Two types of PriorityQueue, in queueutils
21927 @item Chunked and windowed iteration, in iterutils
21928 @item Recursive data structure iteration and merging, with iterutils.remap
21929 @item Exponential backoff functionality, including jitter, through
21930 iterutils.backoff
21931 @item A full-featured TracebackInfo type, for representing stack traces, in
21932 tbutils
21933 @end itemize")
21934 (license license:bsd-3)))
21935
21936 (define-public python-eliot
21937 (package
21938 (name "python-eliot")
21939 (version "1.12.0")
21940 (source
21941 (origin
21942 (method url-fetch)
21943 (uri (pypi-uri "eliot" version))
21944 (sha256
21945 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21946 (build-system python-build-system)
21947 (arguments
21948 `(#:phases
21949 (modify-phases %standard-phases
21950 (add-after 'unpack 'remove-journald-support
21951 (lambda _
21952 (for-each delete-file
21953 '("eliot/tests/test_journald.py"
21954 "eliot/journald.py"))
21955 #t))
21956 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21957 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21958 ;; be installed and these tests should pass.
21959 (lambda _
21960 (delete-file "eliot/tests/test_prettyprint.py")
21961 #t)))))
21962 (propagated-inputs
21963 `(("python-boltons" ,python-boltons)
21964 ("python-pyrsistent" ,python-pyrsistent)
21965 ("python-six" ,python-six)
21966 ("python-zope-interface" ,python-zope-interface)))
21967 (native-inputs
21968 `(("python-black" ,python-black)
21969 ("python-coverage" ,python-coverage)
21970 ("python-dask" ,python-dask)
21971 ("python-flake8" ,python-flake8)
21972 ("python-hypothesis" ,python-hypothesis)
21973 ("python-pytest" ,python-pytest)
21974 ("python-setuptools" ,python-setuptools)
21975 ("python-sphinx" ,python-sphinx)
21976 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21977 ("python-testtools" ,python-testtools)
21978 ("python-twine" ,python-twine)
21979 ("python-twisted" ,python-twisted)))
21980 (home-page "https://github.com/itamarst/eliot/")
21981 (synopsis "Eliot: the logging system that tells you why it happened")
21982 (description
21983 "@dfn{eliot} is a Python logging system that outputs causal chains of
21984 actions: actions can spawn other actions, and eventually they either succeed
21985 or fail. The resulting logs tell you the story of what your software did: what
21986 happened, and what caused it.")
21987 (license license:asl2.0)))
21988
21989 (define-public python-pem
21990 (package
21991 (name "python-pem")
21992 (version "20.1.0")
21993 (source
21994 (origin
21995 (method url-fetch)
21996 (uri (pypi-uri "pem" version))
21997 (sha256
21998 (base32
21999 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22000 (build-system python-build-system)
22001 (native-inputs
22002 `(("python-certifi" ,python-certifi)
22003 ("python-coverage" ,python-coverage)
22004 ("python-pretend" ,python-pretend)
22005 ("python-pyopenssl" ,python-pyopenssl)
22006 ("python-pytest" ,python-pytest)
22007 ("python-sphinx" ,python-sphinx)
22008 ("python-twisted" ,python-twisted)))
22009 (home-page "https://pem.readthedocs.io/")
22010 (synopsis "Easy PEM file parsing in Python")
22011 (description
22012 "This package provides a Python module for parsing and splitting PEM files.")
22013 (license license:expat)))
22014
22015 (define-public python-txsni
22016 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22017 ;; Python and OpenSSL.
22018 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22019 (revision "0"))
22020 (package
22021 (name "python-txsni")
22022 (version (git-version "0.1.9" revision commit))
22023 (home-page "https://github.com/glyph/txsni")
22024 (source
22025 (origin
22026 (method git-fetch)
22027 (uri (git-reference (url home-page) (commit commit)))
22028 (file-name (git-file-name name version))
22029 (sha256
22030 (base32
22031 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22032 (build-system python-build-system)
22033 (propagated-inputs
22034 `(("python-pyopenssl" ,python-pyopenssl)
22035 ("python-service-identity" ,python-service-identity)
22036 ("python-twisted" ,python-twisted)))
22037 (synopsis "Run TLS servers with Twisted")
22038 (description
22039 "This package provides an easy-to-use SNI endpoint for use
22040 with the Twisted web framework.")
22041 (license license:expat))))
22042
22043 (define-public python-txacme
22044 (package
22045 (name "python-txacme")
22046 (version "0.9.2")
22047 (source
22048 (origin
22049 (method url-fetch)
22050 (uri (pypi-uri "txacme" version))
22051 (sha256
22052 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22053 (build-system python-build-system)
22054 (propagated-inputs
22055 `(("python-acme" ,python-acme)
22056 ("python-attrs" ,python-attrs)
22057 ("python-eliot" ,python-eliot)
22058 ("python-josepy" ,python-josepy)
22059 ("python-pem" ,python-pem)
22060 ("python-treq" ,python-treq)
22061 ("python-twisted" ,python-twisted)
22062 ("python-txsni" ,python-txsni)))
22063 (native-inputs
22064 `(("python-fixtures" ,python-fixtures)
22065 ("python-hypothesis" ,python-hypothesis)
22066 ("python-mock" ,python-mock)
22067 ("python-service-identity"
22068 ,python-service-identity)
22069 ("python-testrepository" ,python-testrepository)
22070 ("python-testscenarios" ,python-testscenarios)
22071 ("python-testtools" ,python-testtools)))
22072 (home-page "https://github.com/twisted/txacme")
22073 (synopsis "Twisted implexmentation of the ACME protocol")
22074 (description
22075 "ACME is Automatic Certificate Management Environment, a protocol that
22076 allows clients and certificate authorities to automate verification and
22077 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22078 Certificate Authority.
22079
22080 txacme is an implementation of the protocol for Twisted, the event-driven
22081 networking engine for Python.")
22082 (license license:expat)))
22083
22084 (define-public python-pysaml2
22085 (package
22086 (name "python-pysaml2")
22087 (version "5.0.0")
22088 (source
22089 (origin
22090 (method url-fetch)
22091 (uri (pypi-uri "pysaml2" version))
22092 (sha256
22093 (base32
22094 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22095 (build-system python-build-system)
22096 (propagated-inputs
22097 `(("python-cryptography" ,python-cryptography)
22098 ("python-dateutil" ,python-dateutil)
22099 ("python-defusedxml" ,python-defusedxml)
22100 ("python-pyopenssl" ,python-pyopenssl)
22101 ("python-pytz" ,python-pytz)
22102 ("python-requests" ,python-requests)
22103 ("python-six" ,python-six)))
22104 (home-page "https://idpy.org")
22105 (synopsis "Python implementation of SAML Version 2 Standard")
22106 (description
22107 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22108 It contains all necessary pieces for building a SAML2 service provider or
22109 an identity provider. The distribution contains examples of both.
22110
22111 This package was originally written to work in a WSGI environment, but
22112 there are extensions that allow you to use it with other frameworks.")
22113 (license license:asl2.0)))
22114
22115 (define-public python-click-plugins
22116 (package
22117 (name "python-click-plugins")
22118 (version "1.1.1")
22119 (source
22120 (origin
22121 (method url-fetch)
22122 (uri (pypi-uri "click-plugins" version))
22123 (sha256
22124 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22125 (build-system python-build-system)
22126 (native-inputs
22127 `(("python-pytest" ,python-pytest)))
22128 (propagated-inputs
22129 `(("python-click" ,python-click)))
22130 (synopsis "Extension for Click to register external CLI commands")
22131 (description "This package provides n extension module for Click to
22132 register external CLI commands via setuptools entry-points.")
22133 (home-page "https://github.com/click-contrib/click-plugins")
22134 (license license:bsd-3)))
22135
22136 (define-public python-diceware
22137 (package
22138 (name "python-diceware")
22139 (version "0.9.6")
22140 (source
22141 (origin
22142 (method url-fetch)
22143 (uri (pypi-uri "diceware" version))
22144 (sha256
22145 (base32
22146 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22147 (build-system python-build-system)
22148 (native-inputs
22149 `(("python-coverage" ,python-coverage)
22150 ("python-pytest" ,python-pytest)
22151 ("python-pytest-runner" ,python-pytest-runner)))
22152 (home-page "https://github.com/ulif/diceware/")
22153 (synopsis "Generates memorable passphrases")
22154 (description "This package generates passphrases by concatenating words
22155 randomly picked from wordlists. It supports several sources of
22156 randomness (including real life dice) and different wordlists (including
22157 cryptographically signed ones).")
22158 (license license:gpl3+)))
22159
22160 (define-public python-dictdiffer
22161 (package
22162 (name "python-dictdiffer")
22163 (version "0.8.1")
22164 (source (origin
22165 (method url-fetch)
22166 (uri (pypi-uri "dictdiffer" version))
22167 (sha256
22168 (base32
22169 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22170 (build-system python-build-system)
22171 (native-inputs
22172 `(("python-check-manifest" ,python-check-manifest)
22173 ("python-coverage" ,python-coverage)
22174 ("python-isort" ,python-isort)
22175 ("python-mock" ,python-mock)
22176 ("python-pydoctstyle" ,python-pydocstyle)
22177 ("python-pytest-cache" ,python-pytest-cache)
22178 ("python-pytest-cov" ,python-pytest-cov)
22179 ("python-pytest-pep8" ,python-pytest-pep8)
22180 ("python-pytest-runner" ,python-pytest-runner)
22181 ("python-pytest" ,python-pytest)
22182 ("python-setuptools-scm" ,python-setuptools-scm)
22183 ("python-tox" ,python-tox)))
22184 (home-page "https://github.com/inveniosoftware/dictdiffer")
22185 (synopsis "Diff and patch Python dictionary objects")
22186 (description
22187 "Dictdiffer is a Python module that helps you to diff and patch
22188 dictionaries.")
22189 (license license:expat)))
22190
22191 (define-public pyzo
22192 (package
22193 (name "pyzo")
22194 (version "4.11.2")
22195 (source
22196 (origin
22197 (method url-fetch)
22198 (uri (pypi-uri "pyzo" version))
22199 (sha256
22200 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22201 (build-system python-build-system)
22202 (arguments
22203 `(#:phases
22204 (modify-phases %standard-phases
22205 (add-before 'check 'fix-home-directory
22206 (lambda _
22207 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22208 (setenv "HOME" "/tmp")
22209 #t)))
22210 ;; Tests fail with "Uncaught Python exception: python: undefined
22211 ;; symbol: objc_getClass".
22212 #:tests? #f))
22213 (propagated-inputs
22214 `(("python-pyqt" ,python-pyqt)))
22215 (home-page "https://pyzo.org")
22216 (synopsis
22217 "Python IDE for scientific computing")
22218 (description
22219 "Pyzo is a Python IDE focused on interactivity and introspection,
22220 which makes it very suitable for scientific computing. Its practical
22221 design is aimed at simplicity and efficiency.
22222
22223 It consists of two main components, the editor and the shell, and uses
22224 a set of pluggable tools to help the programmer in various ways. Some
22225 example tools are source structure, project manager, interactive help,
22226 workspace...")
22227 (license license:bsd-2)))
22228
22229 (define-public python-osc
22230 (package
22231 (name "python-osc")
22232 (version "1.7.4")
22233 (source
22234 (origin
22235 (method url-fetch)
22236 (uri (pypi-uri "python-osc" version))
22237 (sha256
22238 (base32
22239 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22240 (build-system python-build-system)
22241 (home-page "https://github.com/attwad/python-osc")
22242 (synopsis "Open Sound Control server and client implementations")
22243 (description
22244 "@code{python-osc} is a pure Python library with no external
22245 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22246 Open Sound Control 1.0} specification.")
22247 (license license:unlicense)))
22248
22249 (define-public python-voluptuous
22250 (package
22251 (name "python-voluptuous")
22252 (version "0.11.7")
22253 (source
22254 (origin
22255 (method url-fetch)
22256 (uri (pypi-uri "voluptuous" version))
22257 (sha256
22258 (base32
22259 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22260 (build-system python-build-system)
22261 (native-inputs
22262 `(("python-nose" ,python-nose)))
22263 (home-page "https://github.com/alecthomas/voluptuous")
22264 (synopsis "Python data validation library")
22265 (description
22266 "Voluptuous is a Python data validation library. It is primarily
22267 intended for validating data coming into Python as JSON, YAML, etc.")
22268 (license license:bsd-3)))
22269
22270 (define-public python-cmd2
22271 (package
22272 (name "python-cmd2")
22273 (version "1.0.2")
22274 (source
22275 (origin
22276 (method url-fetch)
22277 (uri (pypi-uri "cmd2" version))
22278 (sha256
22279 (base32
22280 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22281 (build-system python-build-system)
22282 (propagated-inputs
22283 `(("python-attrs" ,python-attrs)
22284 ("python-colorama" ,python-colorama)
22285 ("python-pyperclip" ,python-pyperclip)
22286 ("python-wcwidth" ,python-wcwidth)))
22287 (native-inputs
22288 `(("python-codecov" ,python-codecov)
22289 ("python-coverage" ,python-coverage)
22290 ("python-doc8" ,python-doc8)
22291 ("python-flake8" ,python-flake8)
22292 ("python-invoke" ,python-invoke)
22293 ("python-mock" ,python-mock)
22294 ("python-pytest" ,python-pytest)
22295 ("python-pytest-cov" ,python-pytest-cov)
22296 ("python-pytest-mock" ,python-pytest-mock)
22297 ("python-setuptools-scm" ,python-setuptools-scm)
22298 ("python-sphinx" ,python-sphinx)
22299 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22300 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22301 ("python-tox" ,python-tox)
22302 ("python-twine" ,python-twine)
22303 ("which" ,which)))
22304 (home-page "https://github.com/python-cmd2/cmd2")
22305 (synopsis "Tool for building interactive command line applications")
22306 (description
22307 "Cmd2 is a tool for building interactive command line applications in
22308 Python. Its goal is to make it quick and easy for developers to build
22309 feature-rich and user-friendly interactive command line applications. It
22310 provides a simple API which is an extension of Python's built-in @code{cmd}
22311 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22312 make your life easier and eliminates much of the boilerplate code which would
22313 be necessary when using @code{cmd}.")
22314 (license license:expat)))
22315
22316 (define-public python-pytidylib
22317 (package
22318 (name "python-pytidylib")
22319 (version "0.3.2")
22320 (source (origin
22321 (method url-fetch)
22322 (uri (pypi-uri "pytidylib" version))
22323 (sha256
22324 (base32
22325 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22326 (build-system python-build-system)
22327 (arguments
22328 '(#:phases
22329 (modify-phases %standard-phases
22330 (add-before 'build 'qualify-libtidy
22331 (lambda* (#:key inputs #:allow-other-keys)
22332 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22333 "/lib/libtidy.so")))
22334 (substitute* "tidylib/tidy.py"
22335 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22336 (format #f "'~a'" libtidy)))
22337 #t))))))
22338 (inputs `(("tidy" ,tidy)))
22339 (home-page "https://github.com/countergram/pytidylib")
22340 (synopsis "Python wrapper for HTML Tidy library")
22341 (description
22342 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22343 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22344 (license license:expat)))
22345
22346 (define-public python2-pytidylib
22347 (package-with-python2 python-pytidylib))
22348
22349 (define-public python-mujson
22350 (package
22351 (name "python-mujson")
22352 (version "1.4")
22353 (source
22354 (origin
22355 (method url-fetch)
22356 (uri (pypi-uri "mujson" version))
22357 (sha256
22358 (base32
22359 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22360 (build-system python-build-system)
22361 (home-page "https://github.com/mattgiles/mujson")
22362 (synopsis "Use the fastest JSON functions available at import time")
22363 (description "This package selects the fastest JSON functions available
22364 at import time.")
22365 (license license:expat)))
22366
22367 (define-public python-bashlex
22368 (package
22369 (name "python-bashlex")
22370 (version "0.14")
22371 (source
22372 (origin
22373 (method url-fetch)
22374 (uri (pypi-uri "bashlex" version))
22375 (sha256
22376 (base32
22377 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22378 (build-system python-build-system)
22379 (arguments
22380 `(#:phases
22381 (modify-phases %standard-phases
22382 (add-before 'build 'pregenerate-yacc-tables
22383 (lambda _
22384 ;; parser.py caches tables, which attempts to write to site lib
22385 ;; see https://github.com/idank/bashlex/issues/51
22386 (invoke "python" "-c" "import bashlex"))))))
22387 (home-page
22388 "https://github.com/idank/bashlex")
22389 (synopsis "Python parser for bash")
22390 (description "@code{bashlex} is a Python port of the parser used
22391 internally by GNU bash.
22392
22393 For the most part it's transliterated from C, the major differences are:
22394
22395 @itemize
22396 @item it does not execute anything
22397 @item it is reentrant
22398 @item it generates a complete AST
22399 @end itemize
22400 ")
22401 (license license:gpl3+)))
22402
22403 (define-public python-jinxed
22404 (package
22405 (name "python-jinxed")
22406 (version "1.0.0")
22407 (source
22408 (origin
22409 (method url-fetch)
22410 (uri (pypi-uri "jinxed" version))
22411 (sha256
22412 (base32
22413 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22414 (build-system python-build-system)
22415 (arguments
22416 '(#:phases
22417 (modify-phases %standard-phases
22418 (add-before 'check 'set-environment-variables
22419 (lambda* (#:key inputs #:allow-other-keys)
22420 (let ((ncurses (assoc-ref inputs "ncurses")))
22421 (setenv "TERM" "LINUX")
22422 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22423 #t))))
22424 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22425 (native-inputs
22426 `(("ncurses" ,ncurses)))
22427 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22428 (synopsis "Jinxed Terminal Library")
22429 (description
22430 "Jinxed is an implementation of a subset of the Python curses library.")
22431 (license license:mpl2.0)))
22432
22433 (define-public python-blessed
22434 (package
22435 (name "python-blessed")
22436 (version "1.17.8")
22437 (source
22438 (origin
22439 (method url-fetch)
22440 (uri (pypi-uri "blessed" version))
22441 (sha256
22442 (base32
22443 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22444 (modules '((guix build utils)))
22445 (snippet
22446 '(begin
22447 ;; Don't get hung up on Windows test failures.
22448 (delete-file "blessed/win_terminal.py") #t))))
22449 (build-system python-build-system)
22450 (propagated-inputs
22451 `(("python-jinxed" ,python-jinxed)
22452 ("python-six" ,python-six)
22453 ("python-wcwidth" ,python-wcwidth)))
22454 (native-inputs
22455 `(("python-mock" ,python-mock)
22456 ("python-pytest" ,python-pytest)))
22457 (home-page "https://github.com/jquast/blessed")
22458 (synopsis "Wrapper around terminal capabilities")
22459 (description
22460 "Blessed is a thin, practical wrapper around terminal styling, screen
22461 positioning, and keyboard input.")
22462 (license license:expat)))
22463
22464 (define-public python-readme-renderer
22465 (package
22466 (name "python-readme-renderer")
22467 (version "26.0")
22468 (source
22469 (origin
22470 (method url-fetch)
22471 (uri (pypi-uri "readme_renderer" version))
22472 (sha256
22473 (base32
22474 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22475 (build-system python-build-system)
22476 (propagated-inputs
22477 `(("python-bleach" ,python-bleach)
22478 ("python-docutils" ,python-docutils)
22479 ("python-pygments" ,python-pygments)
22480 ("python-six" ,python-six)))
22481 (native-inputs
22482 `(("python-mock" ,python-mock)
22483 ("python-pytest" ,python-pytest)))
22484 (home-page "https://github.com/pypa/readme_renderer")
22485 (synopsis "Render README files in Warehouse")
22486 (description
22487 "Readme Renderer is a library that will safely render arbitrary README
22488 files into HTML. It is designed to be used in Warehouse to render the
22489 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22490 and plain text.")
22491 (license license:asl2.0)))
22492
22493 (define-public python-lazr-delegates
22494 (package
22495 (name "python-lazr-delegates")
22496 (version "2.0.4")
22497 (source
22498 (origin
22499 (method url-fetch)
22500 (uri (pypi-uri "lazr.delegates" version))
22501 (sha256
22502 (base32
22503 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22504 (build-system python-build-system)
22505 (arguments
22506 '(#:phases
22507 (modify-phases %standard-phases
22508 (replace 'check
22509 (lambda _
22510 (invoke "python" "setup.py" "nosetests"))))))
22511 (native-inputs
22512 `(("python-nose" ,python-nose)))
22513 (propagated-inputs
22514 `(("python-zope-interface" ,python-zope-interface)))
22515 (home-page "https://launchpad.net/lazr.delegates")
22516 (synopsis "Easily write objects that delegate behavior")
22517 (description
22518 "The @code{lazr.delegates} package makes it easy to write objects that
22519 delegate behavior to another object. The new object adds some property or
22520 behavior on to the other object, while still providing the underlying interface,
22521 and delegating behavior.")
22522 (license license:lgpl3)))
22523
22524 (define-public python-lazr-config
22525 (package
22526 (name "python-lazr-config")
22527 (version "2.2.2")
22528 (source
22529 (origin
22530 (method url-fetch)
22531 (uri (pypi-uri "lazr.config" version))
22532 (sha256
22533 (base32
22534 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22535 (build-system python-build-system)
22536 (arguments
22537 '(#:phases
22538 (modify-phases %standard-phases
22539 (replace 'check
22540 (lambda _
22541 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22542 (native-inputs
22543 `(("python-nose" ,python-nose)))
22544 (propagated-inputs
22545 `(("python-lazr-delegates" ,python-lazr-delegates)
22546 ("python-zope-interface" ,python-zope-interface)))
22547 (home-page "https://launchpad.net/lazr.config")
22548 (synopsis "Create configuration schemas and process and validate configurations")
22549 (description
22550 "The LAZR config system is typically used to manage process configuration.
22551 Process configuration is for saying how things change when we run systems on
22552 different machines, or under different circumstances. This system uses ini-like
22553 file format of section, keys, and values. The config file supports inheritance
22554 to minimize duplication of information across files. The format supports schema
22555 validation.")
22556 (license license:lgpl3)))
22557
22558 (define-public python-flufl-bounce
22559 (package
22560 (name "python-flufl-bounce")
22561 (version "3.0.1")
22562 (source
22563 (origin
22564 (method url-fetch)
22565 (uri (pypi-uri "flufl.bounce" version))
22566 (sha256
22567 (base32
22568 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22569 (build-system python-build-system)
22570 (propagated-inputs
22571 `(("python-atpublic" ,python-atpublic)
22572 ("python-zope-interface" ,python-zope-interface)))
22573 (native-inputs
22574 `(("python-nose2" ,python-nose2)))
22575 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22576 (synopsis "Email bounce detectors")
22577 (description "The @code{flufl.bounce} library provides a set of heuristics
22578 and an API for detecting the original bouncing email addresses from a bounce
22579 message. Many formats found in the wild are supported, as are VERP and
22580 RFC 3464.")
22581 (license (list license:asl2.0
22582 license:lgpl3)))) ; only for setup_headers.py
22583
22584 (define-public python-flufl-i18n
22585 (package
22586 (name "python-flufl-i18n")
22587 (version "3.0")
22588 (source
22589 (origin
22590 (method url-fetch)
22591 (uri (pypi-uri "flufl.i18n" version))
22592 (sha256
22593 (base32
22594 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22595 (build-system python-build-system)
22596 (propagated-inputs
22597 `(("python-atpublic" ,python-atpublic)))
22598 (home-page "https://flufli18n.readthedocs.io")
22599 (synopsis "API for Python internationalization")
22600 (description
22601 "This package provides a high-level, convenient API for managing
22602 internationalization/translation contexts in Python applications. There is a
22603 simple API for single-context applications, such as command line scripts which
22604 only need to translate into one language during the entire course of their
22605 execution. There is a more flexible, but still convenient API for multi-context
22606 applications, such as servers, which may need to switch language contexts for
22607 different tasks.")
22608 (license license:asl2.0)))
22609
22610 (define-public python-flufl-lock
22611 (package
22612 (name "python-flufl-lock")
22613 (version "4.0")
22614 (source
22615 (origin
22616 (method url-fetch)
22617 (uri (pypi-uri "flufl.lock" version))
22618 (sha256
22619 (base32
22620 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22621 (build-system python-build-system)
22622 (propagated-inputs
22623 `(("python-atpublic" ,python-atpublic)
22624 ("python-psutil" ,python-psutil)))
22625 (home-page "https://flufllock.readthedocs.io")
22626 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22627 (description
22628 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22629 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22630 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22631 and have a maximum lifetime built-in.")
22632 (license (list license:asl2.0
22633 license:lgpl3)))) ; only for setup_helpers.py
22634
22635 (define-public python-flufl-testing
22636 (package
22637 (name "python-flufl-testing")
22638 (version "0.8")
22639 (source
22640 (origin
22641 (method url-fetch)
22642 (uri (pypi-uri "flufl.testing" version))
22643 (sha256
22644 (base32
22645 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22646 (build-system python-build-system)
22647 (native-inputs
22648 `(("python-nose2" ,python-nose2)))
22649 (home-page "https://gitlab.com/warsaw/flufl.testing")
22650 (synopsis "Collection of test tool plugins")
22651 (description
22652 "This package contains a small collection of test tool plugins for
22653 @code{nose2} and @code{flake8}.")
22654 (license license:asl2.0)))
22655
22656 (define-public python-devtools
22657 (package
22658 (name "python-devtools")
22659 (version "0.6")
22660 (source
22661 (origin
22662 (method git-fetch)
22663 (uri (git-reference
22664 (url "https://github.com/samuelcolvin/python-devtools")
22665 (commit (string-append "v" version))))
22666 (file-name (git-file-name name version))
22667 (sha256
22668 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22669 (build-system python-build-system)
22670 (native-inputs
22671 `(("python-pytest" ,python-pytest)
22672 ("python-pytest-mock" ,python-pytest-mock)))
22673 (propagated-inputs
22674 `(("python-pygments" ,python-pygments)))
22675 (arguments
22676 `(#:phases (modify-phases %standard-phases
22677 (replace 'check
22678 (lambda _
22679 (invoke "pytest")
22680 #t)))))
22681 (home-page "https://github.com/samuelcolvin/python-devtools")
22682 (synopsis "Debug command and development tools")
22683 (description
22684 "This package provides a debug print command and other development tools.
22685 It adds a simple and readable way to print stuff during development.")
22686 (license license:expat)))
22687
22688 (define-public python-dateparser
22689 (package
22690 (name "python-dateparser")
22691 (version "0.7.6")
22692 (source
22693 (origin
22694 (method url-fetch)
22695 (uri (pypi-uri "dateparser" version))
22696 (sha256
22697 (base32
22698 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22699 (build-system python-build-system)
22700 (propagated-inputs
22701 `(("python-dateutil" ,python-dateutil)
22702 ("python-pytz" ,python-pytz)
22703 ("python-regex" ,python-regex)
22704 ("python-ruamel.yaml" ,python-ruamel.yaml)
22705 ("python-tzlocal" ,python-tzlocal)))
22706 (native-inputs
22707 `(("python-mock" ,python-mock)
22708 ("python-parameterized" ,python-parameterized)
22709 ("tzdata" ,tzdata-for-tests)))
22710 (arguments
22711 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22712 #:tests? #f
22713 #:phases
22714 (modify-phases %standard-phases
22715 (add-before 'check 'set-check-environment
22716 (lambda* (#:key inputs #:allow-other-keys)
22717 (setenv "TZ" "UTC")
22718 (setenv "TZDIR"
22719 (string-append (assoc-ref inputs "tzdata")
22720 "/share/zoneinfo"))
22721 #t)))))
22722 (home-page "https://github.com/scrapinghub/dateparser")
22723 (synopsis
22724 "Date parsing library designed to parse dates from HTML pages")
22725 (description
22726 "@code{python-dateparser} provides modules to easily parse localized
22727 dates in almost any string formats commonly found on web pages.")
22728 (license license:bsd-3)))
22729
22730 (define-public python-dparse
22731 (package
22732 (name "python-dparse")
22733 (version "0.5.1")
22734 (source
22735 (origin
22736 (method url-fetch)
22737 (uri (pypi-uri "dparse" version))
22738 (sha256
22739 (base32
22740 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22741 (build-system python-build-system)
22742 (native-inputs
22743 `(("python-pytest" ,python-pytest)))
22744 (propagated-inputs
22745 `(("python-packaging" ,python-packaging)
22746 ("python-pyyaml" ,python-pyyaml)
22747 ("python-toml" ,python-toml)))
22748 (home-page "https://github.com/pyupio/dparse")
22749 (synopsis "Parser for Python dependency files")
22750 (description "This package provides a parser for Python dependency files.")
22751 (license license:expat)))
22752
22753 (define-public python-dpath
22754 (package
22755 (name "python-dpath")
22756 (version "2.0.1")
22757 (source
22758 (origin
22759 (method url-fetch)
22760 (uri (pypi-uri "dpath" version))
22761 (sha256
22762 (base32
22763 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22764 (build-system python-build-system)
22765 (native-inputs
22766 `(("python-hypothesis" ,python-hypothesis)
22767 ("python-mock" ,python-mock)
22768 ("python-nose" ,python-nose)))
22769 (arguments
22770 '(#:phases
22771 (modify-phases %standard-phases
22772 (replace 'check
22773 (lambda* (#:key inputs outputs #:allow-other-keys)
22774 (add-installed-pythonpath inputs outputs)
22775 ;; This invokation is taken from tox.ini.
22776 (invoke "nosetests" "-d" "-v" "tests/"))))))
22777 (home-page "https://github.com/akesterson/dpath-python")
22778 (synopsis "Filesystem-like pathing and searching for dictionaries")
22779 (description
22780 "@code{python-dpath} is a library for accessing and searching
22781 dictionaries via /slashed/paths ala xpath.
22782
22783 Basically it lets you glob over a dictionary as if it were a filesystem. It
22784 allows you to specify globs (ala the bash eglob syntax, through some advanced
22785 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22786 facility for filtering those results.")
22787 (license license:expat)))
22788
22789 (define-public python-safety
22790 (package
22791 (name "python-safety")
22792 (version "1.9.0")
22793 (source
22794 (origin
22795 (method url-fetch)
22796 (uri (pypi-uri "safety" version))
22797 (sha256
22798 (base32
22799 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22800 (build-system python-build-system)
22801 (arguments
22802 `(#:phases
22803 (modify-phases %standard-phases
22804 (add-after 'unpack 'disable-tests
22805 (lambda _
22806 (substitute* "tests/test_safety.py"
22807 ;; requires network
22808 (("def test_check_live") "def _test_check_live"))
22809 #t)))))
22810 (propagated-inputs
22811 `(("python-click" ,python-click)
22812 ("python-dparse" ,python-dparse)
22813 ("python-packaging" ,python-packaging)
22814 ("python-requests" ,python-requests)))
22815 (home-page "https://github.com/pyupio/safety")
22816 (synopsis "Check installed dependencies for known vulnerabilities")
22817 (description "Safety checks installed dependencies for known vulnerabilities.
22818 By default it uses the open Python vulnerability database Safety DB.")
22819 (license license:expat)))
22820
22821 (define-public python-pypandoc
22822 (package
22823 (name "python-pypandoc")
22824 (version "1.5")
22825 (source
22826 (origin
22827 (method url-fetch)
22828 (uri (pypi-uri "pypandoc" version))
22829 (sha256
22830 (base32
22831 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22832 (build-system python-build-system)
22833 (inputs
22834 `(("pandoc" ,pandoc)
22835 ("pandoc-citeproc" ,pandoc-citeproc)))
22836 (propagated-inputs
22837 `(("wheel" ,python-wheel)))
22838 (native-inputs
22839 `(("texlive" ,(texlive-union (list texlive-amsfonts
22840 texlive-fonts-ec
22841 texlive-latex-hyperref
22842 texlive-latex-oberdiek
22843 texlive-lm
22844 texlive-xcolor)))))
22845 (arguments
22846 `(#:phases
22847 (modify-phases %standard-phases
22848 (add-before 'check 'disable-tests
22849 (lambda _
22850 ;; Disable test requiring network access
22851 (substitute* "tests.py"
22852 (("test_basic_conversion_from_http_url")
22853 "skip_test_basic_conversion_from_http_url"))
22854 ;; Needed by texlive-union to generate fonts
22855 (setenv "HOME" "/tmp")
22856 #t)))))
22857 (home-page "https://github.com/bebraw/pypandoc")
22858 (synopsis "Python wrapper for pandoc")
22859 (description "pypandoc is a thin Python wrapper around pandoc
22860 and pandoc-citeproc.")
22861 (license license:expat)))
22862
22863 (define-public python-rnc2rng
22864 (package
22865 (name "python-rnc2rng")
22866 (version "2.6.4")
22867 (source
22868 (origin
22869 (method url-fetch)
22870 (uri (pypi-uri "rnc2rng" version))
22871 (sha256
22872 (base32
22873 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22874 (build-system python-build-system)
22875 (propagated-inputs
22876 `(("python-rply" ,python-rply)))
22877 (arguments
22878 `(#:phases (modify-phases %standard-phases
22879 (replace 'check
22880 (lambda _
22881 (invoke "python" "test.py"))))))
22882 (home-page "https://github.com/djc/rnc2rng")
22883 (synopsis "Convert RELAX NG Compact to regular syntax")
22884 (description
22885 "This package provides the @command{rnc2rng} command-line tool as well as
22886 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22887 equivalent schemata in the XML-based default RELAX NG syntax.")
22888 (license license:expat)))
22889
22890 (define-public python-telethon
22891 (package
22892 (name "python-telethon")
22893 (version "1.17.5")
22894 (source
22895 (origin
22896 (method git-fetch)
22897 (uri (git-reference
22898 (url "https://github.com/LonamiWebs/Telethon")
22899 (commit (string-append "v" version))))
22900 (file-name (git-file-name name version))
22901 (sha256
22902 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22903 (build-system python-build-system)
22904 (arguments
22905 '(#:phases
22906 (modify-phases %standard-phases
22907 (replace 'check
22908 (lambda* (#:key tests? #:allow-other-keys)
22909 (when tests?
22910 (invoke "py.test" "-v"))
22911 #t)))))
22912 (propagated-inputs
22913 `(("python-rsa" ,python-rsa)
22914 ("python-pyaes" ,python-pyaes)))
22915 (native-inputs
22916 `(("python-pytest" ,python-pytest)
22917 ("python-pytest-asyncio" ,python-pytest-asyncio)
22918 ("python-pytest-trio" ,python-pytest-trio)))
22919 (home-page "https://docs.telethon.dev")
22920 (synopsis "Full-featured Telegram client library for Python 3")
22921 (description "This library is designed to make it easy to write Python
22922 programs that can interact with Telegram.")
22923 (license license:expat)))
22924
22925 (define-public python-citeproc-py
22926 (package
22927 (name "python-citeproc-py")
22928 (version "0.5.1")
22929 (source
22930 (origin
22931 (method url-fetch)
22932 (uri (pypi-uri "citeproc-py" version))
22933 (sha256
22934 (base32
22935 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22936 (build-system python-build-system)
22937 (propagated-inputs
22938 `(("python-lxml" ,python-lxml)
22939 ("python-rnc2rng" ,python-rnc2rng)))
22940 (home-page
22941 "https://github.com/brechtm/citeproc-py")
22942 (synopsis "Citations and bibliography formatter")
22943 (description
22944 "Citeproc-py is a CSL processor for Python. It aims to implement the
22945 CSL 1.0.1 specification. citeproc-py can output styled citations and
22946 bibliographies in a number of different output formats. Currently supported
22947 are plain text, reStructuredText and HTML.")
22948 (license license:bsd-2)))
22949
22950 (define-public python-inform
22951 (package
22952 (name "python-inform")
22953 (version "1.23.0")
22954 (source
22955 (origin
22956 (method url-fetch)
22957 (uri (pypi-uri "inform" version))
22958 (sha256
22959 (base32
22960 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22961 (build-system python-build-system)
22962 (arguments
22963 `(#:tests? #f)) ; PyPI tarball lacks tests
22964 (native-inputs
22965 `(("python-hypothesis" ,python-hypothesis)
22966 ("python-pytest-cov" ,python-pytest-cov)
22967 ("python-pytest-runner" ,python-pytest-runner)))
22968 (propagated-inputs
22969 `(("python-arrow" ,python-arrow)
22970 ("python-six" ,python-six)))
22971 (home-page "https://inform.readthedocs.io")
22972 (synopsis "Print & logging utilities for communicating with user")
22973 (description
22974 "Inform is designed to display messages from programs that are typically run from
22975 a console. It provides a collection of ‘print’ functions that allow you to simply and
22976 cleanly print different types of messages.")
22977 (license license:gpl3+)))
22978
22979 (define-public python-nestedtext
22980 (package
22981 (name "python-nestedtext")
22982 (version "1.0.0")
22983 (source
22984 (origin
22985 (method url-fetch)
22986 (uri (pypi-uri "nestedtext" version))
22987 (sha256
22988 (base32
22989 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22990 (build-system python-build-system)
22991 (arguments
22992 `(#:tests? #f)) ; PyPI tarball lacks tests
22993 (propagated-inputs
22994 `(("python-inform" ,python-inform)))
22995 (home-page "https://nestedtext.org")
22996 (synopsis "Human readable and writable data interchange format")
22997 (description
22998 "NestedText is a file format for holding data that is to be entered, edited, or
22999 viewed by people. It allows data to be organized into a nested collection of
23000 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23001 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23002 NestedText is both simple and natural. Only a small number of concepts and rules must
23003 be kept in mind when creating it. It is easily created, modified, or viewed with
23004 a text editor and easily understood and used by both programmers and non-programmers.")
23005 (license license:expat))) ; MIT license
23006
23007 (define-public python-parallel
23008 (package
23009 (name "python-parallel")
23010 (version "1.6.4.4")
23011 (source
23012 (origin
23013 (method url-fetch)
23014 (uri (string-append
23015 "https://www.parallelpython.com/downloads/pp/pp-"
23016 version ".zip"))
23017 (sha256
23018 (base32
23019 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23020 (native-inputs
23021 `(("unzip" ,unzip)))
23022 (build-system python-build-system)
23023 (arguments '(#:tests? #f)) ; No test suite.
23024 (home-page "https://www.parallelpython.com")
23025 (synopsis "Parallel and distributed programming for Python")
23026 (description "Parallel Python module (PP) provides an easy and efficient
23027 way to create parallel-enabled applications for SMP computers and clusters.
23028 PP module features cross-platform portability and dynamic load balancing.
23029 Thus applications written with PP will parallelize efficiently even on
23030 heterogeneous and multi-platform clusters (including clusters running other
23031 applications with variable CPU loads).")
23032 (license license:bsd-3)))
23033
23034 (define-public python2-parallel
23035 (package-with-python2 python-parallel))
23036
23037 (define-public python-djvulibre
23038 (package
23039 (name "python-djvulibre")
23040 (version "0.8.5")
23041 (source
23042 (origin
23043 (method url-fetch)
23044 (uri (pypi-uri "python-djvulibre" version))
23045 (sha256
23046 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23047 (build-system python-build-system)
23048 (native-inputs
23049 `(("ghostscript" ,ghostscript)
23050 ("pkg-config" ,pkg-config)
23051 ("python-nose" ,python-nose)))
23052 (inputs
23053 `(("djvulibre" ,djvulibre)
23054 ("python-cython" ,python-cython)))
23055 (arguments
23056 `(#:phases
23057 (modify-phases %standard-phases
23058 (add-after 'unpack 'fix-tests
23059 (lambda _
23060 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23061 ;; doesn't make sense on GNU/Linux.
23062 (delete-file "djvu/dllpath.py")
23063 #t)))))
23064 (synopsis "Python bindings for DjVuLibre")
23065 (description "This is a set of Python bindings for the DjVuLibre library.")
23066 (home-page "https://jwilk.net/software/python-djvulibre")
23067 (license license:gpl2)))
23068
23069 (define-public python2-djvulibre
23070 (package-with-python2 python-djvulibre))
23071
23072 (define-public python-versioneer
23073 (package
23074 (name "python-versioneer")
23075 (version "0.19")
23076 (source
23077 (origin
23078 (method url-fetch)
23079 (uri (pypi-uri "versioneer" version))
23080 (sha256
23081 (base32
23082 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23083 (build-system python-build-system)
23084 (home-page
23085 "https://github.com/python-versioneer/python-versioneer")
23086 (synopsis
23087 "Version-string management for VCS-controlled trees")
23088 (description
23089 "@code{versioneer} is a tool for managing a recorded version number in
23090 distutils-based python projects. The goal is to remove the tedious and
23091 error-prone \"update the embedded version string\" step from your release
23092 process.")
23093 (license license:public-domain)))