gnu: python2-graphql-relay: Remove package.
[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, 2020 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 wxwidgets)
188 #:use-module (gnu packages base)
189 #:use-module (gnu packages xml)
190 #:use-module (gnu packages xorg)
191 #:use-module (gnu packages xdisorg)
192 #:use-module (gnu packages tcl)
193 #:use-module (gnu packages bdw-gc)
194 #:use-module (gnu packages serialization)
195 #:use-module (guix packages)
196 #:use-module (guix download)
197 #:use-module (guix git-download)
198 #:use-module (guix hg-download)
199 #:use-module (guix utils)
200 #:use-module (guix build-system gnu)
201 #:use-module (guix build-system cmake)
202 #:use-module (guix build-system python)
203 #:use-module (guix build-system trivial)
204 #:use-module (srfi srfi-1)
205 #:use-module (srfi srfi-26))
206
207 (define-public python-slixmpp
208 (package
209 (name "python-slixmpp")
210 (version "1.5.2")
211 (source
212 (origin
213 (method git-fetch)
214 (uri
215 (git-reference
216 (url "https://lab.louiz.org/poezio/slixmpp.git")
217 (commit
218 (string-append "slix-" version))))
219 (file-name
220 (git-file-name name version))
221 (sha256
222 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
223 (build-system python-build-system)
224 (arguments
225 `(#:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch
228 (lambda _
229 (substitute* "setup.py"
230 (("'CC', 'cc'")
231 "'CC', 'gcc'"))
232 #t)))))
233 (native-inputs
234 `(("cython" ,python-cython)
235 ("gnupg" ,gnupg)
236 ("pkg-config" ,pkg-config)))
237 (propagated-inputs
238 `(("python-aiodns" ,python-aiodns)
239 ("python-aiohttp" ,python-aiohttp)
240 ("python-pyasn1" ,python-pyasn1)
241 ("python-pyasn1-modules" ,python-pyasn1-modules)))
242 (inputs
243 `(("libidn" ,libidn)
244 ("python" ,python))) ; We are building a Python extension.
245 (synopsis "XMPP library without threads")
246 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
247 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
248 socket handling, the timers, the events dispatching) in order to remove all
249 threads.")
250 (home-page "https://lab.louiz.org/poezio/slixmpp")
251 (license license:expat)))
252
253 (define-public python-tenacity
254 (package
255 (name "python-tenacity")
256 (version "6.1.0")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "tenacity" version))
260 (sha256
261 (base32
262 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("python-setuptools-scm" ,python-setuptools-scm)
266 ("python-sphinx" ,python-sphinx)
267 ("python-tornado" ,python-tornado)
268 ("python-pytest" ,python-pytest)))
269 (propagated-inputs
270 `(("python-six" ,python-six)))
271 (arguments
272 `(#:phases (modify-phases %standard-phases
273 (replace 'check
274 (lambda _
275 (invoke "pytest")
276 #t)))))
277 (home-page "https://github.com/jd/tenacity")
278 (synopsis "Retrying library for python")
279 (description "Tenacity is a general-purpose python library to simplify the
280 task of adding retry behavior to just about anything.")
281 (license license:asl2.0)))
282
283 (define-public python-pytelegrambotapi
284 (package
285 (name "python-pytelegrambotapi")
286 (version "3.7.4")
287 (source
288 (origin
289 (method git-fetch)
290 (uri (git-reference
291 (url "https://github.com/eternnoir/pyTelegramBotAPI")
292 (commit version)))
293 (file-name (git-file-name name version))
294 (sha256
295 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
296 (build-system python-build-system)
297 (arguments
298 `(#:phases
299 (modify-phases %standard-phases
300 (replace 'check
301 (lambda* (#:key tests? #:allow-other-keys)
302 (when tests?
303 (with-directory-excursion "tests"
304 (invoke "py.test")))
305 #t)))))
306 (propagated-inputs
307 `(("python-requests" ,python-requests)))
308 (native-inputs
309 `(("python-pytest" ,python-pytest)))
310 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
311 (synopsis "Python Telegram bot api")
312 (description "This package provides a simple, but extensible Python
313 implementation for the Telegram Bot API.")
314 (license license:gpl2)))
315
316 (define-public python-colorlog
317 (package
318 (name "python-colorlog")
319 (version "4.1.0")
320 (source (origin
321 (method url-fetch)
322 (uri (pypi-uri "colorlog" version))
323 (sha256
324 (base32
325 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
326 (build-system python-build-system)
327 (native-inputs
328 `(("python-pytest" ,python-pytest)))
329 (arguments
330 `(#:phases (modify-phases %standard-phases
331 (replace 'check
332 (lambda _
333 ;; Extend PYTHONPATH so the built package will be found.
334 (setenv "PYTHONPATH"
335 (string-append (getcwd) "/build/lib:"
336 (getenv "PYTHONPATH")))
337 (invoke "pytest" "-p" "no:logging")
338 #t)))))
339 (home-page "https://github.com/borntyping/python-colorlog")
340 (synopsis "Log formatting with colors for python")
341 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
342 with Python's logging module that outputs records using terminal colors.")
343 (license license:expat)))
344
345 (define-public python-pyprind
346 (package
347 (name "python-pyprind")
348 (version "2.11.2")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "PyPrind" version))
352 (sha256
353 (base32
354 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-psutil" ,python-psutil)))
358 (home-page "https://github.com/rasbt/pyprind")
359 (synopsis "Python Progress Bar and Percent Indicator Utility")
360 (description "The PyPrind (Python Progress Indicator) module provides a
361 progress bar and a percentage indicator object that let you track the progress
362 of a loop structure or other iterative computation.")
363 (license license:bsd-3)))
364
365 (define-public python-gphoto2
366 (package
367 (name "python-gphoto2")
368 (version "2.2.1")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "gphoto2" version))
372 (sha256
373 (base32
374 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
375 (build-system python-build-system)
376 (native-inputs
377 `(("pkg-config" ,pkg-config)))
378 (inputs
379 `(("libgphoto2" ,libgphoto2)))
380 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
381 (synopsis "Python interface to libgphoto2")
382 (description "@code{python-gphoto2} is a comprehensive Python interface
383 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
384 automatically generate the interface code.")
385 (license license:gpl3+)))
386
387 (define-public python-colour
388 (package
389 (name "python-colour")
390 (version "0.1.5")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "colour" version))
394 (sha256
395 (base32
396 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-d2to1" ,python-d2to1)))
400 (home-page "https://github.com/vaab/colour")
401 (synopsis "Convert and manipulate various color representations")
402 (description "Pythonic way to manipulate color representations (HSL, RVB,
403 web, X11, ...).")
404 (license license:expat)))
405
406 (define-public python-d2to1
407 (package
408 (name "python-d2to1")
409 (version "0.2.12.post1")
410 (source (origin
411 (method url-fetch)
412 (uri (pypi-uri "d2to1" version))
413 (sha256
414 (base32
415 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
416 (build-system python-build-system)
417 (native-inputs
418 `(("python-nose" ,python-nose)))
419 (home-page "https://github.com/embray/d2to1")
420 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
421 in python")
422 (description "The python package d2to1 (the d is for distutils) allows
423 using distutils2-like setup.cfg files for a package's metadata with a
424 distribute/setuptools setup.py script.")
425 (license license:bsd-2)))
426
427 (define-public python-rawkit
428 (package
429 (name "python-rawkit")
430 (version "0.6.0")
431 (source (origin
432 (method url-fetch)
433 (uri (pypi-uri "rawkit" version))
434 (sha256
435 (base32
436 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
437 (build-system python-build-system)
438 (native-inputs
439 `(("python-pytest" ,python-pytest)
440 ("python-mock" ,python-mock)))
441 (inputs
442 `(("libraw" ,libraw)))
443 (home-page "https://rawkit.readthedocs.io")
444 (synopsis "Ctypes-based LibRaw binding for Python")
445 (description "The rawkit package provides two modules: rawkit and libraw.
446 The rawkit module provides a high-level Pythonic interface for developing raw
447 photos, while the libraw module provides a CTypes based interface for
448 interacting with the low-level LibRaw C APIs.")
449 (license license:expat)))
450
451 (define-public python-easygui
452 (package
453 (name "python-easygui")
454 (version "0.98.1")
455 (source (origin
456 (method url-fetch)
457 (uri (pypi-uri "easygui" version))
458 (sha256
459 (base32
460 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
461 (build-system python-build-system)
462 (propagated-inputs
463 `(("python-tkinter" ,python "tk")))
464 (home-page "https://github.com/robertlugg/easygui")
465 (synopsis "GUI programming module for Python")
466 (description "EasyGUI is a module for very simple, very easy GUI
467 programming in Python. EasyGUI is different from other GUI generators in that
468 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
469 simple function calls.")
470 (license license:bsd-3)))
471
472 (define-public python-pymediainfo
473 (package
474 (name "python-pymediainfo")
475 (version "4.1")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "pymediainfo" version))
480 (sha256
481 (base32
482 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
483 (build-system python-build-system)
484 (native-inputs
485 `(("python-setuptools-scm" ,python-setuptools-scm)
486 ("python-pytest" ,python-pytest)))
487 (inputs
488 `(("libmediainfo" ,libmediainfo)))
489 (arguments
490 `(#:phases
491 (modify-phases %standard-phases
492 (add-after 'unpack 'patch-libmediainfo
493 (lambda _
494 (substitute* "pymediainfo/__init__.py"
495 (("libmediainfo.so.0")
496 (string-append (assoc-ref %build-inputs "libmediainfo")
497 "/lib/libmediainfo.so.0")))
498 #t))
499 (replace 'check
500 (lambda _
501 ;; Extend PYTHONPATH so the built package will be found.
502 (setenv "PYTHONPATH"
503 (string-append (getcwd) "/build/lib:"
504 (getenv "PYTHONPATH")))
505 ;; Skip the only failing test "test_parse_url"
506 (invoke "pytest" "-vv" "-k" "not test_parse_url")
507 #t)))))
508 (home-page
509 "https://github.com/sbraz/pymediainfo")
510 (synopsis
511 "Python wrapper for the mediainfo library")
512 (description
513 "Python wrapper for the mediainfo library to access the technical and tag
514 data for video and audio files.")
515 (license license:expat)))
516
517 (define-public python-psutil
518 (package
519 (name "python-psutil")
520 (version "5.7.2")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "psutil" version))
525 (sha256
526 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
527 (build-system python-build-system)
528 (arguments
529 ;; FIXME: some tests do not return and time out. Some tests fail because
530 ;; some processes survive kill().
531 '(#:tests? #f))
532 (home-page "https://www.github.com/giampaolo/psutil")
533 (synopsis "Library for retrieving information on running processes")
534 (description
535 "psutil (Python system and process utilities) is a library for retrieving
536 information on running processes and system utilization (CPU, memory, disks,
537 network) in Python. It is useful mainly for system monitoring, profiling and
538 limiting process resources and management of running processes. It implements
539 many functionalities offered by command line tools such as: ps, top, lsof,
540 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
541 pidof, tty, taskset, pmap.")
542 (properties `((python2-variant . ,(delay python2-psutil))))
543 (license license:bsd-3)))
544
545 (define-public python2-psutil
546 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
547 (package
548 (inherit base)
549 (propagated-inputs
550 `(("python2-enum34" ,python2-enum34) ;optional
551 ,@(package-propagated-inputs base))))))
552
553 (define-public python-shapely
554 (package
555 (name "python-shapely")
556 (version "1.7.1")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "Shapely" version))
561 (sha256
562 (base32
563 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
564 (modules '((guix build utils)))
565 (snippet
566 '(begin
567 (delete-file "shapely/speedups/_speedups.c")
568 (delete-file "shapely/vectorized/_vectorized.c")
569 #t))))
570 (build-system python-build-system)
571 (native-inputs
572 `(("python-cython" ,python-cython)
573 ("python-matplotlib" ,python-matplotlib)
574 ("python-pytest" ,python-pytest)
575 ("python-pytest-cov" ,python-pytest-cov)))
576 (inputs
577 `(("geos" ,geos)))
578 (propagated-inputs
579 `(("python-numpy" ,python-numpy)))
580 (arguments
581 `(#:phases
582 (modify-phases %standard-phases
583 (add-after 'unpack 'patch-geos-path
584 (lambda* (#:key inputs #:allow-other-keys)
585 (let ((geos (assoc-ref inputs "geos"))
586 (glibc (assoc-ref inputs ,(if (%current-target-system)
587 "cross-libc" "libc"))))
588 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
589 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
590 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
591 geos "/lib/libgeos_c.so'])"))
592 (("free = load_dll\\('c'\\)\\.free")
593 (string-append "free = load_dll('c', fallbacks=['"
594 glibc "/lib/libc.so.6']).free"))
595 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
596 (string-append "free = load_dll('c', fallbacks=['"
597 glibc "/lib/libc.so.6']).free"))))
598 #t)))))
599 (home-page "https://github.com/Toblerity/Shapely")
600 (synopsis "Library for the manipulation and analysis of geometric objects")
601 (description "Shapely is a Python package for manipulation and analysis of
602 planar geometric objects. It is based on the @code{GEOS} library.")
603 (license license:bsd-3)))
604
605 (define-public python-shortuuid
606 (package
607 (name "python-shortuuid")
608 (version "0.5.0")
609 (source
610 (origin
611 (method url-fetch)
612 (uri (pypi-uri "shortuuid" version))
613 (sha256
614 (base32
615 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
616 (build-system python-build-system)
617 (native-inputs
618 `(("python-pep8" ,python-pep8)))
619 (home-page "https://github.com/skorokithakis/shortuuid")
620 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
621 (description
622 "@code{shortuuid} is a Python library for generating concise, unambiguous
623 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
624 module and then similar looking characters are removed.")
625 (license license:bsd-3)))
626
627 (define-public python-logwrap
628 (package
629 (name "python-logwrap")
630 (version "3.2.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "logwrap" version ".zip"))
635 (sha256
636 (base32
637 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
638 (build-system python-build-system)
639 (propagated-inputs
640 `(("python-six" ,python-six)
641 ("python-typing" ,python-typing)))
642 (native-inputs
643 `(("unzip" ,unzip)
644 ("python-cython" ,python-cython)
645 ("python-pytest" ,python-pytest)
646 ("python-pytest-cov" ,python-pytest-cov)
647 ("python-pytest-runner" ,python-pytest-runner)))
648 (home-page "https://github.com/penguinolog/logwrap")
649 (synopsis "Decorator for logging function arguments")
650 (description "This package provides a decorator to log function arguments
651 and function call return values in a human-readable way.")
652 (license license:asl2.0)))
653
654 (define-public python2-shapely
655 (package-with-python2 python-shapely))
656
657 (define-public python-clyent
658 (package
659 (name "python-clyent")
660 (version "1.2.1")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (pypi-uri "clyent" version))
665 (sha256
666 (base32
667 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
668 (build-system python-build-system)
669 (native-inputs
670 `(("python-mock" ,python-mock)))
671 (home-page "https://github.com/Anaconda-Platform/clyent")
672 (synopsis "Command line client library")
673 (description "Clyent is a Python command line utility library. It is used
674 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
675 (license license:bsd-3)))
676
677 (define-public python2-clyent
678 (package-with-python2 python-clyent))
679
680 (define-public python-babel
681 (package
682 (name "python-babel")
683 (version "2.8.0")
684 (source
685 (origin
686 (method url-fetch)
687 (uri (pypi-uri "Babel" version))
688 (sha256
689 (base32
690 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
691 (build-system python-build-system)
692 (native-inputs
693 `(("python-freezegun" ,python-freezegun)
694 ("python-pytest" ,python-pytest)))
695 (propagated-inputs
696 `(("python-pytz" ,python-pytz)))
697 (arguments
698 `(#:phases (modify-phases %standard-phases
699 (replace 'check
700 (lambda _
701 (invoke "pytest" "-vv" "-k"
702 (string-append
703 ;; XXX: These tests fail when using Pytest 4.x and
704 ;; Babel 2.6.0. Try removing this for later versions.
705 "not test_no_inherit_metazone_marker_never_in_output"
706 " and not test_smoke_dates"
707 " and not test_smoke_numbers")))))))
708 (home-page "http://babel.pocoo.org/")
709 (synopsis
710 "Tools for internationalizing Python applications")
711 (description
712 "Babel is composed of two major parts:
713 - tools to build and work with gettext message catalogs
714 - a Python interface to the CLDR (Common Locale Data Repository), providing
715 access to various locale display names, localized number and date formatting,
716 etc. ")
717 (license license:bsd-3)))
718
719 (define-public python2-babel
720 (package-with-python2 python-babel))
721
722 (define-public python2-backport-ssl-match-hostname
723 (package
724 (name "python2-backport-ssl-match-hostname")
725 (version "3.5.0.1")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "backports.ssl_match_hostname" version))
730 (sha256
731 (base32
732 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
733 (build-system python-build-system)
734 (arguments
735 `(#:python ,python-2
736 #:tests? #f)) ; no test target
737 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
738 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
739 (description
740 "This backport brings the ssl.match_hostname() function to users of
741 earlier versions of Python. The function checks the hostname in the
742 certificate returned by the server to which a connection has been established,
743 and verifies that it matches the intended target hostname.")
744 (license license:psfl)))
745
746 (define-public python-bitarray
747 (package
748 (name "python-bitarray")
749 (version "1.4.0")
750 (source (origin
751 (method url-fetch)
752 (uri (pypi-uri "bitarray" version))
753 (sha256
754 (base32
755 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
756 (build-system python-build-system)
757 (home-page "https://github.com/ilanschnell/bitarray")
758 (synopsis "Efficient arrays of booleans")
759 (description "This package provides an object type which efficiently
760 represents an array of booleans. Bitarrays are sequence types and behave very
761 much like usual lists. Eight bits are represented by one byte in a contiguous
762 block of memory. The user can select between two representations:
763 little-endian and big-endian. All of the functionality is implemented in C.
764 Methods for accessing the machine representation are provided. This can be
765 useful when bit level access to binary files is required, such as portable
766 bitmap image files. Also, when dealing with compressed data which uses
767 variable bit length encoding, you may find this module useful.")
768 (license license:psfl)))
769
770 (define-public python-boolean.py
771 (package
772 (name "python-boolean.py")
773 (version "3.6")
774 (source
775 (origin
776 ;; There's no source tarball on PyPI.
777 (method git-fetch)
778 (uri (git-reference
779 (url "https://github.com/bastikr/boolean.py")
780 (commit (string-append "v" version))))
781 (file-name (git-file-name name version))
782 (sha256
783 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
784 (build-system python-build-system)
785 (home-page "https://github.com/bastikr/boolean.py")
786 (synopsis "Boolean algebra in one Python module")
787 (description
788 "This is a small Python library that implements boolean algebra.
789 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
790 @code{Symbol} class that can take on one of these two values. Calculations
791 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
792 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
793 Expressions are constructed from parsed strings or directly in Python.")
794 (license license:bsd-2)))
795
796 (define-public python-hdf4
797 (package
798 (name "python-hdf4")
799 (version "0.9")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri name version))
804 (sha256
805 (base32
806 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
807 (build-system python-build-system)
808 (native-inputs `(("nose" ,python-nose)))
809 (propagated-inputs `(("numpy" ,python-numpy)))
810 (inputs
811 `(("hdf4" ,hdf4)
812 ("libjpeg" ,libjpeg-turbo)
813 ("zlib" ,zlib)))
814 (arguments
815 `(#:phases
816 (modify-phases %standard-phases
817 (replace 'check
818 (lambda _
819 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
820 ;; on to import numpy. Somehow this works on their CI system.
821 ;; Let's just manage PYTHONPATH here instead.
822 (substitute* "runexamples.sh"
823 (("export PYTHONPATH=.*") ""))
824 (setenv "PYTHONPATH"
825 (string-append (getcwd) ":"
826 (getenv "PYTHONPATH")))
827 (invoke "./runexamples.sh")
828 (invoke "nosetests" "-v"))))))
829 (home-page "https://github.com/fhs/python-hdf4")
830 (synopsis "Python interface to the NCSA HDF4 library")
831 (description
832 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
833 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
834 NetCDF files can also be read and modified. Python-HDF4 is a fork of
835 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
836 (license license:expat)))
837
838 (define-public python2-hdf4
839 (package-with-python2 python-hdf4))
840
841 (define-public python-h5py
842 (package
843 (name "python-h5py")
844 (version "2.10.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "h5py" version))
849 (sha256
850 (base32
851 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
852 (build-system python-build-system)
853 (arguments
854 `(#:tests? #f ; no test target
855 #:phases
856 (modify-phases %standard-phases
857 (add-after 'unpack 'fix-hdf5-paths
858 (lambda* (#:key inputs #:allow-other-keys)
859 (let ((prefix (assoc-ref inputs "hdf5")))
860 (substitute* "setup_build.py"
861 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
862 (string-append "['" prefix "/lib" "']"))
863 (("'/opt/local/include', '/usr/local/include'")
864 (string-append "'" prefix "/include" "'")))
865 (substitute* "setup_configure.py"
866 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
867 (string-append "['" prefix "/lib" "']")))
868 #t))))))
869 (propagated-inputs
870 `(("python-six" ,python-six)
871 ("python-numpy" ,python-numpy)))
872 (inputs
873 `(("hdf5" ,hdf5-1.10)))
874 (native-inputs
875 `(("python-cython" ,python-cython)
876 ("python-pkgconfig" ,python-pkgconfig)
877 ("pkg-config" ,pkg-config)))
878 (home-page "https://www.h5py.org/")
879 (synopsis "Read and write HDF5 files from Python")
880 (description
881 "The h5py package provides both a high- and low-level interface to the
882 HDF5 library from Python. The low-level interface is intended to be a
883 complete wrapping of the HDF5 API, while the high-level component supports
884 access to HDF5 files, datasets and groups using established Python and NumPy
885 concepts.")
886 (license license:bsd-3)))
887
888 (define-public python2-h5py
889 (package-with-python2 python-h5py))
890
891 (define-public python-sh
892 (package
893 (name "python-sh")
894 (version "1.12.14")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (pypi-uri "sh" version))
899 (sha256
900 (base32
901 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
902 (build-system python-build-system)
903 (arguments
904 '(#:phases
905 (modify-phases %standard-phases
906 (replace 'check
907 (lambda _
908 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
909 (setenv "HOME" "/tmp")
910 (invoke "python" "sh.py" "test"))))))
911 (native-inputs
912 `(("python-coverage" ,python-coverage)))
913 (home-page "https://github.com/amoffat/sh")
914 (synopsis "Python subprocess replacement")
915 (description "This package provides a replacement for Python's
916 @code{subprocess} feature.")
917 (license license:expat)))
918
919 (define-public python2-sh
920 (package-with-python2 python-sh))
921
922 (define-public python-cftime
923 (package
924 (name "python-cftime")
925 (version "1.0.4.2")
926 (source
927 (origin
928 (method url-fetch)
929 (uri (pypi-uri "cftime" version))
930 (sha256
931 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
932 (build-system python-build-system)
933 (propagated-inputs
934 `(("python-numpy" ,python-numpy)))
935 (native-inputs
936 `(("python-coveralls" ,python-coveralls)
937 ("python-cython" ,python-cython)
938 ("python-pytest-cov" ,python-pytest-cov)))
939 (home-page "https://github.com/Unidata/cftime")
940 (synopsis "Library for time handling")
941 (description
942 "This package provides time-handling functionality that used to be part
943 of the netcdf4 package before.")
944 ;; This package claims to include code under the GPLv3 but is released
945 ;; under ISC.
946 (license (list license:isc license:gpl3+))))
947
948 (define-public python-netcdf4
949 (package
950 (name "python-netcdf4")
951 (version "1.5.3")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (pypi-uri "netCDF4" version))
956 (sha256
957 (base32
958 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
959 (build-system python-build-system)
960 (arguments
961 '(#:phases
962 (modify-phases %standard-phases
963 (add-after 'unpack 'configure-locations
964 (lambda* (#:key inputs #:allow-other-keys)
965 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
966 #t)))))
967 (native-inputs
968 `(("python-cython" ,python-cython)))
969 (propagated-inputs
970 `(("python-numpy" ,python-numpy)
971 ("python-cftime" ,python-cftime)))
972 (inputs
973 `(("netcdf" ,netcdf)
974 ("hdf4" ,hdf4)
975 ("hdf5" ,hdf5)))
976 (home-page "https://github.com/Unidata/netcdf4-python")
977 (synopsis "Python/numpy interface to the netCDF library")
978 (description "Netcdf4-python is a Python interface to the netCDF C
979 library. netCDF version 4 has many features not found in earlier
980 versions of the library and is implemented on top of HDF5. This module
981 can read and write files in both the new netCDF 4 and the old netCDF 3
982 format, and can create files that are readable by HDF5 clients. The
983 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
984 to users of that module.")
985 ;; The software is mainly ISC, but includes some files covered
986 ;; by the Expat license.
987 (license (list license:isc license:expat))))
988
989 (define-public python-license-expression
990 (package
991 (name "python-license-expression")
992 (version "1.2")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "license-expression" version))
997 (sha256
998 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
999 (build-system python-build-system)
1000 (propagated-inputs
1001 `(("python-boolean.py" ,python-boolean.py)))
1002 (home-page "https://github.com/nexB/license-expression")
1003 (synopsis "Apply boolean logic to license expressions")
1004 (description
1005 "This Python module defines a tiny language to evaluate and compare
1006 license expressions using boolean logic. Logical combinations of licenses can
1007 be tested for equality, containment, and equivalence. They can be normalised
1008 and simplified. It supports SPDX license expressions as well as other naming
1009 conventions and aliases in the same expression.")
1010 (license license:gpl2+)))
1011
1012 (define-public python-lockfile
1013 (package
1014 (name "python-lockfile")
1015 (version "0.12.2")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "lockfile" version))
1020 (sha256
1021 (base32
1022 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1023 (build-system python-build-system)
1024 (arguments '(#:test-target "check"))
1025 (native-inputs
1026 `(("python-pbr" ,python-pbr)))
1027 (home-page "https://launchpad.net/pylockfile")
1028 (synopsis "Platform-independent file locking module")
1029 (description
1030 "The lockfile package exports a LockFile class which provides a simple
1031 API for locking files.")
1032 (license license:expat)))
1033
1034 (define-public python2-lockfile
1035 (package-with-python2 python-lockfile))
1036
1037 (define-public python-filelock
1038 (package
1039 (name "python-filelock")
1040 (version "3.0.12")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "filelock" version))
1045 (sha256
1046 (base32
1047 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1048 (build-system python-build-system)
1049 (home-page
1050 "https://github.com/benediktschmitt/py-filelock")
1051 (synopsis "Platform independent file lock")
1052 (description "@code{filelock} contains a single module implementing
1053 a platform independent file lock in Python, which provides a simple way of
1054 inter-process communication.")
1055 (license license:unlicense)))
1056
1057 (define-public python-semantic-version
1058 (package
1059 (name "python-semantic-version")
1060 (version "2.6.0")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "semantic_version" version))
1065 (sha256
1066 (base32
1067 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1068 (build-system python-build-system)
1069 (arguments
1070 `(#:tests? #f)) ; PyPI tarball lacks tests
1071 (home-page "https://github.com/rbarrois/python-semanticversion")
1072 (synopsis "Semantic versioning module for Python")
1073 (description
1074 "The @code{semantic_version} class is a small library for handling
1075 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1076
1077 It can compare versions, generate a new version that represents a bump in one of
1078 the version levels, and check whether any given string is a proper semantic
1079 version identifier.")
1080 (license license:bsd-3)))
1081
1082 (define-public python2-semantic-version
1083 (package-with-python2 python-semantic-version))
1084
1085 (define-public python-serpent
1086 (package
1087 (name "python-serpent")
1088 (version "1.28")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (pypi-uri "serpent" version))
1093 (sha256
1094 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1095 (build-system python-build-system)
1096 (native-inputs
1097 `(("python-attrs" ,python-attrs)
1098 ("python-pytz" ,python-pytz)))
1099 (home-page "https://github.com/irmen/Serpent")
1100 (synopsis "Serializer for literal Python expressions")
1101 (description
1102 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1103 serialization. It serializes an object tree into bytes (an utf-8 encoded
1104 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1105 to rebuild the original object tree.
1106
1107 Because only safe literals are encoded, it is safe to send serpent data to
1108 other machines, such as over the network.")
1109 (properties `((python2-variant . ,(delay python2-serpent))))
1110 (license license:expat)))
1111
1112 (define-public python2-serpent
1113 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1114 (package
1115 (inherit base)
1116 (propagated-inputs
1117 `(("python-enum34" ,python2-enum34)
1118 ,@(package-propagated-inputs base))))))
1119
1120 (define-public python-setuptools
1121 (package
1122 (name "python-setuptools")
1123 (version "41.0.1")
1124 (source
1125 (origin
1126 (method url-fetch)
1127 (uri (pypi-uri "setuptools" version ".zip"))
1128 (sha256
1129 (base32
1130 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1131 (modules '((guix build utils)))
1132 (snippet
1133 '(begin
1134 ;; Remove included binaries which are used to build self-extracting
1135 ;; installers for Windows.
1136 ;; TODO: Find some way to build them ourself so we can include them.
1137 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1138 #t))))
1139 (build-system python-build-system)
1140 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1141 ;; One could bootstrap with an internal untested setuptools.
1142 (arguments
1143 `(#:tests? #f))
1144 (home-page "https://pypi.org/project/setuptools/")
1145 (synopsis
1146 "Library designed to facilitate packaging Python projects")
1147 (description
1148 "Setuptools is a fully-featured, stable library designed to facilitate
1149 packaging Python projects, where packaging includes:
1150 Python package and module definitions,
1151 distribution package metadata,
1152 test hooks,
1153 project installation,
1154 platform-specific details,
1155 Python 3 support.")
1156 ;; TODO: setuptools now bundles the following libraries:
1157 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1158 (license (list license:psfl ; setuptools itself
1159 license:expat ; six, appdirs, pyparsing
1160 license:asl2.0 ; packaging is dual ASL2/BSD-2
1161 license:bsd-2))))
1162
1163 (define-public python2-setuptools
1164 (package-with-python2 python-setuptools))
1165
1166 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1167 (define-public python-setuptools-for-tensorflow
1168 (hidden-package
1169 (package
1170 (inherit python-setuptools)
1171 (version "39.1.0")
1172 (source (origin
1173 (inherit (package-source python-setuptools))
1174 (uri (pypi-uri "setuptools" version ".zip"))
1175 (sha256
1176 (base32
1177 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1178
1179 (define-public python-uniseg
1180 (package
1181 (name "python-uniseg")
1182 (version "0.7.1")
1183 (source
1184 (origin
1185 (method url-fetch)
1186 (uri (pypi-uri "uniseg" version ".zip"))
1187 (sha256
1188 (base32
1189 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1190 (build-system python-build-system)
1191 (arguments
1192 '(#:tests? #f)) ; The test suite requires network access.
1193 (native-inputs
1194 `(("unzip" ,unzip)))
1195 (home-page
1196 "https://bitbucket.org/emptypage/uniseg-python")
1197 (synopsis
1198 "Python library to determine Unicode text segmentations")
1199 (description
1200 "Uniseg is a Python package used to determine Unicode text segmentations.
1201 Supported segmentations include:
1202 @enumerate
1203 @item @dfn{Code point} (any value in the Unicode codespace)
1204 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1205 multiple Unicode code points, e.g. \"G\" + acute-accent)
1206 @item Word break
1207 @item Sentence break
1208 @item Line break
1209 @end enumerate")
1210 (license license:expat)))
1211
1212 (define-public python2-uniseg
1213 (package-with-python2 python-uniseg))
1214
1215 (define-public python-humanfriendly
1216 (package
1217 (name "python-humanfriendly")
1218 (version "8.2")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (pypi-uri "humanfriendly" version))
1223 (sha256
1224 (base32
1225 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1226 (build-system python-build-system)
1227 (arguments
1228 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1229 #:tests? #f))
1230 (home-page "https://humanfriendly.readthedocs.io")
1231 (synopsis "Human-friendly input and output in Python")
1232 (description
1233 "The functions and classes in @code{humanfriendly} can be used to make
1234 text interfaces more user-friendly. It includes tools to parse and format
1235 numbers, file sizes, and timespans, timers for long-running operations, menus
1236 to allow the user to choose from a list of options, and terminal interaction
1237 helpers.")
1238 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1239 (license license:expat)))
1240
1241 (define-public python2-humanfriendly
1242 (let ((base (package-with-python2
1243 (strip-python2-variant python-humanfriendly))))
1244 (package (inherit base)
1245 (propagated-inputs
1246 `(("python2-monotonic" ,python2-monotonic)
1247 ,@(package-propagated-inputs base))))))
1248
1249 (define-public python-textparser
1250 (package
1251 (name "python-textparser")
1252 (version "0.23.0")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (pypi-uri "textparser" version))
1257 (sha256
1258 (base32
1259 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1260 (build-system python-build-system)
1261 (home-page "https://github.com/eerimoq/textparser")
1262 (synopsis "Fast text parser for Python")
1263 (description "This library provides a text parser written in the Python
1264 language. It aims to be fast.")
1265 (license license:expat)))
1266
1267 (define-public python-aenum
1268 (package
1269 (name "python-aenum")
1270 (version "2.2.4")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "aenum" version))
1275 (sha256
1276 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1277 (build-system python-build-system)
1278 (arguments
1279 `(#:phases (modify-phases %standard-phases
1280 (replace 'check
1281 (lambda _
1282 (format #t "current working dir ~s~%" (getcwd))
1283 (setenv "PYTHONPATH"
1284 (string-append ".:" (getenv "PYTHONPATH")))
1285 ;; We must run the test suite module directly, as it
1286 ;; fails to define the 'tempdir' variable in scope for
1287 ;; the tests otherwise
1288 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1289 ;; issues/32/running-tests-with-python-setuppy-test).
1290 (invoke "python3" "aenum/test.py")
1291 ;; This one fails with "NameError: name
1292 ;; 'test_pickle_dump_load' is not defined" (see:
1293 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1294 ;; /error-running-the-test_v3py-test-suite).
1295 ;; (invoke "python3" "aenum/test_v3.py")
1296 #t)))))
1297 (home-page "https://bitbucket.org/stoneleaf/aenum")
1298 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1299 (description "The aenum library includes an @code{Enum} base class, a
1300 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1301 class.")
1302 (license license:bsd-3)))
1303
1304 (define-public python-can
1305 (package
1306 (name "python-can")
1307 (version "3.3.3")
1308 (source
1309 (origin
1310 (method url-fetch)
1311 (uri (pypi-uri "python-can" version))
1312 (sha256
1313 (base32
1314 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1315 (build-system python-build-system)
1316 (arguments
1317 `(#:phases (modify-phases %standard-phases
1318 (add-after 'unpack 'relax-version-requirements
1319 (lambda _
1320 (substitute* "setup.py"
1321 (("mock~=2\\.0") "mock")
1322 (("coverage<5") "coverage")
1323 (("pytest~=4\\.3") "pytest")
1324 (("hypothesis~=4\\.56") "hypothesis"))
1325 #t))
1326 (add-after 'unpack 'fix-broken-tests
1327 ;; The tests try to run two scripts it expects should be
1328 ;; in PATH, but they aren't at this time (see:
1329 ;; https://github.com/hardbyte/python-can/issues/805).
1330 (lambda _
1331 (substitute* "test/test_scripts.py"
1332 (("\"can_logger\\.py --help\"") "")
1333 (("\"can_player\\.py --help\"") ""))
1334 #t)))))
1335 (propagated-inputs
1336 `(("python-aenum" ,python-aenum)
1337 ("python-wrapt" ,python-wrapt)))
1338 (native-inputs
1339 `(("python-codecov" ,python-codecov)
1340 ("python-coverage" ,python-coverage)
1341 ("python-future" ,python-future)
1342 ("python-hypothesis" ,python-hypothesis)
1343 ("python-mock" ,python-mock)
1344 ("python-pyserial" ,python-pyserial)
1345 ("python-pytest" ,python-pytest)
1346 ("python-pytest-cov" ,python-pytest-cov)
1347 ("python-pytest-runner" ,python-pytest-runner)
1348 ("python-pytest-timeout" ,python-pytest-timeout)))
1349 (home-page "https://github.com/hardbyte/python-can")
1350 (synopsis "Controller Area Network (CAN) interface module for Python")
1351 (description "This package defines the @code{can} module, which provides
1352 controller area network (CAN) support for Python developers; providing common
1353 abstractions to different hardware devices, and a suite of utilities for
1354 sending and receiving messages on a CAN bus.")
1355 (license license:lgpl3+)))
1356
1357 (define-public python-diskcache
1358 (package
1359 (name "python-diskcache")
1360 (version "4.1.0")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (pypi-uri "diskcache" version))
1365 (sha256
1366 (base32
1367 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:tests? #f)) ;test suite not included in the release
1371 (home-page "http://www.grantjenks.com/docs/diskcache/")
1372 (synopsis "Disk and file backed cache library")
1373 (description "DiskCache is a disk and file backed persistent cache.")
1374 (license license:asl2.0)))
1375
1376 (define-public python-bitstruct
1377 (package
1378 (name "python-bitstruct")
1379 (version "8.9.0")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "bitstruct" version))
1384 (sha256
1385 (base32
1386 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1387 (build-system python-build-system)
1388 (home-page "https://github.com/eerimoq/bitstruct")
1389 (synopsis "Python values to and C bit field structs converter")
1390 (description "This module performs conversions between Python values and C
1391 bit field structs represented as Python byte strings. It is intended to have
1392 a similar interface as the @code{struct} module from Python, but working on
1393 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1394 (license license:expat)))
1395
1396 (define-public python-cantools
1397 (package
1398 (name "python-cantools")
1399 (version "33.1.1")
1400 (source
1401 (origin
1402 ;; We take the sources from the Git repository as the documentation is
1403 ;; not included with the PyPI archive.
1404 (method git-fetch)
1405 (uri (git-reference
1406 (url "https://github.com/eerimoq/cantools")
1407 (commit version)))
1408 (file-name (git-file-name name version))
1409 (sha256
1410 (base32
1411 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1412 (build-system python-build-system)
1413 (arguments
1414 `(#:phases
1415 (modify-phases %standard-phases
1416 (add-after 'build 'build-doc
1417 (lambda _
1418 ;; See: https://github.com/eerimoq/cantools/issues/190.
1419 (substitute* "README.rst"
1420 (("https://github.com/eerimoq/cantools/raw/master\
1421 /docs/monitor.png")
1422 "monitor.png"))
1423 (with-directory-excursion "docs"
1424 (invoke "make" "man" "info"))))
1425 (add-after 'install 'install-doc
1426 (lambda* (#:key outputs #:allow-other-keys)
1427 (let* ((out (assoc-ref outputs "out"))
1428 (info (string-append out "/share/info"))
1429 (man1 (string-append out "/share/man/man1")))
1430 (format #t "CWD: ~s~%" (getcwd))
1431 (install-file "docs/_build/texinfo/cantools.info" info)
1432 (install-file "docs/_build/man/cantools.1" man1)
1433 #t))))))
1434 (native-inputs
1435 `(("sphinx" ,python-sphinx)
1436 ("texinfo" ,texinfo)))
1437 (propagated-inputs
1438 `(("python-bitstruct" ,python-bitstruct)
1439 ("python-can" ,python-can)
1440 ("python-diskcache" ,python-diskcache)
1441 ("python-textparser" ,python-textparser)))
1442 (home-page "https://github.com/eerimoq/cantools")
1443 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1444 (description "This package includes Controller Area Network (CAN) related
1445 tools that can be used to:
1446 @itemize
1447 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1448 @item encode and decode CAN messages
1449 @item multiplex simple and extended signals
1450 @item diagnose DID encoding and decoding
1451 @item dump the CAN decoder output
1452 @item test CAN nodes
1453 @item generate C source code
1454 @item monitor the CAN bus
1455 @end itemize")
1456 (license license:expat)))
1457
1458 (define-public python-capturer
1459 (package
1460 (name "python-capturer")
1461 (version "2.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "capturer" version))
1466 (sha256
1467 (base32
1468 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:tests? #f))
1472 (propagated-inputs
1473 `(("python-humanfriendly" ,python-humanfriendly)))
1474 (home-page "https://capturer.readthedocs.io")
1475 (synopsis "Capture stdout and stderr streams of the current process")
1476 (description
1477 "The capturer package makes it easy to capture the stdout and stderr
1478 streams of the current process and subprocesses. Output can be relayed
1479 to the terminal in real time but is also available to the Python program
1480 for additional processing.")
1481 (license license:expat)))
1482
1483 (define-public python2-capturer
1484 (package-with-python2 python-capturer))
1485
1486 (define-public python-case
1487 (package
1488 (name "python-case")
1489 (version "1.5.3")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "case" version))
1494 (sha256
1495 (base32
1496 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1497 (build-system python-build-system)
1498 (propagated-inputs
1499 `(("python-mock" ,python-mock)
1500 ("python-nose" ,python-nose)
1501 ("python-six" ,python-six)
1502 ("python-unittest2" ,python-unittest2)))
1503 (native-inputs
1504 `(("python-coverage" ,python-coverage)))
1505 (home-page "https://github.com/celery/case")
1506 (synopsis "Unittest utilities and convenience methods")
1507 (description
1508 "The @code{case} package provides utilities on top of unittest, including
1509 some helpful Python 2 compatibility convenience methods.")
1510 (license license:bsd-3)))
1511
1512 (define-public python-verboselogs
1513 (package
1514 (name "python-verboselogs")
1515 (version "1.7")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "verboselogs" version))
1520 (sha256
1521 (base32
1522 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1523 (build-system python-build-system)
1524 (arguments
1525 `(#:phases
1526 (modify-phases %standard-phases
1527 (replace 'check
1528 (lambda _
1529 ;; Do not run pylint plugin test, as astroid is an old
1530 ;; unsupported version.
1531 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1532 "verboselogs/tests.py"))))))
1533 (native-inputs
1534 `(("python-mock" ,python-mock)
1535 ("python-pytest" ,python-pytest)))
1536 (home-page "https://verboselogs.readthedocs.io")
1537 (synopsis "Verbose logging level for Python's logging module")
1538 (description
1539 "The @code{verboselogs} package extends Python's @code{logging} module to
1540 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1541 (license license:expat)))
1542
1543 (define-public python2-verboselogs
1544 (package-with-python2 python-verboselogs))
1545
1546 (define-public python-coloredlogs
1547 (package
1548 (name "python-coloredlogs")
1549 (version "10.0")
1550 (source
1551 (origin
1552 (method url-fetch)
1553 (uri (pypi-uri "coloredlogs" version))
1554 (sha256
1555 (base32
1556 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1557 (build-system python-build-system)
1558 (arguments
1559 `(;Tests require some updated modules
1560 #:tests? #f))
1561 (propagated-inputs
1562 `(("python-capturer" ,python-capturer)))
1563 (home-page "https://coloredlogs.readthedocs.io")
1564 (synopsis "Colored stream handler for Python's logging module")
1565 (description
1566 "The @code{coloredlogs} package enables colored terminal output for
1567 Python's logging module. The @code{ColoredFormatter} class inherits from
1568 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1569 messages in color.")
1570 (license license:expat)))
1571
1572 (define-public python2-coloredlogs
1573 (package-with-python2 python-coloredlogs))
1574
1575 (define-public python-editorconfig
1576 (package
1577 (name "python-editorconfig")
1578 (version "0.12.2")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "EditorConfig" version))
1583 (sha256
1584 (base32
1585 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1586 (build-system python-build-system)
1587 (home-page "https://editorconfig.org/")
1588 (synopsis "EditorConfig bindings for python")
1589 (description "The EditorConfig project consists of a file format for
1590 defining coding styles and a collection of text editor plugins that enable
1591 editors to read the file format and adhere to defined styles. EditorConfig
1592 files are easily readable and they work nicely with version control systems.")
1593 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1594 (license (list license:bsd-2 license:psfl))))
1595
1596 (define-public dosage
1597 (package
1598 (name "dosage")
1599 (version "2.17")
1600 (source
1601 (origin
1602 (method url-fetch)
1603 (uri (pypi-uri "dosage" version))
1604 (sha256
1605 (base32
1606 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1607 (build-system python-build-system)
1608 (propagated-inputs
1609 `(("python2-backports-functools-lru-cache"
1610 ,python2-backports-functools-lru-cache)
1611 ("python2-backports-shutil-get-terminal-size"
1612 ,python2-backports-shutil-get-terminal-size)
1613 ("python-cached-property" ,python-cached-property)
1614 ("python-colorama" ,python-colorama)
1615 ("python-imagesize" ,python-imagesize)
1616 ("python-importlib-metadata" ,python-importlib-metadata)
1617 ("python-lxml" ,python-lxml)
1618 ("python-requests" ,python-requests)
1619 ("python-six" ,python-six)))
1620 (native-inputs
1621 `(("python-pytest-cov" ,python-pytest-cov)
1622 ("python-pytest-xdist" ,python-pytest-xdist)
1623 ("python-responses" ,python-responses)
1624 ("python-setuptools-scm" ,python-setuptools-scm)))
1625 (home-page "https://github.com/webcomics/dosage")
1626 (synopsis "Comic strip downloader and archiver")
1627 (description "Dosage is designed to keep a local copy of specific webcomics and other
1628 picture-based content such as Picture of the Day sites. With the @command{dosage}
1629 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1630 downloaded, or download a strip for a particular date or index, if possible.")
1631 (license license:expat)))
1632
1633 (define-public python-et-xmlfile
1634 (package
1635 (name "python-et-xmlfile")
1636 (version "1.0.1")
1637 (source
1638 (origin
1639 (method url-fetch)
1640 (uri (pypi-uri "et_xmlfile" version))
1641 (sha256
1642 (base32
1643 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1644 (build-system python-build-system)
1645 (arguments
1646 `(#:phases (modify-phases %standard-phases
1647 (replace 'check
1648 (lambda _
1649 (invoke "pytest"))))))
1650 (native-inputs
1651 `(("python-pytest" ,python-pytest)
1652 ("python-lxml" ,python-lxml))) ;used for the tests
1653 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1654 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1655 (description "This Python library is based upon the @code{xmlfile} module
1656 from @code{lxml}. It aims to provide a low memory, compatible implementation
1657 of @code{xmlfile}.")
1658 (license license:expat)))
1659
1660 (define-public python2-et-xmlfile
1661 (package-with-python2 python-et-xmlfile))
1662
1663 (define-public python-openpyxl
1664 (package
1665 (name "python-openpyxl")
1666 (version "3.0.5")
1667 (source
1668 (origin
1669 ;; We use the upstream repository, as the tests are not included in the
1670 ;; PyPI releases.
1671 (method hg-fetch)
1672 (uri (hg-reference
1673 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1674 (changeset version)))
1675 (file-name (string-append name "-" version "-checkout"))
1676 (sha256
1677 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1678 (build-system python-build-system)
1679 (arguments
1680 `(#:phases (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 (invoke "pytest"))))))
1684 (native-inputs
1685 ;; For the test suite.
1686 `(("python-lxml" ,python-lxml)
1687 ("python-pillow" ,python-pillow)
1688 ("python-pytest" ,python-pytest)))
1689 (propagated-inputs
1690 `(("python-et-xmlfile" ,python-et-xmlfile)
1691 ("python-jdcal" ,python-jdcal)))
1692 (home-page "https://openpyxl.readthedocs.io")
1693 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1694 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1695 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1696 standard.")
1697 (properties `((python2-variant . ,(delay python2-openpyxl))))
1698 (license license:expat)))
1699
1700 (define-public python2-openpyxl
1701 (let ((base (package-with-python2
1702 (strip-python2-variant python-openpyxl))))
1703 (package
1704 (inherit base)
1705 ;; This is the latest version that has python2 support
1706 (version "2.6.4")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "openpyxl" version))
1711 (sha256
1712 (base32
1713 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1714 (arguments '(#:tests? #f))))) ; No test suite.
1715
1716 (define-public python-eventlet
1717 (package
1718 (name "python-eventlet")
1719 (version "0.25.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "eventlet" version))
1724 (sha256
1725 (base32
1726 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1727 (build-system python-build-system)
1728 (propagated-inputs
1729 `(("python-greenlet" ,python-greenlet)))
1730 (arguments
1731 ;; TODO: Requires unpackaged 'enum-compat'.
1732 '(#:tests? #f))
1733 (home-page "https://eventlet.net")
1734 (synopsis "Concurrent networking library for Python")
1735 (description
1736 "Eventlet is a concurrent networking library for Python that
1737 allows you to change how you run your code, not how you write it.
1738 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1739 Coroutines ensure that the developer uses a blocking style of programming
1740 that is similar to threading, but provide the benefits of non-blocking I/O.
1741 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1742 from the Python interpreter, or as a small part of a larger application.")
1743 (license license:expat)))
1744
1745 (define-public python-six
1746 (package
1747 (name "python-six")
1748 (version "1.14.0")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "six" version))
1753 (sha256
1754 (base32
1755 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:phases
1759 (modify-phases %standard-phases
1760 (replace 'check
1761 (lambda _
1762 (invoke "py.test" "-v"))))))
1763 (native-inputs
1764 `(("python-pytest" ,python-pytest-bootstrap)))
1765 (home-page "https://pypi.org/project/six/")
1766 (synopsis "Python 2 and 3 compatibility utilities")
1767 (description
1768 "Six is a Python 2 and 3 compatibility library. It provides utility
1769 functions for smoothing over the differences between the Python versions with
1770 the goal of writing Python code that is compatible on both Python versions.
1771 Six supports every Python version since 2.5. It is contained in only one
1772 Python file, so it can be easily copied into your project.")
1773 (license license:x11)))
1774
1775 (define-public python2-six
1776 (package-with-python2 python-six))
1777
1778 (define-public python-six-bootstrap
1779 (package
1780 (inherit python-six)
1781 (name "python-six-bootstrap")
1782 (native-inputs `())
1783 (arguments `(#:tests? #f))))
1784
1785 (define-public python2-six-bootstrap
1786 (package-with-python2 python-six-bootstrap))
1787
1788 (define-public python-schedule
1789 (package
1790 (name "python-schedule")
1791 (version "0.4.3")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "schedule" version))
1796 (sha256
1797 (base32
1798 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1799 (build-system python-build-system)
1800 (native-inputs
1801 `(("python-pytest" ,python-pytest)
1802 ("python-mock" ,python-mock)))
1803 (home-page "https://github.com/dbader/schedule")
1804 (synopsis "Schedule periodic function calls in Python")
1805 (description
1806 "Schedule is an in-process scheduler for periodic jobs that uses the
1807 builder pattern for configuration. Schedule lets you run Python functions (or
1808 any other callable) periodically at pre-determined intervals using a simple,
1809 human-friendly syntax.")
1810 (license license:expat)))
1811
1812 (define-public python2-schedule
1813 (package-with-python2 python-schedule))
1814
1815 (define-public python-scour
1816 (package
1817 (name "python-scour")
1818 (version "038.1")
1819 (source
1820 (origin
1821 (method git-fetch)
1822 (uri
1823 (git-reference
1824 (url "https://github.com/scour-project/scour")
1825 (commit
1826 (string-append "v" version))))
1827 (file-name (git-file-name name version))
1828 (sha256
1829 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1830 (propagated-inputs
1831 `(("python-six" ,python-six)))
1832 (build-system python-build-system)
1833 (home-page "https://github.com/scour-project/scour")
1834 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1835 (description "The goal of Scour is to output a file that renderes
1836 identically at a fraction of the size by removing a lot of redundant
1837 information created by most SVG editors. Optimization options are typically
1838 lossless but can be tweaked for more aggressive cleaning.")
1839 (license license:asl2.0)))
1840
1841 (define-public python-mechanize
1842 (package
1843 (name "python-mechanize")
1844 (version "0.4.5")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "mechanize" version))
1849 (sha256
1850 (base32
1851 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1852 (build-system python-build-system)
1853 (propagated-inputs
1854 `(("python-html5lib" ,python-html5lib)))
1855 (home-page "https://github.com/python-mechanize/mechanize")
1856 (synopsis
1857 "Stateful programmatic web browsing in Python")
1858 (description
1859 "Mechanize implements stateful programmatic web browsing in Python,
1860 after Andy Lester’s Perl module WWW::Mechanize.")
1861 (license license:bsd-3)))
1862
1863 (define-public python2-mechanize
1864 (package-with-python2 python-mechanize))
1865
1866 (define-public python-simpleaudio
1867 (package
1868 (name "python-simpleaudio")
1869 (version "1.0.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (pypi-uri "simpleaudio" version))
1874 (sha256
1875 (base32
1876 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1877 (build-system python-build-system)
1878 (arguments
1879 `(#:tests? #f))
1880 (inputs
1881 `(("alsa-lib" ,alsa-lib)))
1882 (home-page
1883 "https://github.com/hamiltron/py-simple-audio")
1884 (synopsis "Simple, asynchronous audio playback for Python 3")
1885 (description
1886 "The @code{simplaudio} package provides cross-platform, dependency-free
1887 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1888 (license license:expat))) ; MIT license
1889
1890 (define-public python-simplejson
1891 (package
1892 (name "python-simplejson")
1893 (version "3.17.0")
1894 (source
1895 (origin
1896 (method url-fetch)
1897 (uri (pypi-uri "simplejson" version))
1898 (sha256
1899 (base32
1900 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1901 (build-system python-build-system)
1902 (home-page "http://simplejson.readthedocs.org/en/latest/")
1903 (synopsis
1904 "Json library for Python")
1905 (description
1906 "JSON (JavaScript Object Notation) is a subset of JavaScript
1907 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1908 format.
1909
1910 Simplejson exposes an API familiar to users of the standard library marshal
1911 and pickle modules. It is the externally maintained version of the json
1912 library contained in Python 2.6, but maintains compatibility with Python 2.5
1913 and (currently) has significant performance advantages, even without using
1914 the optional C extension for speedups. Simplejson is also supported on
1915 Python 3.3+.")
1916 (license license:x11)))
1917
1918 (define-public python2-simplejson
1919 (package-with-python2 python-simplejson))
1920
1921
1922 (define-public python-pyicu
1923 (package
1924 (name "python-pyicu")
1925 (version "2.4.3")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (pypi-uri "PyICU" version))
1930 (sha256
1931 (base32
1932 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1933 (build-system python-build-system)
1934 (inputs
1935 `(("icu4c" ,icu4c)))
1936 (native-inputs
1937 `(("python-pytest" ,python-pytest)
1938 ("python-six" ,python-six)))
1939 (home-page "https://github.com/ovalhub/pyicu")
1940 (synopsis "Python extension wrapping the ICU C++ API")
1941 (description
1942 "PyICU is a python extension wrapping the ICU C++ API.")
1943 (license license:x11)))
1944
1945 (define-public python2-pyicu
1946 (package-with-python2 python-pyicu))
1947
1948 (define-public python-dogtail
1949 (package
1950 (name "python-dogtail")
1951 (version "0.9.11")
1952 (source (origin
1953 (method url-fetch)
1954 (uri
1955 (string-append
1956 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1957 "dogtail-" version ".tar.gz"))
1958 (sha256
1959 (base32
1960 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1961 (build-system python-build-system)
1962 (arguments
1963 `(#:tests? #f ; TODO Launching dbus for the tests
1964 ; fails
1965 #:phases
1966 (modify-phases %standard-phases
1967 (replace 'check
1968 (lambda* (#:key tests? #:allow-other-keys)
1969 (when tests?
1970 (system "Xvfb :1 &")
1971 (setenv "DISPLAY" ":1")
1972 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1973 #t)))))
1974 (propagated-inputs
1975 `(("python-pygobject" ,python-pygobject)
1976 ("python-pycairo" ,python-pycairo)
1977 ("python-pyatspi" ,python-pyatspi)))
1978 (native-inputs
1979 `(("python-nose" ,python-nose)
1980 ("gtk+" ,gtk+)
1981 ("xvfb" ,xorg-server)
1982 ("dbus" ,dbus)
1983 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1984 ("gobject-introspection" ,gobject-introspection)))
1985 (home-page "https://gitlab.com/dogtail/dogtail/")
1986 (synopsis "GUI test tool and automation framework written in Python")
1987 (description
1988 "Dogtail is a GUI test tool and automation framework written in Python.
1989 It uses Accessibility (a11y) technologies to communicate with desktop
1990 applications. dogtail scripts are written in Python and executed like any
1991 other Python program.")
1992 (license license:gpl2+)))
1993
1994 (define-public python2-dogtail
1995 (package-with-python2 python-dogtail))
1996
1997 (define-public python-empy
1998 (package
1999 (name "python-empy")
2000 (version "3.3.3")
2001 (source (origin
2002 (method url-fetch)
2003 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2004 version ".tar.gz"))
2005 (sha256
2006 (base32
2007 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2008 (build-system python-build-system)
2009 (arguments
2010 `(#:tests? #f)) ; python2 only
2011 (home-page "http://www.alcyone.com/software/empy/")
2012 (synopsis "Templating system for Python")
2013 (description
2014 "EmPy is a system for embedding Python expressions and statements in
2015 template text; it takes an EmPy source file, processes it, and produces
2016 output. This is accomplished via expansions, which are special signals to the
2017 EmPy system and are set off by a special prefix (by default the at sign, @@).
2018 EmPy can expand arbitrary Python expressions and statements in this way, as
2019 well as a variety of special forms. Textual data not explicitly delimited in
2020 this way is sent unaffected to the output, allowing Python to be used in
2021 effect as a markup language. Also supported are callbacks via hooks,
2022 recording and playback via diversions, and dynamic, chainable filters. The
2023 system is highly configurable via command line options and embedded
2024 commands.")
2025 (license license:lgpl2.1+)))
2026
2027 (define-public python2-empy
2028 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2029 (package
2030 (inherit base)
2031 (arguments `(,@(package-arguments base)
2032 #:tests? #t)))))
2033
2034 (define-public python2-element-tree
2035 (package
2036 (name "python2-element-tree")
2037 (version "1.2.6")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "http://effbot.org/media/downloads/elementtree-"
2042 version "-20050316.tar.gz"))
2043 (sha256
2044 (base32
2045 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2046 (build-system python-build-system)
2047 (arguments
2048 `(#:python ,python-2 ; seems to be part of Python 3
2049 #:tests? #f)) ; no 'test' sub-command
2050 (synopsis "Toolkit for XML processing in Python")
2051 (description
2052 "ElementTree is a Python library supporting lightweight XML processing.")
2053 (home-page "https://effbot.org/zone/element-index.htm")
2054 (license (license:x11-style
2055 "http://docs.python.org/2/license.html"
2056 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2057
2058 (define-public python2-pybugz
2059 (package
2060 (name "python2-pybugz")
2061 (version "0.6.11")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (string-append
2065 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2066 version ".tar.gz"))
2067 (sha256
2068 (base32
2069 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2070 (patches (search-patches "pybugz-stty.patch"
2071 "pybugz-encode-error.patch"))))
2072 (build-system python-build-system)
2073 (arguments
2074 `(#:python ,python-2 ; SyntaxError with Python 3
2075 #:tests? #f)) ; no 'test' sub-command
2076 (propagated-inputs
2077 `(("element-tree" ,python2-element-tree)))
2078 (synopsis "Python and command-line interface to Bugzilla")
2079 (description
2080 "PyBugz is a Python library and command-line tool to query the Bugzilla
2081 bug tracking system. It is meant as an aid to speed up interaction with the
2082 bug tracker.")
2083 (home-page "http://www.liquidx.net/pybugz/")
2084 (license license:gpl2)))
2085
2086 (define-public python2-enum
2087 (package
2088 (name "python2-enum")
2089 (version "0.4.6")
2090 (source (origin
2091 (method url-fetch)
2092 (uri (pypi-uri "enum" version))
2093 (sha256
2094 (base32
2095 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2096 (build-system python-build-system)
2097 (arguments
2098 `(#:python ,python-2))
2099 (home-page "https://pypi.org/project/enum/")
2100 (synopsis "Robust enumerated type support in Python")
2101 (description
2102 "This provides a module for robust enumerations in Python. It has
2103 been superseded by the Python standard library and is provided only for
2104 compatibility.")
2105 ;; Choice of either license.
2106 (license (list license:gpl3+ license:psfl))))
2107
2108 (define-public python-enum34
2109 (package
2110 (name "python-enum34")
2111 (version "1.1.6")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (pypi-uri "enum34" version))
2116 (sha256
2117 (base32
2118 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2119 (build-system python-build-system)
2120 (home-page "https://pypi.org/project/enum34/")
2121 (synopsis "Backported Python 3.4 Enum")
2122 (description
2123 "Enum34 is the new Python stdlib enum module available in Python 3.4
2124 backported for previous versions of Python from 2.4 to 3.3.")
2125 (license license:bsd-3)))
2126
2127 (define-public python2-enum34
2128 (package-with-python2 python-enum34))
2129
2130 (define-public python-parse-type
2131 (package
2132 (name "python-parse-type")
2133 (version "0.4.2")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "parse_type" version))
2138 (sha256
2139 (base32
2140 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2141 (build-system python-build-system)
2142 (propagated-inputs
2143 `(("python-six" ,python-six)
2144 ("python-parse" ,python-parse)))
2145 (native-inputs
2146 `(("python-pytest" ,python-pytest)
2147 ("python-pytest-runner" ,python-pytest-runner)))
2148 (home-page "https://github.com/jenisys/parse_type")
2149 (synopsis "Extended parse module")
2150 (description
2151 "Parse_type extends the python parse module.")
2152 (properties
2153 `((python2-variant . ,(delay python2-parse-type))))
2154 (license license:bsd-3)))
2155
2156 (define-public python2-parse-type
2157 (let ((base (package-with-python2
2158 (strip-python2-variant python-parse-type))))
2159 (package (inherit base)
2160 (propagated-inputs
2161 `(("python2-enum34" ,python2-enum34)
2162 ,@(package-propagated-inputs base))))))
2163
2164 (define-public python-parse
2165 (package
2166 (name "python-parse")
2167 (version "1.18.0")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "parse" version))
2172 (sha256
2173 (base32
2174 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2175 (build-system python-build-system)
2176 (arguments
2177 `(#:phases
2178 (modify-phases %standard-phases
2179 (replace 'check
2180 (lambda _ (invoke "python" "test_parse.py"))))))
2181 (home-page "https://github.com/r1chardj0n3s/parse")
2182 (synopsis "Parse strings")
2183 (description
2184 "Parse strings using a specification based on the Python @code{format()}
2185 syntax.")
2186 (license license:x11)))
2187
2188 (define-public python-polib
2189 (package
2190 (name "python-polib")
2191 (version "1.0.8")
2192 (source (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "polib" version))
2195 (sha256
2196 (base32
2197 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2198 (build-system python-build-system)
2199 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2200 (synopsis "Manipulate, create and modify gettext files")
2201 (description "Polib can manipulate any gettext format (po, pot and mo)
2202 files. It can be used to create po files from scratch or to modify
2203 existing ones.")
2204 (license license:expat)))
2205
2206 (define-public python2-polib
2207 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2208 (package
2209 (inherit base)
2210 (arguments `(,@(package-arguments base)
2211 ;; Tests don't work with python2.
2212 #:tests? #f)))))
2213
2214 (define-public python-poyo
2215 (package
2216 (name "python-poyo")
2217 (version "0.5.0")
2218 (source
2219 (origin
2220 (method url-fetch)
2221 (uri (pypi-uri "poyo" version))
2222 (sha256
2223 (base32
2224 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2225 (build-system python-build-system)
2226 (home-page "https://github.com/hackebrot/poyo")
2227 (synopsis "Lightweight YAML Parser for Python")
2228 (description
2229 "This package provides a lightweight YAML Parser for Python. It supports
2230 only a chosen subset of the YAML format that is required to parse cookiecutter
2231 user configuration files. It does not have support for serializing into YAML
2232 and is not compatible with JSON.")
2233 (license license:expat)))
2234
2235 (define-public scons
2236 (package
2237 (name "scons")
2238 (version "3.0.4")
2239 (source (origin
2240 (method git-fetch)
2241 (uri (git-reference
2242 (url "https://github.com/SCons/scons")
2243 (commit version)))
2244 (file-name (git-file-name name version))
2245 (sha256
2246 (base32
2247 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2248 (build-system python-build-system)
2249 (arguments
2250 `(#:use-setuptools? #f ; still relies on distutils
2251 #:tests? #f ; no 'python setup.py test' command
2252 #:phases
2253 (modify-phases %standard-phases
2254 (add-before 'build 'bootstrap
2255 (lambda _
2256 (substitute* "src/engine/SCons/compat/__init__.py"
2257 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2258 "sys.modules[new] = __import__(old)"))
2259 (substitute* "src/engine/SCons/Platform/__init__.py"
2260 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2261 "mod = __import__(full_name)"))
2262 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2263 (chdir "build/scons")
2264 #t)))))
2265 (home-page "https://scons.org/")
2266 (synopsis "Software construction tool written in Python")
2267 (description
2268 "SCons is a software construction tool. Think of SCons as an improved,
2269 cross-platform substitute for the classic Make utility with integrated
2270 functionality similar to autoconf/automake and compiler caches such as ccache.
2271 In short, SCons is an easier, more reliable and faster way to build
2272 software.")
2273 (license license:x11)))
2274
2275 (define-public scons-python2
2276 (package
2277 (inherit (package-with-python2 scons))
2278 (name "scons-python2")))
2279
2280 (define-public python-extras
2281 (package
2282 (name "python-extras")
2283 (version "1.0.0")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "extras" version))
2288 (sha256
2289 (base32
2290 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2291 (build-system python-build-system)
2292 (arguments
2293 ;; FIXME: Circular dependency on testtools.
2294 '(#:tests? #f))
2295 (home-page "https://github.com/testing-cabal/extras")
2296 (synopsis "Useful extensions to the Python standard library")
2297 (description
2298 "Extras is a set of extensions to the Python standard library.")
2299 (license license:expat)))
2300
2301 (define-public python2-extras
2302 (package-with-python2 python-extras))
2303
2304 (define-public python-mimeparse
2305 (package
2306 (name "python-mimeparse")
2307 (version "1.6.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "python-mimeparse" version))
2312 (sha256
2313 (base32
2314 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2315 (build-system python-build-system)
2316 (arguments
2317 '(#:phases
2318 (modify-phases %standard-phases
2319 (replace 'check
2320 (lambda _
2321 (invoke "./mimeparse_test.py"))))))
2322 (home-page
2323 "https://github.com/dbtsai/python-mimeparse")
2324 (synopsis "Python library for parsing MIME types")
2325 (description
2326 "Mimeparse provides basic functions for parsing MIME type names and
2327 matching them against a list of media-ranges.")
2328 (license license:expat)))
2329
2330 (define-public python2-mimeparse
2331 (package-with-python2 python-mimeparse))
2332
2333 (define-public python-miniboa
2334 (package
2335 (name "python-miniboa")
2336 (version "1.0.7")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "miniboa" version))
2341 (sha256
2342 (base32
2343 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2344 (build-system python-build-system)
2345 (home-page "https://github.com/shmup/miniboa")
2346 (synopsis "Simple, single-threaded Telnet server")
2347 (description
2348 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2349 server.")
2350 (license license:asl2.0)))
2351
2352 (define-public python2-miniboa
2353 (package-with-python2 python-miniboa))
2354
2355 (define-public python-pafy
2356 (package
2357 (name "python-pafy")
2358 (version "0.5.3.1")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (pypi-uri "pafy" version))
2363 (sha256
2364 (base32
2365 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2366 (build-system python-build-system)
2367 (arguments
2368 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2369 (propagated-inputs
2370 ;; Youtube-dl is a python package which is imported in the file
2371 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2372 `(("youtube-dl" ,youtube-dl)))
2373 (home-page "https://np1.github.io/pafy/")
2374 (synopsis "Retrieve YouTube content and metadata")
2375 (description
2376 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2377 (license license:lgpl3+)))
2378
2379 (define-public python2-funcsigs
2380 (package
2381 (name "python2-funcsigs")
2382 (version "1.0.2")
2383 (source (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "funcsigs" version))
2386 (sha256
2387 (base32
2388 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2389 (build-system python-build-system)
2390 (arguments
2391 `(#:python ,python-2))
2392 (native-inputs
2393 `(("python2-unittest2" ,python2-unittest2)))
2394 (home-page "http://funcsigs.readthedocs.org")
2395 (synopsis "Python function signatures from PEP362")
2396 (description
2397 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2398 (license license:asl2.0)))
2399
2400 (define-public python2-funcsigs-bootstrap
2401 (package
2402 (inherit python2-funcsigs)
2403 (name "python2-funcsigs-bootstrap")
2404 (native-inputs `())
2405 (arguments
2406 `(#:tests? #f
2407 ,@(package-arguments python2-funcsigs)))))
2408
2409 (define-public python-py
2410 (package
2411 (name "python-py")
2412 (version "1.8.1")
2413 (source
2414 (origin
2415 (method url-fetch)
2416 (uri (pypi-uri "py" version))
2417 (sha256
2418 (base32
2419 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2420 (build-system python-build-system)
2421 (arguments
2422 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2423 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2424 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2425 ;; Is this module globally installed?"
2426 '(#:tests? #f))
2427 (native-inputs
2428 `(("python-setuptools-scm" ,python-setuptools-scm)))
2429 (home-page "https://github.com/pytest-dev/py")
2430 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2431 (description
2432 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2433 code introspection, and logging.")
2434 (license license:expat)))
2435
2436 (define-public python-py-next
2437 (package
2438 (inherit python-py)
2439 (version "1.9.0")
2440 (source
2441 (origin
2442 (method url-fetch)
2443 (uri (pypi-uri "py" version))
2444 (sha256
2445 (base32
2446 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2447
2448 (define-public python2-py
2449 (package-with-python2 python-py))
2450
2451 ;; Recent versions of python-fixtures and python-testrepository need
2452 ;; python-pbr for packaging, which itself needs these two packages for
2453 ;; testing.
2454 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2455 ;; same source, just without any test dependencies and with tests disabled.
2456 ;; python-pbr-minmal is then used to package python-fixtures and
2457 ;; python-testrepository.
2458 ;; Strictly speaking we currently could remove the test-requirements from the
2459 ;; normal python-pbr package (and save this package) since test are disabled
2460 ;; there anyway. But this may change in future.
2461 (define-public python-pbr-minimal
2462 (package
2463 (name "python-pbr-minimal")
2464 (version "3.0.1")
2465 (source
2466 (origin
2467 (method url-fetch)
2468 (uri (pypi-uri "pbr" version))
2469 (sha256
2470 (base32
2471 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2472 (build-system python-build-system)
2473 (arguments
2474 `(#:tests? #f))
2475 (home-page "https://docs.openstack.org/pbr/latest/")
2476 (synopsis "Minimal build of python-pbr used for bootstrapping")
2477 (description
2478 "Used only for bootstrapping python2-pbr, you should not need this.")
2479 (license license:asl2.0)))
2480
2481 (define-public python2-pbr-minimal
2482 (package-with-python2 python-pbr-minimal))
2483
2484 (define-public python-pbr
2485 (package
2486 (inherit python-pbr-minimal)
2487 (name "python-pbr")
2488 (arguments
2489 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2490 (propagated-inputs
2491 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2492 (native-inputs
2493 `(("python-fixtures" ,python-fixtures-bootstrap)
2494 ;; discover, coverage, hacking, subunit
2495 ("python-mock" ,python-mock)
2496 ("python-six" ,python-six)
2497 ("python-sphinx" ,python-sphinx)
2498 ("python-testrepository" ,python-testrepository-bootstrap)
2499 ("python-testresources" ,python-testresources-bootstrap)
2500 ("python-testscenarios" ,python-testscenarios-bootstrap)
2501 ("python-testtools" ,python-testtools-bootstrap)
2502 ("python-virtualenv" ,python-virtualenv)))
2503 (synopsis "Enhance the default behavior of Python’s setuptools")
2504 (description
2505 "Python Build Reasonableness (PBR) is a library that injects some useful
2506 and sensible default behaviors into your setuptools run. It will set
2507 versions, process requirements files and generate AUTHORS and ChangeLog file
2508 from git information.
2509 ")))
2510
2511 (define-public python2-pbr
2512 (package-with-python2 python-pbr))
2513
2514 (define-public python-pyrsistent
2515 (package
2516 (name "python-pyrsistent")
2517 (version "0.16.0")
2518 (home-page "https://github.com/tobgu/pyrsistent")
2519 (source (origin
2520 (method url-fetch)
2521 (uri (pypi-uri "pyrsistent" version))
2522 (sha256
2523 (base32
2524 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2525 (build-system python-build-system)
2526 (arguments
2527 '(#:phases (modify-phases %standard-phases
2528 ;; The package works fine with newer Pytest and Hypothesis, but
2529 ;; has pinned older versions to stay compatible with Python 2.
2530 (add-before 'check 'loosen-pytest-requirement
2531 (lambda _
2532 (substitute* "setup.py"
2533 (("pytest<5") "pytest")
2534 (("hypothesis<5") "hypothesis"))
2535 #t)))))
2536 (native-inputs
2537 `(("python-hypothesis" ,python-hypothesis)
2538 ("python-pytest" ,python-pytest)
2539 ("python-pytest-runner" ,python-pytest-runner)))
2540 (propagated-inputs
2541 `(("python-six" ,python-six)))
2542 (synopsis "Persistent data structures for Python")
2543 (description
2544 "Pyrsistent is a number of persistent collections (by some referred to as
2545 functional data structures). Persistent in the sense that they are immutable.
2546
2547 All methods on a data structure that would normally mutate it instead return a
2548 new copy of the structure containing the requested updates. The original
2549 structure is left untouched.")
2550 (license license:expat)))
2551
2552 (define-public python2-pyrsistent
2553 (package-with-python2 python-pyrsistent))
2554
2555 (define-public python-exif-read
2556 (package
2557 (name "python-exif-read")
2558 (version "2.1.2")
2559 (source (origin
2560 (method url-fetch)
2561 (uri (pypi-uri "ExifRead" version))
2562 (sha256
2563 (base32
2564 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2565 (build-system python-build-system)
2566 (arguments `(#:tests? #f)) ; no tests
2567 (home-page "https://github.com/ianare/exif-py")
2568 (synopsis "Python library to extract EXIF data from image files")
2569 (description
2570 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2571 files.")
2572 (license license:bsd-3)))
2573
2574 (define-public python2-exif-read
2575 (package-with-python2 python-exif-read))
2576
2577 (define-public python-pyld
2578 (package
2579 (name "python-pyld")
2580 (version "1.0.5")
2581 (source (origin
2582 (method url-fetch)
2583 (uri (pypi-uri "PyLD" version))
2584 (sha256
2585 (base32
2586 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2587 (build-system python-build-system)
2588 (home-page "https://github.com/digitalbazaar/pyld")
2589 (synopsis "Python implementation of the JSON-LD specification")
2590 (description
2591 "PyLD is an implementation of the JSON-LD specification.")
2592 (license license:bsd-3)))
2593
2594 (define-public python2-pyld
2595 (package-with-python2 python-pyld))
2596
2597 (define-public python-cli-helpers
2598 (package
2599 (name "python-cli-helpers")
2600 (version "2.0.1")
2601 (source
2602 (origin
2603 ;; There's no source tarball on PyPI.
2604 (method git-fetch)
2605 (uri (git-reference
2606 (url "https://github.com/dbcli/cli_helpers")
2607 (commit (string-append "v" version))))
2608 (file-name (git-file-name name version))
2609 (sha256
2610 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2611 (build-system python-build-system)
2612 (native-inputs
2613 `(("python-pytest" ,python-pytest)))
2614 (propagated-inputs
2615 `(("python-wcwidth" ,python-wcwidth)
2616 ("python-configobj" ,python-configobj)
2617 ("python-tabulate" ,python-tabulate)
2618 ("python-terminaltables" ,python-terminaltables)))
2619 (home-page "https://github.com/dbcli/cli_helpers")
2620 (synopsis "Helpers for building command-line apps")
2621 (description
2622 "CLI Helpers is a Python package that makes it easy to perform common
2623 tasks when building command-line apps. It's a helper library for command-line
2624 interfaces.")
2625 (license license:bsd-3)))
2626
2627 (define-public python-click
2628 (package
2629 (name "python-click")
2630 (version "7.1.2")
2631 (source
2632 (origin
2633 (method url-fetch)
2634 (uri (pypi-uri "click" version))
2635 (sha256
2636 (base32
2637 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2638 (build-system python-build-system)
2639 (arguments
2640 `(#:phases
2641 (modify-phases %standard-phases
2642 (add-after 'unpack 'fix-paths
2643 (lambda* (#:key inputs #:allow-other-keys)
2644 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2645 "cross-libc" "libc"))))
2646 (substitute* "src/click/_unicodefun.py"
2647 (("'locale'")
2648 (string-append "'" glibc "/bin/locale'"))))
2649 #t))
2650 (replace 'check
2651 (lambda _
2652 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2653 (invoke "python" "-m" "pytest"))))))
2654 (native-inputs
2655 `(("python-pytest" ,python-pytest)))
2656 (home-page "https://palletsprojects.com/p/click/")
2657 (synopsis "Command line library for Python")
2658 (description
2659 "Click is a Python package for creating command line interfaces in a
2660 composable way with as little code as necessary. Its name stands for
2661 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2662 with sensible defaults out of the box.")
2663 (license license:bsd-3)))
2664
2665 (define-public python2-click
2666 (package-with-python2 python-click))
2667
2668 (define-public python-click-5
2669 (package (inherit python-click)
2670 (name "python-click")
2671 (version "5.1")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "click" version))
2676 (sha256
2677 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2678 (arguments `())))
2679
2680 (define-public python-wheel
2681 (package
2682 (name "python-wheel")
2683 (version "0.33.6")
2684 (source
2685 (origin
2686 (method url-fetch)
2687 (uri (pypi-uri "wheel" version))
2688 (sha256
2689 (base32
2690 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2691 (build-system python-build-system)
2692 (arguments
2693 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2694 ;; fails to find the newly-built bdist_wheel library, even though it is
2695 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2696 '(#:tests? #f))
2697 (home-page "https://bitbucket.org/pypa/wheel/")
2698 (synopsis "Format for built Python packages")
2699 (description
2700 "A wheel is a ZIP-format archive with a specially formatted filename and
2701 the @code{.whl} extension. It is designed to contain all the files for a PEP
2702 376 compatible install in a way that is very close to the on-disk format. Many
2703 packages will be properly installed with only the @code{Unpack} step and the
2704 unpacked archive preserves enough information to @code{Spread} (copy data and
2705 scripts to their final locations) at any later time. Wheel files can be
2706 installed with a newer @code{pip} or with wheel's own command line utility.")
2707 (license license:expat)))
2708
2709 (define-public python2-wheel
2710 (package-with-python2 python-wheel))
2711
2712 (define-public python-vcversioner
2713 (package
2714 (name "python-vcversioner")
2715 (version "2.16.0.0")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "vcversioner" version))
2720 (sha256
2721 (base32
2722 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2723 (build-system python-build-system)
2724 (synopsis "Python library for version number discovery")
2725 (description "Vcversioner is a Python library that inspects tagging
2726 information in a variety of version control systems in order to discover
2727 version numbers.")
2728 (home-page "https://github.com/habnabit/vcversioner")
2729 (license license:isc)))
2730
2731 (define-public python2-vcversioner
2732 (package-with-python2 python-vcversioner))
2733
2734 (define-public python-jdcal
2735 (package
2736 (name "python-jdcal")
2737 (version "1.4")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "jdcal" version))
2742 (sha256
2743 (base32
2744 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2745 (build-system python-build-system)
2746 (arguments
2747 `(#:phases (modify-phases %standard-phases
2748 (replace 'check
2749 (lambda _
2750 (invoke "pytest"))))))
2751 (native-inputs
2752 `(("python-pytest" ,python-pytest)))
2753 (home-page "https://github.com/phn/jdcal")
2754 (synopsis "Functions to convert between Julian dates Gregorian dates")
2755 (description "This Python library provides functions for converting
2756 between Julian dates and Gregorian dates.")
2757 (license license:bsd-2)))
2758
2759 (define-public python2-jdcal
2760 (package-with-python2 python-jdcal))
2761
2762 (define-public python-jsondiff
2763 (package
2764 (name "python-jsondiff")
2765 (version "1.2.0")
2766 (source
2767 (origin
2768 (method url-fetch)
2769 (uri (pypi-uri "jsondiff" version))
2770 (sha256
2771 (base32
2772 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2773 (build-system python-build-system)
2774 (native-inputs
2775 `(("python-nose" ,python-nose)
2776 ("python-nose-random" ,python-nose-random)))
2777 (home-page
2778 "https://github.com/fzumstein/jsondiff")
2779 (synopsis "Compare JSON and JSON-like structures in Python")
2780 (description "@code{jsondiff} is a Python library which lets you
2781 compare, diff, and patch JSON and JSON-like structures in Python.")
2782 (license license:expat)))
2783
2784 (define-public python-jsonschema
2785 (package
2786 (name "python-jsonschema")
2787 (version "3.2.0")
2788 (source (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "jsonschema" version))
2791 (sha256
2792 (base32
2793 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2794 (build-system python-build-system)
2795 (arguments
2796 '(#:phases
2797 (modify-phases %standard-phases
2798 (replace 'check
2799 (lambda* (#:key inputs outputs #:allow-other-keys)
2800 (add-installed-pythonpath inputs outputs)
2801 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2802 (invoke "trial" "jsonschema"))))))
2803 (native-inputs
2804 `(("python-setuptools_scm" ,python-setuptools-scm)
2805 ("python-twisted" ,python-twisted)))
2806 (propagated-inputs
2807 `(("python-attrs" ,python-attrs)
2808 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2809 ("python-pyrsistent" ,python-pyrsistent)
2810 ("python-six" ,python-six)))
2811 (home-page "https://github.com/Julian/jsonschema")
2812 (synopsis "Implementation of JSON Schema for Python")
2813 (description
2814 "Jsonschema is an implementation of JSON Schema for Python.")
2815 (license license:expat)
2816 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2817
2818 (define-public python2-jsonschema
2819 (let ((jsonschema (package-with-python2
2820 (strip-python2-variant python-jsonschema))))
2821 (package (inherit jsonschema)
2822 (propagated-inputs
2823 `(("python2-functools32" ,python2-functools32)
2824 ,@(package-propagated-inputs jsonschema))))))
2825
2826 (define-public python-schema
2827 (package
2828 (name "python-schema")
2829 (version "0.6.6")
2830 (source
2831 (origin
2832 (method url-fetch)
2833 (uri (pypi-uri "schema" version))
2834 (sha256
2835 (base32
2836 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2837 (build-system python-build-system)
2838 (native-inputs
2839 `(("python-pytest" ,python-pytest)))
2840 (home-page "https://github.com/keleshev/schema")
2841 (synopsis "Simple data validation library")
2842 (description
2843 "@code{python-schema} is a library for validating Python data
2844 structures, such as those obtained from config-files, forms, external
2845 services or command-line parsing, converted from JSON/YAML (or
2846 something else) to Python data-types.")
2847 (license license:psfl)))
2848
2849 (define-public python2-schema
2850 (package-with-python2 python-schema))
2851
2852 (define-public python-schema-0.5
2853 (package (inherit python-schema)
2854 (version "0.5.0")
2855 (source
2856 (origin
2857 (method url-fetch)
2858 (uri (pypi-uri "schema" version))
2859 (sha256
2860 (base32
2861 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2862
2863 (define-public python2-schema-0.5
2864 (package-with-python2 python-schema-0.5))
2865
2866 (define-public python-kitchen
2867 (package
2868 (name "python-kitchen")
2869 (version "1.2.5")
2870 (source
2871 (origin
2872 (method url-fetch)
2873 (uri (pypi-uri "kitchen" version))
2874 (sha256
2875 (base32
2876 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2877 (build-system python-build-system)
2878 (propagated-inputs
2879 `(("python-chardet" ,python-chardet)))
2880 (home-page "https://github.com/fedora-infra/kitchen")
2881 (synopsis "Python API for snippets")
2882 (description "@code{kitchen} module provides a python API for all sorts of
2883 little useful snippets of code that everybody ends up writing for their projects
2884 but never seem big enough to build an independent release. Use kitchen and stop
2885 cutting and pasting that code over and over.")
2886 (license (list license:lgpl2.1+
2887 ;; subprocess.py, test_subprocess.py,
2888 ;; kitchen/pycompat25/defaultdict.py:
2889 license:psfl))))
2890
2891 (define-public python2-kitchen
2892 (package-with-python2 python-kitchen))
2893
2894 (define-public python-unidecode
2895 (package
2896 (name "python-unidecode")
2897 (version "1.1.1")
2898 (source (origin
2899 (method url-fetch)
2900 (uri (pypi-uri "Unidecode" version))
2901 (sha256
2902 (base32
2903 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2904 (build-system python-build-system)
2905 (home-page "https://pypi.org/project/Unidecode/")
2906 (synopsis "ASCII transliterations of Unicode text")
2907 (description
2908 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2909 useful when integrating with legacy code that doesn't support Unicode, or for
2910 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2911 machine identifiers from human-readable Unicode strings that should still be
2912 somewhat intelligible.")
2913 (license license:gpl2+)))
2914
2915 (define-public python2-unidecode
2916 (package-with-python2 python-unidecode))
2917
2918 (define-public python-text-unidecode
2919 (package
2920 (name "python-text-unidecode")
2921 (version "1.3")
2922 (source (origin
2923 (method url-fetch)
2924 (uri (pypi-uri "text-unidecode" version))
2925 (sha256
2926 (base32
2927 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2928 (build-system python-build-system)
2929 (arguments
2930 '(#:phases (modify-phases %standard-phases
2931 (replace 'check
2932 (lambda _
2933 (setenv "PYTHONPATH"
2934 (string-append "./build/lib:"
2935 (getenv "PYTHONPATH")))
2936 (invoke "pytest" "-vv"))))))
2937 (native-inputs
2938 `(("python-pytest" ,python-pytest)))
2939 (home-page "https://github.com/kmike/text-unidecode/")
2940 (synopsis "Decode Unicode data")
2941 (description
2942 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2943 Perl library. It can create ASCII representations of Unicode data. In general
2944 users should prefer the @code{python-unidecode} package which offers better
2945 memory usage and transliteration quality.")
2946 ;; The user can choose either license.
2947 (license (list license:clarified-artistic license:gpl2+))))
2948
2949 (define-public python2-text-unidecode
2950 (package-with-python2 python-text-unidecode))
2951
2952 (define-public python-pyjwt
2953 (package
2954 (name "python-pyjwt")
2955 (version "1.7.1")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "PyJWT" version))
2960 (sha256
2961 (base32
2962 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2963 (modules '((guix build utils)))
2964 (snippet
2965 '(begin
2966 (for-each delete-file-recursively
2967 (find-files "." "\\.pyc$"))
2968 #t))))
2969 (build-system python-build-system)
2970 (arguments
2971 '(#:phases (modify-phases %standard-phases
2972 (replace 'check
2973 (lambda _
2974 ;; Mimic upstream commit 3a20892442b34c7 to get
2975 ;; rid of dependency on pytest-runner < 5.0.
2976 ;; Remove substitution for PyJWT > 1.7.1.
2977 (substitute* "setup.py"
2978 ((".*pytest-runner.*")
2979 ""))
2980 (invoke "pytest" "-vv"))))))
2981 (native-inputs
2982 `(("python-pytest" ,python-pytest)
2983 ("python-pytest-cov" ,python-pytest-cov)))
2984 (home-page "https://github.com/progrium/pyjwt")
2985 (synopsis "JSON Web Token implementation in Python")
2986 (description
2987 "PyJWT is a JSON Web Token implementation written in Python.")
2988 (license license:expat)))
2989
2990 (define-public python2-pyjwt
2991 (package-with-python2 python-pyjwt))
2992
2993 (define-public python-pykka
2994 (package
2995 (name "python-pykka")
2996 (version "1.2.1")
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "Pykka" version))
3001 (sha256
3002 (base32
3003 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3004 (build-system python-build-system)
3005 (native-inputs
3006 `(("python-mock" ,python-mock)
3007 ("python-nose" ,python-nose)
3008 ("python-gevent" ,python-gevent)
3009 ("python-eventlet" ,python-eventlet)))
3010 (home-page "https://www.pykka.org/")
3011 (synopsis "Pykka is a Python implementation of the actor model")
3012 (description
3013 "Pykka is a Python implementation of the actor model.
3014 The actor model introduces some simple rules to control the sharing
3015 of state and cooperation between execution units, which makes it
3016 easier to build concurrent applications.")
3017 (license license:asl2.0)))
3018
3019 (define-public python2-pykka
3020 (package-with-python2 python-pykka))
3021
3022 (define-public python-pymsgbox
3023 (package
3024 (name "python-pymsgbox")
3025 (version "1.0.6")
3026 (source
3027 (origin
3028 (method git-fetch)
3029 (uri (git-reference
3030 ;; LICENSE.txt is not present on pypi
3031 (url "https://github.com/asweigart/PyMsgBox")
3032 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3033 (file-name (git-file-name name version))
3034 (sha256
3035 (base32
3036 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3037 (arguments
3038 ;; Circular dependency to run tests:
3039 ;; Tests need pyautogui, which depends on pymsgbox.
3040 '(#:tests? #f))
3041 (build-system python-build-system)
3042 (home-page "https://github.com/asweigart/PyMsgBox")
3043 (synopsis "Python module for JavaScript-like message boxes")
3044 (description
3045 "PyMsgBox is a simple, cross-platform, pure Python module for
3046 JavaScript-like message boxes. Types of dialog boxes include:
3047 @enumerate
3048 @item alert
3049 @item confirm
3050 @item prompt
3051 @item password
3052 @end enumerate
3053 ")
3054 (license license:bsd-3)))
3055
3056 (define-public python-pympler
3057 (package
3058 (name "python-pympler")
3059 (home-page "https://pythonhosted.org/Pympler/")
3060 (version "0.8")
3061 (source (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "Pympler" version))
3064 (sha256
3065 (base32
3066 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3067 (build-system python-build-system)
3068 (arguments
3069 `(#:phases (modify-phases %standard-phases
3070 (delete 'check)
3071 (add-after 'install 'check
3072 (lambda* (#:key inputs outputs #:allow-other-keys)
3073 (add-installed-pythonpath inputs outputs)
3074 (invoke "python" "setup.py" "test"))))))
3075 (synopsis "Measure, monitor and analyze memory behavior")
3076 (description
3077 "Pympler is a development tool to measure, monitor and analyze
3078 the memory behavior of Python objects in a running Python application.
3079
3080 By pympling a Python application, detailed insight in the size and the
3081 lifetime of Python objects can be obtained. Undesirable or unexpected
3082 runtime behavior like memory bloat and other @samp{pymples} can easily
3083 be identified.
3084
3085 A web profiling frontend exposes process statistics, garbage
3086 visualisation and class tracker statistics.")
3087 (license license:asl2.0)))
3088
3089 (define-public python2-pympler
3090 (package-with-python2 python-pympler))
3091
3092 (define-public python-itsdangerous
3093 (package
3094 (name "python-itsdangerous")
3095 (version "1.1.0")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (pypi-uri "itsdangerous" version))
3100 (sha256
3101 (base32
3102 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3103 (build-system python-build-system)
3104 (home-page "https://palletsprojects.com/p/itsdangerous/")
3105 (synopsis "Python library for passing data to/from untrusted environments")
3106 (description
3107 "Itsdangerous provides various helpers to pass trusted data to untrusted
3108 environments and back.")
3109 (license license:bsd-3)))
3110
3111 (define-public python2-itsdangerous
3112 (package-with-python2 python-itsdangerous))
3113
3114 (define-public python-pyyaml
3115 (package
3116 (name "python-pyyaml")
3117 (version "5.3.1")
3118 (source
3119 (origin
3120 (method url-fetch)
3121 (uri (pypi-uri "PyYAML" version))
3122 (sha256
3123 (base32
3124 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3125 (build-system python-build-system)
3126 (inputs
3127 `(("libyaml" ,libyaml)))
3128 (home-page "https://pyyaml.org")
3129 (synopsis "YAML parser and emitter for Python")
3130 (description
3131 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3132 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3133 API, and sensible error messages. PyYAML supports standard YAML tags and
3134 provides Python-specific tags that represent an arbitrary Python object.")
3135 (license license:expat)))
3136
3137 (define-public python2-pyyaml
3138 (package-with-python2 python-pyyaml))
3139
3140 (define-public python-vine
3141 (package
3142 (name "python-vine")
3143 (version "1.1.4")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "vine" version))
3148 (sha256
3149 (base32
3150 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3151 (build-system python-build-system)
3152 (native-inputs
3153 `(("python-pytest" ,python-pytest)
3154 ("python-case" ,python-case)))
3155 (home-page "https://github.com/celery/vine")
3156 (synopsis "Promises for Python")
3157 (description
3158 "@code{vine} provides a special implementation of promises in that it can
3159 be used both for \"promise of a value\" and lazy evaluation. The biggest
3160 upside for this is that everything in a promise can also be a promise,
3161 e.g. filters, callbacks and errbacks can all be promises.")
3162 (license license:bsd-3)))
3163
3164 (define-public python-virtualenv
3165 (package
3166 (name "python-virtualenv")
3167 (version "20.2.1")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (pypi-uri "virtualenv" version))
3172 (sha256
3173 (base32
3174 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3175 (build-system python-build-system)
3176 (native-inputs
3177 `(("python-mock" ,python-mock)
3178 ("python-pytest" ,python-pytest)
3179 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3180 ;; be an input at all". However, removing the input makes the build error:
3181 ;; File "setup.py", line 4, in <module>
3182 ;; raise RuntimeError("setuptools >= 41 required to build")
3183 ("python-setuptools" ,python-setuptools)
3184 ("python-setuptools-scm" ,python-setuptools-scm)))
3185 (propagated-inputs
3186 `(("python-appdirs" ,python-appdirs)
3187 ("python-distlib" ,python-distlib/next)
3188 ("python-filelock" ,python-filelock)
3189 ("python-six" ,python-six)
3190 ("python-importlib-metadata" ,python-importlib-metadata)))
3191 (home-page "https://virtualenv.pypa.io/")
3192 (synopsis "Virtual Python environment builder")
3193 (description
3194 "Virtualenv is a tool to create isolated Python environments.")
3195 (properties `((python2-variant . ,(delay python2-virtualenv))))
3196 (license license:expat)))
3197
3198 (define-public python2-virtualenv
3199 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3200 (package
3201 (inherit base)
3202 (arguments
3203 `(#:python ,python-2
3204 #:phases
3205 (modify-phases %standard-phases
3206 (add-after 'set-paths 'adjust-PYTHONPATH
3207 (lambda* (#:key inputs #:allow-other-keys)
3208 (let* ((python (assoc-ref inputs "python"))
3209 (python-sitedir (string-append python "/lib/python2.7"
3210 "/site-packages")))
3211 ;; XXX: 'python2' always comes first on PYTHONPATH
3212 ;; and shadows the 'setuptools' input. Move python2
3213 ;; last: this should be fixed in python-build-system
3214 ;; in a future rebuild cycle.
3215 (setenv "PYTHONPATH"
3216 (string-append (string-join (delete python-sitedir
3217 (string-split
3218 (getenv "PYTHONPATH")
3219 #\:))
3220 ":")
3221 ":" python-sitedir))
3222 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3223 (getenv "PYTHONPATH"))
3224 #t))))))
3225 (propagated-inputs
3226 `(("python-contextlib2" ,python2-contextlib2)
3227 ,@(package-propagated-inputs base))))))
3228
3229 (define-public python-markupsafe
3230 (package
3231 (name "python-markupsafe")
3232 (version "1.1.1")
3233 (source
3234 (origin
3235 (method url-fetch)
3236 (uri (pypi-uri "MarkupSafe" version))
3237 (sha256
3238 (base32
3239 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3240 (build-system python-build-system)
3241 (arguments
3242 `(#:modules ((ice-9 ftw)
3243 (srfi srfi-1)
3244 (srfi srfi-26)
3245 (guix build utils)
3246 (guix build python-build-system))
3247 #:phases (modify-phases %standard-phases
3248 (replace 'check
3249 (lambda _
3250 (let ((cwd (getcwd))
3251 (libdir (find (cut string-prefix? "lib." <>)
3252 (scandir "build"))))
3253 (setenv "PYTHONPATH"
3254 (string-append cwd "/build/" libdir ":"
3255 (getenv "PYTHONPATH")))
3256 (invoke "pytest" "-vv")))))))
3257 (native-inputs
3258 `(("python-pytest" ,python-pytest)))
3259 (home-page "https://github.com/mitsuhiko/markupsafe")
3260 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3261 (description
3262 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3263 for Python.")
3264 (license license:bsd-3)))
3265
3266 (define-public python2-markupsafe
3267 (package-with-python2 python-markupsafe))
3268
3269 (define-public python-jinja2
3270 (package
3271 (name "python-jinja2")
3272 (version "2.11.2")
3273 (source
3274 (origin
3275 (method url-fetch)
3276 (uri (pypi-uri "Jinja2" version))
3277 (sha256
3278 (base32
3279 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3280 (build-system python-build-system)
3281 (arguments
3282 '(#:phases (modify-phases %standard-phases
3283 (replace 'check
3284 (lambda* (#:key tests? #:allow-other-keys)
3285 (if tests?
3286 (begin
3287 (setenv "PYTHONPATH"
3288 (string-append "./build/lib:"
3289 (getenv "PYTHONPATH")))
3290 (invoke "pytest" "-vv"))
3291 (format #t "test suite not run~%"))
3292 #t)))))
3293 (native-inputs
3294 `(("python-pytest" ,python-pytest)))
3295 (propagated-inputs
3296 `(("python-markupsafe" ,python-markupsafe)))
3297 (home-page "http://jinja.pocoo.org/")
3298 (synopsis "Python template engine")
3299 (description
3300 "Jinja2 is a small but fast and easy to use stand-alone template engine
3301 written in pure Python.")
3302 (license license:bsd-3)))
3303
3304 (define-public python2-jinja2
3305 (package-with-python2 python-jinja2))
3306
3307 (define-public python-jinja2-time
3308 (package
3309 (name "python-jinja2-time")
3310 (version "0.2.0")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (pypi-uri "jinja2-time" version))
3315 (sha256
3316 (base32
3317 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3318 (build-system python-build-system)
3319 (propagated-inputs
3320 `(("python-arrow" ,python-arrow)
3321 ("python-jinja2" ,python-jinja2)))
3322 (home-page
3323 "https://github.com/hackebrot/jinja2-time")
3324 (synopsis "Jinja2 Extension for Dates and Times")
3325 (description
3326 "This package provides an extension for the template engine Jinja2. It
3327 adds a 'now' tag providing a convenient access to the arrow.now() API from
3328 templates. A format string can be provided to control the output.")
3329 (license license:expat)))
3330
3331 (define-public python-pystache
3332 (package
3333 (name "python-pystache")
3334 (version "0.5.4")
3335 (source (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "pystache" version))
3338 (sha256
3339 (base32
3340 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3341 (build-system python-build-system)
3342 (arguments
3343 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3344 (home-page "http://defunkt.io/pystache/")
3345 (synopsis "Python logic-less template engine")
3346 (description
3347 "Pystache is a Python implementation of the framework agnostic,
3348 logic-free templating system Mustache.")
3349 (license license:expat)
3350 (properties `((python2-variant . ,(delay python2-pystache))))))
3351
3352 (define-public python2-pystache
3353 (package (inherit (package-with-python2
3354 (strip-python2-variant python-pystache)))
3355 (arguments
3356 `(#:python ,python-2
3357 #:phases
3358 (modify-phases %standard-phases
3359 (replace 'check
3360 (lambda _
3361 (invoke "python" "test_pystache.py"))))))))
3362
3363 (define-public python-joblib
3364 (package
3365 (name "python-joblib")
3366 (version "0.14.1")
3367 (source (origin
3368 (method url-fetch)
3369 (uri (pypi-uri "joblib" version))
3370 (sha256
3371 (base32
3372 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3373 (build-system python-build-system)
3374 (arguments
3375 `(#:phases
3376 (modify-phases %standard-phases
3377 (replace 'check
3378 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3379 (native-inputs
3380 `(("python-pytest" ,python-pytest)))
3381 (home-page "https://joblib.readthedocs.io/")
3382 (synopsis "Using Python functions as pipeline jobs")
3383 (description
3384 "Joblib is a set of tools to provide lightweight pipelining in Python.
3385 In particular, joblib offers: transparent disk-caching of the output values
3386 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3387 logging and tracing of the execution.")
3388 (license license:bsd-3)))
3389
3390 (define-public python2-joblib
3391 (package-with-python2 python-joblib))
3392
3393 (define-public python-daemon
3394 (package
3395 (name "python-daemon")
3396 (version "2.2.3")
3397 (source
3398 (origin
3399 (method url-fetch)
3400 (uri (pypi-uri "python-daemon" version))
3401 (sha256
3402 (base32
3403 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3404 (build-system python-build-system)
3405 (arguments
3406 `(#:phases
3407 (modify-phases %standard-phases
3408 (add-before 'check 'disable-tests
3409 (lambda _
3410 ;; FIXME: Determine why test fails
3411 (substitute* "test/test_daemon.py"
3412 (("test_detaches_process_context")
3413 "skip_test_detaches_process_context"))
3414 #t)))))
3415 (propagated-inputs
3416 `(("python-lockfile" ,python-lockfile)))
3417 (native-inputs
3418 `(("python-unittest2" ,python-unittest2)
3419 ("python-testtools" ,python-testtools)
3420 ("python-testscenarios" ,python-testscenarios)
3421 ("python-mock" ,python-mock)
3422 ("python-docutils" ,python-docutils)))
3423 (home-page "https://pagure.io/python-daemon/")
3424 (synopsis "Python library for making a Unix daemon process")
3425 (description "Python-daemon is a library that assists a Python program to
3426 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3427
3428 This library provides a @code{DaemonContext} class that manages the following
3429 important tasks for becoming a daemon process:
3430 @enumerate
3431 @item Detach the process into its own process group.
3432 @item Set process environment appropriate for running inside a chroot.
3433 @item Renounce suid and sgid privileges.
3434 @item Close all open file descriptors.
3435 @item Change the working directory, uid, gid, and umask.
3436 @item Set appropriate signal handlers.
3437 @item Open new file descriptors for stdin, stdout, and stderr.
3438 @item Manage a specified PID lock file.
3439 @item Register cleanup functions for at-exit processing.
3440 @end enumerate")
3441 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3442 (license (list license:asl2.0 license:gpl3+))))
3443
3444 (define-public python-anytree
3445 (package
3446 (name "python-anytree")
3447 (version "2.8.0")
3448 (source (origin
3449 (method url-fetch)
3450 (uri (pypi-uri "anytree" version))
3451 (sha256
3452 (base32
3453 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3454 (build-system python-build-system)
3455 (propagated-inputs
3456 `(("python-six" ,python-six)))
3457 (native-inputs
3458 `(;; For tests.
3459 ("graphviz" ,graphviz) ;for 'dot'
3460 ("python-nose" ,python-nose)))
3461 (home-page "https://github.com/c0fec0de/anytree")
3462 (synopsis "Lightweight tree data library")
3463 (description
3464 "@code{anytree} is a simple, lightweight, and extensible tree data
3465 structure for Python.")
3466 (license license:asl2.0)))
3467
3468 (define-public python-docutils
3469 (package
3470 (name "python-docutils")
3471 (version "0.16")
3472 (source
3473 (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "docutils" version))
3476 (sha256
3477 (base32
3478 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3479 (build-system python-build-system)
3480 (arguments
3481 '(#:phases (modify-phases %standard-phases
3482 (replace 'check
3483 (lambda* (#:key tests? #:allow-other-keys)
3484 (if tests?
3485 (invoke "python" "test/alltests.py")
3486 (format #t "test suite not run~%"))
3487 #t)))))
3488 (home-page "http://docutils.sourceforge.net/")
3489 (synopsis "Python Documentation Utilities")
3490 (description
3491 "Docutils is a modular system for processing documentation into useful
3492 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3493 easy to use markup language, for input.
3494
3495 This package provides tools for converting @file{.rst} files to other formats
3496 via commands such as @command{rst2man}, as well as supporting Python code.")
3497 ;; Most of the source code is public domain, but some source files are
3498 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3499 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3500
3501 (define-public python2-docutils
3502 (package-with-python2 python-docutils))
3503
3504 ;; python2-sphinx fails its test suite with newer versions.
3505 (define-public python2-docutils-0.14
3506 (package
3507 (inherit python2-docutils)
3508 (version "0.14")
3509 (source (origin
3510 (method url-fetch)
3511 (uri (pypi-uri "docutils" version))
3512 (sha256
3513 (base32
3514 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3515
3516 (define-public python-restructuredtext-lint
3517 (package
3518 (name "python-restructuredtext-lint")
3519 (version "1.3.0")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (pypi-uri "restructuredtext-lint" version))
3524 (sha256
3525 (base32
3526 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3527 (build-system python-build-system)
3528 (arguments
3529 `(#:phases
3530 (modify-phases %standard-phases
3531 (delete 'check)
3532 (add-after 'install 'check
3533 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3534 (when tests?
3535 (add-installed-pythonpath inputs outputs)
3536 (invoke "nosetests" "-v"))
3537 #t)))))
3538 (propagated-inputs
3539 `(("python-docutils" ,python-docutils)))
3540 (native-inputs
3541 `(("python-nose" ,python-nose)))
3542 (home-page "https://github.com/twolfson/restructuredtext-lint")
3543 (synopsis "reStructuredText linter")
3544 (description "This package provides a linter for the reStructuredText
3545 format.")
3546 (license license:unlicense)))
3547
3548 (define-public python-doc8
3549 (package
3550 (name "python-doc8")
3551 (version "0.8.0")
3552 (source
3553 (origin
3554 (method url-fetch)
3555 (uri (pypi-uri "doc8" version))
3556 (sha256
3557 (base32
3558 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3559 (build-system python-build-system)
3560 (arguments
3561 `(#:phases
3562 (modify-phases %standard-phases
3563 (delete 'check)
3564 (add-after 'install 'check
3565 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3566 (when tests?
3567 (add-installed-pythonpath inputs outputs)
3568 (invoke "pytest" "-v"))
3569 #t)))))
3570 (propagated-inputs
3571 `(("python-chardet" ,python-chardet)
3572 ("python-docutils" ,python-docutils)
3573 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3574 ("python-six" ,python-six)
3575 ("python-stevedore" ,python-stevedore)))
3576 (native-inputs
3577 `(("python-testtools" ,python-testtools)
3578 ("python-pytest" ,python-pytest)))
3579 (home-page "https://launchpad.net/doc8")
3580 (synopsis
3581 "Style checker for Sphinx (or other) RST documentation")
3582 (description
3583 "Doc8 is an opinionated style checker for reStructured Text and plain
3584 text styles of documentation.")
3585 (license license:asl2.0)))
3586
3587 (define-public python-pygments
3588 (package
3589 (name "python-pygments")
3590 (version "2.6.1")
3591 (source
3592 (origin
3593 (method url-fetch)
3594 (uri (pypi-uri "Pygments" version))
3595 (sha256
3596 (base32
3597 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3598 (build-system python-build-system)
3599 (arguments
3600 ;; FIXME: Tests require sphinx, which depends on this.
3601 '(#:tests? #f))
3602 (home-page "https://pygments.org/")
3603 (synopsis "Syntax highlighting")
3604 (description
3605 "Pygments is a syntax highlighting package written in Python.")
3606 (license license:bsd-2)
3607 (properties `((python2-variant . ,(delay python2-pygments))))))
3608
3609 ;; Pygments 2.6 and later does not support Python 2.
3610 (define-public python2-pygments
3611 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3612 (package
3613 (inherit base)
3614 (version "2.5.2")
3615 (source (origin
3616 (method url-fetch)
3617 (uri (pypi-uri "Pygments" version))
3618 (sha256
3619 (base32
3620 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3621
3622 (define-public python-bumpversion
3623 (package
3624 (name "python-bumpversion")
3625 (version "0.5.3")
3626 (source
3627 (origin
3628 (method url-fetch)
3629 (uri (pypi-uri "bumpversion" version))
3630 (sha256
3631 (base32
3632 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3633 (build-system python-build-system)
3634 (home-page "https://github.com/peritus/bumpversion")
3635 (synopsis "Tool to bump software version")
3636 (description "This tool provides a command-line interface (CLI) to bump a
3637 software version simply.")
3638 (license license:expat)))
3639
3640 (define-public python-deprecated
3641 (package
3642 (name "python-deprecated")
3643 (version "1.2.5")
3644 (source
3645 (origin
3646 (method git-fetch)
3647 (uri (git-reference
3648 (url "https://github.com/tantale/deprecated")
3649 (commit (string-append "v" version))))
3650 (file-name (git-file-name name version))
3651 (sha256
3652 (base32
3653 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3654 (build-system python-build-system)
3655 (arguments
3656 `(#:phases (modify-phases %standard-phases
3657 (replace 'check
3658 (lambda _
3659 (invoke "pytest"))))))
3660 (propagated-inputs
3661 `(("python-wrapt" ,python-wrapt)))
3662 (native-inputs
3663 `(("python-bumpversion" ,python-bumpversion)
3664 ("python-pytest" ,python-pytest)
3665 ("python-pytest-cov" ,python-pytest-cov)
3666 ("python-sphinx" ,python-sphinx)
3667 ("python-tox" ,python-tox)))
3668 (home-page "https://github.com/tantale/deprecated")
3669 (synopsis "Python decorator to deprecate classes, functions or methods")
3670 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3671 to deprecate classes, functions or methods.")
3672 (license license:expat)))
3673
3674 (define-public python-pygithub
3675 (package
3676 (name "python-pygithub")
3677 (version "1.43.8")
3678 (source
3679 ;; We fetch from the Git repo because there are no tests in the PyPI
3680 ;; archive.
3681 (origin
3682 (method git-fetch)
3683 (uri (git-reference
3684 (url "https://github.com/PyGithub/PyGithub")
3685 (commit (string-append "v" version))))
3686 (file-name (git-file-name name version))
3687 (sha256
3688 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3689 (build-system python-build-system)
3690 (arguments
3691 `(#:phases (modify-phases %standard-phases
3692 ;; Some tests rely on the network.
3693 (add-after 'unpack 'disable-failing-tests
3694 (lambda _
3695 (substitute* "tests/Issue142.py"
3696 (("testDecodeJson") "disabled_testDecodeJson"))
3697 #t))
3698 (add-before 'check 'prepare-for-tests
3699 (lambda _
3700 (for-each (lambda (f)
3701 (chmod f #o666))
3702 (find-files "./tests"))
3703 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3704 (setenv "PYTHONPATH"
3705 (string-append "./tests:" (getenv "PYTHONPATH")))
3706 #t)))))
3707 (propagated-inputs
3708 `(("python-deprecated" ,python-deprecated)
3709 ("python-pyjwt" ,python-pyjwt)
3710 ("python-requests" ,python-requests)))
3711 (native-inputs `(("python-httpretty" ,python-httpretty)))
3712 (home-page "https://pygithub.readthedocs.io/en/latest/")
3713 (synopsis "Python library for the GitHub API")
3714 (description "This library allows managing GitHub resources such as
3715 repositories, user profiles, and organizations in your Python applications,
3716 using version 3 of the GitHub application programming interface (API).")
3717 (license license:lgpl3+)))
3718
3719 (define-public python-rellu
3720 (package
3721 (name "python-rellu")
3722 (version "0.7")
3723 (source
3724 (origin
3725 (method url-fetch)
3726 (uri (pypi-uri "rellu" version))
3727 (sha256
3728 (base32
3729 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3730 (build-system python-build-system)
3731 (propagated-inputs
3732 `(("python-invoke" ,python-invoke)
3733 ("python-pygithub" ,python-pygithub)))
3734 (home-page "https://github.com/robotframework/rellu")
3735 (synopsis "Utilities to create PyPI releases")
3736 (description "This collection of utilities contains tooling and templates
3737 to assist in creating releases on GitHub and publishing them on PyPI. It is
3738 designed to be used by Robot Framework and tools and libraries in its
3739 ecosystem, but can naturally be used also by other projects.")
3740 (license license:asl2.0)))
3741
3742 (define-public python-robotframework
3743 (package
3744 (name "python-robotframework")
3745 (version "3.2.2")
3746 ;; There are no tests in the PyPI archive.
3747 (source
3748 (origin
3749 (method git-fetch)
3750 (uri (git-reference
3751 (url "https://github.com/robotframework/robotframework")
3752 (commit (string-append "v" version))))
3753 (file-name (git-file-name name version))
3754 (sha256
3755 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3756 (patches (search-patches
3757 "python-robotframework-source-date-epoch.patch"))))
3758 (build-system python-build-system)
3759 (arguments
3760 `(#:phases (modify-phases %standard-phases
3761 (add-before 'build 'build-and-install-doc
3762 (lambda* (#:key outputs #:allow-other-keys)
3763 (let* ((doc-output (assoc-ref outputs "doc"))
3764 (doc (string-append doc-output "/share/"
3765 ,name "-" ,version "/")))
3766 (invoke "invoke" "library-docs" "all")
3767 (mkdir-p doc)
3768 (copy-recursively "doc/libraries"
3769 (string-append doc "/libraries"))
3770 #t)))
3771 (replace 'check
3772 (lambda* (#:key inputs #:allow-other-keys)
3773 ;; Some tests require timezone data. Otherwise, they
3774 ;; look up /etc/localtime, which doesn't exist, and fail
3775 ;; with:
3776 ;;
3777 ;; OverflowError: mktime argument out of range
3778 (setenv "TZDIR"
3779 (string-append (assoc-ref inputs "tzdata")
3780 "/share/zoneinfo"))
3781 (setenv "TZ" "Europe/Paris")
3782
3783 (invoke "python" "utest/run.py"))))))
3784 (native-inputs
3785 `(("python-invoke" ,python-invoke)
3786 ("python-rellu" ,python-rellu)
3787 ("python:tk" ,python "tk") ;used when building the HTML doc
3788 ("tzdata" ,tzdata-for-tests)))
3789 (outputs '("out" "doc"))
3790 (home-page "https://robotframework.org")
3791 (synopsis "Generic automation framework")
3792 (description "Robot Framework is a generic automation framework for
3793 acceptance testing, acceptance test driven development (ATDD), and robotic
3794 process automation (RPA).")
3795 (license license:asl2.0)))
3796
3797 (define-public python-robotframework-lint
3798 ;; There is no properly tagged release; the commit below seems to correspond
3799 ;; to the 0.9 stable release available from PyPI. The tests are not
3800 ;; included in the PyPI archive, so we fetch the sources from the upstream
3801 ;; Git repo.
3802 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3803 (revision "0"))
3804 (package
3805 (name "python-robotframework-lint")
3806 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3807 revision commit))
3808 (source
3809 (origin
3810 (method git-fetch)
3811 (uri (git-reference
3812 (url "https://github.com/boakley/robotframework-lint")
3813 (commit commit)))
3814 (file-name (git-file-name name version))
3815 (sha256
3816 (base32
3817 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3818 (build-system python-build-system)
3819 (arguments
3820 `(#:phases
3821 (modify-phases %standard-phases
3822 (replace 'check
3823 (lambda _
3824 (invoke "python" "-m" "robot" "-A"
3825 "tests/conf/default.args" "tests"))))))
3826 (propagated-inputs
3827 `(("python-robotframework" ,python-robotframework)))
3828 (home-page "https://github.com/boakley/robotframework-lint/")
3829 (synopsis "Static analysis tool (linter) for Robot Framework")
3830 (description "This package provides the @code{rflint} command-line
3831 utility, a static analysis tool (linter) for Robot Framework source files.")
3832 (license license:asl2.0))))
3833
3834 (define-public python-robotframework-sshlibrary
3835 (package
3836 (name "python-robotframework-sshlibrary")
3837 (version "3.3.0")
3838 ;; There are no tests in the PyPI archive.
3839 (source
3840 (origin
3841 (method git-fetch)
3842 (uri (git-reference
3843 (url "https://github.com/robotframework/SSHLibrary")
3844 (commit (string-append "v" version))))
3845 (file-name (git-file-name name version))
3846 (sha256
3847 (base32
3848 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3849 (build-system python-build-system)
3850 (arguments
3851 `(#:phases
3852 (modify-phases %standard-phases
3853 (add-before 'build 'build-and-install-doc
3854 (lambda* (#:key outputs #:allow-other-keys)
3855 (let* ((doc-output (assoc-ref outputs "doc"))
3856 (doc (string-append doc-output "/share/"
3857 ,name "-" ,version "/")))
3858 (invoke "chmod" "-R" "+w" "docs")
3859 (invoke "invoke" "kw-docs" "project-docs")
3860 (mkdir-p doc)
3861 (for-each delete-file (find-files "docs" "\\.rst"))
3862 (copy-recursively "docs" doc)
3863 #t)))
3864 (replace 'check
3865 (lambda _
3866 ;; Some tests require an SSH server; we remove them.
3867 (delete-file "utest/test_client_api.py")
3868 (delete-file "utest/test_scp.py")
3869 (invoke "python" "utest/run.py"))))))
3870 (propagated-inputs
3871 `(("python-robotframework" ,python-robotframework)
3872 ("python-paramiko" ,python-paramiko)
3873 ("python-scp" ,python-scp)))
3874 (native-inputs
3875 `(("openssh" ,openssh)
3876 ("which" ,which)
3877 ;; To generate the documentation
3878 ("python-docutils" ,python-docutils)
3879 ("python-invoke" ,python-invoke)
3880 ("python-pygments" ,python-pygments)
3881 ("python-rellu" ,python-rellu)))
3882 (outputs '("out" "doc"))
3883 (home-page "https://github.com/robotframework/SSHLibrary")
3884 (synopsis "Robot Framework library for SSH and SFTP")
3885 (description "SSHLibrary is a Robot Framework library providing support
3886 for SSH and SFTP. It has the following main usages:
3887 @itemize @bullet
3888 @item Executing commands on the remote machine, either blocking or non-blocking.
3889 @item Writing and reading in an interactive shell.
3890 @item Transferring files and directories over SFTP.
3891 @item Ensuring that files and directories exist on the remote machine.
3892 @end itemize")
3893 (license license:asl2.0)))
3894
3895 (define-public python-rstr
3896 (package
3897 (name "python-rstr")
3898 (version "2.2.6")
3899 (source
3900 (origin
3901 (method url-fetch)
3902 (uri (pypi-uri "rstr" version))
3903 (sha256
3904 (base32
3905 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3906 (build-system python-build-system)
3907 (home-page
3908 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3909 (synopsis "Generate random strings in Python")
3910 (description "This package provides a python module for generating
3911 random strings of various types. It could be useful for fuzz testing,
3912 generating dummy data, or other applications. It has no dependencies
3913 outside the standard library.")
3914 (license license:bsd-3)))
3915
3916 (define-public python-scp
3917 (package
3918 (name "python-scp")
3919 (version "0.13.3")
3920 (source
3921 (origin
3922 (method url-fetch)
3923 (uri (pypi-uri "scp" version))
3924 (sha256
3925 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3926 (build-system python-build-system)
3927 (arguments
3928 '(#:tests? #f)) ;tests require an SSH server
3929 (propagated-inputs
3930 `(("python-paramiko" ,python-paramiko)))
3931 (home-page "https://github.com/jbardin/scp.py")
3932 (synopsis "SCP protocol module for Python and Paramiko")
3933 (description "The scp module extends the Paramiko library to send and
3934 receive files via the SCP1 protocol, as implemented by the OpenSSH
3935 @command{scp} program.")
3936 (license license:gpl2+)))
3937
3938 (define-public python-rst.linker
3939 (package
3940 (name "python-rst.linker")
3941 (version "1.11")
3942 (source
3943 (origin
3944 (method url-fetch)
3945 (uri (pypi-uri "rst.linker" version))
3946 (sha256
3947 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3948 (build-system python-build-system)
3949 (propagated-inputs
3950 `(("python-dateutil" ,python-dateutil)
3951 ("python-six" ,python-six)))
3952 (native-inputs
3953 `(("python-setuptools-scm" ,python-setuptools-scm)))
3954 ;; Test would require path.py, which would introduce a cyclic dependence.
3955 (arguments `(#:tests? #f))
3956 ;; Note: As of version 1.7 the documentation is not worth building.
3957 (home-page "https://github.com/jaraco/rst.linker")
3958 (synopsis "Sphinx plugin to add links and timestamps")
3959 (description "rst.linker automatically replaces text by a
3960 reStructuredText external reference or timestamps. It's primary purpose is to
3961 augment the changelog, but it can be used for other documents, too.")
3962 (license license:expat)))
3963
3964 (define-public python2-rst.linker
3965 (package-with-python2 python-rst.linker))
3966
3967 (define-public python-sshpubkeys
3968 (package
3969 (name "python-sshpubkeys")
3970 (version "3.1.0")
3971 (home-page "https://github.com/ojarva/python-sshpubkeys")
3972 (source (origin
3973 (method git-fetch)
3974 (uri (git-reference
3975 (url home-page)
3976 (commit (string-append "v" version))))
3977 (file-name (git-file-name name version))
3978 (sha256
3979 (base32
3980 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3981 (build-system python-build-system)
3982 (propagated-inputs
3983 `(("python-cryptography" ,python-cryptography)
3984 ("python-ecdsa" ,python-ecdsa)))
3985 (synopsis "OpenSSH public key parser")
3986 (description
3987 "This package provides a library for parsing and validating OpenSSH
3988 public key files.")
3989 (license license:bsd-3)))
3990
3991 (define-public python-feedgenerator
3992 (package
3993 (name "python-feedgenerator")
3994 (version "1.9")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "feedgenerator" version))
3999 (sha256
4000 (base32
4001 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4002 (modules '((guix build utils)))
4003 (snippet
4004 '(begin
4005 ;; Remove pre-compiled .pyc files from source.
4006 (for-each delete-file-recursively
4007 (find-files "." "__pycache__" #:directories? #t))
4008 (for-each delete-file (find-files "." "\\.pyc$"))
4009 #t))))
4010 (build-system python-build-system)
4011 (propagated-inputs
4012 `(("python-pytz" ,python-pytz)
4013 ("python-six" ,python-six)))
4014 (home-page "https://github.com/getpelican/feedgenerator")
4015 (synopsis
4016 "Standalone version of Django's Atom/RSS feed generator")
4017 (description
4018 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4019 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4020 (license license:bsd-3)))
4021
4022 (define-public python2-feedgenerator
4023 (package-with-python2 python-feedgenerator))
4024
4025 (define-public python-toml
4026 (package
4027 (name "python-toml")
4028 (version "0.10.1")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "toml" version))
4033 (sha256
4034 (base32
4035 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4036 (build-system python-build-system)
4037 (arguments
4038 `(#:tests? #f)) ;no tests suite in release
4039 (home-page "https://github.com/uiri/toml")
4040 (synopsis "Library for TOML")
4041 (description
4042 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4043 Language (TOML) configuration files.")
4044 (license license:expat)))
4045
4046 (define-public python-jsonrpc-server
4047 (package
4048 (name "python-jsonrpc-server")
4049 (version "0.4.0")
4050 (source
4051 (origin
4052 (method url-fetch)
4053 (uri (pypi-uri "python-jsonrpc-server" version))
4054 (sha256
4055 (base32
4056 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4057 (build-system python-build-system)
4058 (propagated-inputs
4059 `(("python-mock" ,python-mock)
4060 ("python-pytest" ,python-pytest)
4061 ("python-ujson" ,python-ujson)))
4062 (home-page
4063 "https://github.com/palantir/python-jsonrpc-server")
4064 (synopsis "JSON RPC 2.0 server library")
4065 (description
4066 "This package provides a JSON RPC 2.0 server library for Python.")
4067 (license license:expat)))
4068
4069 (define-public python-pydantic
4070 (package
4071 (name "python-pydantic")
4072 (version "1.6.1")
4073 (source
4074 (origin
4075 (method git-fetch)
4076 (uri (git-reference
4077 (url "https://github.com/samuelcolvin/pydantic")
4078 (commit (string-append "v" version))))
4079 (file-name (git-file-name name version))
4080 (sha256
4081 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4082 (build-system python-build-system)
4083 (arguments
4084 '(#:phases
4085 (modify-phases %standard-phases
4086 ;; Reported upstream:
4087 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4088 ;; Disable the faulty test as the fix is unclear.
4089 (add-before 'check 'disable-test
4090 (lambda _
4091 (substitute* "tests/test_validators.py"
4092 (("test_assert_raises_validation_error")
4093 "_test_assert_raises_validation_error"))
4094 #t))
4095 (replace 'check
4096 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4097 (native-inputs
4098 `(("python-pytest" ,python-pytest)))
4099 (home-page "https://github.com/samuelcolvin/pydantic")
4100 (synopsis "Python data validation and settings management")
4101 (description
4102 "Pydantic enforces type hints at runtime, and provides user friendly
4103 errors when data is invalid.")
4104 (license license:expat)))
4105
4106 (define-public python-pydocstyle
4107 (package
4108 (name "python-pydocstyle")
4109 (version "3.0.0")
4110 (source
4111 (origin
4112 (method url-fetch)
4113 (uri (pypi-uri "pydocstyle" version))
4114 (sha256
4115 (base32
4116 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4117 (build-system python-build-system)
4118 (propagated-inputs
4119 `(("python-six" ,python-six)
4120 ("python-snowballstemmer" ,python-snowballstemmer)))
4121 (home-page
4122 "https://github.com/PyCQA/pydocstyle/")
4123 (synopsis "Python docstring style checker")
4124 (description
4125 "This package provides a style checker for the Python Language
4126 Server (PLS).")
4127 (license license:expat)))
4128
4129 (define-public python-language-server
4130 (package
4131 (name "python-language-server")
4132 (version "0.36.2")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (pypi-uri "python-language-server" version))
4137 (sha256
4138 (base32
4139 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4140 (build-system python-build-system)
4141 (propagated-inputs
4142 `(("python-autopep8" ,python-autopep8)
4143 ("python-configparser" ,python-configparser)
4144 ("python-pydocstyle" ,python-pydocstyle)
4145 ("python-future" ,python-future)
4146 ("python-jedi" ,python-jedi)
4147 ("python-jsonrpc-server" ,python-jsonrpc-server)
4148 ("python-pluggy" ,python-pluggy)
4149 ("python-pycodestyle" ,python-pycodestyle)
4150 ("python-pyflakes" ,python-pyflakes)
4151 ("python-rope" ,python-rope)
4152 ("python-ujson" ,python-ujson)
4153 ("python-yapf" ,python-yapf)))
4154 (native-inputs
4155 `(("python-coverage" ,python-coverage)
4156 ("python-flaky" ,python-flaky)
4157 ("python-matplotlib" ,python-matplotlib)
4158 ("python-mock" ,python-mock)
4159 ("python-numpy" ,python-numpy)
4160 ("python-pandas" ,python-pandas)
4161 ("python-pylint" ,python-pylint)
4162 ("python-pytest" ,python-pytest)
4163 ("python-pytest-cov" ,python-pytest-cov)
4164 ("python-versioneer" ,python-versioneer)))
4165 (home-page "https://github.com/palantir/python-language-server")
4166 (synopsis "Python implementation of the Language Server Protocol")
4167 (description
4168 "The Python Language Server (pyls) is an implementation of the Python 3
4169 language specification for the Language Server Protocol (LSP). This tool is
4170 used in text editing environments to provide a complete and integrated
4171 feature-set for programming Python effectively.")
4172 (license license:expat)))
4173
4174 (define-public python-pathspec
4175 (package
4176 (name "python-pathspec")
4177 (version "0.7.0")
4178 (source
4179 (origin
4180 (method url-fetch)
4181 (uri (pypi-uri "pathspec" version))
4182 (sha256
4183 (base32
4184 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4185 (build-system python-build-system)
4186 (home-page "https://github.com/cpburnz/python-path-specification")
4187 (synopsis "Utility library for gitignore style pattern matching of file paths")
4188 (description
4189 "This package provides a utility library for gitignore style pattern
4190 matching of file paths.")
4191 (license license:mpl2.0)))
4192
4193 (define-public python-black
4194 (package
4195 (name "python-black")
4196 (version "20.8b1")
4197 (source
4198 (origin
4199 (method url-fetch)
4200 (uri (pypi-uri "black" version))
4201 (sha256
4202 (base32
4203 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4204 (build-system python-build-system)
4205 (arguments
4206 `(#:phases
4207 (modify-phases %standard-phases
4208 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4209 (lambda _
4210 (let ((python3 (which "python3")))
4211 (substitute* '("tests/data/fmtonoff.py"
4212 "tests/data/string_prefixes.py"
4213 "tests/data/function.py"
4214 "tests/data/python37.py")
4215 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4216 (string-append "#!" python3 (if (string? minor-version)
4217 minor-version
4218 "")))))
4219 #t))
4220 (add-after 'unpack 'disable-broken-tests
4221 (lambda* (#:key outputs inputs #:allow-other-keys)
4222 ;; Make installed package available for running the tests
4223 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4224 ":" (getenv "PATH")))
4225
4226 ;; These tests are supposed to be skipped when the blackd
4227 ;; dependencies are missing, but this doesn't quite work.
4228 (substitute* "tests/test_black.py"
4229 (("( *)class BlackDTestCase.*" match indent)
4230 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4231 indent "class BlackDTestCase(unittest.TestCase):\n"))
4232 (("web.Application") "False")
4233 (("@unittest_run_loop") ""))
4234
4235 ;; Patching the above file breaks the self test
4236 (substitute* "tests/test_black.py"
4237 (("( *)def test_self" match indent)
4238 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4239
4240 (substitute* "tests/test_black.py"
4241 (("( *)def test_python38" match indent)
4242 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4243 #t)))))
4244 (propagated-inputs
4245 `(("python-click" ,python-click)
4246 ("python-attrs" ,python-attrs)
4247 ("python-appdirs" ,python-appdirs)
4248 ("python-pathspec" ,python-pathspec)
4249 ("python-mypy-extensions" ,python-mypy-extensions)
4250 ("python-regex" ,python-regex)
4251 ("python-toml" ,python-toml)
4252 ("python-typed-ast" ,python-typed-ast)
4253 ("python-typing-extensions" ,python-typing-extensions)))
4254 (native-inputs
4255 `(("python-setuptools-scm" ,python-setuptools-scm)))
4256 (home-page "https://github.com/ambv/black")
4257 (synopsis "The uncompromising code formatter")
4258 (description "Black is the uncompromising Python code formatter.")
4259 (license license:expat)))
4260
4261 (define-public python-black-macchiato
4262 (package
4263 (name "python-black-macchiato")
4264 (version "1.3.0")
4265 (source
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "black-macchiato" version))
4269 (sha256
4270 (base32
4271 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4272 (build-system python-build-system)
4273 (propagated-inputs
4274 `(("python-black" ,python-black)))
4275 (home-page "https://github.com/wbolster/black-macchiato")
4276 (synopsis "Partial @code{python-black} formatting")
4277 (description
4278 "This package is built on top the @{python-black} code formatter to
4279 enable formatting of partial files.")
4280 (license license:bsd-3)))
4281
4282 (define-public python-blinker
4283 (package
4284 (name "python-blinker")
4285 (version "1.4")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (pypi-uri "blinker" version))
4290 (sha256
4291 (base32
4292 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4293 (build-system python-build-system)
4294 (home-page "https://pythonhosted.org/blinker/")
4295 (synopsis "Fast, simple object-to-object and broadcast signaling")
4296 (description
4297 "Blinker provides a fast dispatching system that allows any number of
4298 interested parties to subscribe to events, or \"signals\".")
4299 (license license:expat)))
4300
4301 (define-public python2-blinker
4302 (package-with-python2 python-blinker))
4303
4304 (define-public pelican
4305 (package
4306 (name "pelican")
4307 (version "4.2.0")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "pelican" version))
4312 (sha256
4313 (base32
4314 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4315 (build-system python-build-system)
4316 (propagated-inputs
4317 `(("python-blinker" ,python-blinker)
4318 ("python-dateutil" ,python-dateutil)
4319 ("python-docutils" ,python-docutils)
4320 ("python-feedgenerator" ,python-feedgenerator)
4321 ("python-jinja2" ,python-jinja2)
4322 ("python-markdown" ,python-markdown)
4323 ("python-pygments" ,python-pygments)
4324 ("python-pytz" ,python-pytz)
4325 ("python-six" ,python-six)
4326 ("python-unidecode" ,python-unidecode)))
4327 (home-page "https://getpelican.com/")
4328 (arguments
4329 `(;; XXX Requires a lot more packages to do unit tests :P
4330 #:tests? #f))
4331 (synopsis "Python-based static site publishing system")
4332 (description
4333 "Pelican is a tool to generate a static blog from reStructuredText,
4334 Markdown input files, and more. Pelican uses Jinja2 for templating
4335 and is very extensible.")
4336 (license license:agpl3+)))
4337
4338 (define-public mallard-ducktype
4339 (package
4340 (name "mallard-ducktype")
4341 (version "1.0.2")
4342 (source
4343 (origin
4344 (method git-fetch)
4345 ;; git-reference because tests are not included in pypi source tarball
4346 ;; https://issues.guix.gnu.org/issue/36755#2
4347 (uri (git-reference
4348 (url "https://github.com/projectmallard/mallard-ducktype")
4349 (commit version)))
4350 (file-name (git-file-name name version))
4351 (sha256
4352 (base32
4353 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4354 (build-system python-build-system)
4355 (arguments
4356 '(#:phases
4357 (modify-phases %standard-phases
4358 (replace 'check
4359 (lambda _
4360 (with-directory-excursion "tests"
4361 (invoke "sh" "runtests")))))))
4362 (home-page "http://projectmallard.org")
4363 (synopsis "Convert Ducktype to Mallard documentation markup")
4364 (description
4365 "Ducktype is a lightweight syntax that can represent all the semantics
4366 of the Mallard XML documentation system. Ducktype files can be converted to
4367 Mallard using the @command{ducktype} tool. The yelp-tools package
4368 provides additional functionality on the produced Mallard documents.")
4369 (license license:expat)))
4370
4371 (define-public python-cython
4372 (package
4373 (name "python-cython")
4374 (version "0.29.21")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "Cython" version))
4379 (sha256
4380 (base32
4381 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4382 (build-system python-build-system)
4383 ;; we need the full python package and not just the python-wrapper
4384 ;; because we need libpython3.3m.so
4385 (inputs
4386 `(("python" ,python)))
4387 (arguments
4388 `(#:phases
4389 (modify-phases %standard-phases
4390 (add-before 'check 'set-HOME
4391 ;; some tests require access to "$HOME/.cython"
4392 (lambda _ (setenv "HOME" "/tmp") #t))
4393 (replace 'check
4394 (lambda _
4395 ;; Disable compiler optimizations to greatly reduce the running
4396 ;; time of the test suite.
4397 (setenv "CFLAGS" "-O0")
4398
4399 (invoke "python" "runtests.py" "-vv"
4400 "-j" (number->string (parallel-job-count))
4401 ;; XXX: On 32-bit architectures, running the parallel tests
4402 ;; fails on many-core systems, see
4403 ;; <https://github.com/cython/cython/issues/2807>.
4404 ,@(if (not (target-64bit?))
4405 '("-x" "run.parallel")
4406 '())))))))
4407 (home-page "https://cython.org/")
4408 (synopsis "C extensions for Python")
4409 (description "Cython is an optimising static compiler for both the Python
4410 programming language and the extended Cython programming language. It makes
4411 writing C extensions for Python as easy as Python itself.")
4412 (license license:asl2.0)
4413 (properties `((python2-variant . ,(delay python2-cython))))))
4414
4415 (define-public python2-cython
4416 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4417 (package
4418 (inherit base)
4419 (name "python2-cython")
4420 (inputs
4421 `(("python-2" ,python-2))) ;this is not automatically changed
4422 (arguments
4423 (substitute-keyword-arguments (package-arguments base)
4424 ((#:phases phases)
4425 `(modify-phases ,phases
4426 (add-before 'check 'adjust-test_embed
4427 (lambda _
4428 (substitute* "runtests.py"
4429 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4430 ;; so it can give the right -L flag to GCC when embedding static
4431 ;; builds of Python. It is unaware that the Python "config"
4432 ;; directory (where the static library lives) was renamed in
4433 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4434 ;; which works fine, because that is where the shared library is.
4435 ;;
4436 ;; It also appears to be unaware that the Makefile in Demos/embed
4437 ;; already unconditionally pass the static library location to GCC,
4438 ;; after checking sysconfig.get_config_var('LIBPL).
4439 ;;
4440 ;; The effect is that the linker is unable to resolve libexpat
4441 ;; symbols when building for Python 2, because neither the Python 2
4442 ;; shared library nor Expat is available. To fix it, we can either
4443 ;; add Expat as an input and make it visible to the linker, or just
4444 ;; prevent it from overriding the Python shared library location.
4445 ;; The end result is identical, so we take the easy route.
4446 ((" or libname not in os\\.listdir\\(libdir\\)")
4447 ""))
4448 #t)))))))))
4449
4450 ;; The RPython toolchain currently does not support Python 3.
4451 (define-public python2-rpython
4452 (package
4453 (name "python2-rpython")
4454 (version "0.2.1")
4455 (source
4456 (origin
4457 (method url-fetch)
4458 (uri (pypi-uri "rpython" version))
4459 (sha256
4460 (base32
4461 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4462 (build-system python-build-system)
4463 (arguments `(#:python ,python-2))
4464 (native-inputs
4465 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4466 (home-page "https://rpython.readthedocs.org")
4467 (synopsis "Framework for implementing interpreters and virtual machines")
4468 (description "RPython is a translation and support framework for
4469 producing implementations of dynamic languages, emphasizing a clean separation
4470 between language specification and implementation aspects.")
4471 (license license:expat)))
4472
4473 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4474 ;; python-scipy still build, as these three packages are often used together.
4475 (define-public python-numpy
4476 (package
4477 (name "python-numpy")
4478 (version "1.17.3")
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (string-append
4483 "https://github.com/numpy/numpy/releases/download/v"
4484 version "/numpy-" version ".tar.gz"))
4485 (sha256
4486 (base32
4487 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4488 (build-system python-build-system)
4489 (inputs
4490 `(("openblas" ,openblas)
4491 ("lapack" ,lapack)))
4492 (native-inputs
4493 `(("python-cython" ,python-cython)
4494 ("python-pytest" ,python-pytest)
4495 ("gfortran" ,gfortran)))
4496 (arguments
4497 `(#:phases
4498 (modify-phases %standard-phases
4499 (add-before 'build 'configure-blas-lapack
4500 (lambda* (#:key inputs #:allow-other-keys)
4501 (call-with-output-file "site.cfg"
4502 (lambda (port)
4503 (format port
4504 "[openblas]
4505 libraries = openblas
4506 library_dirs = ~a/lib
4507 include_dirs = ~a/include
4508
4509 # backslash-n to make emacs happy
4510 \n[lapack]
4511 lapack_libs = lapack
4512 library_dirs = ~a/lib
4513 include_dirs = ~a/include
4514 "
4515 (assoc-ref inputs "openblas")
4516 (assoc-ref inputs "openblas")
4517 (assoc-ref inputs "lapack")
4518 (assoc-ref inputs "lapack"))))
4519 #t))
4520 (add-before 'build 'fix-executable-paths
4521 (lambda* (#:key inputs #:allow-other-keys)
4522 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4523 ;; instead of /bin/sh.
4524 (substitute* "numpy/distutils/exec_command.py"
4525 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4526 (string-append match-start (assoc-ref inputs "bash") match-end)))
4527 ;; Use "gcc" executable, not "cc".
4528 (substitute* "numpy/distutils/system_info.py"
4529 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4530 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4531 #t))
4532 ;; Tests can only be run after the library has been installed and not
4533 ;; within the source directory.
4534 (delete 'check)
4535 (add-after 'install 'check
4536 (lambda* (#:key outputs inputs #:allow-other-keys)
4537 ;; Make installed package available for running the tests
4538 (add-installed-pythonpath inputs outputs)
4539 ;; Make sure "f2py" etc is found.
4540 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4541 ":" (getenv "PATH")))
4542 (with-directory-excursion "/tmp"
4543 (invoke "python" "-c"
4544 "import numpy; numpy.test(verbose=2)")))))))
4545 (home-page "https://numpy.org")
4546 (synopsis "Fundamental package for scientific computing with Python")
4547 (description "NumPy is the fundamental package for scientific computing
4548 with Python. It contains among other things: a powerful N-dimensional array
4549 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4550 and Fortran code, useful linear algebra, Fourier transform, and random number
4551 capabilities.")
4552 (properties `((python2-variant . ,(delay python2-numpy))))
4553 (license license:bsd-3)))
4554
4555 ;; Numpy 1.16.x are the last versions that support Python 2.
4556 (define-public python2-numpy
4557 (let ((numpy (package-with-python2
4558 (strip-python2-variant python-numpy))))
4559 (package/inherit
4560 numpy
4561 (version "1.16.5")
4562 (source (origin
4563 (method url-fetch)
4564 (uri (string-append
4565 "https://github.com/numpy/numpy/releases/download/v"
4566 version "/numpy-" version ".tar.gz"))
4567 (sha256
4568 (base32
4569 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4570
4571 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4572 ;; interest only for legacy code going back to NumPy's predecessor
4573 ;; Numeric.
4574 (define-public python2-numpy-1.8
4575 (package (inherit python2-numpy)
4576 (version "1.8.2")
4577 (source
4578 (origin
4579 (method git-fetch)
4580 (uri (git-reference
4581 (url "https://github.com/numpy/numpy")
4582 (commit (string-append "v" version))))
4583 (file-name (git-file-name "numpy" version))
4584 (sha256
4585 (base32
4586 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4587 (arguments
4588 (substitute-keyword-arguments (package-arguments python2-numpy)
4589 ((#:phases phases)
4590 `(modify-phases ,phases
4591 (replace 'configure-blas-lapack
4592 (lambda* (#:key inputs #:allow-other-keys)
4593 (call-with-output-file "site.cfg"
4594 (lambda (port)
4595 (format port
4596 "[openblas]
4597 libraries = openblas,lapack
4598 library_dirs = ~a/lib:~a/lib
4599 include_dirs = ~a/include:~a/include
4600 "
4601 (assoc-ref inputs "openblas")
4602 (assoc-ref inputs "lapack")
4603 (assoc-ref inputs "openblas")
4604 (assoc-ref inputs "lapack"))))
4605 #t))))))
4606 (native-inputs
4607 `(("python2-nose" ,python2-nose)))
4608 (description "NumPy is the fundamental package for scientific computing
4609 with Python. It contains among other things: a powerful N-dimensional array
4610 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4611 and Fortran code, useful linear algebra, Fourier transform, and random number
4612 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4613 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4614 Numeric.")
4615 (license license:bsd-3)))
4616
4617 (define-public python-munch
4618 (package
4619 (name "python-munch")
4620 (version "2.0.4")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (pypi-uri "munch" version))
4625 (sha256
4626 (base32
4627 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4628 (build-system python-build-system)
4629 (home-page "https://github.com/Infinidat/munch")
4630 (synopsis "Dot-accessible dictionary")
4631 (description "Munch is a dot-accessible dictionary similar to JavaScript
4632 objects.")
4633 (license license:expat)))
4634
4635 (define-public python2-munch
4636 (package-with-python2 python-munch))
4637
4638 (define-public python-colormath
4639 (package
4640 (name "python-colormath")
4641 (version "3.0.0")
4642 (source
4643 (origin
4644 (method url-fetch)
4645 (uri (pypi-uri "colormath" version))
4646 (sha256
4647 (base32
4648 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4649 (build-system python-build-system)
4650 (propagated-inputs
4651 `(("python-networkx" ,python-networkx)
4652 ("python-numpy" ,python-numpy)))
4653 (home-page "https://github.com/gtaylor/python-colormath")
4654 (synopsis "Color math and conversion library")
4655 (description
4656 "This is a Python library for color math and conversions.")
4657 (license license:bsd-3)))
4658
4659 (define-public python2-colormath
4660 (package-with-python2 python-colormath))
4661
4662 (define-public python-spectra
4663 (package
4664 (name "python-spectra")
4665 (version "0.0.11")
4666 (source
4667 (origin
4668 (method url-fetch)
4669 (uri (pypi-uri "spectra" version))
4670 (sha256
4671 (base32
4672 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4673 (build-system python-build-system)
4674 (arguments
4675 `(#:phases
4676 (modify-phases %standard-phases
4677 (replace 'check
4678 (lambda _ (invoke "nosetests" "-v"))))))
4679 (propagated-inputs
4680 `(("python-colormath" ,python-colormath)))
4681 (native-inputs
4682 `(("python-nose" ,python-nose)))
4683 (home-page "https://github.com/jsvine/spectra")
4684 (synopsis "Color scales and color conversion")
4685 (description
4686 "This package provides a Python library intended to make color math,
4687 color scales, and color space conversion easy. It has support for:
4688
4689 @enumerate
4690 @item Color scales
4691 @item Color ranges
4692 @item Color blending
4693 @item Brightening/darkening colors
4694 @item Saturating/desaturating colors
4695 @item Conversion to/from multiple color spaces.
4696 @end enumerate\n")
4697 (license license:expat)))
4698
4699 (define-public python2-spectra
4700 (package-with-python2 python-spectra))
4701
4702 (define-public python-numpy-documentation
4703 (package
4704 (name "python-numpy-documentation")
4705 (version (package-version python-numpy))
4706 (source (package-source python-numpy))
4707 (build-system python-build-system)
4708 (native-inputs
4709 `(("python-matplotlib" ,python-matplotlib)
4710 ("python-numpy" ,python-numpy)
4711 ("pkg-config" ,pkg-config)
4712 ("python-sphinx" ,python-sphinx)
4713 ("python-numpydoc" ,python-numpydoc)
4714 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4715 texlive-fonts-ec
4716 texlive-generic-ifxetex
4717 texlive-generic-pdftex
4718 texlive-amsfonts
4719 texlive-latex-capt-of
4720 texlive-latex-cmap
4721 texlive-latex-environ
4722 texlive-latex-eqparbox
4723 texlive-latex-etoolbox
4724 texlive-latex-expdlist
4725 texlive-latex-fancyhdr
4726 texlive-latex-fancyvrb
4727 texlive-latex-fncychap
4728 texlive-latex-float
4729 texlive-latex-framed
4730 texlive-latex-geometry
4731 texlive-latex-graphics
4732 texlive-latex-hyperref
4733 texlive-latex-mdwtools
4734 texlive-latex-multirow
4735 texlive-latex-needspace
4736 texlive-latex-oberdiek
4737 texlive-latex-parskip
4738 texlive-latex-preview
4739 texlive-latex-tabulary
4740 texlive-latex-threeparttable
4741 texlive-latex-titlesec
4742 texlive-latex-trimspaces
4743 texlive-latex-ucs
4744 texlive-latex-upquote
4745 texlive-latex-url
4746 texlive-latex-varwidth
4747 texlive-latex-wrapfig)))
4748 ("texinfo" ,texinfo)
4749 ("perl" ,perl)
4750 ("scipy-sphinx-theme"
4751 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4752 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4753 (method git-fetch)
4754 (uri (git-reference
4755 (url "https://github.com/scipy/scipy-sphinx-theme")
4756 (commit commit)))
4757 (file-name (git-file-name "python-scipy-sphinx-theme"
4758 (string-take commit 7)))
4759 (sha256
4760 (base32
4761 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4762 ,@(package-native-inputs python-numpy)))
4763 (arguments
4764 `(#:tests? #f ; we're only generating the documentation
4765 #:phases
4766 (modify-phases %standard-phases
4767 (delete 'build)
4768 (replace 'install
4769 (lambda* (#:key inputs outputs #:allow-other-keys)
4770 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4771 (doc (string-append
4772 data "/doc/" ,name "-"
4773 ,(package-version python-numpy)))
4774 (info-reader (string-append data "/info"))
4775 (html (string-append doc "/html"))
4776 (scipy-sphinx-theme "scipy-sphinx-theme")
4777 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4778 (pyver ,(string-append "PYVER=")))
4779
4780 ;; FIXME: this is needed to for texlive-union to generate
4781 ;; fonts, which are not found.
4782 (setenv "HOME" "/tmp")
4783
4784 (with-directory-excursion "doc"
4785 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4786 (mkdir-p html)
4787 (invoke "make" "html" pyver)
4788 (invoke "make" "latex" "PAPER=a4" pyver)
4789 (invoke "make" "-C" "build/latex"
4790 "all-pdf" "PAPER=a4" pyver)
4791 ;; FIXME: Generation of the info file fails.
4792 ;; (invoke "make" "info" pyver)
4793 ;; (mkdir-p info)
4794 ;; (copy-file "build/texinfo/numpy.info"
4795 ;; (string-append info "/numpy.info"))
4796 (for-each (lambda (file)
4797 (copy-file (string-append "build/latex" file)
4798 (string-append doc file)))
4799 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4800 (with-directory-excursion "build/html"
4801 (for-each (lambda (file)
4802 (let* ((dir (dirname file))
4803 (tgt-dir (string-append html "/" dir)))
4804 (unless (equal? "." dir)
4805 (mkdir-p tgt-dir))
4806 (install-file file html)))
4807 (find-files "." ".*")))))
4808 #t)))))
4809 (home-page (package-home-page python-numpy))
4810 (synopsis "Documentation for the python-numpy package")
4811 (description (package-description python-numpy))
4812 (license (package-license python-numpy))))
4813
4814 (define-public python2-numpy-documentation
4815 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4816 (package
4817 (inherit numpy-documentation)
4818 (native-inputs `(("python2-functools32" ,python2-functools32)
4819 ,@(package-native-inputs numpy-documentation))))))
4820
4821 (define-public python-pygit2
4822 (package
4823 (name "python-pygit2")
4824 (version "1.4.0")
4825 (source
4826 (origin
4827 (method url-fetch)
4828 (uri (pypi-uri "pygit2" version))
4829 (sha256
4830 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4831 (build-system python-build-system)
4832 (arguments
4833 '(#:tests? #f)) ; tests don't run correctly in our environment
4834 (propagated-inputs
4835 `(("python-cached-property" ,python-cached-property)
4836 ("python-cffi" ,python-cffi)
4837 ("libgit2" ,libgit2)))
4838 (native-inputs
4839 `(("python-pytest" ,python-pytest)))
4840 (home-page "https://github.com/libgit2/pygit2")
4841 (synopsis "Python bindings for libgit2")
4842 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4843 library, libgit2 implements Git plumbing.")
4844 ;; GPL2.0 only, with linking exception.
4845 (license license:gpl2)))
4846
4847 (define-public python-patiencediff
4848 (package
4849 (name "python-patiencediff")
4850 (version "0.2.0")
4851 (source
4852 (origin
4853 (method url-fetch)
4854 (uri (pypi-uri "patiencediff" version))
4855 (sha256
4856 (base32
4857 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4858 (build-system python-build-system)
4859 (home-page "https://www.breezy-vcs.org/")
4860 (synopsis "Python implementation of the patiencediff algorithm")
4861 (description
4862 "This package contains a Python implementation of the @code{patiencediff}
4863 algorithm. Patiencediff provides a good balance of performance, nice output for
4864 humans, and implementation simplicity.")
4865 (license license:gpl2)))
4866
4867 (define-public python-pyparsing
4868 (package
4869 (name "python-pyparsing")
4870 (version "2.4.6")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "pyparsing" version))
4875 (sha256
4876 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4877 (build-system python-build-system)
4878 (outputs '("out" "doc"))
4879 (arguments
4880 `(#:tests? #f ; no test target
4881 #:phases
4882 (modify-phases %standard-phases
4883 (add-after 'install 'install-doc
4884 (lambda* (#:key outputs #:allow-other-keys)
4885 (let* ((doc (string-append (assoc-ref outputs "doc")
4886 "/share/doc/" ,name "-" ,version))
4887 (html-doc (string-append doc "/html"))
4888 (examples (string-append doc "/examples")))
4889 (mkdir-p html-doc)
4890 (mkdir-p examples)
4891 (for-each
4892 (lambda (dir tgt)
4893 (map (lambda (file)
4894 (install-file file tgt))
4895 (find-files dir ".*")))
4896 (list "docs" "htmldoc" "examples")
4897 (list doc html-doc examples))
4898 #t))))))
4899 (home-page "https://github.com/pyparsing/pyparsing")
4900 (synopsis "Python parsing class library")
4901 (description
4902 "The pyparsing module is an alternative approach to creating and
4903 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4904 of regular expressions. The pyparsing module provides a library of classes
4905 that client code uses to construct the grammar directly in Python code.")
4906 (license license:expat)))
4907
4908 (define-public python2-pyparsing
4909 (package-with-python2 python-pyparsing))
4910
4911 (define-public python-pyparsing-2.4.7
4912 (package
4913 (inherit python-pyparsing)
4914 (version "2.4.7")
4915 (source
4916 (origin
4917 (method url-fetch)
4918 (uri (pypi-uri "pyparsing" version))
4919 (sha256
4920 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4921
4922 (define-public python-numpydoc
4923 (package
4924 (name "python-numpydoc")
4925 (version "0.8.0")
4926 (source
4927 (origin
4928 (method url-fetch)
4929 (uri (pypi-uri "numpydoc" version))
4930 (sha256
4931 (base32
4932 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4933 (build-system python-build-system)
4934 (propagated-inputs
4935 `(("python-sphinx" ,python-sphinx)))
4936 (native-inputs
4937 `(("python-nose" ,python-nose)))
4938 (home-page "https://pypi.org/project/numpydoc/")
4939 (synopsis
4940 "Numpy's Sphinx extensions")
4941 (description
4942 "Sphinx extension to support docstrings in Numpy format.")
4943 (license license:bsd-2)))
4944
4945 (define-public python2-numpydoc
4946 (package-with-python2 python-numpydoc))
4947
4948 (define-public python-numexpr
4949 (package
4950 (name "python-numexpr")
4951 (version "2.6.5")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "numexpr" version))
4956 (sha256
4957 (base32
4958 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4959 (build-system python-build-system)
4960 (arguments `(#:tests? #f)) ; no tests included
4961 (propagated-inputs
4962 `(("python-numpy" ,python-numpy)))
4963 (home-page "https://github.com/pydata/numexpr")
4964 (synopsis "Fast numerical expression evaluator for NumPy")
4965 (description
4966 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4967 expressions that operate on arrays are accelerated and use less memory than
4968 doing the same calculation in Python. In addition, its multi-threaded
4969 capabilities can make use of all your cores, which may accelerate
4970 computations, most specially if they are not memory-bounded (e.g. those using
4971 transcendental functions).")
4972 (license license:expat)))
4973
4974 (define-public python2-numexpr
4975 (package-with-python2 python-numexpr))
4976
4977 (define-public python-cycler
4978 (package
4979 (name "python-cycler")
4980 (version "0.10.0")
4981 (source (origin
4982 (method url-fetch)
4983 (uri (pypi-uri "cycler" version))
4984 (sha256
4985 (base32
4986 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4987 (build-system python-build-system)
4988 (arguments
4989 ;; XXX: The current version requires 'coveralls' which we don't have.
4990 ;; Enable this for the next release which uses 'python-pytest'.
4991 '(#:tests? #f))
4992 (propagated-inputs
4993 `(("python-six" ,python-six)))
4994 (home-page "http://matplotlib.org/cycler/")
4995 (synopsis "Composable keyword argument iterator")
4996 (description
4997 "When using @code{matplotlib} and plotting more than one line, it is
4998 common to want to be able to want to be able to cycle over one or more artist
4999 styles; but the plotting logic can quickly become involved.
5000 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5001 @code{Cycler} class was developed.")
5002 (license license:bsd-3)))
5003
5004 (define-public python2-cycler
5005 (package-with-python2 python-cycler))
5006
5007 (define-public python-colorspacious
5008 (package
5009 (name "python-colorspacious")
5010 (version "1.1.2")
5011 (source
5012 (origin
5013 (method git-fetch)
5014 (uri (git-reference
5015 (url "https://github.com/njsmith/colorspacious")
5016 (commit (string-append "v" version))))
5017 (file-name (git-file-name name version))
5018 (sha256
5019 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5020 (build-system python-build-system)
5021 (propagated-inputs
5022 `(("python-numpy" ,python-numpy)))
5023 (native-inputs
5024 `(("python-nose" ,python-nose)))
5025 (arguments
5026 `(#:phases
5027 (modify-phases %standard-phases
5028 (replace 'check
5029 (lambda _
5030 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5031 (home-page "https://github.com/njsmith/colorspacious")
5032 (synopsis "Python library for colorspace conversions")
5033 (description "@code{colorspacious} is a Python library that lets you
5034 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5035 (license license:expat)))
5036
5037 (define-public python2-colorspacious
5038 (package-with-python2 python-colorspacious))
5039
5040 (define-public python-matplotlib
5041 (package
5042 (name "python-matplotlib")
5043 (version "3.1.2")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "matplotlib" version))
5048 (sha256
5049 (base32
5050 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5051 (build-system python-build-system)
5052 (propagated-inputs ; the following packages are all needed at run time
5053 `(("python-cycler" ,python-cycler)
5054 ("python-kiwisolver" ,python-kiwisolver)
5055 ("python-pyparsing" ,python-pyparsing)
5056 ("python-pygobject" ,python-pygobject)
5057 ("gobject-introspection" ,gobject-introspection)
5058 ("python-tkinter" ,python "tk")
5059 ("python-dateutil" ,python-dateutil)
5060 ("python-numpy" ,python-numpy)
5061 ("python-pillow" ,python-pillow)
5062 ("python-pytz" ,python-pytz)
5063 ("python-six" ,python-six)
5064 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5065 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5066 ;; object. For this reason we need to import both libraries.
5067 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5068 ("python-pycairo" ,python-pycairo)
5069 ("python-cairocffi" ,python-cairocffi)))
5070 (inputs
5071 `(("libpng" ,libpng)
5072 ("freetype" ,freetype)
5073 ("cairo" ,cairo)
5074 ("glib" ,glib)
5075 ;; FIXME: Add backends when available.
5076 ;("python-wxpython" ,python-wxpython)
5077 ("tcl" ,tcl)
5078 ("tk" ,tk)))
5079 (native-inputs
5080 `(("pkg-config" ,pkg-config)
5081 ("python-pytest" ,python-pytest)
5082 ("python-mock" ,python-mock)
5083 ("unzip" ,unzip)
5084 ("jquery-ui"
5085 ,(origin
5086 (method url-fetch)
5087 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5088 (sha256
5089 (base32
5090 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5091 (arguments
5092 `(#:phases
5093 (modify-phases %standard-phases
5094 ;; XXX We disable all image comparison tests because we're using a
5095 ;; newer version of FreeType than matplotlib expects. This leads to
5096 ;; minor differences throughout the tests.
5097 (add-after 'unpack 'fix-and-disable-failing-tests
5098 (lambda _
5099 (substitute* (append (find-files "lib/matplotlib/tests/"
5100 "test_.*\\.py$")
5101 (find-files "lib/mpl_toolkits/tests"
5102 "test_.*\\.py$"))
5103 (("^from matplotlib" match)
5104 (string-append "import pytest\n" match))
5105 (("( *)@image_comparison" match indent)
5106 (string-append indent
5107 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5108 match)))
5109 (substitute* "lib/matplotlib/tests/test_animation.py"
5110 (("/bin/sh") (which "sh")))
5111 (for-each delete-file
5112 ;; test_normal_axes, test_get_tightbbox_polar
5113 '("lib/matplotlib/tests/test_axes.py"
5114 ;; We don't use the webagg backend and this test forces it.
5115 "lib/matplotlib/tests/test_backend_webagg.py"
5116 ;; test_outward_ticks
5117 "lib/matplotlib/tests/test_tightlayout.py"
5118 ;; test_hidden_axes fails with minor extent
5119 ;; differences, possibly due to the use of a
5120 ;; different version of FreeType.
5121 "lib/matplotlib/tests/test_constrainedlayout.py"
5122 ;; Fontconfig returns no fonts.
5123 "lib/matplotlib/tests/test_font_manager.py"))
5124 #t))
5125 (add-before 'install 'install-jquery-ui
5126 (lambda* (#:key outputs inputs #:allow-other-keys)
5127 (let ((dir (string-append (assoc-ref outputs "out")
5128 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5129 (mkdir-p dir)
5130 (invoke "unzip"
5131 (assoc-ref inputs "jquery-ui")
5132 "-d" dir))
5133 #t))
5134 (replace 'check
5135 (lambda* (#:key outputs inputs #:allow-other-keys)
5136 (add-installed-pythonpath inputs outputs)
5137 (invoke "python" "tests.py" "-v"
5138 "-m" "not network and not webagg")))
5139 (add-before 'build 'configure-environment
5140 (lambda* (#:key outputs inputs #:allow-other-keys)
5141 (let ((cairo (assoc-ref inputs "cairo")))
5142 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5143 ;; has not effect.
5144 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5145 (setenv "HOME" (getcwd))
5146 ;; Fix rounding errors when using the x87 FPU.
5147 (when (string-prefix? "i686" ,(%current-system))
5148 (setenv "CFLAGS" "-ffloat-store"))
5149 (call-with-output-file "setup.cfg"
5150 (lambda (port)
5151 (format port "[directories]~%
5152 basedirlist = ~a,~a~%
5153 [packages]~%
5154 tests = True~%"
5155 (assoc-ref inputs "tcl")
5156 (assoc-ref inputs "tk")))))
5157 #t)))))
5158 (home-page "https://matplotlib.org/")
5159 (synopsis "2D plotting library for Python")
5160 (description
5161 "Matplotlib is a Python 2D plotting library which produces publication
5162 quality figures in a variety of hardcopy formats and interactive environments
5163 across platforms. Matplotlib can be used in Python scripts, the python and
5164 ipython shell, web application servers, and six graphical user interface
5165 toolkits.")
5166 (license license:psfl)
5167 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5168
5169 (define-public python2-matplotlib
5170 (let ((matplotlib (package-with-python2
5171 (strip-python2-variant python-matplotlib))))
5172 (package (inherit matplotlib)
5173 (version "2.2.4")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "matplotlib" version))
5178 (sha256
5179 (base32
5180 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5181 (arguments
5182 (substitute-keyword-arguments (package-arguments matplotlib)
5183 ((#:phases phases)
5184 `(modify-phases ,phases
5185 (replace 'install-jquery-ui
5186 (lambda* (#:key outputs inputs #:allow-other-keys)
5187 (let ((dir (string-append (assoc-ref outputs "out")
5188 "/lib/python2.7/site-packages/"
5189 "matplotlib/backends/web_backend/")))
5190 (mkdir-p dir)
5191 (invoke "unzip"
5192 (assoc-ref inputs "jquery-ui")
5193 "-d" dir))
5194 #t))
5195 (delete 'fix-and-disable-failing-tests)
5196 (delete 'check))))) ; These tests weren't run the the past.
5197 ;; Make sure to use special packages for Python 2 instead
5198 ;; of those automatically rewritten by package-with-python2.
5199 (propagated-inputs
5200 `(("python2-pycairo" ,python2-pycairo)
5201 ("python2-backports-functools-lru-cache"
5202 ,python2-backports-functools-lru-cache)
5203 ("python2-functools32" ,python2-functools32)
5204 ("python2-pygobject-2" ,python2-pygobject-2)
5205 ("python2-subprocess32" ,python2-subprocess32)
5206 ("python2-tkinter" ,python-2 "tk")
5207 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5208 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5209
5210 (define-public python-matplotlib-documentation
5211 (package
5212 (name "python-matplotlib-documentation")
5213 (version (package-version python-matplotlib))
5214 (source (package-source python-matplotlib))
5215 (build-system python-build-system)
5216 (native-inputs
5217 `(("python-matplotlib" ,python-matplotlib)
5218 ("python-colorspacious" ,python-colorspacious)
5219 ("python-sphinx" ,python-sphinx)
5220 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5221 ("python-sphinx-gallery" ,python-sphinx-gallery)
5222 ("python-numpydoc" ,python-numpydoc)
5223 ("python-ipython" ,python-ipython)
5224 ("python-ipykernel" ,python-ipykernel)
5225 ("python-mock" ,python-mock)
5226 ("graphviz" ,graphviz)
5227 ("texlive" ,(texlive-union (list texlive-amsfonts
5228 texlive-latex-amsmath
5229 texlive-latex-enumitem
5230 texlive-latex-expdlist
5231 texlive-latex-geometry
5232 texlive-latex-preview
5233 texlive-latex-type1cm
5234 texlive-latex-ucs
5235
5236 texlive-generic-pdftex
5237
5238 texlive-fonts-ec
5239 texlive-fonts-adobe-times
5240 texlive-fonts-txfonts)))
5241 ("texinfo" ,texinfo)
5242 ,@(package-native-inputs python-matplotlib)))
5243 (arguments
5244 `(#:tests? #f ; we're only generating documentation
5245 #:phases
5246 (modify-phases %standard-phases
5247 ;; The tests in python-matplotlib are run after the install phase, so
5248 ;; we need to delete the extra phase here.
5249 (delete 'check)
5250 (replace 'build
5251 (lambda _
5252 (chdir "doc")
5253 (setenv "PYTHONPATH"
5254 (string-append (getenv "PYTHONPATH")
5255 ":" (getcwd) "/../examples/units"))
5256 (substitute* "conf.py"
5257 ;; Don't use git.
5258 (("^SHA = check_output.*")
5259 (string-append "SHA = \"" ,version "\"\n"))
5260 ;; Don't fetch intersphinx files from the Internet
5261 (("^explicit_order_folders" m)
5262 (string-append "intersphinx_mapping = {}\n" m))
5263 (("'sphinx.ext.intersphinx',") "")
5264 ;; Disable URL embedding which requires internet access.
5265 (("'https://docs.scipy.org/doc/numpy'") "None")
5266 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5267 (invoke "make"
5268 "SPHINXBUILD=sphinx-build"
5269 "SPHINXOPTS=" ; don't abort on warnings
5270 "html" "texinfo")))
5271 (replace 'install
5272 (lambda* (#:key inputs outputs #:allow-other-keys)
5273 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5274 (doc (string-append data "/doc/python-matplotlib-" ,version))
5275 (info (string-append data "/info"))
5276 (html (string-append doc "/html")))
5277 (mkdir-p html)
5278 (mkdir-p info)
5279 (copy-recursively "build/html" html)
5280 (symlink (string-append html "/_images")
5281 (string-append info "/matplotlib-figures"))
5282 (with-directory-excursion "build/texinfo"
5283 (substitute* "matplotlib.texi"
5284 (("@image\\{([^,]*)" all file)
5285 (string-append "@image{matplotlib-figures/" file)))
5286 (symlink (string-append html "/_images")
5287 "./matplotlib-figures")
5288 (invoke "makeinfo" "--no-split"
5289 "-o" "matplotlib.info" "matplotlib.texi"))
5290 (install-file "build/texinfo/matplotlib.info" info))
5291 #t)))))
5292 (home-page (package-home-page python-matplotlib))
5293 (synopsis "Documentation for the python-matplotlib package")
5294 (description (package-description python-matplotlib))
5295 (license (package-license python-matplotlib))))
5296
5297 (define-public python2-matplotlib-documentation
5298 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5299 (package
5300 (inherit parent)
5301 (native-inputs
5302 (alist-delete "python-sphinx-copybutton"
5303 (package-native-inputs parent))))))
5304
5305 (define-public python-matplotlib-venn
5306 (package
5307 (name "python-matplotlib-venn")
5308 (version "0.11.5")
5309 (source
5310 (origin
5311 (method url-fetch)
5312 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5313 (sha256
5314 (base32
5315 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5316 (build-system python-build-system)
5317 (arguments '(#:tests? #f)) ; tests are not included
5318 (propagated-inputs
5319 `(("python-matplotlib" ,python-matplotlib)
5320 ("python-numpy" ,python-numpy)
5321 ("python-scipy" ,python-scipy)))
5322 (native-inputs
5323 `(("unzip" ,unzip)))
5324 (home-page "https://github.com/konstantint/matplotlib-venn")
5325 (synopsis "Plot area-proportional Venn diagrams")
5326 (description
5327 "This package provides tools for plotting area-proportional two- and
5328 three-way Venn diagrams in @code{matplotlib}.")
5329 (license license:expat)))
5330
5331 (define-public python-pysnptools
5332 (package
5333 (name "python-pysnptools")
5334 (version "0.4.11")
5335 (source
5336 (origin
5337 (method url-fetch)
5338 (uri (pypi-uri "pysnptools" version))
5339 (sha256
5340 (base32
5341 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5342 (build-system python-build-system)
5343 (arguments
5344 `(#:tests? #f ; no test data are included
5345 #:phases
5346 (modify-phases %standard-phases
5347 (replace 'check
5348 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5349 (if tests?
5350 (begin
5351 (add-installed-pythonpath inputs outputs)
5352 (invoke "python3" "pysnptools/test.py"))
5353 #t))))))
5354 (propagated-inputs
5355 `(("python-dill" ,python-dill)
5356 ("python-h5py" ,python-h5py)
5357 ("python-numpy" ,python-numpy)
5358 ("python-pandas" ,python-pandas)
5359 ("python-psutil" ,python-psutil)
5360 ("python-scipy" ,python-scipy)))
5361 (native-inputs
5362 `(("python-cython" ,python-cython)))
5363 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5364 (synopsis "Library for reading and manipulating genetic data")
5365 (description
5366 "PySnpTools is a library for reading and manipulating genetic data. It
5367 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5368 those files. It can also efficiently manipulate ranges of integers using set
5369 operators such as union, intersection, and difference.")
5370 (license license:asl2.0)))
5371
5372 (define-public python2-pysnptools
5373 (package-with-python2 python-pysnptools))
5374
5375 (define-public python-wurlitzer
5376 (package
5377 (name "python-wurlitzer")
5378 (version "2.0.1")
5379 (source
5380 (origin
5381 (method url-fetch)
5382 (uri (pypi-uri "wurlitzer" version))
5383 (sha256
5384 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5385 (build-system python-build-system)
5386 (arguments
5387 '(#:phases
5388 (modify-phases %standard-phases
5389 (replace 'check
5390 (lambda _
5391 (invoke "pytest" "-vv" "test.py"))))))
5392 (native-inputs
5393 `(("python-mock" ,python-mock)
5394 ("python-pytest" ,python-pytest)))
5395 (home-page "https://github.com/minrk/wurlitzer")
5396 (synopsis "Capture C-level output in context managers")
5397 (description
5398 "This library helps to redirect @code{sys.stdout} to a stream or a file
5399 while executing some piece of code, including C code running within a Python
5400 process.")
5401 (license license:expat)))
5402
5403 (define-public python-socksipy-branch
5404 (package
5405 (name "python-socksipy-branch")
5406 (version "1.01")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "SocksiPy-branch" version))
5411 (sha256
5412 (base32
5413 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5414 (build-system python-build-system)
5415 (arguments
5416 `(#:tests? #f)) ; There are no tests
5417 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5418 (synopsis "Python SOCKS module")
5419 (description
5420 "SocksiPy - A Python SOCKS client module. It provides a
5421 socket-like interface that supports connections to any TCP
5422 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5423 The original version was developed by Dan Haim, this is a
5424 branch created by Mario Vilas to address some open issues,
5425 as the original project seems to have been abandoned circa 2007.")
5426 (license license:bsd-3)))
5427
5428 (define-public python2-socksipy-branch
5429 (package-with-python2 python-socksipy-branch))
5430
5431 (define-public python-socksipychain
5432 (package
5433 (name "python-socksipychain")
5434 (version "2.1.2")
5435 (source
5436 (origin
5437 (method git-fetch)
5438 (uri (git-reference
5439 (url "https://github.com/pagekite/PySocksipyChain")
5440 (commit (string-append "v" version))))
5441 (file-name (git-file-name name version))
5442 (sha256
5443 (base32
5444 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5445 (build-system python-build-system)
5446 (arguments
5447 `(#:tests? #f)) ; Tests try to access the network.
5448 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5449 (synopsis "Python SOCKS module with chained proxies support")
5450 (description
5451 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5452 adds support for arbitrary chaining of proxy servers and various modes of
5453 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5454 a simple netcat replacement with chaining support.")
5455 (license license:bsd-3)))
5456
5457 (define-public python-pycodestyle
5458 (package
5459 (name "python-pycodestyle")
5460 (version "2.6.0")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "pycodestyle" version))
5465 (sha256
5466 (base32
5467 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5468 (build-system python-build-system)
5469 (arguments
5470 `(#:phases
5471 (modify-phases %standard-phases
5472 (replace 'check
5473 (lambda _
5474 (invoke "pytest" "-vv"))))))
5475 (native-inputs
5476 `(("python-pytest" ,python-pytest)))
5477 (home-page "https://pycodestyle.readthedocs.io/")
5478 (synopsis "Python style guide checker")
5479 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5480 Python code against some of the style conventions in
5481 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5482 (license license:expat)))
5483
5484 (define-public python2-pycodestyle
5485 (package-with-python2 python-pycodestyle))
5486
5487 (define-public python-multidict
5488 (package
5489 (name "python-multidict")
5490 (version "4.7.5")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "multidict" version))
5495 (sha256
5496 (base32
5497 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5498 (build-system python-build-system)
5499 (arguments
5500 '(#:modules ((ice-9 ftw)
5501 (srfi srfi-1)
5502 (srfi srfi-26)
5503 (guix build utils)
5504 (guix build python-build-system))
5505 #:phases (modify-phases %standard-phases
5506 (replace 'check
5507 (lambda* (#:key tests? #:allow-other-keys)
5508 (if tests?
5509 (begin
5510 (let ((libdir (find (cut string-prefix? "lib." <>)
5511 (scandir "build"))))
5512 (setenv "PYTHONPATH"
5513 (string-append "./build/" libdir ":"
5514 (getenv "PYTHONPATH")))
5515 (invoke "pytest" "-vv")))
5516 (format #t "test suite not run~%"))
5517 #t)))))
5518 (native-inputs
5519 `(("python-pytest" ,python-pytest)
5520 ("python-pytest-cov" ,python-pytest-cov)))
5521 (home-page "https://github.com/aio-libs/multidict/")
5522 (synopsis "Multidict implementation")
5523 (description "Multidict is dict-like collection of key-value pairs
5524 where key might be occurred more than once in the container.")
5525 (license license:asl2.0)))
5526
5527 (define-public python-orderedmultidict
5528 (package
5529 (name "python-orderedmultidict")
5530 (version "1.0")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (pypi-uri "orderedmultidict" version))
5535 (sha256
5536 (base32
5537 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5538 (build-system python-build-system)
5539 (arguments
5540 `(#:phases
5541 (modify-phases %standard-phases
5542 (add-after 'unpack 'fix-tests
5543 (lambda _
5544 ;; The package uses nosetest for running the tests.
5545 ;; Adding this initfile allows to run the test suite
5546 ;; without requiring nosetest.
5547 (with-output-to-file "tests/__init__.py" newline)
5548 #t)))))
5549 (propagated-inputs
5550 `(("python-six" ,python-six)))
5551 (native-inputs
5552 `(("python-pycodestyle" ,python-pycodestyle)))
5553 (home-page "https://github.com/gruns/orderedmultidict")
5554 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5555 (description "This package contains a library for ordered multivalue
5556 dictionaries. A multivalue dictionary is a dictionary that can store
5557 multiple values for the same key. An ordered multivalue dictionary is a
5558 multivalue dictionary that retains the order of insertions and deletions.")
5559 (license license:unlicense)))
5560
5561 (define-public python2-orderedmultidict
5562 (package-with-python2 python-orderedmultidict))
5563
5564 (define-public python-autopep8
5565 (package
5566 (name "python-autopep8")
5567 (version "1.5.3")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "autopep8" version))
5572 (sha256
5573 (base32
5574 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5575 (build-system python-build-system)
5576 (propagated-inputs
5577 `(("python-pycodestyle" ,python-pycodestyle)
5578 ("python-toml" ,python-toml)))
5579 (home-page "https://github.com/hhatto/autopep8")
5580 (synopsis "Format Python code according to the PEP 8 style guide")
5581 (description
5582 "@code{autopep8} automatically formats Python code to conform to
5583 the PEP 8 style guide. It uses the pycodestyle utility to determine
5584 what parts of the code needs to be formatted. @code{autopep8} is
5585 capable of fixing most of the formatting issues that can be reported
5586 by pycodestyle.")
5587 (license (license:non-copyleft
5588 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5589
5590 (define-public python2-autopep8
5591 (package-with-python2 python-autopep8))
5592
5593 (define-public python-distlib
5594 (package
5595 (name "python-distlib")
5596 (version "0.3.0")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (pypi-uri "distlib" version ".zip"))
5601 (sha256
5602 (base32
5603 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5604 (build-system python-build-system)
5605 (arguments
5606 `(#:phases
5607 (modify-phases %standard-phases
5608 (add-before 'build 'no-/bin/sh
5609 (lambda _
5610 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5611 (("/bin/sh") (which "sh")))
5612 #t))
5613 (add-before 'check 'prepare-test-env
5614 (lambda _
5615 (setenv "HOME" "/tmp")
5616 ;; NOTE: Any value works, the variable just has to be present.
5617 (setenv "SKIP_ONLINE" "1")
5618 #t)))))
5619 (native-inputs `(("unzip" ,unzip)))
5620 (home-page "https://bitbucket.org/pypa/distlib")
5621 (synopsis "Distribution utilities")
5622 (description "Distlib is a library which implements low-level functions that
5623 relate to packaging and distribution of Python software. It is intended to be
5624 used as the basis for third-party packaging tools.")
5625 (license license:psfl)))
5626
5627 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5628 (define-public python-distlib/next
5629 (package
5630 (inherit python-distlib)
5631 (version "0.3.1")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (pypi-uri "distlib" version ".zip"))
5636 (sha256
5637 (base32
5638 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5639
5640 (define-public python-distutils-extra
5641 (package
5642 (name "python-distutils-extra")
5643 (version "2.38")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5648 version "/+download/python-distutils-extra-"
5649 version ".tar.gz"))
5650 (sha256
5651 (base32
5652 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5653 (build-system python-build-system)
5654 (home-page "https://launchpad.net/python-distutils-extra/")
5655 (synopsis "Enhancements to Python's distutils")
5656 (description
5657 "The python-distutils-extra module enables you to easily integrate
5658 gettext support, themed icons, and scrollkeeper-based documentation into
5659 Python's distutils.")
5660 (license license:gpl2)))
5661
5662 (define-public python2-distutils-extra
5663 (package-with-python2 python-distutils-extra))
5664
5665 (define-public python2-elib.intl
5666 (package
5667 (name "python2-elib.intl")
5668 (version "0.0.3")
5669 (source
5670 (origin
5671 ;; This project doesn't tag releases or publish tarballs, so we take
5672 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5673 (method git-fetch)
5674 (uri (git-reference
5675 (url "https://github.com/dieterv/elib.intl")
5676 (commit "d09997cfef")))
5677 (file-name (string-append name "-" version "-checkout"))
5678 (sha256
5679 (base32
5680 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5681 (build-system python-build-system)
5682 (arguments
5683 ;; incompatible with Python 3 (exception syntax)
5684 `(#:python ,python-2
5685 #:tests? #f))
5686 (home-page "https://github.com/dieterv/elib.intl")
5687 (synopsis "Enhanced internationalization for Python")
5688 (description
5689 "The elib.intl module provides enhanced internationalization (I18N)
5690 services for your Python modules and applications.")
5691 (license license:lgpl3+)))
5692
5693 (define-public python-olefile
5694 (package
5695 (name "python-olefile")
5696 (version "0.46")
5697 (source
5698 (origin
5699 (method url-fetch)
5700 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5701 "download/v" version "/olefile-" version ".tar.gz"))
5702 (file-name (string-append name "-" version ".tar.gz"))
5703 (sha256
5704 (base32
5705 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5706 (build-system python-build-system)
5707 (home-page "https://www.decalage.info/python/olefileio")
5708 (synopsis "Read and write Microsoft OLE2 files.")
5709 (description
5710 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5711 Storage or Compound Document, Microsoft Office). It is an improved version of
5712 the OleFileIO module from PIL, the Python Image Library.")
5713 (license license:bsd-3)))
5714
5715 (define-public python2-olefile
5716 (package-with-python2 python-olefile))
5717
5718 (define-public python-pillow
5719 (package
5720 (name "python-pillow")
5721 (version "8.0.1")
5722 (source
5723 (origin
5724 (method url-fetch)
5725 (uri (pypi-uri "Pillow" version))
5726 (sha256
5727 (base32
5728 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5729 (build-system python-build-system)
5730 (native-inputs
5731 `(("python-pytest" ,python-pytest)))
5732 (inputs
5733 `(("freetype" ,freetype)
5734 ("lcms" ,lcms)
5735 ("libjpeg" ,libjpeg-turbo)
5736 ("libtiff" ,libtiff)
5737 ("libwebp" ,libwebp)
5738 ("openjpeg" ,openjpeg)
5739 ("zlib" ,zlib)))
5740 (propagated-inputs
5741 `(("python-olefile" ,python-olefile)))
5742 (arguments
5743 `(#:phases
5744 (modify-phases %standard-phases
5745 (add-after 'unpack 'patch-ldconfig
5746 (lambda _
5747 (substitute* "setup.py"
5748 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5749 (replace 'check
5750 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5751 (if tests?
5752 (begin
5753 (setenv "HOME" (getcwd))
5754 ;; Make installed package available for running the tests.
5755 (add-installed-pythonpath inputs outputs)
5756 (invoke "python" "selftest.py" "--installed")
5757 (invoke "python" "-m" "pytest" "-vv"))
5758 #t))))))
5759 (home-page "https://python-pillow.org")
5760 (synopsis "Fork of the Python Imaging Library")
5761 (description
5762 "The Python Imaging Library adds image processing capabilities to your
5763 Python interpreter. This library provides extensive file format support, an
5764 efficient internal representation, and fairly powerful image processing
5765 capabilities. The core image library is designed for fast access to data
5766 stored in a few basic pixel formats. It should provide a solid foundation for
5767 a general image processing tool.")
5768 (properties `((python2-variant . ,(delay python2-pillow))))
5769 (license (license:x11-style
5770 "http://www.pythonware.com/products/pil/license.htm"
5771 "The PIL Software License"))))
5772
5773 (define-public python2-pillow
5774 (package-with-python2
5775 (package
5776 (inherit (strip-python2-variant python-pillow))
5777 ;; Version 6 is the last series with Python 2 support.
5778 (version "6.2.2")
5779 (source
5780 (origin
5781 (method url-fetch)
5782 (uri (pypi-uri "Pillow" version))
5783 (sha256
5784 (base32
5785 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5786
5787 (define-public python-pillow-2.9
5788 (package
5789 (inherit python-pillow)
5790 (version "2.9.0")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "Pillow" version))
5795 (sha256
5796 (base32
5797 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5798 (arguments
5799 (substitute-keyword-arguments (package-arguments python-pillow)
5800 ((#:tests? _ #f) #f)))
5801 (properties '((hidden? #t)))))
5802
5803 (define-public python-roifile
5804 (package
5805 (name "python-roifile")
5806 (version "2020.5.28")
5807 (source
5808 (origin
5809 (method url-fetch)
5810 (uri (pypi-uri "roifile" version))
5811 (sha256
5812 (base32
5813 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5814 (build-system python-build-system)
5815 (arguments `(#:tests? #f)) ; there are none
5816 (propagated-inputs
5817 `(("python-numpy" ,python-numpy)))
5818 (home-page "https://www.lfd.uci.edu/~gohlke/")
5819 (synopsis "Read and write ImageJ ROI format")
5820 (description "Roifile is a Python library to read, write, create, and plot
5821 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5822 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5823 (license license:bsd-3)))
5824
5825 (define-public python-tifffile
5826 (package
5827 (name "python-tifffile")
5828 (version "2020.6.3")
5829 (source
5830 (origin
5831 (method url-fetch)
5832 (uri (pypi-uri "tifffile" version))
5833 (sha256
5834 (base32
5835 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5836 (build-system python-build-system)
5837 ;; Tests require lfdfiles, which depends on tifffile
5838 (arguments `(#:tests? #f))
5839 (propagated-inputs
5840 `(("python-numpy" ,python-numpy)
5841 ;;("python-lfdfiles" ,python-lfdfiles)
5842 ("python-roifile" ,python-roifile)))
5843 (home-page "https://www.lfd.uci.edu/~gohlke/")
5844 (synopsis "Read and write TIFF(r) files")
5845 (description "This package lets you read image and metadata from many
5846 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5847 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5848 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5849 (license license:bsd-3)))
5850
5851 (define-public python-lfdfiles
5852 (package
5853 (name "python-lfdfiles")
5854 (version "2020.1.1")
5855 (source
5856 (origin
5857 (method url-fetch)
5858 (uri (pypi-uri "lfdfiles" version))
5859 (sha256
5860 (base32
5861 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5862 (build-system python-build-system)
5863 (propagated-inputs
5864 `(("python-click" ,python-click)
5865 ("python-numpy" ,python-numpy)
5866 ("python-tifffile" ,python-tifffile)))
5867 (home-page "https://www.lfd.uci.edu/~gohlke/")
5868 (synopsis "Work with LFD data files")
5869 (description
5870 "Lfdfiles is a Python library and console script for reading, writing,
5871 converting, and viewing many of the proprietary file formats used to store
5872 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5873 (license license:bsd-3)))
5874
5875 (define-public python-imageio
5876 (package
5877 (name "python-imageio")
5878 (version "2.8.0")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "imageio" version))
5883 (sha256
5884 (base32
5885 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5886 (build-system python-build-system)
5887 (arguments
5888 `(#:tests? #f ; many tests require online data
5889 #:phases
5890 (modify-phases %standard-phases
5891 (replace 'check
5892 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5893 (if tests?
5894 (begin
5895 ;; Make installed package available for running the tests.
5896 (add-installed-pythonpath inputs outputs)
5897 (invoke "pytest" "-vv"))
5898 #t))))))
5899 (propagated-inputs
5900 `(("python-numpy" ,python-numpy)
5901 ("python-pillow" ,python-pillow)
5902 ("python-psutil" ,python-psutil)))
5903 (native-inputs
5904 `(("python-pytest" ,python-pytest)))
5905 (home-page "https://imageio.github.io/")
5906 (synopsis "Library for reading and writing a wide range of image data")
5907 (description
5908 "Imageio is a Python library that provides an easy interface to read and
5909 write a wide range of image data, including animated images, video, volumetric
5910 data, and scientific formats.")
5911 (license license:bsd-2)))
5912
5913 (define-public python-pycparser
5914 (package
5915 (name "python-pycparser")
5916 (version "2.20")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (pypi-uri "pycparser" version))
5921 (sha256
5922 (base32
5923 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5924 (outputs '("out" "doc"))
5925 (build-system python-build-system)
5926 (native-inputs
5927 `(("pkg-config" ,pkg-config)))
5928 (arguments
5929 `(#:phases
5930 (modify-phases %standard-phases
5931 (replace 'check
5932 (lambda _
5933 (with-directory-excursion "tests"
5934 (invoke "python" "all_tests.py"))
5935 #t))
5936 (add-after 'install 'install-doc
5937 (lambda* (#:key outputs #:allow-other-keys)
5938 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5939 (doc (string-append data "/doc/" ,name "-" ,version))
5940 (examples (string-append doc "/examples")))
5941 (mkdir-p examples)
5942 (for-each (lambda (file)
5943 (copy-file (string-append "." file)
5944 (string-append doc file)))
5945 '("/README.rst" "/CHANGES" "/LICENSE"))
5946 (copy-recursively "examples" examples)
5947 #t))))))
5948 (home-page "https://github.com/eliben/pycparser")
5949 (synopsis "C parser in Python")
5950 (description
5951 "Pycparser is a complete parser of the C language, written in pure Python
5952 using the PLY parsing library. It parses C code into an AST and can serve as
5953 a front-end for C compilers or analysis tools.")
5954 (license license:bsd-3)))
5955
5956 (define-public python2-pycparser
5957 (package-with-python2 python-pycparser))
5958
5959 (define-public python-xlsxwriter
5960 (package
5961 (name "python-xlsxwriter")
5962 (version "1.3.7")
5963 (source
5964 (origin
5965 ;; There are no tests in the PyPI tarball.
5966 (method git-fetch)
5967 (uri (git-reference
5968 (url "https://github.com/jmcnamara/XlsxWriter")
5969 (commit (string-append "RELEASE_" version))))
5970 (file-name (git-file-name name version))
5971 (sha256
5972 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
5973 (build-system python-build-system)
5974 (home-page "https://github.com/jmcnamara/XlsxWriter")
5975 (synopsis "Python module for creating Excel XLSX files")
5976 (description
5977 "XlsxWriter is a Python module that can be used to write text, numbers,
5978 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
5979 (license license:bsd-2)))
5980
5981 (define-public python-pywavelets
5982 (package
5983 (name "python-pywavelets")
5984 (version "1.1.1")
5985 (home-page "https://github.com/PyWavelets/pywt")
5986 (source (origin
5987 (method url-fetch)
5988 (uri (pypi-uri "PyWavelets" version))
5989 (sha256
5990 (base32
5991 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5992 (build-system python-build-system)
5993 (arguments
5994 '(#:modules ((ice-9 ftw)
5995 (srfi srfi-1)
5996 (srfi srfi-26)
5997 (guix build utils)
5998 (guix build python-build-system))
5999 #:phases
6000 (modify-phases %standard-phases
6001 (replace 'check
6002 (lambda _
6003 (let ((cwd (getcwd))
6004 (libdir (find (cut string-prefix? "lib." <>)
6005 (scandir "build"))))
6006 (with-directory-excursion (string-append cwd "/build/" libdir)
6007 (invoke "pytest" "-vv"))))))))
6008 (native-inputs
6009 `(("python-matplotlib" ,python-matplotlib) ;for tests
6010 ("python-pytest" ,python-pytest)))
6011 (propagated-inputs
6012 `(("python-numpy" ,python-numpy)))
6013 (synopsis "Wavelet transforms in Python")
6014 (description
6015 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6016 mathematical basis functions that are localized in both time and frequency.
6017 Wavelet transforms are time-frequency transforms employing wavelets. They are
6018 similar to Fourier transforms, the difference being that Fourier transforms are
6019 localized only in frequency instead of in time and frequency.")
6020 (license license:expat)))
6021
6022 (define-public python-pywinrm
6023 (package
6024 (name "python-pywinrm")
6025 (version "0.4.1")
6026 (source
6027 (origin
6028 (method url-fetch)
6029 (uri (pypi-uri "pywinrm" version))
6030 (sha256
6031 (base32
6032 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6033 (build-system python-build-system)
6034 (propagated-inputs
6035 `(("python-six" ,python-six)
6036 ("python-requests_ntlm" ,python-requests_ntlm)
6037 ("python-xmltodict" ,python-xmltodict)
6038 ("python-kerberos" ,python-kerberos)))
6039 (native-inputs
6040 `(("python-mock" ,python-mock)
6041 ("python-pytest" ,python-pytest)))
6042 (home-page "https://github.com/diyan/pywinrm/")
6043 (synopsis
6044 "Python library for Windows Remote Management (WinRM)")
6045 (description
6046 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6047 service. It allows you to invoke commands on target Windows machines from
6048 any machine that can run Python.")
6049 (license license:expat)))
6050
6051 (define-public python-xcffib
6052 (package
6053 (name "python-xcffib")
6054 (version "0.6.0")
6055 (source
6056 (origin
6057 (method url-fetch)
6058 (uri (pypi-uri "xcffib" version))
6059 (sha256
6060 (base32
6061 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6062 (build-system python-build-system)
6063 (inputs
6064 `(("libxcb" ,libxcb)))
6065 (propagated-inputs
6066 `(("python-cffi" ,python-cffi) ; used at run time
6067 ("python-six" ,python-six)))
6068 (arguments
6069 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6070 #:tests? #f
6071 #:phases
6072 (modify-phases %standard-phases
6073 (add-after 'unpack 'fix-libxcb-path
6074 (lambda* (#:key inputs #:allow-other-keys)
6075 (let ((libxcb (assoc-ref inputs "libxcb")))
6076 (substitute* '("xcffib/__init__.py")
6077 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6078 #t)))
6079 (add-after 'install 'install-doc
6080 (lambda* (#:key outputs #:allow-other-keys)
6081 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6082 "/doc/" ,name "-" ,version)))
6083 (mkdir-p doc)
6084 (copy-file "README.md"
6085 (string-append doc "/README.md"))
6086 #t))))))
6087 (home-page "https://github.com/tych0/xcffib")
6088 (synopsis "XCB Python bindings")
6089 (description
6090 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6091 support for Python 3 and PyPy. It is based on cffi.")
6092 (license license:expat)))
6093
6094 (define-public python2-xcffib
6095 (package-with-python2 python-xcffib))
6096
6097 (define-public python-cairocffi
6098 (package
6099 (name "python-cairocffi")
6100 (version "1.2.0")
6101 (source
6102 (origin
6103 ;; The PyPI archive does not include the documentation, so use Git.
6104 (method git-fetch)
6105 (uri (git-reference
6106 (url "https://github.com/Kozea/cairocffi")
6107 (commit (string-append "v" version))))
6108 (file-name (git-file-name name version))
6109 (sha256
6110 (base32
6111 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6112 (build-system python-build-system)
6113 (outputs '("out" "doc"))
6114 (inputs
6115 `(("glib" ,glib)
6116 ("gtk+" ,gtk+)
6117 ("gdk-pixbuf" ,gdk-pixbuf)
6118 ("cairo" ,cairo)))
6119 (native-inputs
6120 `(("python-numpy" ,python-numpy)
6121 ("python-pytest" ,python-pytest)
6122 ("python-pytest-cov" ,python-pytest-cov)
6123 ("python-pytest-runner" ,python-pytest-runner)
6124 ("python-sphinx" ,python-sphinx)
6125 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6126 (propagated-inputs
6127 `(("python-xcffib" ,python-xcffib))) ; used at run time
6128 (arguments
6129 `(#:phases
6130 (modify-phases %standard-phases
6131 (add-after 'unpack 'patch-paths
6132 (lambda* (#:key inputs #:allow-other-keys)
6133 (substitute* "cairocffi/__init__.py"
6134 ;; Hack the dynamic library loading mechanism.
6135 (("find_library\\(library_name\\)")
6136 "\"found\"")
6137 (("filenames = \\(library_filename,\\) \\+ filenames")
6138 "pass")
6139 (("libcairo.so.2")
6140 (string-append (assoc-ref inputs "cairo")
6141 "/lib/libcairo.so.2")))
6142 (substitute* "cairocffi/pixbuf.py"
6143 (("libgdk_pixbuf-2.0.so.0")
6144 (string-append (assoc-ref inputs "gdk-pixbuf")
6145 "/lib/libgdk_pixbuf-2.0.so.0"))
6146 (("libgobject-2.0.so.0")
6147 (string-append (assoc-ref inputs "glib")
6148 "/lib/libgobject-2.0.so.0"))
6149 (("libglib-2.0.so.0")
6150 (string-append (assoc-ref inputs "glib")
6151 "/lib/libglib-2.0.so.0"))
6152 (("libgdk-3.so.0")
6153 (string-append (assoc-ref inputs "gtk+")
6154 "/lib/libgdk-3.so.0")))
6155 #t))
6156 (add-after 'unpack 'disable-linters
6157 ;; Their check fails; none of our business.
6158 (lambda _
6159 (substitute* "setup.cfg"
6160 ((".*pytest-flake8.*") "")
6161 ((".*pytest-isort.*") "")
6162 (("--flake8") "")
6163 (("--isort") ""))
6164 #t))
6165 (add-after 'install 'install-doc
6166 (lambda* (#:key inputs outputs #:allow-other-keys)
6167 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6168 (doc (string-append data "/doc/" ,name "-" ,version))
6169 (html (string-append doc "/html")))
6170 (setenv "LD_LIBRARY_PATH"
6171 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6172 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6173 (setenv "LANG" "en_US.UTF-8")
6174 (mkdir-p html)
6175 (for-each (lambda (file)
6176 (copy-file (string-append "." file)
6177 (string-append doc file)))
6178 '("/README.rst" "/NEWS.rst"))
6179 (system* "python" "setup.py" "build_sphinx")
6180 (copy-recursively "docs/_build/html" html)
6181 #t))))))
6182 (home-page "https://github.com/Kozea/cairocffi")
6183 (synopsis "Python bindings and object-oriented API for Cairo")
6184 (description
6185 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6186 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6187 graphics library with support for multiple backends including image buffers,
6188 PNG, PostScript, PDF, and SVG file output.")
6189 (license license:bsd-3)))
6190
6191 (define-public python2-cairocffi
6192 (package-with-python2 python-cairocffi))
6193
6194 (define-public python-decorator
6195 (package
6196 (name "python-decorator")
6197 (version "4.3.0")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (pypi-uri "decorator" version))
6202 (sha256
6203 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6204 (build-system python-build-system)
6205 (home-page "https://pypi.org/project/decorator/")
6206 (synopsis "Python module to simplify usage of decorators")
6207 (description
6208 "The aim of the decorator module is to simplify the usage of decorators
6209 for the average programmer, and to popularize decorators usage giving examples
6210 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6211 etc. The core of this module is a decorator factory.")
6212 (license license:expat)))
6213
6214 (define-public python2-decorator
6215 (package-with-python2 python-decorator))
6216
6217 (define-public python-drmaa
6218 (package
6219 (name "python-drmaa")
6220 (version "0.7.7")
6221 (source
6222 (origin
6223 (method url-fetch)
6224 (uri (pypi-uri "drmaa" version))
6225 (sha256
6226 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6227 (build-system python-build-system)
6228 ;; The test suite requires libdrmaa which is provided by the cluster
6229 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6230 ;; should be set to the path of the libdrmaa library.
6231 (arguments '(#:tests? #f))
6232 (native-inputs
6233 `(("python-nose" ,python-nose)))
6234 (home-page "https://pypi.org/project/drmaa/")
6235 (synopsis "Python bindings for the DRMAA library")
6236 (description
6237 "A Python package for Distributed Resource Management (DRM) job
6238 submission and control. This package is an implementation of the DRMAA 1.0
6239 Python language binding specification.")
6240 (license license:bsd-3)))
6241
6242 (define-public python2-drmaa
6243 (package-with-python2 python-drmaa))
6244
6245 (define-public python-grako
6246 (package
6247 (name "python-grako")
6248 (version "3.99.9")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri
6253 (pypi-uri "grako" version ".zip"))
6254 (sha256
6255 (base32
6256 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6257 (build-system python-build-system)
6258 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6259 (native-inputs
6260 `(("unzip" ,unzip)
6261 ("python-pytest" ,python-pytest)
6262 ("python-pytest-runner" ,python-pytest-runner)))
6263 (home-page "https://bitbucket.org/neogeny/grako")
6264 (synopsis "EBNF parser generator")
6265 (description
6266 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6267 memoizing PEG/Packrat parser in Python.")
6268 (license license:bsd-3)))
6269
6270 (define-public python2-grako
6271 (package-with-python2 python-grako))
6272
6273 (define-public python-grandalf
6274 (package
6275 (name "python-grandalf")
6276 (version "0.7")
6277 (source
6278 (origin
6279 ;; There's no source tarball on PyPI.
6280 (method git-fetch)
6281 (uri (git-reference
6282 (url "https://github.com/bdcht/grandalf")
6283 (commit (string-append "v" version))))
6284 (file-name (git-file-name name version))
6285 (sha256
6286 (base32
6287 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6288 (build-system python-build-system)
6289 (arguments
6290 '(#:phases
6291 (modify-phases %standard-phases
6292 (replace 'check
6293 (lambda _
6294 (invoke "python" "setup.py" "pytest"))))))
6295 (native-inputs
6296 `(("python-pytest" ,python-pytest)
6297 ("python-pytest-runner" ,python-pytest-runner)))
6298 (propagated-inputs
6299 `(("python-numpy" ,python-numpy)
6300 ("python-ply" ,python-ply)))
6301 (home-page "https://github.com/bdcht/grandalf")
6302 (synopsis "Graph and drawing algorithms framework")
6303 (description
6304 "Grandalf is a Python package made for experimentations with graphs
6305 drawing algorithms. It is written in pure Python, and currently implements
6306 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6307 minimization approach. While not as fast or featured as graphviz or other
6308 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6309 than thousands of nodes, while keeping the source code simple enough to tweak
6310 and hack any part of it for experimental purpose. With a total of about 1500
6311 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6312 in less than 600 lines. The energy minimization approach is comprised of only
6313 250 lines!
6314
6315 Grandalf does only 2 not-so-simple things:
6316 @itemize
6317 @item computing the nodes (x,y) coordinates (based on provided nodes
6318 dimensions, and a chosen layout)
6319 @item routing the edges with lines or nurbs
6320 @end itemize
6321
6322 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6323 will help you find where to draw things like nodes and edges, but it’s up to
6324 you to actually draw things with your favorite toolkit.")
6325 ;; The user can choose either license.
6326 (license (list license:gpl2 license:epl1.0))))
6327
6328 (define-public python-gridmap
6329 (package
6330 (name "python-gridmap")
6331 (version "0.14.0")
6332 (source
6333 (origin
6334 (method git-fetch)
6335 (uri (git-reference
6336 (url "https://github.com/pygridtools/gridmap")
6337 (commit (string-append "v" version))))
6338 (file-name (git-file-name name version))
6339 (sha256
6340 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6341 (build-system python-build-system)
6342 (arguments
6343 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6344 (propagated-inputs
6345 `(("python-psutil" ,python-psutil)
6346 ("python-drmaa" ,python-drmaa)
6347 ("python-pyzmq" ,python-pyzmq)))
6348 (home-page "https://github.com/pygridtools/gridmap")
6349 (synopsis "Create jobs on a cluster directly from Python")
6350 (description
6351 "Gridmap is a Python package to allow you to easily create jobs on the
6352 cluster directly from Python. You can directly map Python functions onto the
6353 cluster without needing to write any wrapper code yourself.")
6354 (license license:gpl3+)))
6355
6356 (define-public python2-gridmap
6357 (package-with-python2 python-gridmap))
6358
6359 (define-public python-honcho
6360 (package
6361 (name "python-honcho")
6362 (version "1.0.1")
6363 (source
6364 (origin
6365 (method git-fetch)
6366 (uri (git-reference
6367 (url "https://github.com/nickstenning/honcho")
6368 (commit (string-append "v" version))))
6369 (file-name (git-file-name name version))
6370 (sha256
6371 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6372 (build-system python-build-system)
6373 (native-inputs
6374 `(("python-pytest" ,python-pytest)
6375 ("python-mock" ,python-mock)
6376 ("python-tox" ,python-tox)
6377 ("which" ,which))) ;for tests
6378 (propagated-inputs
6379 `(("python-jinja2" ,python-jinja2)))
6380 (arguments
6381 `(#:phases
6382 (modify-phases %standard-phases
6383 (delete 'check)
6384 (add-after 'install 'check
6385 (lambda* (#:key outputs inputs #:allow-other-keys)
6386 ;; fix honcho path in testsuite
6387 (substitute* "tests/conftest.py"
6388 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6389 "/bin/honcho" "'")))
6390 ;; It's easier to run tests after install.
6391 ;; Make installed package available for running the tests
6392 (add-installed-pythonpath inputs outputs)
6393 (invoke "py.test" "-v"))))))
6394 (home-page "https://github.com/nickstenning/honcho")
6395 (synopsis "Manage Procfile-based applications")
6396 (description
6397 "A Procfile is a file which describes how to run an application
6398 consisting of several processes. honcho starts all listed processes.
6399 The output of all running processes is collected by honcho and
6400 displayed.")
6401 (license license:expat)))
6402
6403 (define-public python2-honcho
6404 (package-with-python2 python-honcho))
6405
6406 (define-public python-pexpect
6407 (package
6408 (name "python-pexpect")
6409 (version "4.8.0")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (pypi-uri "pexpect" version))
6414 (sha256
6415 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6416 (build-system python-build-system)
6417 (arguments
6418 `(#:phases
6419 (modify-phases %standard-phases
6420 (add-before 'check 'prepare-tests
6421 (lambda _
6422 (substitute* (find-files "tests")
6423 (("/bin/ls") (which "ls"))
6424 (("/bin/echo") (which "echo"))
6425 (("/bin/which") (which "which"))
6426 ;; Many tests try to use the /bin directory which
6427 ;; is not present in the build environment.
6428 ;; Use one that's non-empty and unlikely to change.
6429 (("/bin'") "/dev'")
6430 ;; Disable failing test. See upstream bug report
6431 ;; https://github.com/pexpect/pexpect/issues/568
6432 (("def test_bash") "def _test_bash"))
6433 ;; XXX: Socket connection test gets "Connection reset by peer".
6434 ;; Why does it not work? Delete for now.
6435 (delete-file "tests/test_socket.py")
6436 #t))
6437 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6438 (native-inputs
6439 `(("python-nose" ,python-nose)
6440 ("python-pytest" ,python-pytest)
6441 ("man-db" ,man-db)
6442 ("which" ,which)
6443 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6444 (propagated-inputs
6445 `(("python-ptyprocess" ,python-ptyprocess)))
6446 (home-page "http://pexpect.readthedocs.org/")
6447 (synopsis "Controlling interactive console applications")
6448 (description
6449 "Pexpect is a pure Python module for spawning child applications;
6450 controlling them; and responding to expected patterns in their output.
6451 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6452 child application and control it as if a human were typing commands.")
6453 (license license:isc)))
6454
6455 (define-public python2-pexpect
6456 (package-with-python2 python-pexpect))
6457
6458 (define-public python-setuptools-scm
6459 (package
6460 (name "python-setuptools-scm")
6461 (version "3.4.3")
6462 (source (origin
6463 (method url-fetch)
6464 (uri (pypi-uri "setuptools_scm" version))
6465 (sha256
6466 (base32
6467 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6468 (build-system python-build-system)
6469 (home-page "https://github.com/pypa/setuptools_scm/")
6470 (synopsis "Manage Python package versions in SCM metadata")
6471 (description
6472 "Setuptools_scm handles managing your Python package versions in
6473 @dfn{software configuration management} (SCM) metadata instead of declaring
6474 them as the version argument or in a SCM managed file.")
6475 (license license:expat)))
6476
6477 (define-public python2-setuptools-scm
6478 (package-with-python2 python-setuptools-scm))
6479
6480 (define-public python-sexpdata
6481 (package
6482 (name "python-sexpdata")
6483 (version "0.0.3")
6484 (source
6485 (origin
6486 (method url-fetch)
6487 (uri (pypi-uri "sexpdata" version))
6488 (sha256
6489 (base32
6490 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6491 (build-system python-build-system)
6492 (home-page "https://github.com/jd-boyd/sexpdata")
6493 (synopsis "S-expression parser for Python")
6494 (description
6495 "Sexpdata is an S-expression parser/serializer. It has load and dump
6496 functions like pickle, json or PyYAML module.")
6497 (license license:bsd-3)))
6498
6499 (define-public python-pathlib2
6500 (package
6501 (name "python-pathlib2")
6502 (version "2.3.3")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "pathlib2" version))
6507 (sha256
6508 (base32
6509 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6510 (build-system python-build-system)
6511 (propagated-inputs
6512 `(("python-scandir" ,python-scandir)
6513 ("python-six" ,python-six)))
6514 (home-page "https://pypi.org/project/pathlib2/")
6515 (synopsis "Object-oriented file system paths")
6516 (description "The goal of pathlib2 is to provide a backport of the
6517 standard @code{pathlib} module which tracks the standard library module, so
6518 all the newest features of the standard @code{pathlib} can be used also on
6519 older Python versions.")
6520 (license license:expat)))
6521
6522 (define-public python-importlib-resources
6523 (package
6524 (name "python-importlib-resources")
6525 (version "3.0.0")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "importlib_resources" version))
6530 (sha256
6531 (base32
6532 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6533 (build-system python-build-system)
6534 (native-inputs
6535 `(("python-setuptools-scm" ,python-setuptools-scm)
6536 ("python-toml" ,python-toml)))
6537 (home-page "http://importlib-resources.readthedocs.io/")
6538 (synopsis "Read resources from Python packages")
6539 (description
6540 "@code{importlib_resources} is a backport of Python 3's standard library
6541 @code{importlib.resources} module for Python 2.7, and Python 3.")
6542 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6543 (license license:asl2.0)))
6544
6545 (define-public python2-importlib-resources
6546 (package
6547 (name "python2-importlib-resources")
6548 (version "1.0.2")
6549 (source (origin
6550 (method url-fetch)
6551 (uri (pypi-uri "importlib_resources" version))
6552 (sha256
6553 (base32
6554 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6555 (build-system python-build-system)
6556 (arguments
6557 `(#:python ,python-2
6558 #:phases (modify-phases %standard-phases
6559 ;; The build system tests for python-wheel, but it is
6560 ;; not required for Guix nor the test suite. Just drop
6561 ;; it to make bootstrapping pytest easier.
6562 (add-after 'unpack 'drop-wheel-dependency
6563 (lambda _
6564 (substitute* "setup.cfg"
6565 (("^[[:blank:]]+wheel")
6566 ""))
6567 #t)))))
6568 (propagated-inputs
6569 `(("python-pathlib2" ,python2-pathlib2)
6570 ("python-typing" ,python2-typing)))
6571 (home-page "https://gitlab.com/python-devs/importlib_resources")
6572 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6573 (description
6574 "This package provides an implementation of @code{importlib.resources}
6575 for older versions of Python.")
6576 (license license:asl2.0)))
6577
6578 ;; For importlib-metadata-bootstrap below.
6579 (define-public python2-importlib-resources-bootstrap
6580 (hidden-package
6581 (package/inherit
6582 python2-importlib-resources
6583 (name "python2-importlib-resources-bootstrap")
6584 (propagated-inputs
6585 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6586 ("python-typing" ,python2-typing))))))
6587
6588 (define-public python-importlib-metadata
6589 (package
6590 (name "python-importlib-metadata")
6591 (version "1.5.0")
6592 (source
6593 (origin
6594 (method url-fetch)
6595 (uri (pypi-uri "importlib_metadata" version))
6596 (sha256
6597 (base32
6598 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6599 (build-system python-build-system)
6600 (propagated-inputs
6601 `(("python-zipp" ,python-zipp)))
6602 (native-inputs
6603 `(("python-setuptools-scm" ,python-setuptools-scm)
6604 ("python-pyfakefs" ,python-pyfakefs)
6605 ("python-packaging" ,python-packaging)))
6606 (home-page "https://importlib-metadata.readthedocs.io/")
6607 (synopsis "Read metadata from Python packages")
6608 (description
6609 "@code{importlib_metadata} is a library which provides an API for
6610 accessing an installed Python package's metadata, such as its entry points or
6611 its top-level name. This functionality intends to replace most uses of
6612 @code{pkg_resources} entry point API and metadata API. Along with
6613 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6614 need to use the older and less efficient @code{pkg_resources} package.")
6615 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6616 (license license:asl2.0)))
6617
6618 (define-public python2-importlib-metadata
6619 (let ((base (package-with-python2 (strip-python2-variant
6620 python-importlib-metadata))))
6621 (package/inherit
6622 base
6623 (name "python2-importlib-metadata")
6624 (native-inputs
6625 `(("python-setuptools-scm" ,python2-setuptools-scm)
6626 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6627 ("python-packaging" ,python2-packaging-bootstrap)))
6628 (propagated-inputs
6629 `(("python-configparser" ,python2-configparser)
6630 ("python-contextlib2" ,python2-contextlib2)
6631 ("python-importlib-resources" ,python2-importlib-resources)
6632 ("python-pathlib2" ,python2-pathlib2)
6633 ,@(package-propagated-inputs base))))))
6634
6635 ;; This package is used by python2-pytest, and thus must not depend on it.
6636 (define-public python2-importlib-metadata-bootstrap
6637 (hidden-package
6638 (package/inherit
6639 python2-importlib-metadata
6640 (name "python2-importlib-metadata-bootstrap")
6641 (arguments
6642 `(#:tests? #f
6643 ,@(package-arguments python2-importlib-metadata)))
6644 (propagated-inputs
6645 `(("python-zipp" ,python2-zipp-bootstrap)
6646 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6647 ("python-configparser" ,python2-configparser)
6648 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6649 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6650
6651 (define-public python-importmagic
6652 (package
6653 (name "python-importmagic")
6654 (version "0.1.7")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "importmagic" version))
6659 (sha256
6660 (base32
6661 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6662 (build-system python-build-system)
6663 (home-page "https://github.com/alecthomas/importmagic")
6664 (synopsis "Library for adding, removing and managing Python imports")
6665 (description
6666 "Importmagic is a Python library for automatically managing imports by
6667 finding unresolved symbols in Python code and their corresponding imports.")
6668 (license license:bsd-3)))
6669
6670 (define-public python-jaraco-packaging
6671 (package
6672 (name "python-jaraco-packaging")
6673 (version "6.1")
6674 (source
6675 (origin
6676 (method url-fetch)
6677 (uri (pypi-uri "jaraco.packaging" version))
6678 (sha256
6679 (base32
6680 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6681 (build-system python-build-system)
6682 (propagated-inputs
6683 `(("python-pytest" ,python-pytest)
6684 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6685 ("python-pytest-flake8" ,python-pytest-flake8)
6686 ("python-rst.linker" ,python-rst.linker)
6687 ("python-setuptools" ,python-setuptools)
6688 ("python-setuptools-scm" ,python-setuptools-scm)
6689 ("python-six" ,python-six)
6690 ("python-sphinx" ,python-sphinx)))
6691 (home-page "https://github.com/jaraco/jaraco.packaging")
6692 (synopsis "Tools to supplement packaging Python releases")
6693 (description
6694 "This package provides various tools to supplement packaging Python
6695 releases.")
6696 (license license:expat)))
6697
6698 (define-public python-pathpy
6699 (package
6700 (name "python-pathpy")
6701 (version "11.5.1")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "path.py" version))
6706 (sha256
6707 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6708 (outputs '("out" "doc"))
6709 (build-system python-build-system)
6710 (propagated-inputs
6711 `(("python-appdirs" ,python-appdirs)
6712 ("python-importlib-metadata" ,python-importlib-metadata)))
6713 (native-inputs
6714 `(("python-setuptools-scm" ,python-setuptools-scm)
6715 ("python-sphinx" ,python-sphinx)
6716 ("python-rst.linker" ,python-rst.linker)
6717 ("python-pytest" ,python-pytest)
6718 ("python-pytest-runner" ,python-pytest-runner)
6719 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6720 (arguments
6721 `(#:phases
6722 (modify-phases %standard-phases
6723 (add-after 'build 'build-doc
6724 (lambda _
6725 (setenv "LANG" "en_US.UTF-8")
6726 (invoke "python" "setup.py" "build_sphinx")))
6727 (add-after 'install 'install-doc
6728 (lambda* (#:key outputs #:allow-other-keys)
6729 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6730 (doc (string-append data "/doc/" ,name "-" ,version))
6731 (html (string-append doc "/html")))
6732 (mkdir-p html)
6733 (for-each (lambda (file)
6734 (copy-file file (string-append doc "/" file)))
6735 '("README.rst" "CHANGES.rst"))
6736 (copy-recursively "build/sphinx/html" html)
6737 #t)))
6738 (replace 'check
6739 (lambda _
6740 ;; The import time test aborts if an import takes longer than
6741 ;; 100ms. It may very well take a little longer than that.
6742 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6743 (home-page "https://github.com/jaraco/path.py")
6744 (synopsis "Python module wrapper for built-in os.path")
6745 (description
6746 "@code{path.py} implements path objects as first-class entities, allowing
6747 common operations on files to be invoked on those path objects directly.")
6748 (license license:expat)))
6749
6750 (define-public python2-pathpy
6751 (package-with-python2 python-pathpy))
6752
6753 (define-public python-simplegeneric
6754 (package
6755 (name "python-simplegeneric")
6756 (version "0.8.1")
6757 (source
6758 (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "simplegeneric" version ".zip"))
6761 (sha256
6762 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6763 (build-system python-build-system)
6764 (native-inputs
6765 `(("unzip" ,unzip)))
6766 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6767 (synopsis "Python module for simple generic functions")
6768 (description
6769 "The simplegeneric module lets you define simple single-dispatch generic
6770 functions, akin to Python’s built-in generic functions like @code{len()},
6771 @code{iter()} and so on. However, instead of using specially-named methods,
6772 these generic functions use simple lookup tables, akin to those used by
6773 e.g. @code{pickle.dump()} and other generic functions found in the Python
6774 standard library.")
6775 (license license:zpl2.1)))
6776
6777 (define-public python2-simplegeneric
6778 (package-with-python2 python-simplegeneric))
6779
6780 (define-public python-ipython-genutils
6781 ;; TODO: This package is retired, check if can be removed, see description.
6782 (package
6783 (name "python-ipython-genutils")
6784 (version "0.1.0")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "ipython_genutils" version))
6789 (sha256
6790 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6791 (build-system python-build-system)
6792 (arguments `(#:tests? #f)) ; no tests
6793 (home-page "https://ipython.org")
6794 (synopsis "Vestigial utilities from IPython")
6795 (description
6796 "This package provides retired utilities from IPython. No packages
6797 outside IPython/Jupyter should depend on it.
6798
6799 This package shouldn't exist. It contains some common utilities shared by
6800 Jupyter and IPython projects during The Big Split. As soon as possible, those
6801 packages will remove their dependency on this, and this package will go
6802 away.")
6803 (license license:bsd-3)))
6804
6805 (define-public python2-ipython-genutils
6806 (package-with-python2 python-ipython-genutils))
6807
6808 (define-public python-ipyparallel
6809 (package
6810 (name "python-ipyparallel")
6811 (version "6.2.4")
6812 (source
6813 (origin
6814 (method url-fetch)
6815 (uri (pypi-uri "ipyparallel" version))
6816 (sha256
6817 (base32
6818 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6819 (build-system python-build-system)
6820 (arguments
6821 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6822 #:phases
6823 (modify-phases %standard-phases
6824 (add-before 'check 'prepare-for-tests
6825 (lambda _
6826 (setenv "HOME" (getcwd))
6827 #t)))))
6828 (propagated-inputs
6829 `(("python-dateutil" ,python-dateutil)
6830 ("python-decorator" ,python-decorator)
6831 ("python-ipykernel" ,python-ipykernel)
6832 ("python-ipython" ,python-ipython)
6833 ("python-ipython-genutils" ,python-ipython-genutils)
6834 ("python-jupyter-client" ,python-jupyter-client)
6835 ("python-pyzmq" ,python-pyzmq)
6836 ("python-tornado" ,python-tornado)
6837 ("python-traitlets" ,python-traitlets)))
6838 (native-inputs
6839 `(("python-ipython" ,python-ipython)
6840 ("python-mock" ,python-mock)
6841 ("python-nose" ,python-nose)
6842 ("python-pytest" ,python-pytest)
6843 ("python-pytest-cov" ,python-pytest-cov)
6844 ("python-testpath" ,python-testpath)))
6845 (home-page "https://ipython.org/")
6846 (synopsis "Interactive Parallel Computing with IPython")
6847 (description
6848 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6849 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6850 CLI scripts:
6851 @enumerate
6852 @item ipcluster - start/stop a cluster
6853 @item ipcontroller - start a scheduler
6854 @item ipengine - start an engine
6855 @end enumerate")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-ipyparallel
6859 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6860 (package
6861 (inherit ipyparallel)
6862 (propagated-inputs
6863 `(("python2-futures" ,python2-futures)
6864 ,@(package-propagated-inputs ipyparallel))))))
6865
6866 (define-public python-ipython-cluster-helper
6867 (package
6868 (name "python-ipython-cluster-helper")
6869 (version "0.6.4")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri "ipython-cluster-helper" version))
6874 (sha256
6875 (base32
6876 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6877 (modules '((guix build utils)))
6878 (snippet
6879 '(begin (substitute* "requirements.txt"
6880 (("ipython.*") "ipython\n"))
6881 #t))))
6882 (build-system python-build-system)
6883 (arguments
6884 `(#:tests? #f ; Test suite can't find IPython.
6885 #:phases
6886 (modify-phases %standard-phases
6887 (replace 'check
6888 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6889 (if tests?
6890 (begin
6891 (setenv "HOME" (getcwd))
6892 (add-installed-pythonpath inputs outputs)
6893 (invoke "python" "example/example.py" "--local"))
6894 #t))))))
6895 (propagated-inputs
6896 `(("python-ipyparallel" ,python-ipyparallel)
6897 ("python-ipython" ,python-ipython)
6898 ("python-netifaces" ,python-netifaces)
6899 ("python-pyzmq" ,python-pyzmq)
6900 ("python-setuptools" ,python-setuptools)
6901 ("python-six" ,python-six)))
6902 (home-page "https://github.com/roryk/ipython-cluster-helper")
6903 (synopsis
6904 "Simplify IPython cluster start up and use for multiple schedulers")
6905 (description
6906 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6907 profile, launches a cluster and returns a view. On program exit it shuts the
6908 cluster down and deletes the throwaway profile.")
6909 (license license:expat)))
6910
6911 (define-public python2-ipython-cluster-helper
6912 (package-with-python2 python-ipython-cluster-helper))
6913
6914 (define-public python-traitlets
6915 (package
6916 (name "python-traitlets")
6917 (version "4.3.3")
6918 (source
6919 (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "traitlets" version))
6922 (sha256
6923 (base32
6924 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6925 (build-system python-build-system)
6926 (arguments
6927 `(#:phases
6928 (modify-phases %standard-phases
6929 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6930 (propagated-inputs
6931 `(("python-ipython-genutils" ,python-ipython-genutils)
6932 ("python-decorator" ,python-decorator)))
6933 (native-inputs
6934 `(("python-pytest" ,python-pytest)))
6935 (properties `((python2-variant . ,(delay python2-traitlets))))
6936 (home-page "https://ipython.org")
6937 (synopsis "Configuration system for Python applications")
6938 (description
6939 "Traitlets is a framework that lets Python classes have attributes with
6940 type checking, dynamically calculated default values, and ‘on change’
6941 callbacks. The package also includes a mechanism to use traitlets for
6942 configuration, loading values from files or from command line arguments. This
6943 is a distinct layer on top of traitlets, so you can use traitlets in your code
6944 without using the configuration machinery.")
6945 (license license:bsd-3)))
6946
6947 (define-public python2-traitlets
6948 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6949 (package
6950 (inherit traitlets)
6951 (propagated-inputs
6952 `(("python2-enum34" ,python2-enum34)
6953 ,@(package-propagated-inputs traitlets))))))
6954
6955 (define-public python-jupyter-core
6956 (package
6957 (name "python-jupyter-core")
6958 (version "4.4.0")
6959 (source
6960 (origin
6961 (method url-fetch)
6962 (uri (string-append (pypi-uri "jupyter_core" version)))
6963 (sha256
6964 (base32
6965 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6966 (build-system python-build-system)
6967 ;; FIXME: not sure how to run the tests
6968 (arguments `(#:tests? #f))
6969 (propagated-inputs
6970 `(("python-traitlets" ,python-traitlets)))
6971 (home-page "http://jupyter.org/")
6972 (synopsis "Jupyter base package")
6973 (description
6974 "Jupyter core is the base package on which Jupyter projects rely.")
6975 (license license:bsd-3)))
6976
6977 (define-public python2-jupyter-core
6978 (package-with-python2 python-jupyter-core))
6979
6980 (define-public python-jupyter-client
6981 (package
6982 (name "python-jupyter-client")
6983 (version "5.2.4")
6984 (source
6985 (origin
6986 (method url-fetch)
6987 (uri (pypi-uri "jupyter_client" version))
6988 (sha256
6989 (base32
6990 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6991 (build-system python-build-system)
6992 ;; Tests fail because of missing native python kernel which I assume is
6993 ;; provided by the ipython package, which we cannot use because it would
6994 ;; cause a dependency cycle.
6995 (arguments
6996 `(#:tests? #f
6997
6998 #:phases (modify-phases %standard-phases
6999 (add-after 'unpack 'set-tool-file-names
7000 (lambda* (#:key inputs #:allow-other-keys)
7001 (let ((iproute (assoc-ref inputs "iproute")))
7002 (substitute* "jupyter_client/localinterfaces.py"
7003 (("'ip'")
7004 (string-append "'" iproute "/sbin/ip'")))
7005 #t))))))
7006 (inputs
7007 `(("iproute" ,iproute)))
7008 (propagated-inputs
7009 `(("python-pyzmq" ,python-pyzmq)
7010 ("python-traitlets" ,python-traitlets)
7011 ("python-jupyter-core" ,python-jupyter-core)))
7012 (home-page "http://jupyter.org/")
7013 (synopsis "Jupyter protocol implementation and client libraries")
7014 (description
7015 "The @code{jupyter_client} package contains the reference implementation
7016 of the Jupyter protocol. It also provides client and kernel management APIs
7017 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7018 installing @code{kernelspec}s for use with Jupyter frontends.")
7019 (license license:bsd-3)))
7020
7021 (define-public python2-jupyter-client
7022 (package-with-python2 python-jupyter-client))
7023
7024 (define-public python-ipykernel
7025 (package
7026 (name "python-ipykernel")
7027 (version "5.1.3")
7028 (source
7029 (origin
7030 (method url-fetch)
7031 (uri (pypi-uri "ipykernel" version))
7032 (sha256
7033 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7034 (build-system python-build-system)
7035 (arguments
7036 `(#:phases
7037 (modify-phases %standard-phases
7038 (replace 'check
7039 (lambda _
7040 (setenv "HOME" "/tmp")
7041 (invoke "pytest" "-v")
7042 #t))
7043 (add-after 'install 'set-python-file-name
7044 (lambda* (#:key outputs #:allow-other-keys)
7045 ;; Record the absolute file name of the 'python' executable in
7046 ;; 'kernel.json'.
7047 (let ((out (assoc-ref outputs "out")))
7048 (substitute* (string-append out "/share/jupyter"
7049 "/kernels/python3/kernel.json")
7050 (("\"python\"")
7051 (string-append "\"" (which "python") "\"")))
7052 #t))))))
7053 (propagated-inputs
7054 `(("python-ipython" ,python-ipython)
7055 ;; imported at runtime during connect
7056 ("python-jupyter-client" ,python-jupyter-client)))
7057 (native-inputs
7058 `(("python-flaky" ,python-flaky)
7059 ("python-nose" ,python-nose)
7060 ("python-pytest" ,python-pytest)))
7061 (home-page "https://ipython.org")
7062 (synopsis "IPython Kernel for Jupyter")
7063 (description
7064 "This package provides the IPython kernel for Jupyter.")
7065 (properties `((python2-variant . ,(delay python2-ipykernel))))
7066 (license license:bsd-3)))
7067
7068 ;; Version 5.x and above no longer support Python 2.
7069 (define-public python2-ipykernel
7070 (package
7071 (name "python2-ipykernel")
7072 (version "4.10.1")
7073 (source
7074 (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "ipykernel" version))
7077 (sha256
7078 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7079 (build-system python-build-system)
7080 (arguments
7081 `(#:python ,python-2))
7082 (propagated-inputs
7083 `(("python2-ipython" ,python2-ipython)
7084 ;; imported at runtime during connect
7085 ("python2-jupyter-client" ,python2-jupyter-client)
7086 ("python2-tornado" ,python2-tornado)
7087 ("python2-traitlets" ,python2-traitlets)))
7088 (native-inputs
7089 `(("python2-mock" ,python2-mock)
7090 ("python2-nose" ,python2-nose)
7091 ("python2-pytest" ,python2-pytest)
7092 ("python2-pytest-cov" ,python2-pytest-cov)))
7093 (home-page "https://ipython.org")
7094 (synopsis "IPython Kernel for Jupyter")
7095 (description
7096 "This package provides the IPython kernel for Jupyter.")
7097 (license license:bsd-3)))
7098
7099 (define-public python-pari-jupyter
7100 (package
7101 (name "python-pari-jupyter")
7102 (version "1.3.2")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "pari_jupyter" version))
7107 (sha256
7108 (base32
7109 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7110 (build-system python-build-system)
7111 (propagated-inputs
7112 `(("python-ipykernel" ,python-ipykernel)))
7113 (inputs
7114 `(("pari-gp" ,pari-gp)
7115 ("readline" ,readline)))
7116 (arguments
7117 `(#:tests? #f)) ; no test suite
7118 (home-page
7119 "https://github.com/jdemeyer/pari_jupyter")
7120 (synopsis "A Jupyter kernel for PARI/GP")
7121 (description "The package provides a PARI/GP kernel for Jupyter.")
7122 (license license:gpl3+)))
7123
7124 (define-public python-backcall
7125 (package
7126 (name "python-backcall")
7127 (version "0.1.0")
7128 (source
7129 (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "backcall" version))
7132 (sha256
7133 (base32
7134 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7135 (build-system python-build-system)
7136 (home-page "https://github.com/takluyver/backcall/")
7137 (synopsis "Specifications for callback functions passed in to an API")
7138 (description
7139 "If your code lets other people supply callback functions, it's important
7140 to specify the function signature you expect, and check that functions support
7141 that. Adding extra parameters later would break other peoples code unless
7142 you're careful. The @code{backcall} package provides a way of specifying the
7143 callback signature using a prototype function.")
7144 (license license:bsd-3)))
7145
7146 (define-public python-ipython
7147 (package
7148 (name "python-ipython")
7149 (version "7.9.0")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "ipython" version ".tar.gz"))
7154 (sha256
7155 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7156 (build-system python-build-system)
7157 (propagated-inputs
7158 `(("python-backcall" ,python-backcall)
7159 ("python-pyzmq" ,python-pyzmq)
7160 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7161 ("python-terminado" ,python-terminado)
7162 ("python-matplotlib" ,python-matplotlib)
7163 ("python-numpy" ,python-numpy)
7164 ("python-numpydoc" ,python-numpydoc)
7165 ("python-jedi" ,python-jedi)
7166 ("python-jinja2" ,python-jinja2)
7167 ("python-mistune" ,python-mistune)
7168 ("python-pexpect" ,python-pexpect)
7169 ("python-pickleshare" ,python-pickleshare)
7170 ("python-simplegeneric" ,python-simplegeneric)
7171 ("python-jsonschema" ,python-jsonschema)
7172 ("python-traitlets" ,python-traitlets)
7173 ("python-nbformat" ,python-nbformat)
7174 ("python-pygments" ,python-pygments)))
7175 (inputs
7176 `(("readline" ,readline)
7177 ("which" ,which)))
7178 (native-inputs
7179 `(("graphviz" ,graphviz)
7180 ("pkg-config" ,pkg-config)
7181 ("python-requests" ,python-requests) ;; for tests
7182 ("python-testpath" ,python-testpath)
7183 ("python-nose" ,python-nose)))
7184 (arguments
7185 `(#:phases
7186 (modify-phases %standard-phases
7187 (add-after 'unpack 'make-docs-reproducible
7188 (lambda _
7189 (substitute* "IPython/sphinxext/ipython_directive.py"
7190 ((".*import datetime") "")
7191 ((".*datetime.datetime.now\\(\\)") "")
7192 (("%timeit") "# %timeit"))
7193 #t))
7194 ;; Tests can only be run after the library has been installed and not
7195 ;; within the source directory.
7196 (delete 'check)
7197 (add-after 'install 'check
7198 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7199 (if tests?
7200 (begin
7201 ;; Make installed package available for running the tests
7202 (add-installed-pythonpath inputs outputs)
7203 (setenv "HOME" "/tmp/") ;; required by a test
7204 ;; We only test the core because one of the other tests
7205 ;; tries to import ipykernel.
7206 (invoke "python" "IPython/testing/iptest.py"
7207 "-v" "IPython/core/tests"))
7208 #t)))
7209 (add-before 'check 'fix-tests
7210 (lambda* (#:key inputs #:allow-other-keys)
7211 (substitute* "./IPython/utils/_process_posix.py"
7212 (("/usr/bin/env', 'which") (which "which")))
7213 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7214 (("#!/usr/bin/env python")
7215 (string-append "#!" (which "python"))))
7216 ;; This test introduces a circular dependency on ipykernel
7217 ;; (which depends on ipython).
7218 (delete-file "IPython/core/tests/test_display.py")
7219 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7220 (delete-file "IPython/core/tests/test_interactiveshell.py")
7221 #t)))))
7222 (home-page "https://ipython.org")
7223 (synopsis "IPython is a tool for interactive computing in Python")
7224 (description
7225 "IPython provides a rich architecture for interactive computing with:
7226 Powerful interactive shells, a browser-based notebook, support for interactive
7227 data visualization, embeddable interpreters and tools for parallel
7228 computing.")
7229 (properties `((python2-variant . ,(delay python2-ipython))))
7230 (license license:bsd-3)))
7231
7232 ;; This is the latest release of the LTS version of ipython with support for
7233 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7234 ;; dropped support for Python 2.7.
7235 (define-public python2-ipython
7236 (package
7237 (name "python2-ipython")
7238 (version "5.8.0")
7239 (source
7240 (origin
7241 (method url-fetch)
7242 (uri (pypi-uri "ipython" version ".tar.gz"))
7243 (sha256
7244 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7245 (build-system python-build-system)
7246 (propagated-inputs
7247 `(("python2-backports-shutil-get-terminal-size"
7248 ,python2-backports-shutil-get-terminal-size)
7249 ("python2-pathlib2" ,python2-pathlib2)
7250 ("python2-pyzmq" ,python2-pyzmq)
7251 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7252 ("python2-terminado" ,python2-terminado)
7253 ("python2-matplotlib" ,python2-matplotlib)
7254 ("python2-numpy" ,python2-numpy)
7255 ("python2-numpydoc" ,python2-numpydoc)
7256 ("python2-jinja2" ,python2-jinja2)
7257 ("python2-mistune" ,python2-mistune)
7258 ("python2-pexpect" ,python2-pexpect)
7259 ("python2-pickleshare" ,python2-pickleshare)
7260 ("python2-simplegeneric" ,python2-simplegeneric)
7261 ("python2-jsonschema" ,python2-jsonschema)
7262 ("python2-traitlets" ,python2-traitlets)
7263 ("python2-nbformat" ,python2-nbformat)
7264 ("python2-pygments" ,python2-pygments)))
7265 (inputs
7266 `(("readline" ,readline)
7267 ("which" ,which)))
7268 (native-inputs
7269 `(("graphviz" ,graphviz)
7270 ("pkg-config" ,pkg-config)
7271 ("python2-requests" ,python2-requests) ;; for tests
7272 ("python2-testpath" ,python2-testpath)
7273 ("python2-mock" ,python2-mock)
7274 ("python2-nose" ,python2-nose)))
7275 (arguments
7276 `(#:python ,python-2
7277 #:phases
7278 (modify-phases %standard-phases
7279 (add-before 'check 'delete-broken-tests
7280 (lambda* (#:key inputs #:allow-other-keys)
7281 ;; These tests throw errors for unknown reasons.
7282 (delete-file "IPython/core/tests/test_displayhook.py")
7283 (delete-file "IPython/core/tests/test_magic_terminal.py")
7284 (delete-file "IPython/core/tests/test_profile.py")
7285 #t)))))
7286 (home-page "https://ipython.org")
7287 (synopsis "IPython is a tool for interactive computing in Python")
7288 (description
7289 "IPython provides a rich architecture for interactive computing with:
7290 Powerful interactive shells, a browser-based notebook, support for interactive
7291 data visualization, embeddable interpreters and tools for parallel
7292 computing.")
7293 (license license:bsd-3)))
7294
7295 (define-public python-ipython-documentation
7296 (package
7297 (inherit python-ipython)
7298 (name "python-ipython-documentation")
7299 (version (package-version python-ipython))
7300 (arguments
7301 `(#:phases
7302 (modify-phases %standard-phases
7303 (delete 'build)
7304 (delete 'check)
7305 (replace 'install
7306 (lambda* (#:key outputs #:allow-other-keys)
7307 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7308 (doc (string-append data "/doc/" ,name "-" ,version))
7309 (html (string-append doc "/html"))
7310 (man1 (string-append data "/man/man1"))
7311 (info (string-append data "/info"))
7312 (examples (string-append doc "/examples"))
7313 (python-arg (string-append "PYTHON=" (which "python"))))
7314 (setenv "LANG" "en_US.utf8")
7315 (with-directory-excursion "docs"
7316 ;; FIXME: pdf fails to build
7317 ;;(system* "make" "pdf" "PAPER=a4")
7318 (system* "make" python-arg "html")
7319 ;; FIXME: the generated texi file contains ^@^@, which trips
7320 ;; up the parser.
7321 ;; (system* "make" python-arg "info")
7322 )
7323 (copy-recursively "docs/man" man1)
7324 (copy-recursively "examples" examples)
7325 (copy-recursively "docs/build/html" html)
7326 ;; (copy-file "docs/build/latex/ipython.pdf"
7327 ;; (string-append doc "/ipython.pdf"))
7328 (mkdir-p info)
7329 ;; (copy-file "docs/build/texinfo/ipython.info"
7330 ;; (string-append info "/ipython.info"))
7331 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7332 #t)))))
7333 (inputs
7334 `(("python-ipython" ,python-ipython)
7335 ("python-ipykernel" ,python-ipykernel)))
7336 (native-inputs
7337 `(("python-sphinx" ,python-sphinx)
7338 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7339 ;; FIXME: It's possible that a smaller union would work just as well.
7340 ("texlive" ,(texlive-union (list texlive-amsfonts
7341 texlive-fonts-ec
7342 texlive-generic-ifxetex
7343 texlive-generic-pdftex
7344 texlive-latex-capt-of
7345 texlive-latex-cmap
7346 texlive-latex-environ
7347 texlive-latex-eqparbox
7348 texlive-latex-etoolbox
7349 texlive-latex-expdlist
7350 texlive-latex-fancyhdr
7351 texlive-latex-fancyvrb
7352 texlive-latex-fncychap
7353 texlive-latex-float
7354 texlive-latex-framed
7355 texlive-latex-geometry
7356 texlive-latex-graphics
7357 texlive-latex-hyperref
7358 texlive-latex-mdwtools
7359 texlive-latex-multirow
7360 texlive-latex-needspace
7361 texlive-latex-oberdiek
7362 texlive-latex-parskip
7363 texlive-latex-preview
7364 texlive-latex-tabulary
7365 texlive-latex-threeparttable
7366 texlive-latex-titlesec
7367 texlive-latex-trimspaces
7368 texlive-latex-ucs
7369 texlive-latex-upquote
7370 texlive-latex-url
7371 texlive-latex-varwidth
7372 texlive-latex-wrapfig)))
7373 ("texinfo" ,texinfo)))))
7374
7375 (define-public python-urwid
7376 (package
7377 (name "python-urwid")
7378 (version "2.1.0")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "urwid" version))
7383 (sha256
7384 (base32
7385 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7386 (build-system python-build-system)
7387 (home-page "http://urwid.org")
7388 (synopsis "Console user interface library for Python")
7389 (description
7390 "Urwid is a curses-based UI/widget library for Python. It includes many
7391 features useful for text console applications.")
7392 (license license:lgpl2.1+)))
7393
7394 (define-public python2-urwid
7395 (package-with-python2 python-urwid))
7396
7397 (define-public python-urwidtrees
7398 (package
7399 (name "python-urwidtrees")
7400 (version "1.0.2")
7401 (source
7402 (origin
7403 (method git-fetch)
7404 ;; package author intends on distributing via github rather than pypi:
7405 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7406 (uri (git-reference
7407 (url "https://github.com/pazz/urwidtrees")
7408 (commit version)))
7409 (file-name (git-file-name name version))
7410 (sha256
7411 (base32
7412 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7413 (build-system python-build-system)
7414 (arguments
7415 '(#:use-setuptools? #f
7416 #:tests? #f)) ; no tests
7417 (propagated-inputs `(("python-urwid" ,python-urwid)))
7418 (home-page "https://github.com/pazz/urwidtrees")
7419 (synopsis "Tree widgets for urwid")
7420 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7421 toolkit. Use it to build trees of widgets.")
7422 (license license:gpl3+)))
7423
7424 (define-public python2-urwidtrees
7425 (package-with-python2 python-urwidtrees))
7426
7427 (define-public python-ua-parser
7428 (package
7429 (name "python-ua-parser")
7430 (version "0.8.0")
7431 (source
7432 (origin
7433 (method url-fetch)
7434 (uri (pypi-uri "ua-parser" version))
7435 (sha256
7436 (base32
7437 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7438 (build-system python-build-system)
7439 (arguments
7440 `(#:tests? #f)) ;no test suite in release
7441 (native-inputs
7442 `(("python-pyyaml" ,python-pyyaml)))
7443 (home-page "https://github.com/ua-parser/uap-python")
7444 (synopsis "User agent parser")
7445 (description
7446 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7447 (license license:asl2.0)))
7448
7449 (define-public python2-ua-parser
7450 (package-with-python2 python-ua-parser))
7451
7452 (define-public python-user-agents
7453 (package
7454 (name "python-user-agents")
7455 (version "1.1.0")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "user-agents" version))
7460 (sha256
7461 (base32
7462 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7463 (build-system python-build-system)
7464 (arguments
7465 `(#:tests? #f)) ;missing devices.json test file in release
7466 (propagated-inputs
7467 `(("python-ua-parser" ,python-ua-parser)))
7468 (home-page "https://github.com/selwin/python-user-agents")
7469 (synopsis "User Agent strings parsing library")
7470 (description
7471 "A library to identify devices (phones, tablets) and their capabilities by
7472 parsing (browser/HTTP) user agent strings.")
7473 (license license:expat)))
7474
7475 (define-public python2-user-agents
7476 (package-with-python2 python-user-agents))
7477
7478 (define-public python-dbus
7479 (package
7480 (name "python-dbus")
7481 (version "1.2.16")
7482 (source
7483 (origin
7484 (method url-fetch)
7485 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7486 "dbus-python-" version ".tar.gz"))
7487 (sha256
7488 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7489 (build-system gnu-build-system)
7490 (native-inputs
7491 `(("pkg-config" ,pkg-config)))
7492 (inputs
7493 `(("python" ,python-wrapper)
7494 ("dbus-glib" ,dbus-glib)))
7495 (synopsis "Python bindings for D-bus")
7496 (description "python-dbus provides bindings for libdbus, the reference
7497 implementation of D-Bus.")
7498 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7499 (license license:expat)))
7500
7501 (define-public python2-dbus
7502 (package (inherit python-dbus)
7503 (name "python2-dbus")
7504 (inputs `(("python" ,python-2)
7505 ,@(alist-delete "python"
7506 (package-inputs python-dbus)
7507 equal?)))))
7508
7509 (define-public python-notify2
7510 (package
7511 (name "python-notify2")
7512 (version "0.3.1")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "notify2" version))
7517 (sha256
7518 (base32
7519 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7520 (build-system python-build-system)
7521 (arguments `(#:tests? #f)) ; tests depend on system state
7522 (native-inputs
7523 `(("python-dbus" ,python-dbus)))
7524 (home-page "https://bitbucket.org/takluyver/pynotify2")
7525 (synopsis "Python interface to D-Bus notifications")
7526 (description
7527 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7528 It is a reimplementation of pynotify in pure Python, and an alternative to
7529 the GObject Introspection bindings to libnotify for non-GTK applications.")
7530 (license (list license:bsd-2
7531 license:lgpl2.1+))))
7532
7533 (define-public python2-notify2
7534 (package-with-python2 python-notify2))
7535
7536 ;; beautifulsoup4 has a totally different namespace than 3.x,
7537 ;; and pypi seems to put it under its own name, so I guess we should too
7538 (define-public python-beautifulsoup4
7539 (package
7540 (name "python-beautifulsoup4")
7541 (version "4.9.1")
7542 (source
7543 (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "beautifulsoup4" version))
7546 (sha256
7547 (base32
7548 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7549 (build-system python-build-system)
7550 (arguments
7551 `(#:phases
7552 (modify-phases %standard-phases
7553 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7554 ;; must use this conversion script when building with Python 3. The
7555 ;; conversion script also runs the tests.
7556 ;; For more information, see the file 'convert-py3k' in the source
7557 ;; distribution.
7558 (replace 'check
7559 (lambda _ (invoke "./convert-py3k"))))))
7560 (propagated-inputs
7561 `(("python-soupsieve" ,python-soupsieve)))
7562 (home-page
7563 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7564 (synopsis
7565 "Python screen-scraping library")
7566 (description
7567 "Beautiful Soup is a Python library designed for rapidly setting up
7568 screen-scraping projects. It offers Pythonic idioms for navigating,
7569 searching, and modifying a parse tree, providing a toolkit for
7570 dissecting a document and extracting what you need. It automatically
7571 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7572 (license license:expat)
7573 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7574
7575 (define-public python2-beautifulsoup4
7576 (package
7577 (inherit (package-with-python2
7578 (strip-python2-variant python-beautifulsoup4)))
7579 (arguments `(#:python ,python-2))))
7580
7581 (define-public python-soupsieve
7582 (package
7583 (name "python-soupsieve")
7584 (version "2.0.1")
7585 (source
7586 (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "soupsieve" version))
7589 (sha256
7590 (base32
7591 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7592 (build-system python-build-system)
7593 (arguments `(#:tests? #f))
7594 ;;XXX: 2 tests fail currently despite claming they were to be
7595 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7596 ;;don't want to create a circular dependency.
7597 (home-page "https://github.com/facelessuser/soupsieve")
7598 (synopsis "CSS selector library")
7599 (description
7600 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7601 Soup 4. It aims to provide selecting, matching, and filtering using modern
7602 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7603 specifications up through the latest CSS level 4 drafts and beyond (though
7604 some are not yet implemented).")
7605 (properties `((python2-variant . ,(delay python2-soupsieve))))
7606 (license license:expat)))
7607
7608 ;; This is the last version that supports python-2
7609 (define-public python2-soupsieve
7610 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7611 (package
7612 (inherit base)
7613 (version "1.9.6")
7614 (source
7615 (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "soupsieve" version))
7618 (sha256
7619 (base32
7620 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7621 (propagated-inputs
7622 `(("python2-backports-functools-lru-cache"
7623 ,python2-backports-functools-lru-cache)
7624 ,@(package-propagated-inputs base))))))
7625
7626 (define-public python-netifaces
7627 (package
7628 (name "python-netifaces")
7629 (version "0.10.9")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "netifaces" version))
7634 (sha256
7635 (base32
7636 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7637 (build-system python-build-system)
7638 (home-page "https://github.com/al45tair/netifaces")
7639 (synopsis
7640 "Python module for portable network interface information")
7641 (description
7642 "Netifaces is a Python module providing information on network
7643 interfaces in an easy and portable manner.")
7644 (license license:expat)))
7645
7646 (define-public python2-netifaces
7647 (package-with-python2 python-netifaces))
7648
7649 (define-public python-networkx
7650 (package
7651 (name "python-networkx")
7652 (version "2.5")
7653 (source
7654 (origin
7655 (method url-fetch)
7656 (uri (pypi-uri "networkx" version))
7657 (sha256
7658 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7659 (build-system python-build-system)
7660 (arguments
7661 '(#:phases (modify-phases %standard-phases
7662 (replace 'check
7663 (lambda* (#:key tests? #:allow-other-keys)
7664 (if tests?
7665 (invoke "pytest" "-vv" "--pyargs" "networkx")
7666 (format #t "test suite not run~%"))
7667 #t)))))
7668 ;; python-decorator is needed at runtime.
7669 (propagated-inputs
7670 `(("python-decorator" ,python-decorator)))
7671 (native-inputs
7672 `(("python-pytest" ,python-pytest)))
7673 (home-page "https://networkx.github.io/")
7674 (synopsis "Python module for creating and manipulating graphs and networks")
7675 (description
7676 "NetworkX is a Python package for the creation, manipulation, and study
7677 of the structure, dynamics, and functions of complex networks.")
7678 (properties `((python2-variant . ,(delay python2-networkx))))
7679 (license license:bsd-3)))
7680
7681 ;; NetworkX 2.2 is the last version with support for Python 2.
7682 (define-public python2-networkx
7683 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7684 (package
7685 (inherit base)
7686 (version "2.2")
7687 (source (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "networkx" version ".zip"))
7690 (sha256
7691 (base32
7692 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7693 (arguments
7694 `(#:python ,python-2))
7695 (native-inputs
7696 `(("python-nose" ,python2-nose)
7697 ("unzip" ,unzip))))))
7698
7699 (define-public python-datrie
7700 (package
7701 (name "python-datrie")
7702 (version "0.8.2")
7703 (source
7704 (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "datrie" version))
7707 (sha256
7708 (base32
7709 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7710 (build-system python-build-system)
7711 (native-inputs
7712 `(("python-cython" ,python-cython)
7713 ("python-hypothesis" ,python-hypothesis)
7714 ("python-pytest" ,python-pytest)
7715 ("python-pytest-runner" ,python-pytest-runner)))
7716 (home-page "https://github.com/kmike/datrie")
7717 (synopsis "Fast, efficiently stored trie for Python")
7718 (description
7719 "This package provides a fast, efficiently stored trie implementation for
7720 Python.")
7721 (license license:lgpl2.1+)))
7722
7723 (define-public snakemake
7724 (package
7725 (name "snakemake")
7726 (version "5.7.1")
7727 (source
7728 (origin
7729 (method url-fetch)
7730 (uri (pypi-uri "snakemake" version))
7731 (sha256
7732 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7733 (build-system python-build-system)
7734 (arguments
7735 ;; TODO: Package missing test dependencies.
7736 '(#:tests? #f
7737 #:phases
7738 (modify-phases %standard-phases
7739 ;; For cluster execution Snakemake will call Python. Since there is
7740 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7741 ;; this by calling the snakemake wrapper instead.
7742 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7743 (lambda* (#:key outputs #:allow-other-keys)
7744 (substitute* "snakemake/executors.py"
7745 (("\\{sys.executable\\} -m snakemake")
7746 (string-append (assoc-ref outputs "out")
7747 "/bin/snakemake")))
7748 #t)))))
7749 (propagated-inputs
7750 `(("python-appdirs" ,python-appdirs)
7751 ("python-configargparse" ,python-configargparse)
7752 ("python-datrie" ,python-datrie)
7753 ("python-docutils" ,python-docutils)
7754 ("python-gitpython" ,python-gitpython)
7755 ("python-jinja2" ,python-jinja2)
7756 ("python-jsonschema" ,python-jsonschema)
7757 ("python-networkx" ,python-networkx)
7758 ("python-psutil" ,python-psutil)
7759 ("python-pyyaml" ,python-pyyaml)
7760 ("python-ratelimiter" ,python-ratelimiter)
7761 ("python-requests" ,python-requests)
7762 ("python-wrapt" ,python-wrapt)))
7763 (home-page "https://snakemake.readthedocs.io")
7764 (synopsis "Python-based execution environment for make-like workflows")
7765 (description
7766 "Snakemake aims to reduce the complexity of creating workflows by
7767 providing a clean and modern domain specific specification language (DSL) in
7768 Python style, together with a fast and comfortable execution environment.")
7769 (license license:expat)))
7770
7771 (define-public python-pyqrcode
7772 (package
7773 (name "python-pyqrcode")
7774 (version "1.2.1")
7775 (source
7776 (origin
7777 (method url-fetch)
7778 (uri (pypi-uri "PyQRCode" version))
7779 (sha256
7780 (base32
7781 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7782 (build-system python-build-system)
7783 (home-page
7784 "https://github.com/mnooner256/pyqrcode")
7785 (synopsis "QR code generator")
7786 (description
7787 "Pyqrcode is a QR code generator written purely in Python with
7788 SVG, EPS, PNG and terminal output.")
7789 (license license:bsd-3)))
7790
7791 (define-public python-seaborn
7792 (package
7793 (name "python-seaborn")
7794 (version "0.10.0")
7795 (source
7796 (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "seaborn" version))
7799 (sha256
7800 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7801 (build-system python-build-system)
7802 (arguments
7803 `(#:phases
7804 (modify-phases %standard-phases
7805 (add-before 'check 'start-xserver
7806 (lambda* (#:key inputs #:allow-other-keys)
7807 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7808 ;; There must be a running X server and make check doesn't
7809 ;; start one. Therefore we must do it.
7810 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7811 (setenv "DISPLAY" ":1")
7812 #t)))
7813 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7814 (propagated-inputs
7815 `(("python-pandas" ,python-pandas)
7816 ("python-matplotlib" ,python-matplotlib)
7817 ("python-numpy" ,python-numpy)
7818 ("python-scipy" ,python-scipy)))
7819 (native-inputs
7820 `(("python-pytest" ,python-pytest)
7821 ("xorg-server" ,xorg-server-for-tests)))
7822 (home-page "https://seaborn.pydata.org/")
7823 (synopsis "Statistical data visualization")
7824 (description
7825 "Seaborn is a library for making attractive and informative statistical
7826 graphics in Python. It is built on top of matplotlib and tightly integrated
7827 with the PyData stack, including support for numpy and pandas data structures
7828 and statistical routines from scipy and statsmodels.")
7829 (properties `((python2-variant . ,(delay python2-seaborn))))
7830 (license license:bsd-3)))
7831
7832 ;; 0.9.1 is the last release with support for Python 2.
7833 (define-public python2-seaborn
7834 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7835 (package
7836 (inherit base)
7837 (version "0.9.1")
7838 (source (origin
7839 (method url-fetch)
7840 (uri (pypi-uri "seaborn" version))
7841 (sha256
7842 (base32
7843 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7844
7845 (define-public python-mpmath
7846 (package
7847 (name "python-mpmath")
7848 (version "1.1.0")
7849 (source (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "mpmath" version))
7852 (file-name (git-file-name name version))
7853 (sha256
7854 (base32
7855 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7856 (build-system python-build-system)
7857 (native-inputs
7858 `(("python-pytest" ,python-pytest)))
7859 (arguments
7860 '(#:phases
7861 (modify-phases %standard-phases
7862 (replace 'check
7863 (lambda _
7864 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7865 (home-page "http://mpmath.org")
7866 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7867 (description
7868 "@code{mpmath} can be used as an arbitrary-precision substitute for
7869 Python's float/complex types and math/cmath modules, but also does much
7870 more advanced mathematics.")
7871 (license license:bsd-3)))
7872
7873 (define-public python2-mpmath
7874 (package-with-python2 python-mpmath))
7875
7876 (define-public python-bigfloat
7877 (package
7878 (name "python-bigfloat")
7879 (version "0.3.0")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "bigfloat" version))
7884 (sha256
7885 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7886 (build-system python-build-system)
7887 (inputs
7888 `(("mpfr" ,mpfr)))
7889 (home-page "https://github.com/mdickinson/bigfloat")
7890 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7891 (description
7892 "This package provides a Python interface to the MPFR library for
7893 multiprecision arithmetic.")
7894 (license license:lgpl3+)))
7895
7896 (define-public python2-bigfloat
7897 (package-with-python2 python-bigfloat))
7898
7899 (define-public python-sympy
7900 (package
7901 (name "python-sympy")
7902 (version "1.6.2")
7903 (source
7904 (origin
7905 (method url-fetch)
7906 (uri (pypi-uri "sympy" version))
7907 (sha256
7908 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7909 (build-system python-build-system)
7910 (arguments
7911 `(#:phases
7912 (modify-phases %standard-phases
7913 (replace 'check
7914 (lambda* (#:key outputs #:allow-other-keys)
7915 (invoke
7916 (or (which "python3") (which "python"))
7917 "-c" "import sympy; sympy.test(\"/core\")"))))))
7918 (propagated-inputs
7919 `(("python-mpmath" ,python-mpmath)))
7920 (home-page "https://www.sympy.org/")
7921 (synopsis "Python library for symbolic mathematics")
7922 (description
7923 "SymPy is a Python library for symbolic mathematics. It aims to become a
7924 full-featured computer algebra system (CAS) while keeping the code as simple
7925 as possible in order to be comprehensible and easily extensible.")
7926 (license license:bsd-3)))
7927
7928 (define-public python2-sympy
7929 (package
7930 (inherit (package-with-python2 python-sympy))
7931 (version "1.5.1") ; last release for python2
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "sympy" version))
7936 (sha256
7937 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7938
7939 (define-public python-q
7940 (package
7941 (name "python-q")
7942 (version "2.6")
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "q" version))
7947 (sha256
7948 (base32
7949 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7950 (build-system python-build-system)
7951 (home-page "https://github.com/zestyping/q")
7952 (synopsis "Quick-and-dirty debugging output for tired programmers")
7953 (description
7954 "q is a Python module for \"print\" style of debugging Python code. It
7955 provides convenient short API for print out of values, tracebacks, and
7956 falling into the Python interpreter.")
7957 (license license:asl2.0)))
7958
7959 (define-public python2-q
7960 (package-with-python2 python-q))
7961
7962 (define-public python-xlib
7963 (package
7964 (name "python-xlib")
7965 (version "0.27")
7966 (source
7967 (origin
7968 (method git-fetch)
7969 (uri (git-reference
7970 (url "https://github.com/python-xlib/python-xlib")
7971 (commit version)))
7972 (file-name (git-file-name name version))
7973 (sha256
7974 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7975 (build-system python-build-system)
7976 (arguments
7977 `(#:phases
7978 (modify-phases %standard-phases
7979 (add-before 'check 'start-xserver
7980 (lambda* (#:key inputs #:allow-other-keys)
7981 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7982 ;; There must be a running X server and make check doesn't
7983 ;; start one. Therefore we must do it.
7984 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7985 (setenv "DISPLAY" ":1")
7986 #t))))))
7987 (native-inputs
7988 `(("python-mock" ,python-mock)
7989 ("python-setuptools-scm" ,python-setuptools-scm)
7990 ("python-six" ,python-six)
7991 ("xorg-server" ,xorg-server)))
7992 (home-page "https://github.com/python-xlib/python-xlib")
7993 (synopsis "Python X11 client library")
7994 (description
7995 "The Python X Library is intended to be a fully functional
7996 X client library for Python programs. It is useful to implement
7997 low-level X clients. It is written entirely in Python.")
7998 (license license:gpl2+)))
7999
8000 (define-public python2-xlib
8001 (package-with-python2 python-xlib))
8002
8003 (define-public python-singledispatch
8004 (package
8005 (name "python-singledispatch")
8006 (version "3.4.0.3")
8007 (source
8008 (origin
8009 (method url-fetch)
8010 (uri (pypi-uri "singledispatch" version))
8011 (sha256
8012 (base32
8013 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8014 (build-system python-build-system)
8015 (native-inputs
8016 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8017 (home-page
8018 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8019 (synopsis "Backport of singledispatch feature from Python 3.4")
8020 (description
8021 "This library brings functools.singledispatch from Python 3.4 to Python
8022 2.6-3.3.")
8023 (license license:expat)))
8024
8025 (define-public python2-singledispatch
8026 (package-with-python2 python-singledispatch))
8027
8028 ;; the python- version can be removed with python-3.5
8029 (define-public python-backports-abc
8030 (package
8031 (name "python-backports-abc")
8032 (version "0.5")
8033 (source
8034 (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "backports_abc" version))
8037 (sha256
8038 (base32
8039 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8040 (build-system python-build-system)
8041 (home-page "https://github.com/cython/backports_abc")
8042 (synopsis "Backport of additions to the 'collections.abc' module")
8043 (description
8044 "Python-backports-abc provides a backport of additions to the
8045 @code{collections.abc} module in Python-3.5.")
8046 (license license:psfl)))
8047
8048 (define-public python2-backports-abc
8049 (package-with-python2 python-backports-abc))
8050
8051 (define-public python-backports-csv
8052 (package
8053 (name "python-backports-csv")
8054 (version "1.0.7")
8055 (source
8056 (origin
8057 (method url-fetch)
8058 (uri (pypi-uri "backports.csv" version))
8059 (sha256
8060 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8061 (build-system python-build-system)
8062 (home-page "https://github.com/ryanhiebert/backports.csv")
8063 (synopsis "Backport of Python 3's csv module for Python 2")
8064 (description
8065 "Provides a backport of Python 3's @code{csv} module for parsing
8066 comma separated values. The API of the @code{csv} module in Python 2
8067 is drastically different from the @code{csv} module in Python 3.
8068 This is due, for the most part, to the difference between str in
8069 Python 2 and Python 3.")
8070 (license license:psfl)))
8071
8072 (define-public python2-backports-csv
8073 (package-with-python2 python-backports-csv))
8074
8075 (define-public python2-backports-shutil-get-terminal-size
8076 (package
8077 (name "python2-backports-shutil-get-terminal-size")
8078 (version "1.0.0")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8083 (sha256
8084 (base32
8085 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8086 (build-system python-build-system)
8087 (arguments
8088 `(#:python ,python-2
8089 #:phases
8090 (modify-phases %standard-phases
8091 (replace 'check
8092 (lambda _
8093 (setenv "PYTHONPATH" (string-append "./build/lib:"
8094 (getenv "PYTHONPATH")))
8095 (invoke "py.test" "-v"))))))
8096 (native-inputs
8097 `(("python2-pytest" ,python2-pytest)))
8098 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8099 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8100 (description
8101 "This package provides a backport of the @code{get_terminal_size
8102 function} from Python 3.3's @code{shutil}.
8103 Unlike the original version it is written in pure Python rather than C,
8104 so it might be a tiny bit slower.")
8105 (license license:expat)))
8106
8107 (define-public python-waf
8108 (package
8109 (name "python-waf")
8110 (version "2.0.19")
8111 (source (origin
8112 (method url-fetch)
8113 (uri (string-append "https://waf.io/"
8114 "waf-" version ".tar.bz2"))
8115 (sha256
8116 (base32
8117 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8118 (build-system python-build-system)
8119 (arguments
8120 '(#:phases
8121 (modify-phases %standard-phases
8122 (replace 'build
8123 (lambda _
8124 ;; XXX: Find a way to add all extra tools.
8125 (let ((tools '("gccdeps"
8126 "clang_compilation_database")))
8127 (invoke "python" "waf-light" "configure" "build"
8128 (string-append "--tools="
8129 (string-join tools ","))))))
8130 (replace 'check
8131 (lambda _
8132 (invoke "python" "waf" "--version")))
8133 (replace 'install
8134 (lambda* (#:key outputs #:allow-other-keys)
8135 (let ((out (assoc-ref outputs "out")))
8136 (install-file "waf" (string-append out "/bin")))
8137 #t))
8138 ;; waf breaks when it is wrapped.
8139 (delete 'wrap))))
8140 (home-page "https://waf.io/")
8141 (synopsis "Python-based build system")
8142 (description
8143 "Waf is a Python-based framework for configuring, compiling and installing
8144 applications.")
8145 (license license:bsd-3)))
8146
8147 (define-public python2-waf
8148 (package-with-python2 python-waf))
8149
8150 (define-public python-pyzmq
8151 (package
8152 (name "python-pyzmq")
8153 (version "17.1.2")
8154 (source
8155 (origin
8156 (method url-fetch)
8157 (uri (pypi-uri "pyzmq" version))
8158 (sha256
8159 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8160 (build-system python-build-system)
8161 (arguments
8162 `(#:configure-flags
8163 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8164 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8165 ;; --inplace' for 'python setup.py test' to work.
8166 #:tests? #f))
8167 (inputs
8168 `(("zeromq" ,zeromq)))
8169 (native-inputs
8170 `(("pkg-config" ,pkg-config)
8171 ("python-nose" ,python-nose)))
8172 (home-page "https://github.com/zeromq/pyzmq")
8173 (synopsis "Python bindings for 0MQ")
8174 (description
8175 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8176 (license license:bsd-4)))
8177
8178 (define-public python2-pyzmq
8179 (package-with-python2 python-pyzmq))
8180
8181 (define-public python-pep8
8182 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8183 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8184 ;; some dependents' test suites, and nothing more.
8185 (package
8186 (name "python-pep8")
8187 (version "1.7.0")
8188 (source
8189 (origin
8190 (method url-fetch)
8191 (uri (pypi-uri "pep8" version))
8192 (sha256
8193 (base32
8194 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8195 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8196 (build-system python-build-system)
8197 (home-page "https://pep8.readthedocs.org/")
8198 (synopsis "Python style guide checker")
8199 (description
8200 "This tools checks Python code against some of the style conventions in
8201 PEP 8.")
8202 (license license:expat)))
8203
8204 (define-public python2-pep8
8205 (package-with-python2 python-pep8))
8206
8207 (define-public python-pep517
8208 (package
8209 (name "python-pep517")
8210 (version "0.8.2")
8211 (source
8212 (origin
8213 (method url-fetch)
8214 (uri (pypi-uri "pep517" version))
8215 (sha256
8216 (base32
8217 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8218 (build-system python-build-system)
8219 (arguments
8220 '(#:phases
8221 (modify-phases %standard-phases
8222 (replace 'check
8223 (lambda* (#:key tests? #:allow-other-keys)
8224 (delete-file "pytest.ini")
8225 ;; This test tries to connect to the internet
8226 (delete-file "tests/test_meta.py")
8227 (if tests?
8228 (invoke "pytest")
8229 #t))))))
8230 (native-inputs
8231 `(("python-mock" ,python-mock)
8232 ("python-pytest" ,python-pytest)
8233 ("python-testpath" ,python-testpath)))
8234 (propagated-inputs
8235 `(("python-toml" ,python-toml)
8236 ("python-wheel" ,python-wheel)))
8237 (home-page "https://github.com/pypa/pep517")
8238 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8239 (description
8240 "Wrappers to build Python packages using PEP 517 hooks.")
8241 (properties `((python2-variant . ,(delay python2-pep517))))
8242 (license license:expat)))
8243
8244 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8245 (define-public python2-pep517
8246 (let ((base (package-with-python2
8247 (strip-python2-variant python-pep517))))
8248 (package
8249 (inherit base)
8250 (name "python2-pep517")
8251 (arguments
8252 `(#:tests? #f
8253 ,@(package-arguments base)))
8254 (native-inputs `()))))
8255
8256 (define-public python-pyflakes
8257 (package
8258 (name "python-pyflakes")
8259 (version "2.2.0")
8260 (source
8261 (origin
8262 (method url-fetch)
8263 (uri (pypi-uri "pyflakes" version))
8264 (sha256
8265 (base32
8266 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8267 (build-system python-build-system)
8268 (home-page
8269 "https://github.com/pyflakes/pyflakes")
8270 (synopsis "Passive checker of Python programs")
8271 (description
8272 "Pyflakes statically checks Python source code for common errors.")
8273 (license license:expat)))
8274
8275 (define-public python2-pyflakes
8276 (package-with-python2 python-pyflakes))
8277
8278 (define-public python-mccabe
8279 (package
8280 (name "python-mccabe")
8281 (version "0.6.1")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "mccabe" version))
8286 (sha256
8287 (base32
8288 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8289 (build-system python-build-system)
8290 (native-inputs
8291 `(("python-pytest" ,python-pytest-bootstrap)
8292 ("python-pytest-runner" ,python-pytest-runner)))
8293 (home-page "https://github.com/flintwork/mccabe")
8294 (synopsis "McCabe checker, plugin for flake8")
8295 (description
8296 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8297 complexity of Python source code.")
8298 (license license:expat)))
8299
8300 (define-public python2-mccabe
8301 (package-with-python2 python-mccabe))
8302
8303 (define-public python-flake8
8304 (package
8305 (name "python-flake8")
8306 (version "3.8.4")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "flake8" version))
8310 (sha256
8311 (base32
8312 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8313 (build-system python-build-system)
8314 (arguments
8315 `(#:phases
8316 (modify-phases %standard-phases
8317 (delete 'check)
8318 (add-after 'install 'check
8319 (lambda* (#:key inputs outputs #:allow-other-keys)
8320 (add-installed-pythonpath inputs outputs)
8321 (invoke "pytest" "-v")
8322 #t)))))
8323 (propagated-inputs
8324 `(("python-pycodestyle" ,python-pycodestyle)
8325 ("python-entrypoints" ,python-entrypoints)
8326 ("python-pyflakes" ,python-pyflakes)
8327 ("python-mccabe" ,python-mccabe)))
8328 (native-inputs
8329 `(("python-mock" ,python-mock)
8330 ("python-pytest" ,python-pytest-bootstrap)))
8331 (home-page "https://gitlab.com/pycqa/flake8")
8332 (synopsis
8333 "The modular source code checker: pep8, pyflakes and co")
8334 (description
8335 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8336 (properties `((python2-variant . ,(delay python2-flake8))))
8337 (license license:expat)))
8338
8339 (define-public python2-flake8
8340 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8341 (package (inherit base)
8342 (propagated-inputs
8343 `(("python2-configparser" ,python2-configparser)
8344 ("python2-enum34" ,python2-enum34)
8345 ("python2-functools32" ,python2-functools32)
8346 ("python2-typing" ,python2-typing)
8347 ,@(package-propagated-inputs base))))))
8348
8349 (define-public python-flake8-bugbear
8350 (package
8351 (name "python-flake8-bugbear")
8352 (version "20.1.4")
8353 (source
8354 (origin
8355 (method url-fetch)
8356 (uri (pypi-uri "flake8-bugbear" version))
8357 (sha256
8358 (base32
8359 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8360 (build-system python-build-system)
8361 (arguments
8362 '(#:phases
8363 (modify-phases %standard-phases
8364 (add-before 'check 'disable-test
8365 (lambda _
8366 ;; This test fails on slow computers.
8367 (substitute* "tests/test_bugbear.py"
8368 (("def test_does_not_crash_on_any_valid_code")
8369 "def _test_does_not_crash_on_any_valid_code")))))))
8370 (native-inputs
8371 `(("python-hypothesis" ,python-hypothesis)
8372 ("python-hypothesmith" ,python-hypothesmith)))
8373 (propagated-inputs
8374 `(("python-attrs" ,python-attrs)
8375 ("python-flake8" ,python-flake8)))
8376 (home-page "https://github.com/PyCQA/flake8-bugbear")
8377 (synopsis
8378 "Flake8 plugin for finding likely bugs and design problems in your program")
8379 (description
8380 "This package contains a plugin for Flake8 finding likely bugs and
8381 design problems in your program. It contains warnings that don't belong
8382 in pyflakes and pycodestyle.")
8383 (license license:expat)))
8384
8385 (define-public python-flake8-polyfill
8386 (package
8387 (name "python-flake8-polyfill")
8388 (version "1.0.2")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "flake8-polyfill" version))
8393 (sha256
8394 (base32
8395 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8396 (build-system python-build-system)
8397 (arguments
8398 '(#:phases
8399 (modify-phases %standard-phases
8400 (replace 'check
8401 (lambda _
8402 ;; Be compatible with Pytest 4:
8403 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8404 (substitute* "setup.cfg"
8405 (("\\[pytest\\]")
8406 "[tool:pytest]"))
8407
8408 (setenv "PYTHONPATH"
8409 (string-append (getcwd) "/build/lib:"
8410 (getenv "PYTHONPATH")))
8411 (invoke "py.test" "-v"))))))
8412 (native-inputs
8413 `(("python-flake8" ,python-flake8)
8414 ("python-mock" ,python-mock)
8415 ("python-pep8" ,python-pep8)
8416 ("python-pycodestyle" ,python-pycodestyle)
8417 ("python-pytest" ,python-pytest)))
8418 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8419 (synopsis "Polyfill package for Flake8 plugins")
8420 (description
8421 "This package that provides some compatibility helpers for Flake8
8422 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8423 (license license:expat)))
8424
8425 (define-public python2-flake8-polyfill
8426 (package-with-python2 python-flake8-polyfill))
8427
8428 (define-public python-flake8-pyi
8429 (package
8430 (name "python-flake8-pyi")
8431 (version "20.5.0")
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "flake8-pyi" version))
8436 (sha256
8437 (base32
8438 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8439 (build-system python-build-system)
8440 (propagated-inputs
8441 `(("python-attrs" ,python-attrs)
8442 ("python-flake8" ,python-flake8)
8443 ("python-pyflakes" ,python-pyflakes)))
8444 (home-page "https://github.com/ambv/flake8-pyi")
8445 (synopsis
8446 "Flake8 plugin that provides specializations for type hinting stub files")
8447 (description
8448 "This package contains a plugin that provides specializations for
8449 type hinting stub files, especially interesting for linting typeshed. It
8450 adds the @file{.pyi} extension to the default value of the @code{--filename}
8451 command-line argument to Flake8. This means stubs are linted by default with
8452 this plugin enabled, without needing to explicitly list every file. It
8453 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8454 expressions after the entire file has been read. This enables support for
8455 first-class forward references that stub files use.")
8456 (license license:expat)))
8457
8458 (define-public python-flake8-pie
8459 (package
8460 (name "python-flake8-pie")
8461 (version "0.5.0")
8462 (source
8463 (origin
8464 (method url-fetch)
8465 (uri (pypi-uri "flake8-pie" version))
8466 (sha256
8467 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8468 (build-system python-build-system)
8469 (home-page "https://github.com/sbdchd/flake8-pie")
8470 (synopsis "Flake8 extension that implements lints")
8471 (description
8472 "This package provides a flake8 extension that implements miscellaneous
8473 lints.")
8474 (license license:bsd-2)))
8475
8476 (define-public python-autoflake
8477 (package
8478 (name "python-autoflake")
8479 (version "1.3.1")
8480 (source
8481 (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "autoflake" version))
8484 (sha256
8485 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8486 (build-system python-build-system)
8487 (propagated-inputs
8488 `(("python-pyflakes" ,python-pyflakes)))
8489 (home-page "https://github.com/myint/autoflake")
8490 (synopsis "Removes unused imports and unused variables")
8491 (description
8492 "@code{autoflake} removes unused imports and unused variables from Python
8493 code as reported by @code{pyflakes}.
8494
8495 By default, it only removes unused imports for modules that are part of the
8496 standard library. Removal of unused variables is also disabled by default.
8497 It also removes useless @code{pass} statements.")
8498 (license license:expat)))
8499
8500 (define-public python-mistune
8501 (package
8502 (name "python-mistune")
8503 (version "0.8.4")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "mistune" version))
8508 (sha256
8509 (base32
8510 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8511 (build-system python-build-system)
8512 (native-inputs
8513 `(("python-nose" ,python-nose)
8514 ("python-cython" ,python-cython)))
8515 (home-page "https://github.com/lepture/mistune")
8516 (synopsis "Markdown parser in pure Python")
8517 (description "This package provides a fast markdown parser in pure
8518 Python.")
8519 (license license:bsd-3)))
8520
8521 (define-public python2-mistune
8522 (package-with-python2 python-mistune))
8523
8524 (define-public python-markdown
8525 (package
8526 (name "python-markdown")
8527 (version "3.2.1")
8528 (source
8529 (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "Markdown" version))
8532 (sha256
8533 (base32
8534 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8535 (build-system python-build-system)
8536 (native-inputs
8537 `(("python-nose" ,python-nose)
8538 ("python-pyyaml" ,python-pyyaml)))
8539 (home-page "https://python-markdown.github.io/")
8540 (synopsis "Python implementation of Markdown")
8541 (description
8542 "This package provides a Python implementation of John Gruber's
8543 Markdown. The library features international input, various Markdown
8544 extensions, and several HTML output formats. A command line wrapper
8545 markdown_py is also provided to convert Markdown files to HTML.")
8546 (properties `((python2-variant . ,(delay python2-markdown))))
8547 (license license:bsd-3)))
8548
8549 ;; Markdown 3.2 dropped support for Python 2.
8550 (define-public python2-markdown
8551 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8552 (package/inherit
8553 base
8554 (version "3.1.1")
8555 (source (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "Markdown" version))
8558 (sha256
8559 (base32
8560 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8561
8562 (define-public python-ptyprocess
8563 (package
8564 (name "python-ptyprocess")
8565 (version "0.5.2")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "ptyprocess" version))
8570 (sha256
8571 (base32
8572 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8573 (build-system python-build-system)
8574 (native-inputs
8575 `(("python-nose" ,python-nose)))
8576 (arguments
8577 `(#:phases
8578 (modify-phases %standard-phases
8579 (replace 'check
8580 (lambda _ (invoke "nosetests"))))))
8581 (home-page "https://github.com/pexpect/ptyprocess")
8582 (synopsis "Run a subprocess in a pseudo terminal")
8583 (description
8584 "This package provides a Python library used to launch a subprocess in a
8585 pseudo terminal (pty), and interact with both the process and its pty.")
8586 (license license:isc)))
8587
8588 (define-public python2-ptyprocess
8589 (package-with-python2 python-ptyprocess))
8590
8591 (define-public python-cram
8592 (package
8593 (name "python-cram")
8594 (version "0.7")
8595 (home-page "https://bitheap.org/cram/")
8596 (source (origin
8597 (method url-fetch)
8598 (uri (list (string-append home-page "cram-"
8599 version ".tar.gz")
8600 (pypi-uri "cram" version)))
8601 (sha256
8602 (base32
8603 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8604 (arguments
8605 '(#:phases
8606 (modify-phases %standard-phases
8607 (add-after 'unpack 'patch-source
8608 (lambda _
8609 (substitute* (find-files "cram" ".*\\.py$")
8610 ;; Replace default shell path.
8611 (("/bin/sh") (which "sh")))
8612 (substitute* (find-files "tests" ".*\\.t$")
8613 (("md5") "md5sum")
8614 (("/bin/bash") (which "bash"))
8615 (("/bin/sh") (which "sh")))
8616 (substitute* "cram/_test.py"
8617 ;; This hack works around a bug triggered by substituting
8618 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8619 ;; "cram -h", which breaks the output at 80 characters. This
8620 ;; causes the line showing the default shell to break into two
8621 ;; lines, but the test expects a single line...
8622 (("env\\['COLUMNS'\\] = '80'")
8623 "env['COLUMNS'] = '160'"))
8624
8625 (substitute* "Makefile"
8626 ;; Recent versions of python-coverage have caused the test
8627 ;; coverage to decrease (as of version 0.7). Allow that.
8628 (("--fail-under=100")
8629 "--fail-under=90"))
8630
8631 #t))
8632 (replace 'check
8633 ;; The test phase uses the built library and executable.
8634 (lambda* (#:key inputs outputs #:allow-other-keys)
8635 (add-installed-pythonpath inputs outputs)
8636 (setenv "PATH" (string-append (getenv "PATH") ":"
8637 (assoc-ref outputs "out") "/bin"))
8638 (invoke "make" "test"))))))
8639 (build-system python-build-system)
8640 (native-inputs
8641 `(("python-coverage" ,python-coverage)
8642 ("which" ,which)))
8643 (synopsis "Simple testing framework for command line applications")
8644 (description
8645 "Cram is a functional testing framework for command line applications.
8646 Cram tests look like snippets of interactive shell sessions. Cram runs each
8647 command and compares the command output in the test with the command’s actual
8648 output.")
8649 (license license:gpl2+)))
8650
8651 (define-public python2-cram
8652 (package-with-python2 python-cram))
8653
8654 (define-public python-crashtest
8655 (package
8656 (name "python-crashtest")
8657 (version "0.3.1")
8658 (source
8659 (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "crashtest" version))
8662 (sha256
8663 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8664 (build-system python-build-system)
8665 (home-page "https://github.com/sdispater/crashtest")
8666 (synopsis "Manage Python errors with ease")
8667 (description
8668 "Python library that makes exceptions handling and inspection easier.")
8669 (license license:expat)))
8670
8671 (define-public python-straight-plugin
8672 (package
8673 (name "python-straight-plugin")
8674 (version "1.4.1")
8675 (source
8676 (origin
8677 (method url-fetch)
8678 (uri (pypi-uri "straight.plugin" version))
8679 (sha256
8680 (base32
8681 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8682 (build-system python-build-system)
8683 (home-page "https://github.com/ironfroggy/straight.plugin")
8684 (synopsis "Simple namespaced plugin facility")
8685 (description "Straight Plugin provides a type of plugin you can create from
8686 almost any existing Python modules, and an easy way for outside developers to
8687 add functionality and customization to your projects with their own plugins.")
8688 (license license:expat)))
8689
8690 (define-public python2-straight-plugin
8691 (package-with-python2 python-straight-plugin))
8692
8693 (define-public python-fonttools
8694 (package
8695 (name "python-fonttools")
8696 (version "4.6.0")
8697 (source (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "fonttools" version ".zip"))
8700 (sha256
8701 (base32
8702 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8703 (build-system python-build-system)
8704 (native-inputs
8705 `(("unzip" ,unzip)
8706 ("python-pytest" ,python-pytest)
8707 ("python-pytest-runner" ,python-pytest-runner)))
8708 (home-page "https://github.com/fonttools/fonttools")
8709 (synopsis "Tools to manipulate font files")
8710 (description
8711 "FontTools/TTX is a library to manipulate font files from Python. It
8712 supports reading and writing of TrueType/OpenType fonts, reading and writing
8713 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8714 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8715 from an XML-based format.")
8716 (license license:expat)))
8717
8718 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8719 (define-public python2-fonttools
8720 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8721 (package/inherit
8722 base
8723 (version "3.44.0")
8724 (source (origin
8725 (method url-fetch)
8726 (uri (pypi-uri "fonttools" version ".zip"))
8727 (sha256
8728 (base32
8729 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8730
8731 (define-public python-ly
8732 (package
8733 (name "python-ly")
8734 (version "0.9.5")
8735 (source
8736 (origin
8737 (method url-fetch)
8738 (uri (pypi-uri name version))
8739 (sha256
8740 (base32
8741 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8742 (build-system python-build-system)
8743 (arguments
8744 ;; FIXME: Some tests need network access.
8745 '(#:tests? #f))
8746 (synopsis "Tool and library for manipulating LilyPond files")
8747 (description "This package provides a Python library to parse, manipulate
8748 or create documents in LilyPond format. A command line program ly is also
8749 provided that can be used to do various manipulations with LilyPond files.")
8750 (home-page "https://pypi.org/project/python-ly/")
8751 (license license:gpl2+)))
8752
8753 (define-public python-appdirs
8754 (package
8755 (name "python-appdirs")
8756 (version "1.4.3")
8757 (source
8758 (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "appdirs" version))
8761 (sha256
8762 (base32
8763 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8764 (build-system python-build-system)
8765 (home-page "https://github.com/ActiveState/appdirs")
8766 (synopsis
8767 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8768 (description
8769 "This module provides a portable way of finding out where user data
8770 should be stored on various operating systems.")
8771 (license license:expat)))
8772
8773 (define-public python2-appdirs
8774 (package-with-python2 python-appdirs))
8775
8776 (define-public python-gorilla
8777 (package
8778 (name "python-gorilla")
8779 (version "0.3.0")
8780 (source (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "gorilla" version))
8783 (sha256
8784 (base32
8785 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8786 (build-system python-build-system)
8787 (home-page "https://github.com/christophercrouzet/gorilla")
8788 (synopsis "Convenient monkey patching with Python")
8789 (description
8790 "Gorilla is a Python library that provides a convenient approach to
8791 monkey patching. Monkey patching is the process of modifying module and
8792 class attributes at runtime with the purpose of replacing or extending
8793 third-party code.")
8794 (license license:expat)))
8795
8796 (define-public python-llfuse
8797 (package
8798 (name "python-llfuse")
8799 (version "1.3.8")
8800 (source (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "llfuse" version))
8803 (sha256
8804 (base32
8805 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
8806 (build-system python-build-system)
8807 (inputs
8808 `(("fuse" ,fuse)
8809 ("attr" ,attr)))
8810 (native-inputs
8811 `(("pkg-config" ,pkg-config)))
8812 (synopsis "Python bindings for FUSE")
8813 (description
8814 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8815 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8816 (license license:lgpl2.0+)
8817 (properties `((python2-variant . ,(delay python2-llfuse))))))
8818
8819 (define-public python2-llfuse
8820 (package (inherit (package-with-python2
8821 (strip-python2-variant python-llfuse)))
8822 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8823
8824 (define-public python-msgpack
8825 (package
8826 (name "python-msgpack")
8827 (version "1.0.0")
8828 (source (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "msgpack" version))
8831 (sha256
8832 (base32
8833 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8834 (build-system python-build-system)
8835 (arguments
8836 `(#:modules ((guix build utils)
8837 (guix build python-build-system)
8838 (ice-9 ftw)
8839 (srfi srfi-1)
8840 (srfi srfi-26))
8841 #:phases
8842 (modify-phases %standard-phases
8843 (replace 'check
8844 (lambda _
8845 (let ((cwd (getcwd)))
8846 (setenv "PYTHONPATH"
8847 (string-append cwd "/build/"
8848 (find (cut string-prefix? "lib" <>)
8849 (scandir (string-append cwd "/build")))
8850 ":"
8851 (getenv "PYTHONPATH")))
8852 (invoke "pytest" "-v" "test")))))))
8853 (native-inputs
8854 `(("python-pytest" ,python-pytest)))
8855 (synopsis "MessagePack (de)serializer")
8856 (description "MessagePack is a fast, compact binary serialization format,
8857 suitable for similar data to JSON. This package provides CPython bindings for
8858 reading and writing MessagePack data.")
8859 (home-page "https://pypi.org/project/msgpack/")
8860 (license license:asl2.0)))
8861
8862 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8863 ;; release 0.5. Some packages like borg still call it by the old name for now.
8864 ;; <https://bugs.gnu.org/30662>
8865 (define-public python-msgpack-transitional
8866 (package
8867 (inherit python-msgpack)
8868 (name "python-msgpack-transitional")
8869 (version "0.5.6")
8870 (source (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "msgpack" version))
8873 (sha256
8874 (base32
8875 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8876 (arguments
8877 (substitute-keyword-arguments (package-arguments python-msgpack)
8878 ((#:phases phases)
8879 `(modify-phases ,phases
8880 (add-after 'unpack 'configure-transitional
8881 (lambda _
8882 ;; Keep using the old name.
8883 (substitute* "setup.py"
8884 (("TRANSITIONAL = False")
8885 "TRANSITIONAL = 1"))
8886 #t))))))))
8887
8888 (define-public python2-msgpack
8889 (package-with-python2 python-msgpack))
8890
8891 (define-public python-netaddr
8892 (package
8893 (name "python-netaddr")
8894 (version "0.7.19")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "netaddr" version))
8899 (sha256
8900 (base32
8901 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8902 (build-system python-build-system)
8903 (arguments `(#:tests? #f)) ;; No tests.
8904 (home-page "https://github.com/drkjam/netaddr/")
8905 (synopsis "Pythonic manipulation of network addresses")
8906 (description
8907 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8908 and MAC network addresses.")
8909 (license license:bsd-3)))
8910
8911 (define-public python2-netaddr
8912 (package-with-python2 python-netaddr))
8913
8914 (define-public python2-pyroute2
8915 (package
8916 (name "python2-pyroute2")
8917 (version "0.5.6")
8918 (source
8919 (origin
8920 (method url-fetch)
8921 (uri (pypi-uri "pyroute2" version))
8922 (sha256
8923 (base32
8924 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8925 (build-system python-build-system)
8926 (arguments
8927 `(#:python ,python-2)) ;Python 3.x is not supported
8928 (home-page "https://github.com/svinota/pyroute2")
8929 (synopsis "Python netlink library")
8930 (description
8931 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8932 Supported netlink families and protocols include:
8933 @itemize
8934 @item rtnl, network settings - addresses, routes, traffic controls
8935 @item nfnetlink - netfilter API: ipset, nftables, ...
8936 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8937 @item devlink - manage and monitor devlink-enabled hardware
8938 @item generic - generic netlink families
8939 @itemize
8940 @item nl80211 - wireless functions API (basic support)
8941 @item taskstats - extended process statistics
8942 @item acpi_events - ACPI events monitoring
8943 @item thermal_events - thermal events monitoring
8944 @item VFS_DQUOT - disk quota events monitoring
8945 @end itemize
8946 @end itemize")
8947 (license license:gpl2+)))
8948
8949 (define-public python-wrapt
8950 (package
8951 (name "python-wrapt")
8952 (version "1.11.2")
8953 (source
8954 (origin
8955 (method url-fetch)
8956 (uri (pypi-uri "wrapt" version))
8957 (sha256
8958 (base32
8959 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8960 (build-system python-build-system)
8961 (arguments
8962 ;; Tests are not included in the tarball, they are only available in the
8963 ;; git repository.
8964 `(#:tests? #f))
8965 (home-page "https://github.com/GrahamDumpleton/wrapt")
8966 (synopsis "Module for decorators, wrappers and monkey patching")
8967 (description
8968 "The aim of the wrapt module is to provide a transparent object proxy for
8969 Python, which can be used as the basis for the construction of function
8970 wrappers and decorator functions.")
8971 (license license:bsd-2)))
8972
8973 (define-public python2-wrapt
8974 (package-with-python2 python-wrapt))
8975
8976 (define-public python-commonmark
8977 (package
8978 (name "python-commonmark")
8979 (version "0.9.1")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "commonmark" version))
8984 (sha256
8985 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
8986 (build-system python-build-system)
8987 (arguments
8988 `(#:phases
8989 (modify-phases %standard-phases
8990 (replace 'check
8991 (lambda* (#:key inputs outputs #:allow-other-keys)
8992 (add-installed-pythonpath inputs outputs)
8993 (invoke "python" "setup.py" "test"))))))
8994 (home-page "https://github.com/readthedocs/commonmark.py")
8995 (synopsis "Python parser for the CommonMark Markdown spec")
8996 (description
8997 "This module is a pure Python port of jgm's @code{commonmark.js}, a
8998 Markdown parser and renderer for the CommonMark specification, using only
8999 native modules.")
9000 (license license:bsd-3)))
9001
9002 (define-public python-xlrd
9003 (package
9004 (name "python-xlrd")
9005 (version "1.2.0")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "xlrd" version))
9009 (sha256
9010 (base32
9011 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9012 (build-system python-build-system)
9013 (arguments
9014 `(#:phases
9015 (modify-phases %standard-phases
9016 ;; Some tests depend on writing a temporary file to the user's home
9017 ;; directory.
9018 (add-after 'unpack 'fix-tests
9019 (lambda _
9020 (delete-file "tests/test_open_workbook.py")
9021 #t)))))
9022 (home-page "http://www.python-excel.org/")
9023 (synopsis "Library for extracting data from Excel files")
9024 (description "This package provides a library to extract data from
9025 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9026 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9027 Unicode-aware. It is not intended as an end-user tool.")
9028 (license license:bsd-3)))
9029
9030 (define-public python2-xlrd
9031 (package-with-python2 python-xlrd))
9032
9033 (define-public python-immutables
9034 (package
9035 (name "python-immutables")
9036 (version "0.14")
9037 (source
9038 (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "immutables" version))
9041 (sha256
9042 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9043 (build-system python-build-system)
9044 (home-page "https://github.com/MagicStack/immutables")
9045 (synopsis "High-performance immutable mapping type for Python")
9046 (description
9047 "An immutable mapping type for Python. The underlying datastructure is a
9048 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9049 functional languages.")
9050 (license license:asl2.0)))
9051
9052 (define-public python-prettytable
9053 (package
9054 (name "python-prettytable")
9055 (version "0.7.2")
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9060 (sha256
9061 (base32
9062 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9063 (build-system python-build-system)
9064 (home-page "https://code.google.com/archive/p/prettytable/")
9065 (synopsis "Display tabular data in an ASCII table format")
9066 (description
9067 "A library designed to represent tabular data in visually appealing ASCII
9068 tables. PrettyTable allows for selection of which columns are to be printed,
9069 independent alignment of columns (left or right justified or centred) and
9070 printing of sub-tables by specifying a row range.")
9071 (license license:bsd-3)))
9072
9073 (define-public python2-prettytable
9074 (package-with-python2 python-prettytable))
9075
9076 (define-public python-curio
9077 (package
9078 (name "python-curio")
9079 (version "1.2")
9080 (source
9081 (origin
9082 (method url-fetch)
9083 (uri (pypi-uri "curio" version))
9084 (sha256
9085 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9086 (build-system python-build-system)
9087 (arguments
9088 `(#:phases
9089 (modify-phases %standard-phases
9090 (replace 'check
9091 (lambda* (#:key inputs outputs #:allow-other-keys)
9092 (add-installed-pythonpath inputs outputs)
9093 (invoke "pytest" "-vv" "-k"
9094 ;; Tries to open an outgoing connection.
9095 "not test_ssl_outgoing"))))))
9096 (native-inputs
9097 `(("python-pytest" ,python-pytest)))
9098 (home-page "https://github.com/dabeaz/curio")
9099 (synopsis "Coroutine-based library for concurrent Python")
9100 (description
9101 "Curio is a coroutine-based library for concurrent Python systems
9102 programming. It provides standard programming abstractions such as as
9103 tasks, sockets, files, locks, and queues.")
9104 (license license:bsd-3)))
9105
9106 (define-public python-tables
9107 (package
9108 (name "python-tables")
9109 (version "3.6.1")
9110 (source
9111 (origin
9112 (method url-fetch)
9113 (uri (pypi-uri "tables" version))
9114 (sha256
9115 (base32
9116 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9117 (modules '((guix build utils)))
9118 (snippet
9119 '(begin
9120 ;; Remove pre-compiled .pyc files from source.
9121 (for-each delete-file-recursively
9122 (find-files "." "__pycache__" #:directories? #t))
9123 (for-each delete-file (find-files "." "\\.pyc$"))
9124 #t))))
9125 (build-system python-build-system)
9126 (arguments
9127 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9128 ;; or "check", so we must override the build and check phases.
9129 #:phases
9130 (modify-phases %standard-phases
9131 (add-after 'unpack 'use-gcc
9132 (lambda _
9133 (substitute* "setup.py"
9134 (("^( +)compiler = new_compiler\\(\\)" line indent)
9135 (string-append line
9136 "\n"
9137 indent
9138 "compiler.set_executables(compiler='gcc',"
9139 "compiler_so='gcc',"
9140 "linker_exe='gcc',"
9141 "linker_so='gcc -shared')")))
9142 #t))
9143 (add-after 'unpack 'disable-tuning
9144 (lambda _
9145 (substitute* "setup.py"
9146 (("cpu_flags = .*")
9147 "cpu_flags = ['sse2']\n"))
9148 #t))
9149 (replace 'build
9150 (lambda* (#:key inputs #:allow-other-keys)
9151 (invoke "python" "setup.py" "build"
9152 (string-append "--hdf5="
9153 (assoc-ref inputs "hdf5")))))
9154 (replace 'check
9155 (lambda* (#:key inputs #:allow-other-keys)
9156 (invoke "python" "setup.py" "check"
9157 (string-append "--hdf5="
9158 (assoc-ref inputs "hdf5"))))))))
9159 (propagated-inputs
9160 `(("python-numexpr" ,python-numexpr)
9161 ("python-numpy" ,python-numpy)))
9162 (native-inputs
9163 `(("python-cython" ,python-cython)
9164 ("pkg-config" ,pkg-config)))
9165 (inputs
9166 `(("hdf5" ,hdf5-1.10)
9167 ("bzip2" ,bzip2)
9168 ("zlib" ,zlib)))
9169 (home-page "https://www.pytables.org/")
9170 (synopsis "Hierarchical datasets for Python")
9171 (description "PyTables is a package for managing hierarchical datasets and
9172 designed to efficiently cope with extremely large amounts of data.")
9173 (license license:bsd-3)))
9174
9175 (define-public python2-tables
9176 (package-with-python2 python-tables))
9177
9178 (define-public python-sniffio
9179 (package
9180 (name "python-sniffio")
9181 (version "1.1.0")
9182 (source
9183 (origin
9184 (method url-fetch)
9185 (uri (pypi-uri "sniffio" version))
9186 (sha256
9187 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9188 (build-system python-build-system)
9189 (arguments
9190 `(#:phases
9191 (modify-phases %standard-phases
9192 (replace 'check
9193 (lambda _
9194 (invoke "pytest" "-vv"))))))
9195 (native-inputs
9196 `(("python-curio" ,python-curio)
9197 ("python-pytest" ,python-pytest)
9198 ("python-pytest-cov" ,python-pytest-cov)))
9199 (home-page "https://github.com/python-trio/sniffio")
9200 (synopsis "Detect which async library a program is running under")
9201 (description "This package detects which async library a program is
9202 running under. It supports multiple async I/O packages, like Trio, and
9203 asyncio.")
9204 ;; Either license applies.
9205 (license (list license:expat license:asl2.0))))
9206
9207 (define-public python-pytest-black
9208 (package
9209 (name "python-pytest-black")
9210 (version "0.3.8")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "pytest-black" version))
9215 (sha256
9216 (base32
9217 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9218 (build-system python-build-system)
9219 (propagated-inputs
9220 `(("python-pytest" ,python-pytest)
9221 ("python-black" ,python-black)
9222 ("python-toml" ,python-toml)))
9223 (native-inputs
9224 `(("python-setuptools-scm" ,python-setuptools-scm)))
9225 (home-page "https://github.com/shopkeep/pytest-black")
9226 (synopsis "Pytest plugin to enable format checking with black")
9227 (description
9228 "This package provides a pytest plugin to enable format checking with the
9229 Python code formatter \"black\".")
9230 (license license:expat)))
9231
9232 (define-public python-get-version
9233 (package
9234 (name "python-get-version")
9235 (version "2.1")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "get_version" version))
9240 (sha256
9241 (base32
9242 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9243 (build-system python-build-system)
9244 (propagated-inputs
9245 `(("python-pygments" ,python-pygments)
9246 ("python-pytest" ,python-pytest)
9247 ("python-pytest-black" ,python-pytest-black)
9248 ("python-pytest-cov" ,python-pytest-cov)
9249 ("python-setuptools" ,python-setuptools)
9250 ("python-testpath" ,python-testpath)))
9251 (home-page "https://github.com/flying-sheep/get_version")
9252 (synopsis "Version helper in the spirit of versioneer")
9253 (description
9254 "This package provides a version helper that lets you automatically use
9255 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9256 also supports getting the version from Python source distributions or, once
9257 your package is installed, via @code{pkg_resources} (part of
9258 @code{setuptools}).")
9259 (license license:gpl3+)))
9260
9261 (define-public python-legacy-api-wrap
9262 (package
9263 (name "python-legacy-api-wrap")
9264 (version "1.2")
9265 (source
9266 (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "legacy-api-wrap" version))
9269 (sha256
9270 (base32
9271 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9272 (build-system python-build-system)
9273 (propagated-inputs
9274 `(("python-get-version" ,python-get-version)
9275 ("python-pytest" ,python-pytest)
9276 ("python-pytest-black" ,python-pytest-black)
9277 ("python-pytest-cov" ,python-pytest-cov)
9278 ("python-setuptools" ,python-setuptools)))
9279 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9280 (synopsis "Legacy API wrapper")
9281 (description "This module defines a decorator to wrap legacy APIs. The
9282 primary use case is APIs defined before keyword-only parameters existed.")
9283 (license license:gpl3+)))
9284
9285 (define-public python-pyasn1
9286 (package
9287 (name "python-pyasn1")
9288 (version "0.4.8")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "pyasn1" version))
9293 (sha256
9294 (base32
9295 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9296 (build-system python-build-system)
9297 (home-page "http://pyasn1.sourceforge.net/")
9298 (synopsis "ASN.1 types and codecs")
9299 (description
9300 "This is an implementation of ASN.1 types and codecs in Python. It is
9301 suitable for a wide range of protocols based on the ASN.1 specification.")
9302 (license license:bsd-2)))
9303
9304 (define-public python2-pyasn1
9305 (package-with-python2 python-pyasn1))
9306
9307 (define-public python-pyasn1-modules
9308 (package
9309 (name "python-pyasn1-modules")
9310 (version "0.2.2")
9311 (source
9312 (origin
9313 (method url-fetch)
9314 (uri (pypi-uri "pyasn1-modules" version))
9315 (sha256
9316 (base32
9317 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9318 (build-system python-build-system)
9319 (propagated-inputs
9320 `(("python-pyasn1" ,python-pyasn1)))
9321 (home-page "https://sourceforge.net/projects/pyasn1/")
9322 (synopsis "ASN.1 codec implementations")
9323 (description
9324 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9325 implementations of ASN.1-based codecs and protocols.")
9326 (license license:bsd-3)))
9327
9328 (define-public python2-pyasn1-modules
9329 (package-with-python2 python-pyasn1-modules))
9330
9331 (define-public python-ipaddress
9332 (package
9333 (name "python-ipaddress")
9334 (version "1.0.22")
9335 (source (origin
9336 (method url-fetch)
9337 (uri (pypi-uri "ipaddress" version))
9338 (sha256
9339 (base32
9340 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9341 (build-system python-build-system)
9342 (home-page "https://github.com/phihag/ipaddress")
9343 (synopsis "IP address manipulation library")
9344 (description
9345 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9346 in Python. This library is used to create, poke at, and manipulate IPv4 and
9347 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9348 module to older versions of Python.")
9349 (license license:psfl)))
9350
9351 (define-public python2-ipaddress
9352 (package-with-python2 python-ipaddress))
9353
9354 (define-public python2-ipaddr
9355 (package
9356 (name "python2-ipaddr")
9357 (version "2.1.11")
9358 (source
9359 (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "ipaddr" version))
9362 (sha256
9363 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9364 (build-system python-build-system)
9365 (arguments
9366 `(#:python ,python-2 ;version 2 only
9367 #:phases
9368 (modify-phases %standard-phases
9369 (replace 'check
9370 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9371 (home-page "https://github.com/google/ipaddr-py")
9372 (synopsis "IP address manipulation library")
9373 (description
9374 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9375 IPv6 addresses and networks.
9376
9377 For new implementations you may prefer to use the standard module
9378 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9379 versions of Python.")
9380 (license license:asl2.0)))
9381
9382 (define-public python-idna
9383 (package
9384 (name "python-idna")
9385 (version "2.10")
9386 (source
9387 (origin
9388 (method url-fetch)
9389 (uri (pypi-uri "idna" version))
9390 (sha256
9391 (base32
9392 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9393 (build-system python-build-system)
9394 (home-page "https://github.com/kjd/idna")
9395 (synopsis "Internationalized domain names in applications")
9396 (description
9397 "This is a library to support the Internationalised Domain Names in
9398 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9399 protocol is often referred to as “IDNA2008” and can produce different results
9400 from the earlier standard from 2003. The library is also intended to act as a
9401 suitable drop-in replacement for the “encodings.idna” module that comes with
9402 the Python standard library but currently only supports the older 2003
9403 specification.")
9404 (license license:bsd-4)))
9405
9406 (define-public python-idna-2.7
9407 (package (inherit python-idna)
9408 (version "2.7")
9409 (source (origin
9410 (method url-fetch)
9411 (uri (pypi-uri "idna" version))
9412 (sha256
9413 (base32
9414 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9415
9416
9417 (define-public python2-idna
9418 (package-with-python2 python-idna))
9419
9420 (define-public python-libsass
9421 (package
9422 (name "python-libsass")
9423 (version "0.20.1")
9424 (source
9425 (origin
9426 ;; PyPI tarball is missing some test files.
9427 (method git-fetch)
9428 (uri (git-reference
9429 (url "https://github.com/sass/libsass-python")
9430 (commit version)))
9431 (file-name (git-file-name name version))
9432 (sha256
9433 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9434 (build-system python-build-system)
9435 (arguments
9436 `(#:phases
9437 (modify-phases %standard-phases
9438 ;; Use Guix package of libsass instead of compiling from a checkout.
9439 (add-before 'build 'set-libsass
9440 (lambda _
9441 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9442 #t))
9443 (replace 'check
9444 (lambda* (#:key inputs outputs #:allow-other-keys)
9445 (add-installed-pythonpath inputs outputs)
9446 (invoke "pytest" "sasstests.py"))))))
9447 (native-inputs
9448 `(("python-pytest" ,python-pytest)
9449 ("python-werkzeug" ,python-werkzeug)))
9450 (inputs
9451 `(("libsass" ,libsass)))
9452 (propagated-inputs
9453 `(("python-six" ,python-six)))
9454 (home-page "https://sass.github.io/libsass-python/")
9455 (synopsis "Straightforward binding of libsass for Python")
9456 (description
9457 "This package provides a simple Python extension module @code{sass} which
9458 is binding LibSass.")
9459 (license license:expat)))
9460
9461 (define-public python-idna-ssl
9462 (package
9463 (name "python-idna-ssl")
9464 (version "1.0.1")
9465 (source
9466 (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "idna-ssl" version))
9469 (sha256
9470 (base32
9471 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9472 (build-system python-build-system)
9473 (arguments
9474 `(#:tests? #f)) ;circular dependency with python-aiohttp
9475 (home-page "https://github.com/aio-libs/idna-ssl")
9476 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9477 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9478 domains support.")
9479 (license license:expat)))
9480
9481 (define-public python-pretend
9482 (package
9483 (name "python-pretend")
9484 (version "1.0.9")
9485 (source
9486 (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "pretend" version))
9489 (sha256
9490 (base32
9491 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9492 (build-system python-build-system)
9493 (home-page "https://github.com/alex/pretend")
9494 (synopsis "Library for stubbing in Python")
9495 (description
9496 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9497 technique for writing tests. You may hear the term mixed up with mocks,
9498 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9499 responses, rather than doing any computation.")
9500 (license license:bsd-3)))
9501
9502 (define-public python2-pretend
9503 (package-with-python2 python-pretend))
9504
9505 (define-public python-pip
9506 (package
9507 (name "python-pip")
9508 (version "20.2.4")
9509 (source
9510 (origin
9511 (method url-fetch)
9512 (uri (pypi-uri "pip" version))
9513 (sha256
9514 (base32
9515 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9516 (build-system python-build-system)
9517 (arguments
9518 '(#:tests? #f)) ; there are no tests in the pypi archive.
9519 (home-page "https://pip.pypa.io/")
9520 (synopsis "Package manager for Python software")
9521 (description
9522 "Pip is a package manager for Python software, that finds packages on the
9523 Python Package Index (PyPI).")
9524 (license license:expat)))
9525
9526 (define-public python2-pip
9527 (package-with-python2 python-pip))
9528
9529 (define-public python-tlsh
9530 (package
9531 (name "python-tlsh")
9532 (version "3.4.5")
9533 (home-page "https://github.com/trendmicro/tlsh")
9534 (source
9535 (origin
9536 (method git-fetch)
9537 (uri (git-reference
9538 (url "https://github.com/trendmicro/tlsh")
9539 (commit (string-append "v" version))))
9540 (file-name (git-file-name name version))
9541 (sha256
9542 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9543 (build-system cmake-build-system)
9544 (arguments
9545 '(#:out-of-source? #f
9546 #:phases (modify-phases %standard-phases
9547 (replace
9548 'install
9549 (lambda* (#:key outputs #:allow-other-keys)
9550 ;; Build and install the Python bindings. The underlying
9551 ;; C++ library is apparently not meant to be installed.
9552 (let ((out (assoc-ref outputs "out")))
9553 (with-directory-excursion "py_ext"
9554 (and (system* "python" "setup.py" "build")
9555 (system* "python" "setup.py" "install"
9556 (string-append "--prefix=" out))))))))))
9557 (inputs `(("python" ,python-wrapper))) ;for the bindings
9558 (synopsis "Fuzzy matching library for Python")
9559 (description
9560 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9561 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9562 value which can be used for similarity comparisons. Similar objects have
9563 similar hash values, which allows for the detection of similar objects by
9564 comparing their hash values. The byte stream should have a sufficient amount
9565 of complexity; for example, a byte stream of identical bytes will not generate
9566 a hash value.")
9567 (license license:asl2.0)))
9568
9569 (define-public python2-tlsh
9570 (package
9571 (inherit python-tlsh)
9572 (name "python2-tlsh")
9573 (inputs `(("python" ,python-2)))))
9574
9575 (define-public python-termcolor
9576 (package
9577 (name "python-termcolor")
9578 (version "1.1.0")
9579 (source
9580 (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "termcolor" version))
9583 (sha256
9584 (base32
9585 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9586 (build-system python-build-system)
9587 (arguments
9588 ;; There are no tests.
9589 `(#:tests? #f))
9590 (home-page "https://pypi.org/project/termcolor/")
9591 (synopsis "ANSII Color formatting for terminal output")
9592 (description
9593 "This package provides ANSII Color formatting for output in terminals.")
9594 (license license:expat)))
9595
9596 (define-public python2-termcolor
9597 (package-with-python2 python-termcolor))
9598
9599 (define-public python-terminaltables
9600 (package
9601 (name "python-terminaltables")
9602 (version "3.1.0")
9603 (source
9604 (origin
9605 (method url-fetch)
9606 (uri (pypi-uri "terminaltables" version))
9607 (sha256
9608 (base32
9609 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9610 (build-system python-build-system)
9611 (home-page "https://github.com/Robpol86/terminaltables")
9612 (synopsis
9613 "Generate simple tables in terminals from a nested list of strings")
9614 (description
9615 "This package makes it easy to draw tables in terminal/console
9616 applications from a list of lists of strings. It supports multi-line rows.")
9617 (license license:expat)))
9618
9619 (define-public python-libarchive-c
9620 (package
9621 (name "python-libarchive-c")
9622 (version "2.9")
9623 (source (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "libarchive-c" version))
9626 (sha256
9627 (base32
9628 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9629 (build-system python-build-system)
9630 (arguments
9631 '(#:phases (modify-phases %standard-phases
9632 (add-before
9633 'build 'reference-libarchive
9634 (lambda* (#:key inputs #:allow-other-keys)
9635 ;; Retain the absolute file name of libarchive.so.
9636 (let ((libarchive (assoc-ref inputs "libarchive")))
9637 (substitute* "libarchive/ffi.py"
9638 (("find_library\\('archive'\\)")
9639 (string-append "'" libarchive
9640 "/lib/libarchive.so'"))))))
9641 (replace 'check
9642 (lambda _ (invoke "pytest" "-vv"))))))
9643 (native-inputs
9644 `(("python-mock" ,python-mock)
9645 ("python-pytest" ,python-pytest)))
9646 (inputs
9647 `(("libarchive" ,libarchive)))
9648 (home-page "https://github.com/Changaco/python-libarchive-c")
9649 (synopsis "Python interface to libarchive")
9650 (description
9651 "This package provides Python bindings to libarchive, a C library to
9652 access possibly compressed archives in many different formats. It uses
9653 Python's @code{ctypes} foreign function interface (FFI).")
9654 (license license:lgpl2.0+)))
9655
9656 (define-public python2-libarchive-c
9657 (package-with-python2 python-libarchive-c))
9658
9659 (define-public python-file
9660 (package
9661 (inherit file)
9662 (name "python-file")
9663 (build-system python-build-system)
9664 (arguments
9665 '(#:tests? #f ;no tests
9666 #:configure-flags '("--single-version-externally-managed" "--root=/")
9667 #:phases (modify-phases %standard-phases
9668 (add-before 'build 'change-directory
9669 (lambda _
9670 (chdir "python")
9671 #t))
9672 (add-before 'build 'set-library-file-name
9673 (lambda* (#:key inputs #:allow-other-keys)
9674 (let ((file (assoc-ref inputs "file")))
9675 (substitute* "magic.py"
9676 (("find_library\\('magic'\\)")
9677 (string-append "'" file "/lib/libmagic.so'")))
9678 #t))))))
9679 (inputs `(("file" ,file)))
9680 (native-inputs (if (%current-target-system)
9681 `(("self" ,this-package))
9682 '()))
9683 (synopsis "Python bindings to the libmagic file type guesser")
9684 (description "This package provides Python bindings to the libmagic file
9685 type guesser.
9686
9687 Note that this module and the @code{python-magic} module both provide a
9688 @file{magic.py} file; these two modules, which are different and were
9689 developed separately, both serve the same purpose: provide Python bindings for
9690 libmagic.")))
9691
9692 (define-public python2-file
9693 (package-with-python2 python-file))
9694
9695 (define-public python-debian
9696 (package
9697 (name "python-debian")
9698 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9699 (version "0.1.36")
9700 (source
9701 (origin
9702 ;; Use git-fetch, as pypi doesn't include test suite.
9703 (method git-fetch)
9704 (uri (git-reference
9705 (url home-page)
9706 (commit version)))
9707 (file-name (git-file-name name version))
9708 (sha256
9709 (base32
9710 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9711 (build-system python-build-system)
9712 (arguments
9713 `(#:phases (modify-phases %standard-phases
9714 (add-after 'unpack 'remove-debian-specific-tests
9715 ;; python-apt, apt and dpkg are not yet available in guix,
9716 ;; and these tests heavily depend on them.
9717 (lambda _
9718 (delete-file "lib/debian/tests/test_deb822.py")
9719 (delete-file "lib/debian/tests/test_debfile.py")
9720 #t)))))
9721 (propagated-inputs
9722 `(("python-six" ,python-six)
9723 ("python-chardet" ,python-chardet)))
9724 (synopsis "Debian package related modules")
9725 (description
9726 ;; XXX: Use @enumerate instead of @itemize to work around
9727 ;; <http://bugs.gnu.org/21772>.
9728 "This package provides Python modules that abstract many formats of
9729 Debian-related files, such as:
9730
9731 @enumerate
9732 @item Debtags information;
9733 @item @file{debian/changelog} files;
9734 @item packages files, pdiffs;
9735 @item control files of single or multiple RFC822-style paragraphs---e.g.
9736 @file{debian/control}, @file{.changes}, @file{.dsc};
9737 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9738 contained files and meta-information.
9739 @end enumerate\n")
9740
9741 ;; Modules are either GPLv2+ or GPLv3+.
9742 (license license:gpl3+)))
9743
9744 (define-public python-nbformat
9745 (package
9746 (name "python-nbformat")
9747 (version "4.4.0")
9748 (source
9749 (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "nbformat" version))
9752 (sha256
9753 (base32
9754 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9755 (build-system python-build-system)
9756 (arguments `(#:tests? #f)) ; no test target
9757 (propagated-inputs
9758 `(("python-ipython-genutils" ,python-ipython-genutils)
9759 ("python-jsonschema" ,python-jsonschema)
9760 ("python-jupyter-core" ,python-jupyter-core)
9761 ("python-traitlets" ,python-traitlets)))
9762 (home-page "http://jupyter.org")
9763 (synopsis "Jupyter Notebook format")
9764 (description "This package provides the reference implementation of the
9765 Jupyter Notebook format and Python APIs for working with notebooks.")
9766 (license license:bsd-3)))
9767
9768 (define-public python2-nbformat
9769 (package-with-python2 python-nbformat))
9770
9771 (define-public python-bleach
9772 (package
9773 (name "python-bleach")
9774 (version "3.1.5")
9775 (source
9776 (origin
9777 (method url-fetch)
9778 (uri (pypi-uri "bleach" version))
9779 (sha256
9780 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9781 (build-system python-build-system)
9782 (propagated-inputs
9783 `(("python-webencodings" ,python-webencodings)
9784 ("python-six" ,python-six)))
9785 (native-inputs
9786 `(("python-datrie" ,python-datrie)
9787 ("python-genshi" ,python-genshi)
9788 ("python-lxml" ,python-lxml)
9789 ("python-pytest" ,python-pytest)))
9790 (home-page "https://github.com/mozilla/bleach")
9791 (synopsis "Whitelist-based HTML-sanitizing tool")
9792 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9793 (license license:asl2.0)))
9794
9795 (define-public python2-bleach
9796 (package-with-python2 python-bleach))
9797
9798 (define-public python-entrypoints
9799 (package
9800 (name "python-entrypoints")
9801 (version "0.3")
9802 (source
9803 (origin
9804 (method url-fetch)
9805 (uri (pypi-uri "entrypoints" version))
9806 (sha256
9807 (base32
9808 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9809 (build-system python-build-system)
9810 ;; The package does not come with a setup.py file, so we have to generate
9811 ;; one ourselves.
9812 (arguments
9813 `(#:tests? #f
9814 #:phases
9815 (modify-phases %standard-phases
9816 (add-after 'unpack 'create-setup.py
9817 (lambda _
9818 (call-with-output-file "setup.py"
9819 (lambda (port)
9820 (format port "\
9821 from setuptools import setup
9822 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9823 " ,version))))))))
9824 (home-page "https://github.com/takluyver/entrypoints")
9825 (synopsis "Discover and load entry points from installed Python packages")
9826 (description "Entry points are a way for Python packages to advertise
9827 objects with some common interface. The most common examples are
9828 @code{console_scripts} entry points, which define shell commands by
9829 identifying a Python function to run. The @code{entrypoints} module contains
9830 functions to find and load entry points.")
9831 (license license:expat)))
9832
9833 (define-public python2-entrypoints
9834 (package-with-python2 python-entrypoints))
9835
9836 (define-public python-epc
9837 (package
9838 (name "python-epc")
9839 (version "0.0.5")
9840 (source
9841 (origin
9842 (method url-fetch)
9843 (uri (pypi-uri "epc" version))
9844 (sha256
9845 (base32
9846 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9847 (build-system python-build-system)
9848 (propagated-inputs
9849 `(("python-sexpdata" ,python-sexpdata)))
9850 (native-inputs
9851 `(("python-nose" ,python-nose)))
9852 (home-page "https://github.com/tkf/python-epc")
9853 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9854 (description
9855 "Python-EPC can call elisp functions from Python and Python functions
9856 from elisp.")
9857 (license license:gpl3)))
9858
9859 (define-public python-forex-python
9860 (package
9861 (name "python-forex-python")
9862 (version "1.5")
9863 (source
9864 (origin
9865 (method url-fetch)
9866 (uri (pypi-uri "forex-python" version))
9867 (sha256
9868 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9869 (build-system python-build-system)
9870 (arguments
9871 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9872 ;; repository require online data.
9873 `(#:tests? #f))
9874 (propagated-inputs
9875 `(("python-requests" ,python-requests)
9876 ("python-simplejson" ,python-simplejson)))
9877 (home-page "https://github.com/MicroPyramid/forex-python")
9878 (synopsis "Foreign exchange rates and currency conversion")
9879 (description
9880 "@code{python-forex-python} can be used to manipulate foreign
9881 exchange rates and to operate currency conversions.
9882
9883 Features:
9884 @itemize
9885 @item List all currency rates.
9886 @item BitCoin price for all currencies.
9887 @item Converting amount to BitCoins.
9888 @item Get historical rates for any day since 1999.
9889 @item Conversion rate for one currency(ex; USD to INR).
9890 @item Convert amount from one currency to other.('USD 10$' to INR).
9891 @item Currency symbols.
9892 @item Currency names.
9893 @end itemize")
9894 (license license:expat)))
9895
9896 (define-public python-simpleeval
9897 (package
9898 (name "python-simpleeval")
9899 (version "0.9.10")
9900 (source
9901 (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "simpleeval" version))
9904 (sha256
9905 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9906 (build-system python-build-system)
9907 (home-page "https://github.com/danthedeckie/simpleeval")
9908 (synopsis "Simple, safe single expression evaluator library")
9909 (description
9910 "This package provides a quick single file library for easily adding
9911 evaluatable expressions into python projects. Say you want to allow a user
9912 to set an alarm volume, which could depend on the time of day, alarm level,
9913 how many previous alarms had gone off, and if there is music playing at the
9914 time.")
9915 (license license:expat)))
9916
9917 (define-public python-nbconvert
9918 (package
9919 (name "python-nbconvert")
9920 (version "5.0.0b1")
9921 (source
9922 (origin
9923 (method url-fetch)
9924 (uri (pypi-uri "nbconvert" version))
9925 (sha256
9926 (base32
9927 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9928 (build-system python-build-system)
9929 (arguments
9930 `(;; The "bdist_egg" target is disabled by default, causing the installation
9931 ;; to fail.
9932 #:configure-flags (list "bdist_egg")
9933 ;; FIXME: 5 failures, 40 errors.
9934 #:tests? #f))
9935 ;; #:phases
9936 ;; (modify-phases %standard-phases
9937 ;; (replace 'check
9938 ;; (lambda _
9939 ;; (zero? (system* "py.test" "-v")))))
9940 (native-inputs
9941 `(("python-pytest" ,python-pytest)))
9942 (propagated-inputs
9943 `(("python-bleach" ,python-bleach)
9944 ("python-entrypoints" ,python-entrypoints)
9945 ("python-jinja2" ,python-jinja2)
9946 ("python-jupyter-core" ,python-jupyter-core)
9947 ("python-mistune" ,python-mistune)
9948 ("python-nbformat" ,python-nbformat)
9949 ("python-pygments" ,python-pygments)
9950 ("python-traitlets" ,python-traitlets)))
9951 (home-page "http://jupyter.org")
9952 (synopsis "Converting Jupyter Notebooks")
9953 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9954 notebooks to various other formats via Jinja templates. It allows you to
9955 convert an @code{.ipynb} notebook file into various static formats including:
9956
9957 @enumerate
9958 @item HTML
9959 @item LaTeX
9960 @item PDF
9961 @item Reveal JS
9962 @item Markdown (md)
9963 @item ReStructured Text (rst)
9964 @item executable script
9965 @end enumerate\n")
9966 (license license:bsd-3)))
9967
9968 (define-public python2-nbconvert
9969 (package-with-python2 python-nbconvert))
9970
9971 (define-public python-notebook
9972 (package
9973 (name "python-notebook")
9974 (version "5.7.4")
9975 (source (origin
9976 (method url-fetch)
9977 (uri (pypi-uri "notebook" version))
9978 (sha256
9979 (base32
9980 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9981 (build-system python-build-system)
9982 (arguments
9983 `(#:phases
9984 (modify-phases %standard-phases
9985 (replace 'check
9986 (lambda _
9987 ;; These tests require a browser
9988 (delete-file-recursively "notebook/tests/selenium")
9989 ;; Some tests need HOME
9990 (setenv "HOME" "/tmp")
9991 ;; This file contains "warningfilters", which are not supported
9992 ;; by this version of nose.
9993 (delete-file "setup.cfg")
9994 (with-directory-excursion "/tmp"
9995 (invoke "nosetests" "-v"))
9996 #t)))))
9997 (propagated-inputs
9998 `(("python-jupyter-core" ,python-jupyter-core)
9999 ("python-nbformat" ,python-nbformat)
10000 ("python-nbconvert" ,python-nbconvert)
10001 ("python-prometheus-client" ,python-prometheus-client)
10002 ("python-send2trash" ,python-send2trash)
10003 ("python-terminado" ,python-terminado)))
10004 (native-inputs
10005 `(("python-nose" ,python-nose)
10006 ("python-sphinx" ,python-sphinx)
10007 ("python-requests" ,python-requests)))
10008 (home-page "http://jupyter.org/")
10009 (synopsis "Web-based notebook environment for interactive computing")
10010 (description
10011 "The Jupyter HTML notebook is a web-based notebook environment for
10012 interactive computing.")
10013 (properties `((python2-variant . ,(delay python2-notebook))))
10014 (license license:bsd-3)))
10015
10016 (define-public python2-notebook
10017 (let ((base (package-with-python2
10018 (strip-python2-variant python-notebook))))
10019 (package (inherit base)
10020 (native-inputs
10021 `(("python2-mock" ,python2-mock)
10022 ,@(package-native-inputs base)))
10023 (arguments
10024 (substitute-keyword-arguments (package-arguments base)
10025 ((#:phases phases)
10026 `(modify-phases ,phases
10027 (add-before 'check 'disable-test-case
10028 ;; The test requires network access to localhost. Curiously it
10029 ;; fails with Python 2 only. Simply make the test-case return
10030 ;; immediately.
10031 (lambda _
10032 (substitute*
10033 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10034 (("formats = self.nbconvert_api") "return #")))))))))))
10035
10036 (define-public python-widgetsnbextension
10037 (package
10038 (name "python-widgetsnbextension")
10039 (version "3.5.1")
10040 (source
10041 (origin
10042 (method url-fetch)
10043 (uri (pypi-uri "widgetsnbextension" version))
10044 (sha256
10045 (base32
10046 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10047 (build-system python-build-system)
10048 (propagated-inputs
10049 `(("python-ipykernel" ,python-ipykernel)
10050 ("python-notebook" ,python-notebook)))
10051 (native-inputs
10052 `(("python-certifi" ,python-certifi)
10053 ("python-nose" ,python-nose)))
10054 (home-page "https://ipython.org")
10055 (synopsis "IPython HTML widgets for Jupyter")
10056 (description "This package provides interactive HTML widgets for Jupyter
10057 notebooks.")
10058 (license license:bsd-3)))
10059
10060 (define-public python2-widgetsnbextension
10061 (package-with-python2 python-widgetsnbextension))
10062
10063 (define-public python-ipywidgets
10064 (package
10065 (name "python-ipywidgets")
10066 (version "7.5.1")
10067 (source
10068 (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "ipywidgets" version))
10071 (sha256
10072 (base32
10073 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10074 (build-system python-build-system)
10075 (propagated-inputs
10076 `(("python-ipython" ,python-ipython)
10077 ("python-traitlets" ,python-traitlets)
10078 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10079 (native-inputs
10080 `(("python-nose" ,python-nose)
10081 ("python-pytest" ,python-pytest)))
10082 (home-page "https://ipython.org")
10083 (synopsis "IPython HTML widgets for Jupyter")
10084 (description "Ipywidgets are interactive HTML widgets for Jupyter
10085 notebooks and the IPython kernel. Notebooks come alive when interactive
10086 widgets are used. Users gain control of their data and can visualize changes
10087 in the data.")
10088 (license license:bsd-3)))
10089
10090 (define-public python2-ipywidgets
10091 (package-with-python2 python-ipywidgets))
10092
10093 (define-public python-jupyter-console
10094 (package
10095 (name "python-jupyter-console")
10096 (version "6.1.0")
10097 (source
10098 (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "jupyter_console" version))
10101 (sha256
10102 (base32
10103 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10104 (build-system python-build-system)
10105 (propagated-inputs
10106 `(("python-ipykernel" ,python-ipykernel)
10107 ("python-jupyter-client" ,python-jupyter-client)
10108 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10109 ("python-pygments" ,python-pygments)))
10110 (native-inputs
10111 `(("python-nose" ,python-nose)))
10112 (home-page "https://jupyter.org")
10113 (synopsis "Jupyter terminal console")
10114 (description "This package provides a terminal-based console frontend for
10115 Jupyter kernels. It also allows for console-based interaction with non-Python
10116 Jupyter kernels such as IJulia and IRKernel.")
10117 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10118 (license license:bsd-3)))
10119
10120 (define-public python2-jupyter-console
10121 (package
10122 (name "python2-jupyter-console")
10123 (version "5.2.0")
10124 (source
10125 (origin
10126 (method url-fetch)
10127 (uri (pypi-uri "jupyter_console" version))
10128 (sha256
10129 (base32
10130 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10131 (build-system python-build-system)
10132 (arguments
10133 `(#:python ,python-2
10134 #:tests? #f)) ; Tests only run in a TTY.
10135 (propagated-inputs
10136 `(("python2-ipykernel" ,python2-ipykernel)
10137 ("python2-jupyter-client" ,python2-jupyter-client)
10138 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10139 ("python2-pygments" ,python2-pygments)))
10140 (native-inputs
10141 `(("python2-nose" ,python2-nose)))
10142 (home-page "https://jupyter.org")
10143 (synopsis "Jupyter terminal console")
10144 (description "This package provides a terminal-based console frontend for
10145 Jupyter kernels. It also allows for console-based interaction with non-Python
10146 Jupyter kernels such as IJulia and IRKernel.")
10147 (license license:bsd-3)))
10148
10149 ;; The python-ipython and python-jupyter-console require each other. To get
10150 ;; the functionality in both packages working, strip down the
10151 ;; python-jupyter-console package when using it as an input to python-ipython.
10152 (define python-jupyter-console-minimal
10153 (package
10154 (inherit python-jupyter-console)
10155 (name "python-jupyter-console-minimal")
10156 (arguments
10157 (substitute-keyword-arguments
10158 (package-arguments python-jupyter-console)
10159 ((#:phases phases)
10160 `(modify-phases ,phases
10161 (add-after 'install 'delete-bin
10162 (lambda* (#:key outputs #:allow-other-keys)
10163 ;; Delete the bin files, to avoid conflicts in profiles
10164 ;; where python-ipython and python-jupyter-console are
10165 ;; both present.
10166 (delete-file-recursively
10167 (string-append
10168 (assoc-ref outputs "out") "/bin"))))))))
10169 ;; Remove the python-ipython propagated input, to avoid the cycle
10170 (propagated-inputs
10171 (alist-delete
10172 "python-ipython"
10173 (package-propagated-inputs python-jupyter-console)))))
10174
10175 (define-public python-qtconsole
10176 (package
10177 (name "python-qtconsole")
10178 (version "4.4.3")
10179 (source
10180 (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "qtconsole" version))
10183 (sha256
10184 (base32
10185 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10186 (build-system python-build-system)
10187 (arguments
10188 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10189 ;; but we only have the LTS version 5.x. This means that there might be
10190 ;; runtime errors, but since this is a dependency of the Jupyter package,
10191 ;; and Jupyter can be used without the qtconsole we can overlook this for
10192 ;; now.
10193 `(#:tests? #f
10194 #:phases
10195 (modify-phases %standard-phases
10196 (add-before 'check 'pre-check
10197 (lambda _
10198 (setenv "QT_QPA_PLATFORM" "offscreen")
10199 #t)))))
10200 (propagated-inputs
10201 `(("python-ipykernel" ,python-ipykernel)
10202 ("python-ipython" ,python-ipython)))
10203 (native-inputs
10204 `(("python-pytest" ,python-pytest)))
10205 (home-page "http://jupyter.org")
10206 (synopsis "Jupyter Qt console")
10207 (description "This package provides a Qt-based console for Jupyter with
10208 support for rich media output.")
10209 (license license:bsd-3)))
10210
10211 (define-public python-jsbeautifier
10212 (package
10213 (name "python-jsbeautifier")
10214 (version "1.10.2")
10215 (home-page "https://github.com/beautify-web/js-beautify")
10216 (source (origin
10217 (method git-fetch)
10218 (uri (git-reference
10219 (url home-page)
10220 (commit (string-append "v" version))))
10221 (file-name (git-file-name name version))
10222 (sha256
10223 (base32
10224 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10225 (build-system python-build-system)
10226 (arguments
10227 `(#:phases (modify-phases %standard-phases
10228 (add-after 'unpack 'chdir
10229 (lambda _
10230 ;; The upstream Git repository contains all the code,
10231 ;; but this package only builds the python code.
10232 (chdir "python")
10233 #t))
10234 (add-after 'unpack 'patch-python-six-requirements
10235 (lambda _
10236 (substitute* "python/setup.py"
10237 (("six>=1.12.0")
10238 "six>=1.11.0"))
10239 #t)))))
10240 (propagated-inputs
10241 `(("python-editorconfig" ,python-editorconfig)
10242 ("python-six" ,python-six)))
10243 (native-inputs
10244 `(("python-pytest" ,python-pytest)))
10245 (synopsis "JavaScript unobfuscator and beautifier")
10246 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10247 popular online obfuscators.")
10248 (license license:expat)))
10249
10250 (define-public jupyter
10251 (package
10252 (name "jupyter")
10253 (version "1.0.0")
10254 (source
10255 (origin
10256 (method url-fetch)
10257 (uri (pypi-uri "jupyter" version))
10258 (sha256
10259 (base32
10260 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10261 (build-system python-build-system)
10262 (arguments '(#:tests? #f)) ; there are none.
10263 (propagated-inputs
10264 `(("python-ipykernel" ,python-ipykernel)
10265 ("python-ipywidgets" ,python-ipywidgets)
10266 ("python-jupyter-console" ,python-jupyter-console)
10267 ("python-nbconvert" ,python-nbconvert)
10268 ("python-notebook" ,python-notebook)
10269 ("python-qtconsole" ,python-qtconsole)))
10270 (native-search-paths
10271 (list (search-path-specification
10272 (variable "JUPYTER_PATH")
10273 (files '("share/jupyter")))))
10274 (home-page "https://jupyter.org")
10275 (synopsis "Web application for interactive documents")
10276 (description
10277 "The Jupyter Notebook is a web application that allows you to create and
10278 share documents that contain live code, equations, visualizations and
10279 explanatory text. Uses include: data cleaning and transformation, numerical
10280 simulation, statistical modeling, machine learning and much more.")
10281 (license license:bsd-3)))
10282
10283 (define-public python-chardet
10284 (package
10285 (name "python-chardet")
10286 (version "3.0.4")
10287 (source
10288 (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "chardet" version))
10291 (sha256
10292 (base32
10293 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10294 (native-inputs
10295 `(("python-hypothesis" ,python-hypothesis)
10296 ("python-pytest" ,python-pytest)
10297 ("python-pytest-runner" ,python-pytest-runner)))
10298 (build-system python-build-system)
10299 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10300 (arguments `(#:tests? #f))
10301 (home-page "https://github.com/chardet/chardet")
10302 (synopsis "Universal encoding detector for Python 2 and 3")
10303 (description
10304 "This package provides @code{chardet}, a Python module that can
10305 automatically detect a wide range of file encodings.")
10306 (license license:lgpl2.1+)))
10307
10308 (define-public python2-chardet
10309 (package-with-python2 python-chardet))
10310
10311 (define-public python-docopt
10312 (package
10313 (name "python-docopt")
10314 (version "0.6.2")
10315 (source
10316 (origin
10317 (method git-fetch)
10318 ;; The release on PyPI does not include tests.
10319 (uri (git-reference
10320 (url "https://github.com/docopt/docopt")
10321 (commit version)))
10322 (file-name (git-file-name name version))
10323 (sha256
10324 (base32
10325 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10326 (build-system python-build-system)
10327 (native-inputs
10328 `(("python-pytest" ,python-pytest)))
10329 (arguments
10330 `(#:phases
10331 (modify-phases %standard-phases
10332 (replace 'check
10333 (lambda _ (invoke "py.test"))))))
10334 (home-page "http://docopt.org")
10335 (synopsis "Command-line interface description language for Python")
10336 (description "This library allows the user to define a command-line
10337 interface from a program's help message rather than specifying it
10338 programmatically with command-line parsers like @code{getopt} and
10339 @code{argparse}.")
10340 (license license:expat)))
10341
10342 (define-public python2-docopt
10343 (package-with-python2 python-docopt))
10344
10345 (define-public python-pythondialog
10346 (package
10347 (name "python-pythondialog")
10348 (version "3.4.0")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "pythondialog" version))
10353 (sha256
10354 (base32
10355 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10356 (build-system python-build-system)
10357 (arguments
10358 `(#:phases
10359 (modify-phases %standard-phases
10360 (add-after 'unpack 'patch-path
10361 (lambda* (#:key inputs #:allow-other-keys)
10362 (let* ((dialog (assoc-ref inputs "dialog")))
10363 ;; Since this library really wants to grovel the search path, we
10364 ;; must hardcode dialog's store path into it.
10365 (substitute* "dialog.py"
10366 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10367 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10368 #t))))
10369 #:tests? #f)) ; no test suite
10370 (propagated-inputs
10371 `(("dialog" ,dialog)))
10372 (home-page "http://pythondialog.sourceforge.net/")
10373 (synopsis "Python interface to the UNIX dialog utility")
10374 (description "A Python wrapper for the dialog utility. Its purpose is to
10375 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10376 This allows one to make simple text-mode user interfaces on Unix-like systems")
10377 (license license:lgpl2.1)
10378 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10379
10380 (define-public python2-pythondialog
10381 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10382 (package
10383 (inherit base)
10384 (version (package-version python-pythondialog))
10385 (source (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "python2-pythondialog" version))
10388 (sha256
10389 (base32
10390 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10391
10392 (define-public python-configobj
10393 (package
10394 (name "python-configobj")
10395 (version "5.0.6")
10396 (source (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "configobj" version))
10399 (sha256
10400 (base32
10401 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10402 ;; Patch setup.py so it looks for python-setuptools, which is
10403 ;; required to parse the keyword 'install_requires' in setup.py.
10404 (patches (search-patches "python-configobj-setuptools.patch"))))
10405 (build-system python-build-system)
10406 (propagated-inputs
10407 `(("python-six" ,python-six)))
10408 (synopsis "Config file reading, writing and validation")
10409 (description "ConfigObj is a simple but powerful config file reader and
10410 writer: an ini file round tripper. Its main feature is that it is very easy to
10411 use, with a straightforward programmer’s interface and a simple syntax for
10412 config files.")
10413 (home-page "https://github.com/DiffSK/configobj")
10414 (license license:bsd-3)))
10415
10416 (define-public python2-configobj
10417 (package-with-python2 python-configobj))
10418
10419 (define-public python-configargparse
10420 (package
10421 (name "python-configargparse")
10422 (version "1.2.3")
10423 (source (origin
10424 (method url-fetch)
10425 (uri (pypi-uri "ConfigArgParse" version))
10426 (sha256
10427 (base32
10428 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10429 (build-system python-build-system)
10430 (native-inputs
10431 `(("python-pyyaml" ,python-pyyaml)))
10432 (arguments
10433 `(#:phases
10434 (modify-phases %standard-phases
10435 (replace 'check
10436 (lambda _
10437 ;; Bypass setuptools-shim because one test relies on "setup.py"
10438 ;; being the first argument passed to the python call.
10439 ;;
10440 ;; NOTE: Many tests do not run because they rely on Python's
10441 ;; built-in test.test_argparse, but we remove the unit tests from
10442 ;; our Python installation.
10443 (invoke "python" "setup.py" "test"))))))
10444 (synopsis "Replacement for argparse")
10445 (description "A drop-in replacement for argparse that allows options to also
10446 be set via config files and/or environment variables.")
10447 (home-page "https://github.com/bw2/ConfigArgParse")
10448 (license license:expat)))
10449
10450 (define-public python-argparse-manpage
10451 (package
10452 (name "python-argparse-manpage")
10453 (version "1.1")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "argparse-manpage" version))
10458 (sha256
10459 (base32
10460 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10461 (build-system python-build-system)
10462 (home-page "https://github.com/praiskup/argparse-manpage")
10463 (synopsis "Build manual page from Python's ArgumentParser object")
10464 (description
10465 "This package provides tools to build manual pages from Python's
10466 @code{ArgumentParser} object.")
10467 (license license:asl2.0)))
10468
10469 (define-public python-contextlib2
10470 (package
10471 (name "python-contextlib2")
10472 (version "0.6.0.post1")
10473 (source
10474 (origin
10475 (method url-fetch)
10476 (uri (pypi-uri "contextlib2" version))
10477 (sha256
10478 (base32
10479 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10480 (build-system python-build-system)
10481 (home-page "https://contextlib2.readthedocs.org/")
10482 (synopsis "Tools for decorators and context managers")
10483 (description "This module is primarily a backport of the Python
10484 3.2 contextlib to earlier Python versions. Like contextlib, it
10485 provides utilities for common tasks involving decorators and context
10486 managers. It also contains additional features that are not part of
10487 the standard library.")
10488 (properties `((python2-variant . ,(delay python2-contextlib2))))
10489 (license license:psfl)))
10490
10491 (define-public python2-contextlib2
10492 (let ((base (package-with-python2
10493 (strip-python2-variant python-contextlib2))))
10494 (package
10495 (inherit base)
10496 (arguments
10497 (substitute-keyword-arguments (package-arguments base)
10498 ((#:phases phases)
10499 `(modify-phases ,phases
10500 (replace 'check
10501 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10502 (native-inputs
10503 `(("python2-unittest2" ,python2-unittest2))))))
10504
10505 ;; This package is used by python2-pytest via python2-importlib-metadata,
10506 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10507 (define-public python2-contextlib2-bootstrap
10508 (hidden-package
10509 (package/inherit
10510 python2-contextlib2
10511 (name "python2-contextlib2-bootstrap")
10512 (arguments
10513 `(#:tests? #f
10514 ,@(package-arguments python2-contextlib2)))
10515 (native-inputs '()))))
10516
10517 (define-public python-texttable
10518 (package
10519 (name "python-texttable")
10520 (version "1.6.2")
10521 (source
10522 (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "texttable" version))
10525 (sha256
10526 (base32
10527 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10528 (build-system python-build-system)
10529 (arguments
10530 `(#:phases
10531 (modify-phases %standard-phases
10532 (replace 'check
10533 (lambda _ (invoke "pytest" "tests.py"))))))
10534 (native-inputs
10535 `(("python-pytest" ,python-pytest)))
10536 (home-page "https://github.com/foutaise/texttable/")
10537 (synopsis "Python module for creating simple ASCII tables")
10538 (description "Texttable is a Python module for creating simple ASCII
10539 tables.")
10540 (license license:expat)))
10541
10542 (define-public python2-texttable
10543 (package-with-python2 python-texttable))
10544
10545 (define-public python-atomicwrites
10546 (package
10547 (name "python-atomicwrites")
10548 (version "1.3.0")
10549 (source (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "atomicwrites" version))
10552 (sha256
10553 (base32
10554 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10555 (build-system python-build-system)
10556 (synopsis "Atomic file writes in Python")
10557 (description "Library for atomic file writes using platform dependent tools
10558 for atomic file system operations.")
10559 (home-page "https://github.com/untitaker/python-atomicwrites")
10560 (license license:expat)))
10561
10562 (define-public python2-atomicwrites
10563 (package-with-python2 python-atomicwrites))
10564
10565 (define-public python-click-threading
10566 (package
10567 (name "python-click-threading")
10568 (version "0.4.4")
10569 (source (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "click-threading" version))
10572 (sha256
10573 (base32
10574 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10575 (build-system python-build-system)
10576 (propagated-inputs
10577 `(("python-click" ,python-click)))
10578 (synopsis "Utilities for multithreading in Click")
10579 (description "This package provides utilities for multithreading in Click
10580 applications.")
10581 (home-page "https://github.com/click-contrib/click-threading")
10582 (license license:expat)))
10583
10584 (define-public python-click-log
10585 (package
10586 (name "python-click-log")
10587 (version "0.3.2")
10588 (source (origin
10589 (method url-fetch)
10590 (uri (pypi-uri "click-log" version))
10591 (sha256
10592 (base32
10593 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10594 (build-system python-build-system)
10595 (propagated-inputs
10596 `(("python-click" ,python-click)))
10597 (synopsis "Logging for click applications")
10598 (description "This package provides a Python library for logging Click
10599 applications.")
10600 (home-page "https://github.com/click-contrib/click-log")
10601 (license license:expat)))
10602
10603 (define-public python-apipkg
10604 (package
10605 (name "python-apipkg")
10606 (version "1.5")
10607 (source (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "apipkg" version))
10610 (sha256
10611 (base32
10612 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10613 (build-system python-build-system)
10614 (native-inputs
10615 `(("python-pytest" ,python-pytest)
10616 ("python-setuptools-scm" ,python-setuptools-scm)))
10617 (synopsis "Namespace control and lazy-import mechanism")
10618 (description "With apipkg you can control the exported namespace of a Python
10619 package and greatly reduce the number of imports for your users. It is a small
10620 pure Python module that works on virtually all Python versions.")
10621 (home-page "https://github.com/pytest-dev/apipkg")
10622 (license license:expat)))
10623
10624 (define-public python-execnet
10625 (package
10626 (name "python-execnet")
10627 (version "1.4.1")
10628 (source (origin
10629 (method url-fetch)
10630 (uri (pypi-uri "execnet" version))
10631 (sha256
10632 (base32
10633 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10634 (build-system python-build-system)
10635 (arguments
10636 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10637 ;; The two test failures are caused by the lack of an `ssh` executable.
10638 ;; The test suite can be run with pytest after the 'install' phase.
10639 #:tests? #f))
10640 (native-inputs
10641 `(("python-pytest" ,python-pytest)
10642 ("python-setuptools-scm" ,python-setuptools-scm)))
10643 (propagated-inputs
10644 `(("python-apipkg" ,python-apipkg)))
10645 (synopsis "Rapid multi-Python deployment")
10646 (description "Execnet provides a share-nothing model with
10647 channel-send/receive communication for distributing execution across many
10648 Python interpreters across version, platform and network barriers. It has a
10649 minimal and fast API targeting the following uses:
10650 @enumerate
10651 @item distribute tasks to (many) local or remote CPUs
10652 @item write and deploy hybrid multi-process applications
10653 @item write scripts to administer multiple environments
10654 @end enumerate")
10655 (home-page "https://codespeak.net/execnet/")
10656 (license license:expat)))
10657
10658 (define-public python2-execnet
10659 (package-with-python2 python-execnet))
10660
10661 (define-public python-icalendar
10662 (package
10663 (name "python-icalendar")
10664 (version "4.0.5")
10665 (source (origin
10666 (method url-fetch)
10667 (uri (pypi-uri "icalendar" version))
10668 (sha256
10669 (base32
10670 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10671 (build-system python-build-system)
10672 (propagated-inputs
10673 `(("python-dateutil" ,python-dateutil)
10674 ("python-pytz" ,python-pytz)))
10675 (synopsis "Python library for parsing iCalendar files")
10676 (description "The icalendar package is a parser/generator of iCalendar
10677 files for use with Python.")
10678 (home-page "https://github.com/collective/icalendar")
10679 (license license:bsd-2)))
10680
10681 (define-public python-args
10682 (package
10683 (name "python-args")
10684 (version "0.1.0")
10685 (source (origin
10686 (method url-fetch)
10687 (uri (pypi-uri "args" version))
10688 (sha256
10689 (base32
10690 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10691 (build-system python-build-system)
10692 (home-page "https://github.com/kennethreitz/args")
10693 (synopsis "Command-line argument parser")
10694 (description
10695 "This library provides a Python module to parse command-line arguments.")
10696 (license license:bsd-3)))
10697
10698 (define-public python2-args
10699 (package-with-python2 python-args))
10700
10701 (define-public python-clint
10702 (package
10703 (name "python-clint")
10704 (version "0.5.1")
10705 (source (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "clint" version))
10708 (sha256
10709 (base32
10710 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10711 (build-system python-build-system)
10712 (arguments
10713 '(#:phases
10714 (modify-phases %standard-phases
10715 (replace 'check
10716 (lambda _ (invoke "py.test" "-v"))))))
10717 (native-inputs
10718 `(("python-pytest" ,python-pytest)))
10719 (propagated-inputs
10720 `(("python-args" ,python-args)))
10721 (home-page "https://github.com/kennethreitz/clint")
10722 (synopsis "Command-line interface tools")
10723 (description
10724 "Clint is a Python module filled with a set of tools for developing
10725 command-line applications, including tools for colored and indented
10726 output, progress bar display, and pipes.")
10727 (license license:isc)))
10728
10729 (define-public python2-clint
10730 (package-with-python2 python-clint))
10731
10732 (define-public python-rply
10733 (package
10734 (name "python-rply")
10735 (version "0.7.5")
10736 (source (origin
10737 (method url-fetch)
10738 (uri (pypi-uri "rply" version))
10739 (sha256
10740 (base32
10741 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10742 (build-system python-build-system)
10743 (propagated-inputs
10744 `(("python-appdirs" ,python-appdirs)))
10745 (home-page "https://github.com/alex/rply")
10746 (synopsis "Parser generator for Python")
10747 (description
10748 "This package provides a pure Python based parser generator, that also
10749 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10750 with a new public API, and RPython support.")
10751 (license license:bsd-3)))
10752
10753 (define-public python2-rply
10754 (package-with-python2 python-rply))
10755
10756 (define-public python-hy
10757 (package
10758 (name "python-hy")
10759 (version "0.18.0")
10760 (source (origin
10761 (method url-fetch)
10762 (uri (pypi-uri "hy" version))
10763 (sha256
10764 (base32
10765 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10766 (build-system python-build-system)
10767 (arguments
10768 '(#:phases
10769 (modify-phases %standard-phases
10770 (add-before 'install 'set-HOME
10771 (lambda _
10772 (setenv "HOME" "/tmp") #t))
10773 (replace 'check
10774 (lambda _
10775 ;; Tests require write access to HOME.
10776 (setenv "HOME" "/tmp")
10777 (invoke "nosetests"))))))
10778 (native-inputs
10779 `(("python-coverage" ,python-coverage)
10780 ("python-nose" ,python-nose)))
10781 (propagated-inputs
10782 `(("python-astor" ,python-astor)
10783 ("python-colorama" ,python-colorama)
10784 ("python-rply" ,python-rply)
10785 ("python-funcparserlib"
10786 ,python-funcparserlib)))
10787 (home-page "http://hylang.org/")
10788 (synopsis "Lisp frontend to Python")
10789 (description
10790 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10791 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10792 Python at your fingertips, in Lisp form.")
10793 (license license:expat)))
10794
10795 (define-public python2-functools32
10796 (package
10797 (name "python2-functools32")
10798 (version "3.2.3-2")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "functools32" version))
10803 (sha256
10804 (base32
10805 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10806 (build-system python-build-system)
10807 (arguments
10808 `(#:python ,python-2
10809 #:tests? #f)) ; no test target
10810 (home-page "https://github.com/MiCHiLU/python-functools32")
10811 (synopsis
10812 "Backport of the functools module from Python 3.2.3")
10813 (description
10814 "This package is a backport of the @code{functools} module from Python
10815 3.2.3 for use with older versions of Python and PyPy.")
10816 (license license:expat)))
10817
10818 (define-public python2-subprocess32
10819 (package
10820 (name "python2-subprocess32")
10821 (version "3.2.7")
10822 (source (origin
10823 (method url-fetch)
10824 (uri (pypi-uri "subprocess32" version))
10825 (sha256
10826 (base32
10827 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10828 (patches
10829 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10830 (build-system python-build-system)
10831 (arguments
10832 `(#:python ,python-2
10833 ;; The test suite fails with Python > 2.7.13:
10834 ;; import test.support
10835 ;; ImportError: No module named support
10836 #:tests? #f
10837 #:phases
10838 (modify-phases %standard-phases
10839 (add-after 'unpack 'patch-/bin/sh
10840 (lambda _
10841 (substitute* '("subprocess32.py"
10842 "test_subprocess32.py")
10843 (("/bin/sh") (which "sh")))
10844 #t)))))
10845 (home-page "https://github.com/google/python-subprocess32")
10846 (synopsis "Backport of the subprocess module from Python 3.2")
10847 (description
10848 "This is a backport of the @code{subprocess} standard library module
10849 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10850 new features. On POSIX systems it is guaranteed to be reliable when used
10851 in threaded applications. It includes timeout support from Python 3.3 but
10852 otherwise matches 3.2’s API.")
10853 (license license:psfl)))
10854
10855 (define-public python2-futures
10856 (package
10857 (name "python2-futures")
10858 (version "3.2.0")
10859 (source
10860 (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "futures" version))
10863 (sha256
10864 (base32
10865 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10866 (build-system python-build-system)
10867 (arguments
10868 `(#:python ,python-2
10869 #:phases
10870 (modify-phases %standard-phases
10871 (replace 'check
10872 (lambda _
10873 (invoke "python" "test_futures.py")
10874 #t)))))
10875 (home-page "https://github.com/agronholm/pythonfutures")
10876 (synopsis
10877 "Backport of the concurrent.futures package from Python 3.2")
10878 (description
10879 "The concurrent.futures module provides a high-level interface for
10880 asynchronously executing callables. This package backports the
10881 concurrent.futures package from Python 3.2")
10882 (license license:bsd-3)))
10883
10884 (define-public python-promise
10885 (package
10886 (name "python-promise")
10887 (version "0.4.2")
10888 (source
10889 (origin
10890 (method url-fetch)
10891 (uri (pypi-uri "promise" version))
10892 (sha256
10893 (base32
10894 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10895 (build-system python-build-system)
10896 ;; Tests wants python-futures, which is a python2 only program, and
10897 ;; can't be found by python-promise at test time.
10898 (arguments `(#:tests? #f))
10899 (home-page "https://github.com/syrusakbary/promise")
10900 (synopsis "Promises/A+ implementation for Python")
10901 (description
10902 "Promises/A+ implementation for Python")
10903 (properties `((python2-variant . ,(delay python2-promise))))
10904 (license license:expat)))
10905
10906 (define-public python2-promise
10907 (let ((promise (package-with-python2
10908 (strip-python2-variant python-promise))))
10909 (package (inherit promise)
10910 (arguments (substitute-keyword-arguments (package-arguments promise)
10911 ((#:tests? _) #t)))
10912 (native-inputs
10913 `(("python2-futures" ,python2-futures)
10914 ("python2-pytest" ,python2-pytest)
10915 ,@(package-native-inputs promise))))))
10916
10917 (define-public python-progressbar2
10918 (package
10919 (name "python-progressbar2")
10920 (version "3.51.3")
10921 (source
10922 (origin
10923 (method url-fetch)
10924 (uri (pypi-uri "progressbar2" version))
10925 (sha256
10926 (base32
10927 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10928 (build-system python-build-system)
10929 (propagated-inputs
10930 `(("python-six" ,python-six)
10931 ("python-utils" ,python-utils)))
10932 (native-inputs
10933 `(("python-flake8" ,python-flake8)
10934 ("python-freezegun" ,python-freezegun)
10935 ("python-pycodestyle" ,python-pycodestyle)
10936 ("python-pytest" ,python-pytest)
10937 ("python-pytest-cache" ,python-pytest-cache)
10938 ("python-pytest-cov" ,python-pytest-cov)
10939 ("python-pytest-flakes" ,python-pytest-flakes)
10940 ("python-pytest-pep8" ,python-pytest-pep8)
10941 ("python-sphinx" ,python-sphinx)))
10942 (home-page "https://github.com/WoLpH/python-progressbar")
10943 (synopsis "Text progress bar library for Python")
10944 (description
10945 "This package provides a Python progressbar library to provide
10946 visual (yet text based) progress to long running operations.")
10947 (license license:bsd-3)))
10948
10949 (define-public python-progressbar33
10950 (package
10951 (name "python-progressbar33")
10952 (version "2.4")
10953 (source
10954 (origin
10955 (method url-fetch)
10956 (uri (pypi-uri "progressbar33" version))
10957 (sha256
10958 (base32
10959 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10960 (build-system python-build-system)
10961 (home-page "https://github.com/germangh/python-progressbar")
10962 (synopsis "Text progress bar library for Python")
10963 (description
10964 "This package provides a text progress bar library for Python. This
10965 version only differs from the original @code{progressbar} package in that it
10966 uses relative package imports instead of absolute imports, which is necessary
10967 for the module to work under Python 3.3.")
10968 ;; Either or both of these licenses may be selected.
10969 (license (list license:lgpl2.1+ license:bsd-3))))
10970
10971 (define-public python-colorama
10972 (package
10973 (name "python-colorama")
10974 (version "0.4.4")
10975 (source
10976 (origin
10977 (method url-fetch)
10978 (uri (pypi-uri "colorama" version))
10979 (sha256
10980 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10981 (build-system python-build-system)
10982 (synopsis "Colored terminal text rendering for Python")
10983 (description "Colorama is a Python library for rendering colored terminal
10984 text.")
10985 (home-page "https://pypi.org/project/colorama/")
10986 (license license:bsd-3)))
10987
10988 (define-public python2-colorama
10989 (package-with-python2 python-colorama))
10990
10991 (define-public python-moto
10992 (package
10993 (name "python-moto")
10994 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
10995 (version "1.3.16.dev134")
10996 (source (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "moto" version))
10999 (sha256
11000 (base32
11001 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11002 (build-system python-build-system)
11003 (arguments
11004 `(#:phases (modify-phases %standard-phases
11005 (add-after 'unpack 'patch-hardcoded-executable-names
11006 (lambda _
11007 (substitute* "moto/batch/models.py"
11008 (("/bin/sh")
11009 (which "sh")))
11010 (substitute* (find-files "tests" "\\.py$")
11011 (("#!/bin/bash")
11012 (string-append "#!" (which "bash"))))
11013 #t))
11014 (replace 'check
11015 (lambda _
11016 (setenv "PYTHONPATH" (string-append "./build/lib:"
11017 (getenv "PYTHONPATH")))
11018 (invoke "pytest" "-vv" "-m" "not network"
11019 ;; These tests require Docker.
11020 "-k" "not test_terminate_job \
11021 and not test_invoke_function_from_sqs_exception"))))))
11022 (native-inputs
11023 `(("python-flask" ,python-flask)
11024 ("python-flask-cors" ,python-flask-cors)
11025 ("python-freezegun" ,python-freezegun)
11026 ("python-parameterized" ,python-parameterized)
11027 ("python-pytest" ,python-pytest)
11028 ("python-sure" ,python-sure)))
11029 (propagated-inputs
11030 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11031 ("python-boto" ,python-boto)
11032 ("python-boto3" ,python-boto3)
11033 ("python-botocore" ,python-botocore)
11034 ("python-cfn-lint" ,python-cfn-lint)
11035 ("python-cryptography" ,python-cryptography)
11036 ("python-dateutil" ,python-dateutil)
11037 ("python-docker" ,python-docker)
11038 ("python-idna" ,python-idna)
11039 ("python-jinja2" ,python-jinja2)
11040 ("python-jose" ,python-jose)
11041 ("python-jsondiff" ,python-jsondiff)
11042 ("python-mock" ,python-mock)
11043 ("python-pytz" ,python-pytz)
11044 ("python-pyyaml" ,python-pyyaml)
11045 ("python-requests" ,python-requests)
11046 ("python-responses" ,python-responses)
11047 ("python-six" ,python-six)
11048 ("python-sshpubkeys" ,python-sshpubkeys)
11049 ("python-werkzeug" ,python-werkzeug)
11050 ("python-xmltodict" ,python-xmltodict)))
11051 (home-page "https://github.com/spulec/moto")
11052 (synopsis "Mock out the boto library")
11053 (description
11054 "@code{moto} is a library designed to easily mock out the
11055 @code{boto} library.")
11056 (license license:asl2.0)))
11057
11058 (define-public python-rsa
11059 (package
11060 (name "python-rsa")
11061 (version "3.4.2")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "rsa" version))
11066 (sha256
11067 (base32
11068 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11069 (build-system python-build-system)
11070 (propagated-inputs
11071 `(("python-pyasn1" ,python-pyasn1)))
11072 (synopsis "Pure-Python RSA implementation")
11073 (description "Python-RSA is a pure-Python RSA implementation. It supports
11074 encryption and decryption, signing and verifying signatures, and key
11075 generation according to PKCS#1 version 1.5. It can be used as a Python
11076 library as well as on the command line.")
11077 (home-page "https://stuvel.eu/rsa")
11078 (license license:asl2.0)))
11079
11080 (define-public python2-rsa
11081 (package-with-python2 python-rsa))
11082
11083 (define-public python-pluggy
11084 (package
11085 (name "python-pluggy")
11086 (version "0.13.1")
11087 (source
11088 (origin
11089 (method url-fetch)
11090 (uri (pypi-uri "pluggy" version))
11091 (sha256
11092 (base32
11093 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11094 (build-system python-build-system)
11095 (native-inputs
11096 `(("python-setuptools-scm" ,python-setuptools-scm)))
11097 (synopsis "Plugin and hook calling mechanism for Python")
11098 (description "Pluggy is an extraction of the plugin manager as used by
11099 Pytest but stripped of Pytest specific details.")
11100 (home-page "https://pypi.org/project/pluggy/")
11101 (properties `((python2-variant . ,(delay python2-pluggy))))
11102 (license license:expat)))
11103
11104 (define-public python2-pluggy
11105 (let ((base (package-with-python2 (strip-python2-variant
11106 python-pluggy))))
11107 (package/inherit
11108 base
11109 (propagated-inputs
11110 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11111
11112 ;; This package requires python2-importlib-metadata, but that package
11113 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11114 ;; variant to solve the circular dependency.
11115 (define-public python2-pluggy-bootstrap
11116 (hidden-package
11117 (package/inherit
11118 python2-pluggy
11119 (name "python2-pluggy-bootstrap")
11120 (arguments
11121 `(#:tests? #f
11122 ,@(package-arguments python2-pluggy)))
11123 (propagated-inputs
11124 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11125
11126 (define-public python-tox
11127 (package
11128 (name "python-tox")
11129 (version "3.20.0")
11130 (source
11131 (origin
11132 (method url-fetch)
11133 (uri (pypi-uri "tox" version))
11134 (sha256
11135 (base32
11136 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11137 (build-system python-build-system)
11138 (arguments
11139 ;; FIXME: Tests require pytest-timeout, which itself requires
11140 ;; pytest>=2.8.0 for installation.
11141 '(#:tests? #f))
11142 (propagated-inputs
11143 `(("python-filelock" ,python-filelock)
11144 ("python-packaging" ,python-packaging)
11145 ("python-pluggy" ,python-pluggy)
11146 ("python-py" ,python-py)
11147 ("python-six" ,python-six)
11148 ("python-toml" ,python-toml)
11149 ("python-virtualenv" ,python-virtualenv)))
11150 (native-inputs
11151 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11152 ("python-pytest" ,python-pytest) ; >= 2.3.5
11153 ("python-setuptools-scm" ,python-setuptools-scm)))
11154 (home-page "https://tox.readthedocs.io")
11155 (synopsis "Virtualenv-based automation of test activities")
11156 (description "Tox is a generic virtualenv management and test command line
11157 tool. It can be used to check that a package installs correctly with
11158 different Python versions and interpreters, or run tests in each type of
11159 supported environment, or act as a frontend to continuous integration
11160 servers.")
11161 (license license:expat)))
11162
11163 (define-public python2-tox
11164 (package-with-python2 python-tox))
11165
11166 (define-public python-jmespath
11167 (package
11168 (name "python-jmespath")
11169 (version "0.9.4")
11170 (source
11171 (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "jmespath" version))
11174 (sha256
11175 (base32
11176 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11177 (build-system python-build-system)
11178 (native-inputs
11179 `(("python-nose" ,python-nose)))
11180 (synopsis "JSON Matching Expressions")
11181 (description "JMESPath (pronounced “james path”) is a Python library that
11182 allows one to declaratively specify how to extract elements from a JSON
11183 document.")
11184 (home-page "https://github.com/jmespath/jmespath.py")
11185 (license license:expat)))
11186
11187 (define-public python2-jmespath
11188 (package-with-python2 python-jmespath))
11189
11190 (define-public python-symengine
11191 (package
11192 (name "python-symengine")
11193 (version "0.6.1")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "symengine" version))
11198 (sha256
11199 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11200 (build-system python-build-system)
11201 (native-inputs
11202 `(("cmake" ,cmake)
11203 ("python-cython" ,python-cython)))
11204 (inputs
11205 `(("symengine" ,symengine)))
11206 (home-page "https://github.com/symengine/symengine.py")
11207 (synopsis "Python library providing wrappers to SymEngine")
11208 (description
11209 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11210 manipulation library.")
11211 (license license:expat)))
11212
11213 (define-public python-boto
11214 (package
11215 (name "python-boto")
11216 (version "2.49.0")
11217 (source (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "boto" version))
11220 (sha256
11221 (base32
11222 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11223 (build-system python-build-system)
11224 (arguments
11225 ;; XXX: This package is unmaintained and has problems with newer versions
11226 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11227 ;; subset of this library, so keep it around for now, but disable tests.
11228 '(#:tests? #f))
11229 (propagated-inputs
11230 `(("python-paramiko" ,python-paramiko)
11231 ("python-requests" ,python-requests)))
11232 (home-page "https://github.com/boto/boto")
11233 (synopsis "Python interfaces for Amazon Web Services")
11234 (description
11235 "This package provides various facilities for interacting with Amazon
11236 Web Services through Python.
11237
11238 This software is unmaintained, and new projects should use @code{boto3} instead.")
11239 (license license:expat)))
11240
11241 (define-public python-botocore
11242 ;; Note: When updating botocore, also make sure that boto3 and awscli
11243 ;; are compatible.
11244 (package
11245 (name "python-botocore")
11246 (version "1.19.22")
11247 (source
11248 (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "botocore" version))
11251 (sha256
11252 (base32
11253 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11254 (build-system python-build-system)
11255 (arguments
11256 ;; FIXME: Many tests are failing.
11257 '(#:tests? #f))
11258 (propagated-inputs
11259 `(("python-dateutil" ,python-dateutil)
11260 ("python-jmespath" ,python-jmespath)
11261 ("python-urllib3" ,python-urllib3)))
11262 (home-page "https://github.com/boto/botocore")
11263 (synopsis "Low-level interface to AWS")
11264 (description "Botocore is a Python library that provides a low-level
11265 interface to the Amazon Web Services (AWS) API.")
11266 (license license:asl2.0)))
11267
11268 (define-public python2-botocore
11269 (package-with-python2 python-botocore))
11270
11271 (define-public python-boto3
11272 (package
11273 (name "python-boto3")
11274 (version "1.16.22")
11275 (home-page "https://github.com/boto/boto3")
11276 (source (origin
11277 (method git-fetch)
11278 (uri (git-reference (url home-page) (commit version)))
11279 (file-name (git-file-name name version))
11280 (sha256
11281 (base32
11282 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11283 (arguments
11284 `(#:phases
11285 (modify-phases %standard-phases
11286 (add-after 'unpack 'delete-network-tests
11287 ;; Deleting integration tests because they are trying to connect to AWS.
11288 (lambda _
11289 (delete-file-recursively "tests/integration")
11290 #t)))))
11291 (build-system python-build-system)
11292 (native-inputs
11293 `(("python-nose" ,python-nose)
11294 ("python-mock" ,python-mock)))
11295 (propagated-inputs
11296 `(("python-botocore" ,python-botocore)
11297 ("python-jmespath" ,python-jmespath)
11298 ("python-s3transfer" ,python-s3transfer)))
11299 (synopsis "AWS SDK for Python")
11300 (description
11301 "Boto3 is a Python library for writing programs that interact with
11302 @acronym{AWS,Amazon Web Services}.")
11303 (license license:asl2.0)))
11304
11305 (define-public python-pyfiglet
11306 (package
11307 (name "python-pyfiglet")
11308 (version "0.8.post1")
11309 (source
11310 (origin
11311 (method url-fetch)
11312 (uri (pypi-uri "pyfiglet" version))
11313 (sha256
11314 (base32
11315 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11316 (build-system python-build-system)
11317 (home-page "https://github.com/pwaller/pyfiglet")
11318 (synopsis "Draw ASCII art big letters in Python")
11319 (description "This module lets you draw large letter from ordinary characters
11320 in pure Python.")
11321 (license license:expat)))
11322
11323 (define-public python-xdo
11324 (package
11325 (name "python-xdo")
11326 (version "0.3")
11327 (source (origin
11328 (method url-fetch)
11329 (uri (string-append
11330 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11331 "python-xdo_" version ".orig.tar.gz"))
11332 (sha256
11333 (base32
11334 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11335 (build-system python-build-system)
11336 (arguments
11337 '(#:phases
11338 (modify-phases %standard-phases
11339 (add-before 'install 'patch-libxdo-path
11340 ;; Hardcode the path of dynamically loaded libxdo library.
11341 (lambda* (#:key inputs #:allow-other-keys)
11342 (let ((libxdo (string-append
11343 (assoc-ref inputs "xdotool")
11344 "/lib/libxdo.so")))
11345 (substitute* "xdo/_xdo.py"
11346 (("find_library\\(\"xdo\"\\)")
11347 (simple-format #f "\"~a\"" libxdo)))
11348 #t))))
11349 #:tests? #f)) ; no tests provided
11350 (propagated-inputs
11351 `(("python-six" ,python-six)))
11352 (inputs
11353 `(("xdotool" ,xdotool)
11354 ("libX11" ,libx11)))
11355 (home-page "https://tracker.debian.org/pkg/python-xdo")
11356 (synopsis "Python library for simulating X11 keyboard/mouse input")
11357 (description "Provides bindings to libxdo for manipulating X11 via simulated
11358 input. (Note that this is mostly a legacy library; you may wish to look at
11359 python-xdo for newer bindings.)")
11360 (license license:bsd-3)))
11361
11362 (define-public python2-xdo
11363 (package-with-python2 python-xdo))
11364
11365 (define-public python-mako
11366 (package
11367 (name "python-mako")
11368 (version "1.1.3")
11369 (source
11370 (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "Mako" version))
11373 (sha256
11374 (base32
11375 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11376 (build-system python-build-system)
11377 (arguments
11378 `(#:phases (modify-phases %standard-phases
11379 (replace 'check
11380 (lambda* (#:key tests? #:allow-other-keys)
11381 (if tests?
11382 (invoke "nosetests" "-v")
11383 (format #t "test suite not run~%"))
11384 #t)))))
11385 (propagated-inputs
11386 `(("python-markupsafe" ,python-markupsafe)))
11387 (native-inputs
11388 `(("python-mock" ,python-mock)
11389 ("python-nose" ,python-nose)))
11390 (home-page "https://www.makotemplates.org/")
11391 (synopsis "Templating language for Python")
11392 (description "Mako is a templating language for Python that compiles
11393 templates into Python modules.")
11394 (license license:expat)))
11395
11396 (define-public python2-mako
11397 (package-with-python2 python-mako))
11398
11399 (define-public python-waitress
11400 (package
11401 (name "python-waitress")
11402 (version "1.1.0")
11403 (source
11404 (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "waitress" version))
11407 (patches (search-patches "python-waitress-fix-tests.patch"))
11408 (sha256
11409 (base32
11410 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11411 (build-system python-build-system)
11412 (home-page "https://github.com/Pylons/waitress")
11413 (synopsis "Waitress WSGI server")
11414 (description "Waitress is meant to be a production-quality pure-Python WSGI
11415 server with very acceptable performance.")
11416 (license license:zpl2.1)))
11417
11418 (define-public python2-waitress
11419 (package-with-python2 python-waitress))
11420
11421 (define-public python-whichcraft
11422 (package
11423 (name "python-whichcraft")
11424 (version "0.6.1")
11425 (source
11426 (origin
11427 (method url-fetch)
11428 (uri (pypi-uri "whichcraft" version))
11429 (sha256
11430 (base32
11431 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11432 (build-system python-build-system)
11433 (native-inputs
11434 `(("python-pytest" ,python-pytest)))
11435 (home-page "https://github.com/pydanny/whichcraft")
11436 (synopsis "Cross-platform cross-python shutil.which functionality")
11437 (description
11438 "This package provides a shim of the shutil.which function that's
11439 designed to work across multiple versions of Python.")
11440 (license license:bsd-3)))
11441
11442 (define-public python-cookiecutter
11443 (package
11444 (name "python-cookiecutter")
11445 (version "1.7.2")
11446 (source
11447 (origin
11448 (method url-fetch)
11449 (uri (pypi-uri "cookiecutter" version))
11450 (sha256
11451 (base32
11452 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11453 (build-system python-build-system)
11454 (native-inputs
11455 `(("python-freezegun" ,python-freezegun)
11456 ("python-pytest" ,python-pytest)
11457 ("python-pytest-catchlog" ,python-pytest-catchlog)
11458 ("python-pytest-cov" ,python-pytest-cov)
11459 ("python-pytest-mock" ,python-pytest-mock)))
11460 (propagated-inputs
11461 `(("python-binaryornot" ,python-binaryornot)
11462 ("python-click" ,python-click)
11463 ("python-future" ,python-future)
11464 ("python-jinja2" ,python-jinja2)
11465 ("python-jinja2-time" ,python-jinja2-time)
11466 ("python-poyo" ,python-poyo)
11467 ("python-requests" ,python-requests)
11468 ("python-slugify" ,python-slugify)
11469 ("python-text-unidecode" ,python-text-unidecode)
11470 ("python-whichcraft" ,python-whichcraft)))
11471 (home-page "https://github.com/cookiecutter/cookiecutter")
11472 (synopsis
11473 "Command-line utility that creates projects from project templates")
11474 (description
11475 "This package provides a command-line utility that creates projects from
11476 project templates, e.g. creating a Python package project from a Python package
11477 project template.")
11478 (license license:bsd-3)))
11479
11480 (define-public python-pyquery
11481 (package
11482 (name "python-pyquery")
11483 (version "1.2.17")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "pyquery" version))
11488 (sha256
11489 (base32
11490 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11491 (build-system python-build-system)
11492 (native-inputs
11493 `(("python-webob" ,python-webob)
11494 ("python-webtest" ,python-webtest)))
11495 (propagated-inputs
11496 `(("python-lxml" ,python-lxml)
11497 ("python-cssselect" ,python-cssselect)))
11498 (home-page "https://github.com/gawel/pyquery")
11499 (synopsis "Make jQuery-like queries on xml documents")
11500 (description "pyquery allows you to make jQuery queries on xml documents.
11501 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11502 fast xml and html manipulation.")
11503 (license license:bsd-3)))
11504
11505 (define-public python-anyjson
11506 (package
11507 (name "python-anyjson")
11508 (version "0.3.3")
11509 (source
11510 (origin
11511 (method url-fetch)
11512 (uri (pypi-uri "anyjson" version))
11513 (sha256
11514 (base32
11515 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11516 (build-system python-build-system)
11517 (arguments
11518 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11519 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11520 ;; whatever) so this transformation needs to be done before the tests
11521 ;; can be run. Maybe we could add a build step to transform beforehand
11522 ;; but it could be annoying/difficult.
11523 ;; We can enable tests for the Python 2 version, though, and do below.
11524 #:tests? #f))
11525 (home-page "https://bitbucket.org/runeh/anyjson/")
11526 (synopsis
11527 "Wraps best available JSON implementation in a common interface")
11528 (description
11529 "Anyjson loads whichever is the fastest JSON module installed
11530 and provides a uniform API regardless of which JSON implementation is used.")
11531 (license license:bsd-3)
11532 (properties `((python2-variant . ,(delay python2-anyjson))))))
11533
11534 (define-public python2-anyjson
11535 (let ((anyjson (package-with-python2
11536 (strip-python2-variant python-anyjson))))
11537 (package
11538 (inherit anyjson)
11539 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11540 #:tests? #t
11541 ,@(package-arguments anyjson)))
11542 (native-inputs `(("python2-nose" ,python2-nose))))))
11543
11544 (define-public python-amqp
11545 (package
11546 (name "python-amqp")
11547 (version "2.3.2")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "amqp" version))
11552 (sha256
11553 (base32
11554 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11555 (build-system python-build-system)
11556 (native-inputs
11557 `(("python-case" ,python-case)
11558 ("python-pytest-sugar" ,python-pytest-sugar)
11559 ("python-mock" ,python-mock)))
11560 (propagated-inputs
11561 `(("python-vine" ,python-vine)))
11562 (home-page "https://github.com/celery/py-amqp")
11563 (synopsis
11564 "Low-level AMQP client for Python (fork of amqplib)")
11565 (description
11566 "This is a fork of amqplib which was originally written by Barry Pederson.
11567 It is maintained by the Celery project, and used by kombu as a pure python
11568 alternative when librabbitmq is not available.")
11569 (license license:lgpl2.1+)
11570 (properties `((python2-variant . ,(delay python2-amqp))))))
11571
11572 (define-public python2-amqp
11573 (let ((amqp (package-with-python2
11574 (strip-python2-variant python-amqp))))
11575 (package
11576 (inherit amqp)
11577 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11578 ;; unmaintained. Weirdly, does not do this on the python 3
11579 ;; version?
11580 #:tests? #f
11581 ,@(package-arguments amqp))))))
11582
11583 (define-public python-txamqp
11584 (package
11585 (name "python-txamqp")
11586 (version "0.8.2")
11587 (source
11588 (origin
11589 (method url-fetch)
11590 (uri (pypi-uri "txAMQP" version))
11591 (sha256
11592 (base32
11593 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11594 (build-system python-build-system)
11595 (propagated-inputs
11596 `(("python-six" ,python-six)
11597 ("python-twisted" ,python-twisted)))
11598 (home-page "https://github.com/txamqp/txamqp")
11599 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11600 (description
11601 "This package provides a Python library for communicating with AMQP peers
11602 and brokers using the asynchronous networking framework Twisted. It contains
11603 all the necessary code to connect, send and receive messages to/from an
11604 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11605 also includes support for using Thrift RPC over AMQP in Twisted
11606 applications.")
11607 (license license:asl2.0)))
11608
11609 (define-public python2-txamqp
11610 (package-with-python2 python-txamqp))
11611
11612 (define-public python-kombu
11613 (package
11614 (name "python-kombu")
11615 (version "4.2.2")
11616 (source
11617 (origin
11618 (method url-fetch)
11619 (uri (pypi-uri "kombu" version))
11620 (sha256
11621 (base32
11622 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11623 (build-system python-build-system)
11624 (native-inputs
11625 `(("python-mock" ,python-mock)
11626 ("python-case" ,python-case)
11627 ("python-pyro4" ,python-pyro4)
11628 ("python-pytest-sugar" ,python-pytest-sugar)
11629 ("python-pytz" ,python-pytz)))
11630 (propagated-inputs
11631 `(("python-anyjson" ,python-anyjson)
11632 ("python-amqp" ,python-amqp)
11633 ("python-redis" ,python-redis)))
11634 (home-page "https://kombu.readthedocs.io")
11635 (synopsis "Message passing library for Python")
11636 (description "The aim of Kombu is to make messaging in Python as easy as
11637 possible by providing an idiomatic high-level interface for the AMQ protocol,
11638 and also provide proven and tested solutions to common messaging problems.
11639 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11640 message orientation, queuing, routing, reliability and security, for which the
11641 RabbitMQ messaging server is the most popular implementation.")
11642 (license license:bsd-3)
11643 (properties `((python2-variant . ,(delay python2-kombu))))))
11644
11645 (define-public python2-kombu
11646 (let ((kombu (package-with-python2
11647 (strip-python2-variant python-kombu))))
11648 (package
11649 (inherit kombu)
11650 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11651 ;; It works fine on the python3 variant.
11652 #:tests? #f
11653 ,@(package-arguments kombu)))
11654 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11655 ,@(package-native-inputs kombu))))))
11656
11657 (define-public python-billiard
11658 (package
11659 (name "python-billiard")
11660 (version "3.5.0.5")
11661 (source
11662 (origin
11663 (method url-fetch)
11664 (uri (pypi-uri "billiard" version))
11665 (sha256
11666 (base32
11667 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11668 (build-system python-build-system)
11669 (native-inputs
11670 `(("python-case" ,python-case)
11671 ("python-pytest" ,python-pytest)))
11672 (home-page "https://github.com/celery/billiard")
11673 (synopsis
11674 "Python multiprocessing fork with improvements and bugfixes")
11675 (description
11676 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11677 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11678 pyprocessing package. This standalone variant is intended to be compatible with
11679 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11680 (license license:bsd-3)
11681 (properties `((python2-variant . ,(delay python2-billiard))))))
11682
11683 (define-public python2-billiard
11684 (let ((billiard (package-with-python2
11685 (strip-python2-variant python-billiard))))
11686 (package
11687 (inherit billiard)
11688 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11689 ("python2-mock" ,python2-mock)
11690 ,@(package-native-inputs billiard))))))
11691
11692 (define-public python-celery
11693 (package
11694 (name "python-celery")
11695 (version "4.2.1")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "celery" version))
11700 (sha256
11701 (base32
11702 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11703 (build-system python-build-system)
11704 (arguments
11705 '(;; TODO The tests fail with Python 3.7
11706 ;; https://github.com/celery/celery/issues/4849
11707 #:tests? #f
11708 #:phases
11709 (modify-phases %standard-phases
11710 (add-after 'unpack 'patch-requirements
11711 (lambda _
11712 (substitute* "requirements/test.txt"
11713 (("pytest>=3\\.0,<3\\.3")
11714 "pytest>=3.0"))
11715 #t)))))
11716 (native-inputs
11717 `(("python-case" ,python-case)
11718 ("python-pytest" ,python-pytest)))
11719 (propagated-inputs
11720 `(("python-pytz" ,python-pytz)
11721 ("python-billiard" ,python-billiard)
11722 ("python-kombu" ,python-kombu)))
11723 (home-page "https://celeryproject.org")
11724 (synopsis "Distributed Task Queue")
11725 (description "Celery is an asynchronous task queue/job queue based on
11726 distributed message passing. It is focused on real-time operation, but
11727 supports scheduling as well. The execution units, called tasks, are executed
11728 concurrently on a single or more worker servers using multiprocessing,
11729 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11730 synchronously (wait until ready).")
11731 (license license:bsd-3)
11732 (properties `((python2-variant . ,(delay python2-celery))))))
11733
11734 (define-public python2-celery
11735 (let ((celery (package-with-python2
11736 (strip-python2-variant python-celery))))
11737 (package
11738 (inherit celery)
11739 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11740 ("python2-mock" ,python2-mock)
11741 ,@(package-native-inputs celery))))))
11742
11743 (define-public python-translitcodec
11744 (package
11745 (name "python-translitcodec")
11746 (version "0.4.0")
11747 (source
11748 (origin
11749 (method url-fetch)
11750 (uri (pypi-uri "translitcodec" version))
11751 (sha256
11752 (base32
11753 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11754 (build-system python-build-system)
11755 (arguments
11756 `(#:tests? #f)) ; no tests provided
11757 (home-page
11758 "https://github.com/claudep/translitcodec")
11759 (synopsis
11760 "Unicode to 8-bit charset transliteration codec")
11761 (description
11762 "This package contains codecs for transliterating ISO 10646 texts into
11763 best-effort representations using smaller coded character sets (ASCII,
11764 ISO 8859, etc.).")
11765 (license license:expat)))
11766
11767 (define-public python2-translitcodec
11768 (package-with-python2 python-translitcodec))
11769
11770 (define-public python-editor
11771 (package
11772 (name "python-editor")
11773 (version "1.0.4")
11774 (source
11775 (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "python-editor" version))
11778 (sha256
11779 (base32
11780 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11781 (build-system python-build-system)
11782 (arguments
11783 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11784 (home-page "https://github.com/fmoo/python-editor")
11785 (synopsis "Programmatically open an editor, capture the result")
11786 (description
11787 "python-editor is a library that provides the editor module for
11788 programmatically interfacing with your system's $EDITOR.")
11789 (license license:asl2.0)))
11790
11791 (define-public python2-editor
11792 (package-with-python2 python-editor))
11793
11794 (define-public python-vobject
11795 (package
11796 (name "python-vobject")
11797 (version "0.9.6.1")
11798 (source (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "vobject" version))
11801 (sha256
11802 (base32
11803 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11804 (build-system python-build-system)
11805 (arguments
11806 '(;; The test suite relies on some non-portable Windows interfaces.
11807 #:tests? #f))
11808 (propagated-inputs
11809 `(("python-dateutil" ,python-dateutil)
11810 ("python-pyicu" ,python-pyicu)))
11811 (synopsis "Parse and generate vCard and vCalendar files")
11812 (description "Vobject is intended to be a full featured Python package for
11813 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11814 are supported and well tested. vCard 3.0 files are supported, and all data
11815 should be imported, but only a few components are understood in a sophisticated
11816 way.")
11817 (home-page "https://eventable.github.io/vobject/")
11818 (license license:asl2.0)))
11819
11820 (define-public python2-vobject
11821 (package-with-python2 python-vobject))
11822
11823 (define-public python-munkres
11824 (package
11825 (name "python-munkres")
11826 (version "1.0.8")
11827 (source (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "munkres" version))
11830 (sha256
11831 (base32
11832 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11833 (build-system python-build-system)
11834 (arguments
11835 '(#:tests? #f)) ; no test suite
11836 (home-page "https://software.clapper.org/munkres/")
11837 (synopsis "Implementation of the Munkres algorithm")
11838 (description "The Munkres module provides an implementation of the Munkres
11839 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11840 useful for solving the Assignment Problem.")
11841 (license license:bsd-3)))
11842
11843 (define-public python2-munkres
11844 (package-with-python2 python-munkres))
11845
11846 (define-public python-whoosh
11847 (package
11848 (name "python-whoosh")
11849 (version "2.7.4")
11850 (source
11851 (origin
11852 (method url-fetch)
11853 (uri (pypi-uri "Whoosh" version))
11854 (sha256
11855 (base32
11856 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11857 (build-system python-build-system)
11858 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11859 (native-inputs
11860 `(("python-pytest" ,python-pytest)))
11861 (home-page "https://bitbucket.org/mchaput/whoosh")
11862 (synopsis "Full text indexing, search, and spell checking library")
11863 (description
11864 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11865 checking library.")
11866 (license license:bsd-2)))
11867
11868 (define-public python2-whoosh
11869 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11870 (package (inherit whoosh)
11871 (propagated-inputs
11872 `(("python2-backport-ssl-match-hostname"
11873 ,python2-backport-ssl-match-hostname)
11874 ,@(package-propagated-inputs whoosh))))))
11875
11876 (define-public python-pathlib
11877 (package
11878 (name "python-pathlib")
11879 (version "1.0.1")
11880 (source (origin
11881 (method url-fetch)
11882 (uri (pypi-uri "pathlib" version))
11883 (sha256
11884 (base32
11885 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11886 (build-system python-build-system)
11887 ;; The tests depend on the internal "test" module, which does not provide
11888 ;; a stable interface.
11889 (arguments `(#:tests? #f))
11890 (home-page "https://pathlib.readthedocs.org/")
11891 (synopsis "Object-oriented file system paths")
11892 (description "Pathlib offers a set of classes to handle file system paths.
11893 It offers the following advantages over using string objects:
11894
11895 @enumerate
11896 @item No more cumbersome use of os and os.path functions. Everything can
11897 be done easily through operators, attribute accesses, and method calls.
11898 @item Embodies the semantics of different path types. For example,
11899 comparing Windows paths ignores casing.
11900 @item Well-defined semantics, eliminating any inconsistencies or
11901 ambiguities (forward vs. backward slashes, etc.).
11902 @end enumerate
11903
11904 Note: In Python 3.4, pathlib is now part of the standard library. For other
11905 Python versions please consider python-pathlib2 instead, which tracks the
11906 standard library module. This module (python-pathlib) isn't maintained
11907 anymore.")
11908 (license license:expat)))
11909
11910 (define-public python2-pathlib
11911 (package-with-python2 python-pathlib))
11912
11913 (define-public python2-pathlib2
11914 (package
11915 (name "python2-pathlib2")
11916 (version "2.3.5")
11917 (source (origin
11918 (method url-fetch)
11919 (uri (pypi-uri "pathlib2" version))
11920 (sha256
11921 (base32
11922 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11923 (build-system python-build-system)
11924 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11925 ;; version is 3.4 which already includes this package as part of the
11926 ;; standard library.
11927 (arguments
11928 `(#:python ,python-2))
11929 (propagated-inputs
11930 `(("python2-scandir" ,python2-scandir)
11931 ("python2-six" ,python2-six)))
11932 (home-page "https://pypi.org/project/pathlib2/")
11933 (synopsis "Object-oriented file system paths - backport of standard
11934 pathlib module")
11935 (description "The goal of pathlib2 is to provide a backport of standard
11936 pathlib module which tracks the standard library module, so all the newest
11937 features of the standard pathlib can be used also on older Python versions.
11938
11939 Pathlib offers a set of classes to handle file system paths. It offers the
11940 following advantages over using string objects:
11941
11942 @enumerate
11943 @item No more cumbersome use of os and os.path functions. Everything can
11944 be done easily through operators, attribute accesses, and method calls.
11945 @item Embodies the semantics of different path types. For example,
11946 comparing Windows paths ignores casing.
11947 @item Well-defined semantics, eliminating any inconsistencies or
11948 ambiguities (forward vs. backward slashes, etc.).
11949 @end enumerate")
11950 (license license:expat)))
11951
11952 (define-public python2-pathlib2-bootstrap
11953 (hidden-package
11954 (package
11955 (inherit python2-pathlib2)
11956 (name "python2-pathlib2-bootstrap")
11957 (propagated-inputs
11958 `(("python2-scandir" ,python2-scandir)
11959 ("python2-six" ,python2-six-bootstrap))))))
11960
11961 (define-public python-jellyfish
11962 (package
11963 (name "python-jellyfish")
11964 (version "0.5.6")
11965 (source (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "jellyfish" version))
11968 (sha256
11969 (base32
11970 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11971 (build-system python-build-system)
11972 (native-inputs
11973 `(("python-pytest" ,python-pytest)))
11974 (home-page "https://github.com/jamesturk/jellyfish")
11975 (synopsis "Approximate and phonetic matching of strings")
11976 (description "Jellyfish uses a variety of string comparison and phonetic
11977 encoding algorithms to do fuzzy string matching.")
11978 (license license:bsd-2)
11979 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11980
11981 (define-public python2-jellyfish
11982 (let ((jellyfish (package-with-python2
11983 (strip-python2-variant python-jellyfish))))
11984 (package (inherit jellyfish)
11985 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11986 ,@(package-native-inputs jellyfish))))))
11987
11988 (define-public python2-unicodecsv
11989 (package
11990 (name "python2-unicodecsv")
11991 (version "0.14.1")
11992 (source (origin
11993 (method git-fetch)
11994 ;; The test suite is not included in the PyPi release.
11995 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11996 (uri (git-reference
11997 (url "https://github.com/jdunck/python-unicodecsv")
11998 (commit version)))
11999 (file-name (git-file-name name version))
12000 (sha256
12001 (base32
12002 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12003 (build-system python-build-system)
12004 (arguments
12005 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12006 #:python ,python-2))
12007 (native-inputs
12008 `(("python2-unittest2" ,python2-unittest2)))
12009 (home-page "https://github.com/jdunck/python-unicodecsv")
12010 (synopsis "Unicode CSV module for Python 2")
12011 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12012 module, adding support for Unicode strings.")
12013 (license license:bsd-2)))
12014
12015 (define-public python-rarfile
12016 (package
12017 (name "python-rarfile")
12018 (version "2.8")
12019 (source (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "rarfile" version))
12022 (sha256
12023 (base32
12024 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12025 (build-system python-build-system)
12026 (arguments
12027 '(#:phases
12028 (modify-phases %standard-phases
12029 (replace 'check
12030 ;; Many tests fail, but the installation proceeds.
12031 (lambda _ (invoke "make" "-C" "test" "test"))))))
12032 (native-inputs
12033 `(("which" ,which))) ; required for tests
12034 (propagated-inputs
12035 `(("libarchive" ,libarchive)))
12036 (home-page "https://github.com/markokr/rarfile")
12037 (synopsis "RAR archive reader for Python")
12038 (description "This is Python module for RAR archive reading. The interface
12039 is made as zipfile like as possible.")
12040 (license license:isc)))
12041
12042 (define-public python2-rarfile
12043 (package-with-python2 python-rarfile))
12044
12045 (define-public python-magic
12046 (package
12047 (name "python-magic")
12048 (version "0.4.15")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "python-magic" version))
12053 (sha256
12054 (base32
12055 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12056 (file-name (string-append name "-" version "-checkout"))))
12057 (build-system python-build-system)
12058 (arguments
12059 ;; The tests are unreliable, so don't run them. The tests fail
12060 ;; under Python3 because they were written for Python2 and
12061 ;; contain import statements that do not work in Python3. One of
12062 ;; the tests fails under Python2 because its assertions are
12063 ;; overly stringent; it relies on comparing output strings which
12064 ;; are brittle and can change depending on the version of
12065 ;; libmagic being used and the system on which the test is
12066 ;; running. In my case, under GuixSD 0.10.0, only one test
12067 ;; failed, and it seems to have failed only because the version
12068 ;; of libmagic that is packaged in Guix outputs a slightly
12069 ;; different (but not wrong) string than the one that the test
12070 ;; expected.
12071 '(#:tests? #f
12072 #:phases (modify-phases %standard-phases
12073 ;; Replace a specific method call with a hard-coded
12074 ;; path to the necessary libmagic.so file in the
12075 ;; store. If we don't do this, then the method call
12076 ;; will fail to find the libmagic.so file, which in
12077 ;; turn will cause any application using
12078 ;; python-magic to fail.
12079 (add-before 'build 'hard-code-path-to-libmagic
12080 (lambda* (#:key inputs #:allow-other-keys)
12081 (let ((file (assoc-ref inputs "file")))
12082 (substitute* "magic.py"
12083 (("ctypes.util.find_library\\('magic'\\)")
12084 (string-append "'" file "/lib/libmagic.so'")))
12085 #t)))
12086 (add-before 'install 'disable-egg-compression
12087 (lambda _
12088 (let ((port (open-file "setup.cfg" "a")))
12089 (display "\n[easy_install]\nzip_ok = 0\n"
12090 port)
12091 (close-port port)
12092 #t))))))
12093 (inputs
12094 ;; python-magic needs to be able to find libmagic.so.
12095 `(("file" ,file)))
12096 (home-page
12097 "https://github.com/ahupp/python-magic")
12098 (synopsis
12099 "File type identification using libmagic")
12100 (description
12101 "This module uses ctypes to access the libmagic file type
12102 identification library. It makes use of the local magic database and
12103 supports both textual and MIME-type output. Note that this module and
12104 the python-file module both provide a \"magic.py\" file; these two
12105 modules, which are different and were developed separately, both serve
12106 the same purpose: to provide Python bindings for libmagic.")
12107 (license license:expat)))
12108
12109 (define-public python2-magic
12110 (package-with-python2 python-magic))
12111
12112 (define-public python2-s3cmd
12113 (package
12114 (name "python2-s3cmd")
12115 (version "1.6.1")
12116 (source
12117 (origin
12118 (method url-fetch)
12119 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12120 "s3cmd-" version ".tar.gz"))
12121 (sha256
12122 (base32
12123 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12124 (build-system python-build-system)
12125 (arguments
12126 ;; s3cmd is written for python2 only and contains no tests.
12127 `(#:python ,python-2
12128 #:tests? #f))
12129 (propagated-inputs
12130 `(("python2-dateutil" ,python2-dateutil)
12131 ;; The python-file package also provides a magic.py module.
12132 ;; This is an unfortunate state of affairs; however, s3cmd
12133 ;; fails to install if it cannot find specifically the
12134 ;; python-magic package. Thus we include it, instead of using
12135 ;; python-file. Ironically, s3cmd sometimes works better
12136 ;; without libmagic bindings at all:
12137 ;; https://github.com/s3tools/s3cmd/issues/198
12138 ("python2-magic" ,python2-magic)))
12139 (home-page "https://s3tools.org/s3cmd")
12140 (synopsis "Command line tool for S3-compatible storage services")
12141 (description
12142 "S3cmd is a command line tool for uploading, retrieving and managing data
12143 in storage services that are compatible with the Amazon Simple Storage
12144 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12145 GnuPG encryption, and more. It also supports management of Amazon's
12146 CloudFront content delivery network.")
12147 (license license:gpl2+)))
12148
12149 (define-public python-pkgconfig
12150 (package
12151 (name "python-pkgconfig")
12152 (version "1.3.1")
12153 (source
12154 (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "pkgconfig" version))
12157 (sha256
12158 (base32
12159 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12160 (build-system python-build-system)
12161 (native-inputs
12162 `(("python-nose" ,python-nose)))
12163 (inputs
12164 `(("pkg-config" ,pkg-config)))
12165 (arguments
12166 `(#:phases
12167 (modify-phases %standard-phases
12168 (add-before 'build 'patch
12169 ;; Hard-code the path to pkg-config.
12170 (lambda _
12171 (substitute* "pkgconfig/pkgconfig.py"
12172 (("cmd = 'pkg-config")
12173 (string-append "cmd = '" (which "pkg-config"))))
12174 #t))
12175 (replace 'check
12176 (lambda _
12177 (invoke "nosetests" "test.py"))))))
12178 (home-page "https://github.com/matze/pkgconfig")
12179 (synopsis "Python interface for pkg-config")
12180 (description "This module provides a Python interface to pkg-config. It
12181 can be used to find all pkg-config packages, check if a package exists,
12182 check if a package meets certain version requirements, query CFLAGS and
12183 LDFLAGS and parse the output to build extensions with setup.py.")
12184 (license license:expat)))
12185
12186 (define-public python2-pkgconfig
12187 (package-with-python2 python-pkgconfig))
12188
12189 (define-public python-bz2file
12190 (package
12191 (name "python-bz2file")
12192 (version "0.98")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "bz2file" version))
12197 (sha256
12198 (base32
12199 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12200 (build-system python-build-system)
12201 (arguments
12202 `(#:tests? #f)) ; Tests use deprecated python modules.
12203 (home-page "https://github.com/nvawda/bz2file")
12204 (synopsis "Read and write bzip2-compressed files")
12205 (description
12206 "Bz2file is a Python library for reading and writing bzip2-compressed
12207 files. It contains a drop-in replacement for the I/O interface in the
12208 standard library's @code{bz2} module, including features from the latest
12209 development version of CPython that are not available in older releases.")
12210 (license license:asl2.0)))
12211
12212 (define-public python2-bz2file
12213 (package-with-python2 python-bz2file))
12214
12215 (define-public python-future
12216 (package
12217 (name "python-future")
12218 (version "0.17.1")
12219 (source
12220 (origin
12221 (method url-fetch)
12222 (uri (pypi-uri "future" version))
12223 (sha256
12224 (base32
12225 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12226 (build-system python-build-system)
12227 ;; Many tests connect to the network or are otherwise flawed.
12228 ;; https://github.com/PythonCharmers/python-future/issues/210
12229 (arguments
12230 `(#:tests? #f))
12231 (home-page "https://python-future.org")
12232 (synopsis "Single-source support for Python 3 and 2")
12233 (description
12234 "@code{python-future} is the missing compatibility layer between Python 2 and
12235 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12236 to support both Python 2 and Python 3 with minimal overhead.")
12237 (license license:expat)))
12238
12239 (define-public python2-future
12240 (package-with-python2 python-future))
12241
12242 (define-public python-cysignals
12243 (package
12244 (name "python-cysignals")
12245 (version "1.9.0")
12246 (source
12247 (origin
12248 (method url-fetch)
12249 (uri (pypi-uri "cysignals" version))
12250 (sha256
12251 (base32
12252 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12253 (build-system python-build-system)
12254 (native-inputs
12255 `(("python-cython" ,python-cython)
12256 ("python-sphinx" ,python-sphinx)))
12257 (inputs
12258 `(("pari-gp" ,pari-gp)))
12259 (arguments
12260 `(#:modules ((guix build python-build-system)
12261 ((guix build gnu-build-system) #:prefix gnu:)
12262 (guix build utils))
12263 ;; FIXME: Tests are executed after installation and currently fail
12264 ;; when not installing into standard locations; the author is working
12265 ;; on a fix.
12266 #:tests? #f
12267 #:phases
12268 (modify-phases %standard-phases
12269 (add-before
12270 'build 'configure
12271 (assoc-ref gnu:%standard-phases 'configure)))))
12272 (home-page
12273 "https://github.com/sagemath/cysignals")
12274 (synopsis
12275 "Handling of interrupts and signals for Cython")
12276 (description
12277 "The cysignals package provides mechanisms to handle interrupts (and
12278 other signals and errors) in Cython code, using two related approaches,
12279 for mixed Cython/Python code or external C libraries and pure Cython code,
12280 respectively.")
12281 (license license:lgpl3+)))
12282
12283 (define-public python2-cysignals
12284 (package-with-python2 python-cysignals))
12285
12286 (define-public python2-shedskin
12287 (package
12288 (name "python2-shedskin")
12289 (version "0.9.4")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (string-append "https://github.com/shedskin/shedskin/"
12294 "releases/download/v" version
12295 "/shedskin-" version ".tgz"))
12296 (sha256
12297 (base32
12298 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12299 (build-system python-build-system)
12300 (arguments
12301 `(#:python ,python-2
12302 #:phases (modify-phases %standard-phases
12303 (add-after 'unpack 'fix-resulting-include-libs
12304 (lambda* (#:key inputs #:allow-other-keys)
12305 (let ((libgc (assoc-ref inputs "libgc"))
12306 (pcre (assoc-ref inputs "pcre")))
12307 (substitute* "shedskin/makefile.py"
12308 (("variable == 'CCFLAGS':[ ]*")
12309 (string-append "variable == 'CCFLAGS':\n"
12310 " line += ' -I " pcre "/include"
12311 " -I " libgc "/include'"))
12312 (("variable == 'LFLAGS':[ ]*")
12313 (string-append "variable == 'LFLAGS':\n"
12314 " line += ' -L" pcre "/lib"
12315 " -L " libgc "/lib'")))
12316 #t))))))
12317 (inputs `(("pcre" ,pcre)
12318 ("libgc" ,libgc)))
12319 (home-page "https://shedskin.github.io/")
12320 (synopsis "Experimental Python-2 to C++ Compiler")
12321 (description (string-append "This is an experimental compiler for a subset of
12322 Python. It generates C++ code and a Makefile."))
12323 (license (list license:gpl3 license:bsd-3 license:expat))))
12324
12325 (define-public python2-rope
12326 (package
12327 (name "python2-rope")
12328 (version "0.11.0")
12329 (source
12330 (origin
12331 (method url-fetch)
12332 (uri (pypi-uri "rope" version))
12333 (sha256
12334 (base32
12335 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12336 (arguments
12337 ;; Rope has only partial python3 support, see `python-rope'
12338 `(#:python ,python-2))
12339 (build-system python-build-system)
12340 (native-inputs
12341 `(("python2-unittest2" ,python2-unittest2)))
12342 (home-page "https://github.com/python-rope/rope")
12343 (synopsis "Refactoring library for Python")
12344 (description "Rope is a refactoring library for Python. It facilitates
12345 the renaming, moving and extracting of attributes, functions, modules, fields
12346 and parameters in Python 2 source code. These refactorings can also be applied
12347 to occurrences in strings and comments.")
12348 (license license:gpl2)))
12349
12350 (define-public python-rope
12351 (package
12352 (inherit python2-rope)
12353 (name "python-rope")
12354 (arguments `(#:python ,python-wrapper
12355 ;; XXX: Only partial python3 support, results in some failing
12356 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12357 #:tests? #f))
12358 (properties `((python2-variant . ,(delay python2-rope))))))
12359
12360 (define-public python-py3status
12361 (package
12362 (name "python-py3status")
12363 (version "3.21")
12364 (source
12365 (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "py3status" version))
12368 (sha256
12369 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12370 (build-system python-build-system)
12371 (inputs
12372 `(("file" ,file)))
12373 (arguments
12374 '(#:phases
12375 (modify-phases %standard-phases
12376 ;; 'file' is used for detection of configuration file encoding
12377 ;; let's make link the dependency to particular input
12378 (add-before 'build 'patch-file-path
12379 (lambda* (#:key inputs #:allow-other-keys)
12380 (let ((file-path (assoc-ref inputs "file")))
12381 (substitute* "py3status/parse_config.py"
12382 (("\\[\"file\", \"-b\"")
12383 (string-append "['" file-path "/bin/file', '-b'")))
12384 #t))))
12385 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12386 (home-page "https://github.com/ultrabug/py3status")
12387 (synopsis "Extensible i3status wrapper written in Python")
12388 (description "py3status is an i3status wrapper which extends i3status
12389 functionality in a modular way, allowing you to extend your panel with your
12390 own code, responding to click events and updating clock every second.")
12391 (license license:bsd-3)))
12392
12393 (define-public python2-selectors2
12394 (package
12395 (name "python2-selectors2")
12396 (version "2.0.1")
12397 (source (origin
12398 (method url-fetch)
12399 (uri (pypi-uri "selectors2" version))
12400 (sha256
12401 (base32
12402 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:python ,python-2))
12406 (native-inputs
12407 `(("python2-mock" ,python2-mock)
12408 ("python2-psutil" ,python2-psutil)))
12409 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12410 (synopsis "Backport of the selectors module from Python 3.5+")
12411 (description
12412 "This package provides a drop-in replacement for the @code{selectors}
12413 module in Python 3.5 and later.")
12414 (license license:expat)))
12415
12416 (define-public python-tblib
12417 (package
12418 (name "python-tblib")
12419 (version "1.6.0")
12420 (source (origin
12421 (method url-fetch)
12422 (uri (pypi-uri "tblib" version))
12423 (sha256
12424 (base32
12425 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12426 (build-system python-build-system)
12427 (arguments
12428 `(#:phases
12429 (modify-phases %standard-phases
12430 (replace 'check
12431 (lambda _
12432 ;; Upstream runs tests after installation and the package itself
12433 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12434 ;; found.
12435 (setenv "PYTHONPATH"
12436 (string-append (getcwd) "/build/lib:"
12437 (getenv "PYTHONPATH")))
12438 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12439 (native-inputs
12440 `(("python-pytest" ,python-pytest)
12441 ("python-six" ,python-six)))
12442 (home-page "https://github.com/ionelmc/python-tblib")
12443 (synopsis "Traceback serialization library")
12444 (description
12445 "Traceback serialization allows you to:
12446
12447 @enumerate
12448 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12449 different processes. This allows better error handling when running code over
12450 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12451
12452 @item Parse traceback strings and raise with the parsed tracebacks.
12453 @end enumerate\n")
12454 (license license:bsd-3)))
12455
12456 (define-public python2-tblib
12457 (package-with-python2 python-tblib))
12458
12459 (define-public python-greenlet
12460 (package
12461 (name "python-greenlet")
12462 (version "0.4.16")
12463 (source (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "greenlet" version))
12466 (sha256
12467 (base32
12468 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12469 (build-system python-build-system)
12470 (home-page "https://greenlet.readthedocs.io/")
12471 (synopsis "Lightweight in-process concurrent programming")
12472 (description
12473 "Greenlet package is a spin-off of Stackless, a version of CPython
12474 that supports micro-threads called \"tasklets\". Tasklets run
12475 pseudo-concurrently (typically in a single or a few OS-level threads) and
12476 are synchronized with data exchanges on \"channels\".")
12477 (license (list license:psfl license:expat))))
12478
12479 (define-public python-objgraph
12480 (package
12481 (name "python-objgraph")
12482 (version "3.4.1")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "objgraph" version))
12487 (sha256
12488 (base32
12489 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12490 (build-system python-build-system)
12491 (propagated-inputs
12492 `(("python-graphviz" ,python-graphviz)))
12493 (native-inputs
12494 `(("python-mock" ,python-mock)
12495 ("graphviz" ,graphviz)))
12496 (home-page "https://mg.pov.lt/objgraph/")
12497 (synopsis "Draw Python object reference graphs with graphviz")
12498 (description
12499 "This package provides tools to draw Python object reference graphs with
12500 graphviz.")
12501 (license license:expat)))
12502
12503 (define-public python2-objgraph
12504 (package-with-python2 python-objgraph))
12505
12506 (define-public python-gevent
12507 (package
12508 (name "python-gevent")
12509 (version "20.6.2")
12510 (source (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "gevent" version))
12513 (sha256
12514 (base32
12515 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12516 (modules '((guix build utils)))
12517 (snippet
12518 '(begin
12519 ;; unbunding libev and c-ares
12520 (delete-file-recursively "deps")
12521 #t))))
12522 (build-system python-build-system)
12523 (arguments
12524 `(#:modules ((ice-9 ftw)
12525 (ice-9 match)
12526 (srfi srfi-26)
12527 (guix build utils)
12528 (guix build python-build-system))
12529 #:phases (modify-phases %standard-phases
12530 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12531 (lambda _
12532 (substitute* "src/gevent/subprocess.py"
12533 (("/bin/sh") (which "sh")))
12534 (for-each (lambda (file)
12535 (substitute* file
12536 (("/bin/sh") (which "sh"))
12537 (("/bin/true") (which "true"))))
12538 (find-files "src/greentest" "\\.py$"))
12539 #t))
12540 (add-before 'build 'do-not-use-bundled-sources
12541 (lambda _
12542 (setenv "GEVENTSETUP_EMBED" "0")
12543
12544 ;; Prevent building bundled libev.
12545 (substitute* "setup.py"
12546 (("run_make=_BUILDING")
12547 "run_make=False"))
12548 #t))
12549 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12550 (lambda* (#:key inputs #:allow-other-keys)
12551 (let ((greenlet (string-append
12552 (assoc-ref inputs "python-greenlet")
12553 "/include")))
12554 (match (scandir greenlet
12555 (lambda (item)
12556 (string-prefix? "python" item)))
12557 ((python)
12558 (setenv "C_INCLUDE_PATH"
12559 (string-append greenlet "/" python ":"
12560 (or (getenv "C_INCLUDE_PATH")
12561 ""))))))
12562 #t))
12563 (add-before 'check 'pretend-to-be-CI
12564 (lambda _
12565 ;; A few tests are skipped due to network constraints or
12566 ;; get longer timeouts when running in a CI environment.
12567 ;; Piggy-back on that, as we need the same adjustments.
12568 (setenv "TRAVIS" "1")
12569 (setenv "APPVEYOR" "1")
12570 #t))
12571 (add-before 'check 'adjust-tests
12572 (lambda _
12573 (let ((disabled-tests
12574 '(;; These tests rely on networking which is not
12575 ;; available in the build container.
12576 "test_urllib2net.py"
12577 "test__server.py"
12578 "test__server_pywsgi.py"
12579 "test_socket.py"
12580 "test__socket.py"
12581 "test__socket_ssl.py"
12582 "test__socket_dns.py"
12583 "test__socket_dns6.py"
12584 "test___example_servers.py"
12585 "test__getaddrinfo_import.py"
12586 "test__examples.py"
12587 "test_httplib.py"
12588 "test_https.py"
12589 "test_urllib2_localnet.py"
12590 "test_ssl.py"
12591 "test__ssl.py"
12592 ;; XXX: These tests borrow functionality from the
12593 ;; Python builtin 'test' module, but it is not
12594 ;; installed with the Guix Python distribution.
12595 "test_smtpd.py"
12596 "test_wsgiref.py"
12597 "test_urllib2.py"
12598 "test_thread.py"
12599 "test_threading.py"
12600 "test__threading_2.py"
12601 ;; These tests rely on KeyboardInterrupts which do not
12602 ;; work inside the build container for some reason
12603 ;; (lack of controlling terminal?).
12604 "test_subprocess.py"
12605 "test__issues461_471.py"
12606 ;; TODO: Patch out the tests that use getprotobyname, etc
12607 ;; instead of disabling all the tests from these files.
12608 "test__resolver_dnspython.py"
12609 "test__doctests.py"
12610 "test__all__.py"
12611 "test___config.py"
12612 "test__execmodules.py")))
12613 (call-with-output-file "skipped_tests.txt"
12614 (lambda (port)
12615 (format port "~a~%"
12616 (string-join disabled-tests "\n"))))
12617 #t)))
12618 (replace 'check
12619 (lambda _
12620 ;; Make sure the build directory is on PYTHONPATH.
12621 (setenv "PYTHONPATH"
12622 (string-append
12623 (getenv "PYTHONPATH") ":"
12624 (getcwd) "/build/"
12625 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12626
12627 ;; Use the build daemons configured number of workers.
12628 (setenv "NWORKERS" (number->string (parallel-job-count)))
12629
12630 (invoke "python" "-m" "gevent.tests" "--config"
12631 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12632 (propagated-inputs
12633 `(("python-greenlet" ,python-greenlet)
12634 ("python-objgraph" ,python-objgraph)
12635 ("python-zope.event" ,python-zope-event)
12636 ("python-zope.interface" ,python-zope-interface)))
12637 (native-inputs
12638 `(("python-six" ,python-six)
12639
12640 ;; For tests.
12641 ("python-dnspython" ,python-dnspython)
12642 ("python-psutil" ,python-psutil)))
12643 (inputs
12644 `(("c-ares" ,c-ares)
12645 ("libev" ,libev)))
12646 (home-page "http://www.gevent.org/")
12647 (synopsis "Coroutine-based network library")
12648 (description
12649 "gevent is a coroutine-based Python networking library that uses greenlet
12650 to provide a high-level synchronous API on top of the libev event loop.")
12651 (license license:expat)
12652 (properties `((python2-variant . ,(delay python2-gevent))))))
12653
12654 (define-public python2-gevent
12655 (let ((base (package-with-python2
12656 (strip-python2-variant python-gevent))))
12657 (package
12658 (inherit base)
12659 (native-inputs `(,@(package-native-inputs base)
12660 ("python-mock" ,python2-mock)
12661 ("python2-selectors2" ,python2-selectors2))))))
12662
12663 (define-public python-fastimport
12664 (package
12665 (name "python-fastimport")
12666 (version "0.9.8")
12667 (source
12668 (origin
12669 (method url-fetch)
12670 (uri (pypi-uri "fastimport" version))
12671 (sha256
12672 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12673 (build-system python-build-system)
12674 (home-page "https://github.com/jelmer/python-fastimport")
12675 (synopsis "VCS fastimport parser and generator in Python")
12676 (description "This package provides a parser for and generator of the Git
12677 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12678 format.")
12679 (license license:gpl2+)))
12680
12681 (define-public python2-fastimport
12682 (package-with-python2 python-fastimport))
12683
12684 (define-public python-twisted
12685 (package
12686 (name "python-twisted")
12687 (version "19.7.0")
12688 (source (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12691 (sha256
12692 (base32
12693 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12694 (build-system python-build-system)
12695 (arguments
12696 '(#:tests? #f)) ; FIXME: some tests fail
12697 (propagated-inputs
12698 `(("python-zope-interface" ,python-zope-interface)
12699 ("python-pyhamcrest" ,python-pyhamcrest)
12700 ("python-incremental" ,python-incremental)
12701 ("python-hyperlink" ,python-hyperlink)
12702 ("python-constantly" ,python-constantly)
12703 ("python-automat" ,python-automat)))
12704 (home-page "https://twistedmatrix.com/")
12705 (synopsis "Asynchronous networking framework written in Python")
12706 (description
12707 "Twisted is an extensible framework for Python programming, with special
12708 focus on event-based network programming and multiprotocol integration.")
12709 (license license:expat)))
12710
12711 (define-public python2-twisted
12712 (package-with-python2 python-twisted))
12713
12714 (define-public python-pika
12715 (package
12716 (name "python-pika")
12717 (version "0.12.0")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 (uri (pypi-uri "pika" version))
12722 (sha256
12723 (base32
12724 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12725 (build-system python-build-system)
12726 (native-inputs
12727 `(("python-pyev" ,python-pyev)
12728 ("python-tornado" ,python-tornado)
12729 ("python-twisted" ,python-twisted)))
12730 (home-page "https://pika.readthedocs.org")
12731 (synopsis "Pure Python AMQP Client Library")
12732 (description
12733 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12734 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12735 network support library.")
12736 (license license:bsd-3)))
12737
12738 (define-public python2-pika
12739 (package-with-python2 python-pika))
12740
12741 (define-public python-ply
12742 (package
12743 (name "python-ply")
12744 (version "3.11")
12745 (source
12746 (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "ply" version))
12749 (sha256
12750 (base32
12751 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12752 (build-system python-build-system)
12753 (home-page "http://www.dabeaz.com/ply/")
12754 (synopsis "Python Lex & Yacc")
12755 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12756 It uses LR parsing and does extensive error checking.")
12757 (license license:bsd-3)))
12758
12759 (define-public python-tabulate
12760 (package
12761 (name "python-tabulate")
12762 (version "0.8.7")
12763 (source (origin
12764 (method url-fetch)
12765 (uri (pypi-uri "tabulate" version))
12766 (sha256
12767 (base32
12768 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12769 (build-system python-build-system)
12770 (arguments
12771 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12772 ;; and the latest release is not tagged in the upstream repository.
12773 '(#:tests? #f))
12774 (home-page "https://bitbucket.org/astanin/python-tabulate")
12775 (synopsis "Pretty-print tabular data")
12776 (description
12777 "Tabulate is a library and command-line utility to pretty-print tabular
12778 data in Python.")
12779 (license license:expat)))
12780
12781 (define-public python2-tabulate
12782 (package-with-python2 python-tabulate))
12783
12784 (define-public python-kazoo
12785 (package
12786 (name "python-kazoo")
12787 (version "2.4.0")
12788 (source
12789 (origin
12790 (method url-fetch)
12791 (uri (pypi-uri "kazoo" version))
12792 (sha256
12793 (base32
12794 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12795 (build-system python-build-system)
12796 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12797 (propagated-inputs
12798 `(("python-six" ,python-six)))
12799 (home-page "https://kazoo.readthedocs.org")
12800 (synopsis "High-level Zookeeper client library")
12801 (description
12802 "Kazoo is a Python client library for the Apache Zookeeper distributed
12803 application service. It is designed to be easy to use and to avoid common
12804 programming errors.")
12805 (license license:asl2.0)))
12806
12807 (define-public python2-kazoo
12808 (package-with-python2 python-kazoo))
12809
12810 (define-public python-pykafka
12811 (package
12812 (name "python-pykafka")
12813 (version "2.4.0")
12814 (source (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "pykafka" version))
12817 (sha256
12818 (base32
12819 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12820 (build-system python-build-system)
12821 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12822 (propagated-inputs
12823 `(("python-gevent" ,python-gevent)
12824 ("python-kazoo" ,python-kazoo)
12825 ("python-tabulate" ,python-tabulate)))
12826 (inputs
12827 `(("librdkafka" ,librdkafka)))
12828 (home-page "https://pykafka.readthedocs.io/")
12829 (synopsis "Apache Kafka client for Python")
12830 (description
12831 "PyKafka is a client for the Apache Kafka distributed messaging system.
12832 It includes Python implementations of Kafka producers and consumers, which
12833 are optionally backed by a C extension built on librdkafka.")
12834 (license license:asl2.0)))
12835
12836 (define-public python2-pykafka
12837 (package-with-python2 python-pykafka))
12838
12839 (define-public python-wcwidth
12840 (package
12841 (name "python-wcwidth")
12842 (version "0.1.8")
12843 (source (origin
12844 (method url-fetch)
12845 (uri (pypi-uri "wcwidth" version))
12846 (sha256
12847 (base32
12848 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12849 (build-system python-build-system)
12850 (home-page "https://github.com/jquast/wcwidth")
12851 (synopsis "Measure number of terminal column cells of wide-character codes")
12852 (description "Wcwidth measures the number of terminal column cells of
12853 wide-character codes. It is useful for those implementing a terminal emulator,
12854 or programs that carefully produce output to be interpreted by one. It is a
12855 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12856 specified in POSIX.1-2001 and POSIX.1-2008.")
12857 (license license:expat)))
12858
12859 (define-public python2-wcwidth
12860 (package-with-python2 python-wcwidth))
12861
12862 (define-public python2-jsonrpclib
12863 (package
12864 (name "python2-jsonrpclib")
12865 (version "0.1.7")
12866 (source (origin
12867 (method url-fetch)
12868 (uri (pypi-uri "jsonrpclib" version))
12869 (sha256
12870 (base32
12871 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12872 (build-system python-build-system)
12873 (arguments
12874 `(#:tests? #f
12875 #:python ,python-2))
12876 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12877 (synopsis "Implementation of JSON-RPC specification for Python")
12878 (description
12879 "This library is an implementation of the JSON-RPC specification.
12880 It supports both the original 1.0 specification, as well as the
12881 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12882 etc.")
12883 (license license:asl2.0)))
12884
12885 (define-public python-chai
12886 (package
12887 (name "python-chai")
12888 (version "1.1.2")
12889 (source (origin
12890 (method url-fetch)
12891 (uri (pypi-uri "chai" version))
12892 (sha256
12893 (base32
12894 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12895 (build-system python-build-system)
12896 (home-page "https://github.com/agoragames/chai")
12897 (synopsis "Mocking framework for Python")
12898 (description
12899 "Chai provides an api for mocking, stubbing and spying your python
12900 objects, patterned after the Mocha library for Ruby.")
12901 (license license:bsd-3)))
12902
12903 (define-public python2-chai
12904 (package-with-python2 python-chai))
12905
12906 (define-public python-inflection
12907 (package
12908 (name "python-inflection")
12909 (version "0.3.1")
12910 (source
12911 (origin (method url-fetch)
12912 (uri (pypi-uri "inflection" version))
12913 (sha256
12914 (base32
12915 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12916 (build-system python-build-system)
12917 (native-inputs
12918 `(("python-pytest" ,python-pytest)))
12919 (home-page "https://github.com/jpvanhal/inflection")
12920 (synopsis "Python string transformation library")
12921 (description
12922 "Inflection is a string transformation library. It singularizes
12923 and pluralizes English words, and transforms strings from CamelCase to
12924 underscored string.")
12925 (license license:expat)))
12926
12927 (define-public python2-inflection
12928 (package-with-python2 python-inflection))
12929
12930 (define-public python-pylev
12931 (package
12932 (name "python-pylev")
12933 (version "1.3.0")
12934 (source (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "pylev" version))
12937 (sha256
12938 (base32
12939 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12940 (build-system python-build-system)
12941 (home-page "https://github.com/toastdriven/pylev")
12942 (synopsis "Levenshtein distance implementation in Python")
12943 (description "Pure Python Levenshtein implementation, based off the
12944 Wikipedia code samples at
12945 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12946 (license license:bsd-3)))
12947
12948 (define-public python2-pylev
12949 (package-with-python2 python-pylev))
12950
12951 (define-public python-cleo
12952 (package
12953 (name "python-cleo")
12954 (version "0.8.1")
12955 (source (origin
12956 (method url-fetch)
12957 (uri (pypi-uri "cleo" version))
12958 (sha256
12959 (base32
12960 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12961 (build-system python-build-system)
12962 (native-inputs
12963 `( ;; For testing
12964 ("python-mock" ,python-mock)
12965 ("python-pytest-mock" ,python-pytest-mock)
12966 ("python-pytest" ,python-pytest)))
12967 (propagated-inputs
12968 `(("python-backpack" ,python-backpack)
12969 ("python-clikit" ,python-clikit)
12970 ("python-pastel" ,python-pastel)
12971 ("python-pylev" ,python-pylev)))
12972 (home-page "https://github.com/sdispater/cleo")
12973 (synopsis "Command-line arguments library for Python")
12974 (description
12975 "Cleo allows you to create command-line commands with signature in
12976 docstring and colored output.")
12977 (license license:expat)))
12978
12979 (define-public python2-cleo
12980 (package-with-python2 python-cleo))
12981
12982 (define-public python-tomlkit
12983 (package
12984 (name "python-tomlkit")
12985 (version "0.7.0")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "tomlkit" version))
12990 (sha256
12991 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
12992 (build-system python-build-system)
12993 (native-inputs
12994 `(("python-pytest" ,python-pytest)
12995 ("python-pyyaml" ,python-pyyaml)))
12996 (home-page "https://github.com/sdispater/tomlkit")
12997 (synopsis "Style-preserving TOML library")
12998 (description
12999 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13000 preserves all comments, indentations, whitespace and internal element ordering,
13001 and makes them accessible and editable via an intuitive API. It can also
13002 create new TOML documents from scratch using the provided helpers. Part of the
13003 implementation has been adapted, improved, and fixed from Molten.")
13004 (license license:expat)))
13005
13006 (define-public python-shellingham
13007 (package
13008 (name "python-shellingham")
13009 (version "1.3.2")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "shellingham" version))
13014 (sha256
13015 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13016 (build-system python-build-system)
13017 (arguments
13018 `(#:phases
13019 (modify-phases %standard-phases
13020 (add-after 'unpack 'restore-setup.py
13021 ;; setup.py will return in the next release.
13022 ;; <https://github.com/sarugaku/shellingham/issues/33>
13023 (lambda _
13024 (with-output-to-file "setup.py"
13025 (lambda _
13026 (display "from setuptools import setup\nsetup()\n")))
13027 #t)))))
13028 (home-page "https://github.com/sarugaku/shellingham")
13029 (synopsis "Tool to detect surrounding shell")
13030 (description
13031 "Shellingham detects what shell the current Python executable is
13032 running in.")
13033 (license license:isc)))
13034
13035 (define-public python-memcached
13036 (package
13037 (name "python-memcached")
13038 (version "1.59")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "python-memcached" version))
13043 (sha256
13044 (base32
13045 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13046 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13047 (build-system python-build-system)
13048 (propagated-inputs `(("python-six" ,python-six)))
13049 (home-page
13050 "https://github.com/linsomniac/python-memcached")
13051 (synopsis "Pure python memcached client")
13052 (description
13053 "This software is a pure Python interface to the memcached memory cache
13054 daemon. It is the client side software which allows storing values in one or
13055 more, possibly remote, memcached servers.")
13056 (license license:psfl)))
13057
13058 (define-public python-clikit
13059 (package
13060 (name "python-clikit")
13061 (version "0.6.2")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (pypi-uri "clikit" version))
13066 (sha256
13067 (base32
13068 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13069 (build-system python-build-system)
13070 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13071 (propagated-inputs
13072 `(("python-crashtest" ,python-crashtest)
13073 ("python-pastel" ,python-pastel)
13074 ("python-pylev" ,python-pylev)))
13075 (home-page "https://github.com/sdispater/clikit")
13076 (synopsis "Group of utilities to build command line interfaces")
13077 (description
13078 "CliKit is a group of utilities to build testable command line
13079 interfaces.")
13080 (properties `((python2-variant . ,(delay python2-clikit))))
13081 (license license:expat)))
13082
13083 (define-public python2-clikit
13084 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13085 (package/inherit
13086 base
13087 (propagated-inputs
13088 `(("python-enum34" ,python2-enum34)
13089 ("python-typing" ,python2-typing)
13090 ,@(package-propagated-inputs base))))))
13091
13092 (define-public python-msgpack-python
13093 (package
13094 (name "python-msgpack-python")
13095 (version "0.5.6")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "msgpack-python" version))
13100 (sha256
13101 (base32
13102 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13103 (build-system python-build-system)
13104 (home-page "http://msgpack.org/")
13105 (synopsis "Package to deserialize messages in MessagePack binary format")
13106 (description
13107 "MessagePack is an efficient binary serialization format. It lets you
13108 exchange data among multiple languages like JSON. But it's faster and
13109 smaller. Small integers are encoded into a single byte, and typical short
13110 strings require only one extra byte in addition to the strings themselves.")
13111 (license license:asl2.0)))
13112
13113 (define-public python-cachy
13114 (package
13115 (name "python-cachy")
13116 (version "0.3.0")
13117 (source
13118 (origin
13119 (method url-fetch)
13120 (uri (pypi-uri "cachy" version))
13121 (sha256
13122 (base32
13123 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13124 (build-system python-build-system)
13125 (arguments
13126 '(#:phases
13127 (modify-phases %standard-phases
13128 (replace 'check
13129 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13130 "pytest"))))))
13131 (native-inputs
13132 `(("memcached" ,memcached)
13133 ("python-fakeredis" ,python-fakeredis)
13134 ("python-flexmock" ,python-flexmock)
13135 ("python-pifpaf" ,python-pifpaf)
13136 ("python-pytest" ,python-pytest)))
13137 (propagated-inputs
13138 `(("python-memcached" ,python-memcached)
13139 ("python-msgpack-python" ,python-msgpack-python)
13140 ("python-redis" ,python-redis)))
13141 (home-page "https://github.com/sdispater/cachy")
13142 (synopsis "Simple yet effective caching library")
13143 (description
13144 "Cachy provides a simple yet effective caching library. A simple but
13145 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13146 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13147 (license license:expat)))
13148
13149 (define-public python-poetry-core
13150 (package
13151 (name "python-poetry-core")
13152 (version "1.0.0")
13153 (source
13154 (origin
13155 (method url-fetch)
13156 (uri (pypi-uri "poetry-core" version))
13157 (sha256
13158 (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka"))))
13159 (build-system python-build-system)
13160 (home-page "https://github.com/python-poetry/poetry-core")
13161 (synopsis "Poetry PEP 517 build back-end")
13162 (description
13163 "The @code{poetry-core} module provides a PEP 517 build back-end
13164 implementation developed for Poetry. This project is intended to be
13165 a light weight, fully compliant, self-contained package allowing PEP 517
13166 compatible build front-ends to build Poetry managed projects.")
13167 (license license:expat)))
13168
13169 (define-public poetry
13170 (package
13171 (name "poetry")
13172 (version "1.1.4")
13173 ;; Poetry can only be built from source with Poetry.
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "poetry" version))
13178 (sha256
13179 (base32
13180 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13181 (build-system python-build-system)
13182 (arguments
13183 `(#:tests? #f ;; Pypi does not have tests.
13184 #:phases
13185 (modify-phases %standard-phases
13186 (add-before 'build 'patch-setup-py
13187 (lambda _
13188 (substitute* "setup.py"
13189 ;; Newer versions of keyring produce a package with version "0.0.0"
13190 ;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
13191 (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
13192 ;; TODO: remove after the next release cycle,
13193 ;; when packaging has been updated.
13194 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13195 #t)))))
13196 (propagated-inputs
13197 `(("python-cachecontrol" ,python-cachecontrol)
13198 ("python-cachy" ,python-cachy)
13199 ("python-cleo" ,python-cleo)
13200 ("python-clikit" ,python-clikit)
13201 ("python-html5lib" ,python-html5lib)
13202 ("python-keyring" ,python-keyring)
13203 ("python-msgpack-transitional" ,python-msgpack-transitional)
13204 ("python-packaging" ,python-packaging)
13205 ("python-pexpect" ,python-pexpect)
13206 ("python-pip" ,python-pip)
13207 ("python-pkginfo" ,python-pkginfo)
13208 ("python-poetry-core" ,python-poetry-core)
13209 ("python-requests" ,python-requests)
13210 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13211 ("python-shellingham" ,python-shellingham)
13212 ("python-tomlkit" ,python-tomlkit)
13213 ("python-virtualenv" ,python-virtualenv)))
13214 (home-page "https://python-poetry.org")
13215 (synopsis "Python dependency management and packaging made easy")
13216 (description "Poetry is a tool for dependency management and packaging
13217 in Python. It allows you to declare the libraries your project depends on and
13218 it will manage (install/update) them for you.")
13219 (license license:expat)))
13220
13221 (define-public python-lark-parser
13222 (package
13223 (name "python-lark-parser")
13224 (version "0.9.0")
13225 (source (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "lark-parser" version))
13228 (sha256
13229 (base32
13230 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13231 (build-system python-build-system)
13232 (home-page "https://github.com/lark-parser/lark")
13233 (synopsis "Multi-language parser for Python")
13234 (description
13235 "Lark is a parser built with a focus on ergonomics, performance and
13236 resilience. Lark can parse all context-free languages. That means it is
13237 capable of parsing almost any programming language out there, and to
13238 some degree most natural languages too.")
13239 (license license:expat)))
13240
13241 (define-public python-libcst
13242 (package
13243 (name "python-libcst")
13244 (version "0.3.8")
13245 (source (origin
13246 (method url-fetch)
13247 (uri (pypi-uri "libcst" version))
13248 (sha256
13249 (base32
13250 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13251 (build-system python-build-system)
13252 (arguments
13253 `(#:phases
13254 (modify-phases %standard-phases
13255 (add-after 'unpack 'remove-failing-tests
13256 (lambda _
13257 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13258 (delete-file "libcst/tests/test_fuzz.py")
13259 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13260 (delete-file "libcst/tests/test_pyre_integration.py")
13261 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13262 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13263 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13264 #t))
13265 (add-before 'check 'generate-test-data
13266 (lambda _
13267 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13268 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13269 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13270 (replace 'check
13271 (lambda _
13272 (invoke "python" "-m" "unittest")
13273 #t)))))
13274 (native-inputs
13275 `(("python-black" ,python-black)
13276 ("python-isort" ,python-isort)))
13277 (propagated-inputs
13278 `(("python-typing-extensions" ,python-typing-extensions)
13279 ("python-typing-inspect" ,python-typing-inspect)
13280 ("python-pyyaml" ,python-pyyaml)))
13281 (home-page "https://github.com/Instagram/LibCST")
13282 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13283 (description
13284 "LibCST parses Python source code as a CST tree that keeps all
13285 formatting details (comments, whitespaces, parentheses, etc). It's useful
13286 for building automated refactoring (codemod) applications and linters.
13287 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13288 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13289 naming node types and fields, LibCST creates a lossless CST that looks and
13290 feels like an AST.")
13291 (license (list license:expat
13292 ;; Some files unde libcst/_parser/ are under Python Software
13293 ;; Foundation license (see LICENSE file for details)
13294 license:psfl
13295 ;; libcst/_add_slots.py
13296 license:asl2.0))))
13297
13298 (define-public python-typing-inspect
13299 (package
13300 (name "python-typing-inspect")
13301 (version "0.6.0")
13302 (source (origin
13303 (method url-fetch)
13304 (uri (pypi-uri "typing_inspect" version))
13305 (sha256
13306 (base32
13307 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13308 (build-system python-build-system)
13309 (propagated-inputs
13310 `(("python-mypy-extensions" ,python-mypy-extensions)
13311 ("python-typing-extensions" ,python-typing-extensions)))
13312 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13313 (synopsis "API for inspection of types in the Python @code{typing} module")
13314 (description
13315 "The @code{typing_inspect} module defines experimental API for runtime
13316 inspection of types defined in the Python standard typing module.")
13317 (license license:expat)))
13318
13319 (define-public python-lazy-object-proxy
13320 (package
13321 (name "python-lazy-object-proxy")
13322 (version "1.5.1")
13323 (source (origin
13324 (method url-fetch)
13325 (uri (pypi-uri "lazy-object-proxy" version))
13326 (sha256
13327 (base32
13328 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13329 (native-inputs
13330 `(("python-setuptools-scm" ,python-setuptools-scm)))
13331 (build-system python-build-system)
13332 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13333 (synopsis "Lazy object proxy for python")
13334 (description
13335 "Lazy object proxy is an object that wraps a callable but defers the call
13336 until the object is actually required, and caches the result of said call.")
13337 (license license:bsd-2)))
13338
13339 (define-public python2-lazy-object-proxy
13340 (package-with-python2 python-lazy-object-proxy))
13341
13342 (define-public python-dnspython
13343 (package
13344 (name "python-dnspython")
13345 (version "2.0.0")
13346 (source (origin
13347 (method url-fetch)
13348 (uri (pypi-uri "dnspython" version ".zip"))
13349 (sha256
13350 (base32
13351 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13352 (build-system python-build-system)
13353 (native-inputs `(("unzip" ,unzip)))
13354 (arguments '(#:tests? #f)) ; XXX: requires internet access
13355 (home-page "https://www.dnspython.org")
13356 (synopsis "DNS toolkit for Python")
13357 (description
13358 "dnspython is a DNS toolkit for Python. It supports almost all record
13359 types. It can be used for queries, zone transfers, and dynamic updates.
13360 It supports TSIG authenticated messages and EDNS0.")
13361 (license license:expat)))
13362
13363 (define-public python-dnspython-1.16
13364 (package
13365 (inherit python-dnspython)
13366 (version "1.16.0")
13367 (source (origin
13368 (method url-fetch)
13369 (uri (string-append "http://www.dnspython.org/kits/"
13370 version "/dnspython-" version ".tar.gz"))
13371 (sha256
13372 (base32
13373 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13374 (native-inputs '())))
13375
13376 (define-public python2-dnspython-1.16
13377 (package-with-python2 python-dnspython-1.16))
13378
13379 (define-public python-py3dns
13380 (package
13381 (name "python-py3dns")
13382 (version "3.2.1")
13383 (source
13384 (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "py3dns" version))
13387 (sha256
13388 (base32
13389 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13390 (build-system python-build-system)
13391 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13392 ;; removing functionality so we copy from Nix and "just don't build it".
13393 (arguments
13394 `(#:phases
13395 (modify-phases %standard-phases
13396 (add-after 'unpack 'patch-source
13397 (lambda _
13398 (substitute* "setup.py"
13399 (("import DNS") "")
13400 (("DNS.__version__") (string-append "\"" ,version "\"")))
13401 #t)))
13402 #:tests? #f)) ; Also skip the tests.
13403 (home-page "https://launchpad.net/py3dns")
13404 (synopsis "Python 3 DNS library")
13405 (description "This Python 3 module provides a DNS API for looking up DNS
13406 entries from within Python 3 modules and applications. This module is a
13407 simple, lightweight implementation.")
13408 (license license:psfl)))
13409
13410 (define-public python-email-validator
13411 (package
13412 (name "python-email-validator")
13413 (version "1.0.2")
13414 (source
13415 (origin (method url-fetch)
13416 (uri (pypi-uri "email_validator" version))
13417 (sha256
13418 (base32
13419 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13420 (build-system python-build-system)
13421 (arguments
13422 '(#:phases
13423 (modify-phases %standard-phases
13424 (add-before 'build 'use-dnspython
13425 (lambda _
13426 (substitute* "setup.py"
13427 (("dnspython3") "dnspython"))
13428 #t)))))
13429 (propagated-inputs
13430 `(("python-dnspython" ,python-dnspython)
13431 ("python-idna" ,python-idna)))
13432 (home-page "https://github.com/JoshData/python-email-validator")
13433 (synopsis "Email address validation library for Python")
13434 (description
13435 "This library validates email address syntax and deliverability.")
13436 (license license:cc0)))
13437
13438 (define-public python2-email-validator
13439 (package-with-python2 python-email-validator))
13440
13441 (define-public python-ukpostcodeparser
13442 (package
13443 (name "python-ukpostcodeparser")
13444 (version "1.0.3")
13445 (source (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "UkPostcodeParser" version))
13448 (sha256
13449 (base32
13450 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13451 (build-system python-build-system)
13452 (home-page "https://github.com/hamstah/ukpostcodeparser")
13453 (synopsis "UK Postcode parser for Python")
13454 (description
13455 "This library provides the @code{parse_uk_postcode} function for
13456 parsing UK postcodes.")
13457 (license license:expat)))
13458
13459 (define-public python2-ukpostcodeparser
13460 (package-with-python2 python-ukpostcodeparser))
13461
13462 (define-public python-faker
13463 (package
13464 (name "python-faker")
13465 (version "4.0.2")
13466 (source (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "Faker" version))
13469 (sha256
13470 (base32
13471 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13472 (build-system python-build-system)
13473 (arguments
13474 '(#:phases
13475 (modify-phases %standard-phases
13476 (replace 'check
13477 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13478 (native-inputs
13479 `(;; For testing
13480 ("python-freezegun" ,python-freezegun)
13481 ("python-pytest" ,python-pytest)
13482 ("python-random2" ,python-random2)
13483 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13484 ("python-validators" ,python-validators)))
13485 (propagated-inputs
13486 `(("python-dateutil" ,python-dateutil)
13487 ("python-text-unidecode" ,python-text-unidecode)))
13488 (home-page "https://github.com/joke2k/faker")
13489 (synopsis "Python package that generates fake data")
13490 (description
13491 "Faker is a Python package that generates fake data such as names,
13492 addresses, and phone numbers.")
13493 (license license:expat)
13494 (properties `((python2-variant . ,(delay python2-faker))))))
13495
13496 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13497 (define-public python2-faker
13498 (let ((base (package-with-python2 (strip-python2-variant
13499 python-faker))))
13500 (package
13501 (inherit base)
13502 (version "3.0.1")
13503 (source (origin
13504 (method url-fetch)
13505 (uri (pypi-uri "Faker" version))
13506 (sha256
13507 (base32
13508 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13509 (native-inputs
13510 `(("python-mock" ,python2-mock)
13511 ,@(package-native-inputs base)))
13512 (propagated-inputs
13513 `(("python2-ipaddress" ,python2-ipaddress)
13514 ("python2-six" ,python2-six)
13515 ,@(package-propagated-inputs base))))))
13516
13517 (define-public python-pyaml
13518 (package
13519 (name "python-pyaml")
13520 (version "18.11.0")
13521 (source (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "pyaml" version))
13524 (sha256
13525 (base32
13526 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13527 (build-system python-build-system)
13528 (native-inputs
13529 `(("python-unidecode" ,python-unidecode)))
13530 (propagated-inputs
13531 `(("python-pyyaml" ,python-pyyaml)))
13532 (home-page "https://github.com/mk-fg/pretty-yaml")
13533 (synopsis "YAML pretty-print library for Python")
13534 (description
13535 "pyaml is a PyYAML based python module to produce pretty and readable
13536 YAML-serialized data.")
13537 (license license:wtfpl2)))
13538
13539 (define-public python2-pyaml
13540 (package-with-python2 python-pyaml))
13541
13542 (define-public python-backpack
13543 (package
13544 (name "python-backpack")
13545 (version "0.1")
13546 (source
13547 (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "backpack" version))
13550 (sha256
13551 (base32
13552 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13553 (build-system python-build-system)
13554 (native-inputs
13555 `(("python-pytest" ,python-pytest)
13556 ("python-nose" ,python-nose)))
13557 (propagated-inputs
13558 `(("python-simplejson" ,python-simplejson)))
13559 (home-page "https://github.com/sdispater/backpack")
13560 (synopsis "Utilities for working with Python collections")
13561 (description "Backpack provides some useful utilities for working with
13562 collections of data.")
13563 (license license:expat)))
13564
13565 (define-public python2-backpack
13566 (package-with-python2 python-backpack))
13567
13568 (define-public python-prompt-toolkit
13569 (package
13570 (name "python-prompt-toolkit")
13571 (version "3.0.7")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "prompt_toolkit" version))
13576 (sha256
13577 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13578 (build-system python-build-system)
13579 (arguments
13580 `(#:phases
13581 (modify-phases %standard-phases
13582 (delete 'check)
13583 (add-after 'install 'post-install-check
13584 (lambda* (#:key inputs outputs #:allow-other-keys)
13585 ;; HOME is needed for the test
13586 ;; "test_pathcompleter_can_expanduser".
13587 (setenv "HOME" "/tmp")
13588 (add-installed-pythonpath inputs outputs)
13589 (invoke "py.test"))))))
13590 (propagated-inputs
13591 `(("python-wcwidth" ,python-wcwidth)))
13592 (native-inputs
13593 `(("python-pytest" ,python-pytest)))
13594 (home-page
13595 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13596 (synopsis "Library for building command line interfaces in Python")
13597 (description
13598 "Prompt-Toolkit is a library for building interactive command line
13599 interfaces in Python. It's like GNU Readline but it also features syntax
13600 highlighting while typing, out-of-the-box multi-line input editing, advanced
13601 code completion, incremental search, support for Chinese double-width
13602 characters, mouse support, and auto suggestions.")
13603 (license license:bsd-3)
13604 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13605
13606 (define-public python-prompt-toolkit-2
13607 (package (inherit python-prompt-toolkit)
13608 (name "python-prompt-toolkit")
13609 (version "2.0.7")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "prompt_toolkit" version))
13614 (sha256
13615 (base32
13616 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13617 (propagated-inputs
13618 `(("python-wcwidth" ,python-wcwidth)
13619 ("python-six" ,python-six)
13620 ("python-pygments" ,python-pygments)))
13621 (properties '())))
13622
13623 (define-public python2-prompt-toolkit
13624 (package-with-python2 python-prompt-toolkit-2))
13625
13626 (define-public python-prompt-toolkit-1
13627 (package (inherit python-prompt-toolkit-2)
13628 (version "1.0.15")
13629 (source
13630 (origin
13631 (method url-fetch)
13632 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13633 (sha256
13634 (base32
13635 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13636
13637 (define-public python2-prompt-toolkit-1
13638 (package-with-python2 python-prompt-toolkit-1))
13639
13640 (define-public python-jedi
13641 (package
13642 (name "python-jedi")
13643 (version "0.17.2")
13644 (source
13645 (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "jedi" version))
13648 (sha256
13649 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13650 (build-system python-build-system)
13651 (arguments
13652 `(#:phases
13653 (modify-phases %standard-phases
13654 (replace 'check
13655 (lambda _
13656 (setenv "HOME" "/tmp")
13657 (invoke "python" "-m" "pytest" "-vv"))))))
13658 (native-inputs
13659 `(("python-pytest" ,python-pytest)
13660 ("python-docopt" ,python-docopt)))
13661 (propagated-inputs
13662 `(("python-parso" ,python-parso)))
13663 (home-page "https://github.com/davidhalter/jedi")
13664 (synopsis "Autocompletion and static analysis library for Python")
13665 (description
13666 "Jedi is a static analysis tool for Python that can be used in Integrated
13667 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13668 on a deeper level than many other static analysis frameworks for Python.
13669
13670 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13671 well.")
13672 (license license:expat)))
13673
13674 (define-public python2-jedi
13675 (package-with-python2 python-jedi))
13676
13677 (define-public ptpython
13678 (package
13679 (name "ptpython")
13680 (version "3.0.5")
13681 (source (origin
13682 (method url-fetch)
13683 (uri (pypi-uri "ptpython" version))
13684 (sha256
13685 (base32
13686 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13687 (build-system python-build-system)
13688 (arguments
13689 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13690 (propagated-inputs
13691 `(("python-appdirs" ,python-appdirs)
13692 ("python-jedi" ,python-jedi)
13693 ("python-prompt-toolkit" ,python-prompt-toolkit)
13694 ("python-pygments" ,python-pygments)))
13695 (home-page "https://github.com/jonathanslenders/ptpython")
13696 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13697 (description
13698 "ptpython is a Python read-eval-print loop with IDE-like features.
13699 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13700 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13701 etc.")
13702 (license license:bsd-3)
13703 (properties `((python2-variant . ,(delay ptpython-2))))))
13704
13705 (define-public ptpython-2
13706 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13707 (package
13708 (inherit base)
13709 (name "ptpython2"))))
13710
13711 (define-public python-stem
13712 (package
13713 (name "python-stem")
13714 (version "1.8.0")
13715 (source
13716 (origin
13717 (method url-fetch)
13718 (uri (pypi-uri "stem" version))
13719 (sha256
13720 (base32
13721 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13722 (build-system python-build-system)
13723 (arguments
13724 `(#:phases
13725 (modify-phases %standard-phases
13726 (replace 'check
13727 (lambda _
13728 (invoke "./run_tests.py" "--unit")
13729 #t)))))
13730 (native-inputs
13731 `(("python-mock" ,python-mock)
13732 ("python-pycodestyle" ,python-pycodestyle)
13733 ("python-pyflakes" ,python-pyflakes)))
13734 (home-page "https://stem.torproject.org/")
13735 (synopsis
13736 "Python controller library that allows applications to interact with Tor")
13737 (description
13738 "Stem is a Python controller library for Tor. With it you can use Tor's
13739 control protocol to script against the Tor process and read descriptor data
13740 relays publish about themselves.")
13741 (license license:lgpl3)))
13742
13743 (define-public python2-stem
13744 (package-with-python2 python-stem))
13745
13746 (define-public python-pyserial
13747 (package
13748 (name "python-pyserial")
13749 (version "3.4")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (pypi-uri "pyserial" version))
13754 (sha256
13755 (base32
13756 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13757 (build-system python-build-system)
13758 (arguments
13759 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13760 ;; #:phases
13761 ;; (modify-phases %standard-phases
13762 ;; (replace 'check
13763 ;; (lambda _
13764 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13765 (home-page
13766 "https://github.com/pyserial/pyserial")
13767 (synopsis "Python Serial Port Bindings")
13768 (description "@code{pyserial} provide serial port bindings for Python. It
13769 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13770 and/or Xon/Xoff. The port is accessed in RAW mode.")
13771 (license license:bsd-3)))
13772
13773 (define-public python2-pyserial
13774 (package-with-python2 python-pyserial))
13775
13776 (define-public python-kivy
13777 (package
13778 (name "python-kivy")
13779 (version "1.10.1")
13780 (source
13781 (origin
13782 (method url-fetch)
13783 (uri (pypi-uri "Kivy" version))
13784 (file-name (string-append name "-" version ".tar.gz"))
13785 (sha256
13786 (base32
13787 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13788 (build-system python-build-system)
13789 (arguments
13790 `(#:tests? #f ; Tests require many optional packages
13791 #:phases
13792 (modify-phases %standard-phases
13793 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13794 (lambda* (#:key inputs #:allow-other-keys)
13795 (setenv "KIVY_SDL2_PATH"
13796 (string-append (assoc-ref inputs "sdl-union")
13797 "/include/SDL2"))
13798 #t)))))
13799 (native-inputs
13800 `(("pkg-config" ,pkg-config)
13801 ("python-cython" ,python-cython)))
13802 (inputs
13803 `(("gstreamer" ,gstreamer)
13804 ("mesa" ,mesa)
13805 ("sdl-union"
13806 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13807 (home-page "https://kivy.org")
13808 (synopsis
13809 "Multitouch application framework")
13810 (description
13811 "A software library for rapid development of
13812 hardware-accelerated multitouch applications.")
13813 (license license:expat)))
13814
13815 (define-public python2-kivy
13816 (package-with-python2 python-kivy))
13817
13818 (define-public python-binaryornot
13819 (package
13820 (name "python-binaryornot")
13821 (version "0.4.4")
13822 (source (origin
13823 (method url-fetch)
13824 (uri (pypi-uri "binaryornot" version))
13825 (sha256
13826 (base32
13827 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13828 (build-system python-build-system)
13829 (arguments
13830 `(#:phases
13831 (modify-phases %standard-phases
13832 (add-after 'unpack 'patch-tests
13833 (lambda _
13834 ;; TypeError: binary() got an unexpected keyword argument
13835 ;; 'average_size'.
13836 (substitute* "tests/test_check.py"
13837 (("average_size=512") ""))
13838 #t)))))
13839 (propagated-inputs
13840 `(("python-chardet" ,python-chardet)
13841 ("python-hypothesis" ,python-hypothesis)))
13842 (home-page "https://github.com/audreyr/binaryornot")
13843 (synopsis "Package to check if a file is binary or text")
13844 (description "Ultra-lightweight pure Python package to check if a file is
13845 binary or text.")
13846 (license license:bsd-3)
13847 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13848
13849 (define-public python2-binaryornot
13850 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13851 (package (inherit base)
13852 (propagated-inputs
13853 `(("python2-enum34" ,python2-enum34)
13854 ,@(package-propagated-inputs base))))))
13855
13856 (define-public python-binwalk
13857 (package
13858 (name "python-binwalk")
13859 (version "2.2.0")
13860 (source
13861 (origin
13862 (method git-fetch)
13863 (uri (git-reference
13864 (url "https://github.com/ReFirmLabs/binwalk")
13865 (commit (string-append "v" version))))
13866 (file-name (git-file-name name version))
13867 (sha256
13868 (base32
13869 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13870 (build-system python-build-system)
13871 (arguments
13872 `(#:phases
13873 (modify-phases %standard-phases
13874 (add-before 'check 'set-pythonpath
13875 (lambda _
13876 (setenv "PYTHONPATH"
13877 (string-append
13878 (getcwd) "/src/"
13879 ":" (getenv "PYTHONPATH")))
13880 (setenv "HOME" "")
13881 #t)))))
13882 (native-inputs
13883 `(("python-coverage" ,python-coverage)
13884 ("python-nose" ,python-nose)))
13885 (home-page "https://github.com/ReFirmLabs/binwalk")
13886 (synopsis "Firmware analysis tool")
13887 (description "Binwalk is a tool for analyzing, reverse engineering, and
13888 extracting firmware images")
13889 (license license:expat)))
13890
13891 (define-public python-nltk
13892 (package
13893 (name "python-nltk")
13894 (version "3.2.1")
13895 (source (origin
13896 (method url-fetch)
13897 (uri (pypi-uri "nltk" version))
13898 (sha256
13899 (base32
13900 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13901 (build-system python-build-system)
13902 (arguments
13903 '(;; The tests require some extra resources to be downloaded.
13904 ;; TODO Try packaging these resources.
13905 #:tests? #f))
13906 (home-page "http://nltk.org/")
13907 (synopsis "Natural Language Toolkit")
13908 (description "It provides interfaces to over 50 corpora and lexical
13909 resources such as WordNet, along with a suite of text processing libraries
13910 for classification, tokenization, stemming, tagging, parsing, and semantic
13911 reasoning, wrappers for natural language processing libraries.")
13912 (license license:asl2.0)))
13913
13914 (define-public python2-nltk
13915 (package-with-python2 python-nltk))
13916
13917 (define-public python-pymongo
13918 (package
13919 (name "python-pymongo")
13920 (version "3.7.2")
13921 (source (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "pymongo" version))
13924 (sha256
13925 (base32
13926 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13927 (build-system python-build-system)
13928 (propagated-inputs
13929 `(("python-certifi" ,python-certifi)))
13930 (home-page "https://github.com/mongodb/mongo-python-driver")
13931 (synopsis "Python driver for MongoDB")
13932 (description "Python driver for MongoDB.")
13933 (license license:asl2.0)))
13934
13935 (define-public python2-pymongo
13936 (package-with-python2 python-pymongo))
13937
13938 (define-public python-consul
13939 (package
13940 (name "python-consul")
13941 (version "0.6.1")
13942 (source
13943 (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "python-consul" version))
13946 (sha256
13947 (base32
13948 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13949 (build-system python-build-system)
13950 (arguments
13951 '(#:tests? #f)) ; The tests are not distributed
13952 (propagated-inputs
13953 `(("python-requests" ,python-requests)
13954 ("python-six" ,python-six)))
13955 (home-page "https://github.com/cablehead/python-consul")
13956 (synopsis "Python client for Consul")
13957 (description
13958 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13959 discovery, monitoring and configuration.")
13960 (license license:expat)))
13961
13962 (define-public python2-consul
13963 (package-with-python2 python-consul))
13964
13965 (define-public python-schematics
13966 (package
13967 (name "python-schematics")
13968 (version "1.1.1")
13969 (source
13970 (origin
13971 (method git-fetch)
13972 (uri (git-reference
13973 (url "https://github.com/schematics/schematics")
13974 (commit (string-append "v" version))))
13975 (file-name (git-file-name name version))
13976 (sha256
13977 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13978 (build-system python-build-system)
13979 (propagated-inputs
13980 `(("python-six" ,python-six)))
13981 (arguments
13982 ;; The tests require a bunch of not very nice packages with fixed
13983 ;; version requirements (e.g. python-coveralls).
13984 `(#:tests? #f))
13985 (home-page "https://github.com/schematics/schematics")
13986 (synopsis "Python Data Structures for Humans")
13987 (description "Python Data Structures for Humans.")
13988 (license license:bsd-3)))
13989
13990 (define-public python2-schematics
13991 (package-with-python2 python-schematics))
13992
13993 (define-public python-odfpy
13994 (package
13995 (name "python-odfpy")
13996 (version "1.4.1")
13997 (source (origin
13998 (method url-fetch)
13999 (uri (pypi-uri "odfpy" version))
14000 (sha256
14001 (base32
14002 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14003 (arguments
14004 `(#:phases
14005 (modify-phases %standard-phases
14006 (replace 'check
14007 (lambda _
14008 (setenv "PYTHONPATH" (string-append "./build/lib:"
14009 (getenv "PYTHONPATH")))
14010 (invoke "pytest" "-vv"))))))
14011 (build-system python-build-system)
14012 (native-inputs
14013 `(("python-pytest" ,python-pytest)))
14014 (propagated-inputs
14015 `(("python-defusedxml" ,python-defusedxml)))
14016 (home-page "https://github.com/eea/odfpy")
14017 (synopsis "Python API and tools to manipulate OpenDocument files")
14018 (description "Collection of libraries and utility programs written in
14019 Python to manipulate OpenDocument 1.2 files.")
14020 (license
14021 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14022 ;; number of files with other licenses.
14023 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14024
14025 (define-public python2-odfpy
14026 (package-with-python2 python-odfpy))
14027
14028 (define-public python-natsort
14029 (package
14030 (name "python-natsort")
14031 (version "7.0.1")
14032 (source (origin
14033 (method url-fetch)
14034 (uri (pypi-uri "natsort" version))
14035 (sha256
14036 (base32
14037 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14038 (build-system python-build-system)
14039 (arguments
14040 `(#:modules ((guix build utils)
14041 (guix build python-build-system)
14042 (srfi srfi-1)
14043 (srfi srfi-26)
14044 (ice-9 ftw))
14045 #:phases
14046 (modify-phases %standard-phases
14047 (add-before 'check 'set-cachedir
14048 ;; Tests require write access to $HOME by default
14049 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14050 (replace 'check
14051 (lambda _
14052 (let ((cwd (getcwd)))
14053 (setenv "PYTHONPATH"
14054 (string-append
14055 cwd "/build/"
14056 (find (cut string-prefix? "lib" <>)
14057 (scandir (string-append cwd "/build")))
14058 ":"
14059 (getenv "PYTHONPATH")))
14060 (invoke "pytest" "-v")))))))
14061 (native-inputs
14062 `(("python-hypothesis" ,python-hypothesis)
14063 ("python-pytest-cov" ,python-pytest-cov)
14064 ("python-pytest-mock" ,python-pytest-mock)
14065 ("python-pytest" ,python-pytest)))
14066 (propagated-inputs ; TODO: Add python-fastnumbers.
14067 `(("python-pyicu" ,python-pyicu)))
14068 (home-page "https://github.com/SethMMorton/natsort")
14069 (synopsis "Natural sorting for python and shell")
14070 (description
14071 "Natsort lets you apply natural sorting on lists instead of
14072 lexicographical. If you use the built-in @code{sorted} method in python
14073 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14074 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14075 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14076 identifies numbers and sorts them separately from strings. It can also sort
14077 version numbers, real numbers, mixed types and more, and comes with a shell
14078 command @command{natsort} that exposes this functionality in the command line.")
14079 (license license:expat)
14080 (properties `((python2-variant . ,(delay python2-natsort))))))
14081
14082 ;; Natsort 6.x are the last versions with support for Python 2.
14083 (define-public python2-natsort
14084 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14085 (package (inherit base)
14086 (version "6.2.1")
14087 (source (origin
14088 (method url-fetch)
14089 (uri (pypi-uri "natsort" version))
14090 (sha256
14091 (base32
14092 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14093 (native-inputs
14094 `(("python2-pathlib" ,python2-pathlib)
14095 ,@(package-native-inputs base))))))
14096
14097 (define-public glances
14098 (package
14099 (name "glances")
14100 (version "3.1.4")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "Glances" version))
14105 (sha256
14106 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14107 (modules '((guix build utils)))
14108 (snippet
14109 '(begin
14110 ;; Glances phones PyPI for weekly update checks by default.
14111 ;; Disable these. The user can re-enable them if desired.
14112 (substitute* "glances/outdated.py"
14113 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14114 (string-append indentation
14115 "self.args.disable_check_update = True\n"
14116 line)))
14117 #t))))
14118 (build-system python-build-system)
14119 (propagated-inputs
14120 `(("python-future" ,python-future)
14121 ("python-psutil" ,python-psutil)))
14122 (home-page "https://github.com/nicolargo/glances")
14123 (synopsis "Cross-platform curses-based monitoring tool")
14124 (description
14125 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14126 Glances uses the PsUtil library to get information from your system. It
14127 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14128 (license license:lgpl3+)))
14129
14130 (define-public python-glances
14131 (deprecated-package "python-glances" glances))
14132
14133 (define-public python-graphql-core
14134 (package
14135 (name "python-graphql-core")
14136 (version "0.5.3")
14137 (source
14138 (origin
14139 (method url-fetch)
14140 (uri (pypi-uri "graphql-core" version))
14141 (sha256
14142 (base32
14143 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14144 (build-system python-build-system)
14145 (arguments
14146 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14147 #:phases
14148 (modify-phases %standard-phases
14149 (add-after 'unpack 'patch-hardcoded-version
14150 (lambda _ (substitute*
14151 "setup.py"
14152 (("'gevent==1.1rc1'") "'gevent'"))
14153 #t)))))
14154 (native-inputs
14155 `(("python-gevent" ,python-gevent)
14156 ("python-mock" ,python-mock)
14157 ("python-pytest-mock" ,python-pytest-mock)))
14158 (propagated-inputs
14159 `(("python-promise" ,python-promise)
14160 ("python-six" ,python-six)))
14161 (home-page "https://github.com/graphql-python/graphql-core")
14162 (synopsis "GraphQL implementation for Python")
14163 (description
14164 "GraphQL implementation for Python. GraphQL is a data query language and
14165 runtime designed and used to request and deliver data to mobile and web apps.
14166 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14167 to Python.")
14168 (license license:expat)))
14169
14170 (define-public python2-graphql-core
14171 (package-with-python2 python-graphql-core))
14172
14173 (define-public python-graphql-relay
14174 (package
14175 (name "python-graphql-relay")
14176 (version "0.4.5")
14177 (source
14178 (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "graphql-relay" version))
14181 (sha256
14182 (base32
14183 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14184 (build-system python-build-system)
14185 (arguments
14186 '(#:tests? #f)) ; The tests are not distributed
14187 (propagated-inputs
14188 `(("python-graphql-core" ,python-graphql-core)
14189 ("python-promise" ,python-promise)
14190 ("python-six" ,python-six)))
14191 (home-page "https://github.com/graphql-python/graphql-relay-py")
14192 (synopsis "Relay implementation for Python")
14193 (description
14194 "This is a library to allow the easy creation of Relay-compliant servers
14195 using the GraphQL Python reference implementation of a GraphQL server. It
14196 should be noted that the code is a exact port of the original
14197 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14198 from Facebook.")
14199 (license license:expat)))
14200
14201 (define-public python-graphene
14202 (package
14203 (name "python-graphene")
14204 (version "0.10.2")
14205 (source
14206 (origin
14207 (method url-fetch)
14208 (uri (pypi-uri "graphene" version))
14209 (sha256
14210 (base32
14211 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14212 (build-system python-build-system)
14213 (propagated-inputs
14214 `(("python-graphql-core" ,python-graphql-core)
14215 ("python-graphql-relay" ,python-graphql-relay)
14216 ("python-iso8601" ,python-iso8601)
14217 ("python-promise" ,python-promise)
14218 ("python-six" ,python-six)))
14219 (arguments
14220 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14221 (home-page "https://graphene-python.org/")
14222 (synopsis "GraphQL Framework for Python")
14223 (description
14224 "Graphene is a Python library for building GraphQL schemas/types.
14225 A GraphQL schema describes your data model, and provides a GraphQL server
14226 with an associated set of resolve methods that know how to fetch data.")
14227 (properties `((python2-variant . ,(delay python2-graphene))))
14228 (license license:expat)))
14229
14230 (define-public python2-graphene
14231 (let ((base (package-with-python2
14232 (strip-python2-variant python-graphene))))
14233 (package (inherit base)
14234 (native-inputs
14235 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14236 ,@(package-native-inputs base))))))
14237
14238 (define-public python-nautilus
14239 (package
14240 (name "python-nautilus")
14241 (version "0.4.9")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "nautilus" version))
14246 (sha256
14247 (base32
14248 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14249 (build-system python-build-system)
14250 (arguments `(#:tests? #f)) ; fails to import test modules
14251 (propagated-inputs
14252 `(("python-bcrypt" ,python-bcrypt)
14253 ("python-click" ,python-click)
14254 ("python-consul" ,python-consul)
14255 ("python-graphene" ,python-graphene)
14256 ("python-jinja2" ,python-jinja2)
14257 ("python-peewee" ,python-peewee)
14258 ("python-pika" ,python-pika)
14259 ("python-tornado" ,python-tornado)
14260 ("python-wtforms" ,python-wtforms)))
14261 (native-inputs
14262 `(("python-nose2" ,python-nose2)))
14263 (home-page "https://github.com/AlecAivazis/nautilus")
14264 (synopsis "Library for creating microservice applications")
14265 (description
14266 "Nautilus is a framework for flux based microservices that looks to
14267 provide extendible implementations of common aspects of a cloud so that you can
14268 focus on building massively scalable web applications.")
14269 (license license:expat)))
14270
14271 (define-public python-random2
14272 (package
14273 (name "python-random2")
14274 (version "1.0.1")
14275 (source (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "random2" version ".zip"))
14278 (sha256
14279 (base32
14280 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14281 (build-system python-build-system)
14282 (native-inputs `(("unzip" ,unzip)))
14283 (home-page "http://pypi.python.org/pypi/random2")
14284 (synopsis "Python 3 version of the Python 2 @code{random} module")
14285 (description
14286 "This package provides a Python 3 ported version of Python 2.7’s
14287 @code{random} module. It has also been back-ported to work in Python 2.6.
14288
14289 In Python 3, the implementation of @code{randrange()} was changed, so that
14290 even with the same seed you get different sequences in Python 2 and 3.
14291
14292 This package closes that gap, allowing stable random number generation
14293 between the different Python versions.")
14294 (license license:psfl)))
14295
14296 (define-public python2-random2
14297 (package-with-python2 python-random2))
14298
14299 (define-public python-snowballstemmer
14300 (package
14301 (name "python-snowballstemmer")
14302 (version "2.0.0")
14303 (source (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "snowballstemmer" version))
14306 (sha256
14307 (base32
14308 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14309 (build-system python-build-system)
14310 (arguments
14311 `(;; No tests exist
14312 #:tests? #f))
14313 (home-page "https://github.com/shibukawa/snowball_py")
14314 (synopsis "Snowball stemming library collection for Python")
14315 (description "This package provides 16 word stemmer algorithms generated
14316 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14317 English stemmer.")
14318 (license license:bsd-3)))
14319
14320 (define-public python2-snowballstemmer
14321 (package-with-python2 python-snowballstemmer))
14322
14323 (define-public python-setproctitle
14324 (package
14325 (name "python-setproctitle")
14326 (version "1.1.10")
14327 (source
14328 (origin
14329 (method url-fetch)
14330 (uri (pypi-uri "setproctitle" version))
14331 (sha256
14332 (base32
14333 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14334 (build-system python-build-system)
14335 (arguments
14336 '(#:phases
14337 (modify-phases %standard-phases
14338 (add-before 'check 'patch-Makefile
14339 ;; Stricly this is only required for the python2 variant.
14340 ;; But adding a phase in an inherited package seems to be
14341 ;; cumbersum. So we patch even for python3.
14342 (lambda _
14343 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14344 (when nose
14345 (substitute* "Makefile"
14346 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14347 (string-append nose "/bin/nosetests "))))
14348 #t)))
14349 (replace 'check
14350 (lambda _
14351 (setenv "PYTHON" (or (which "python3") (which "python")))
14352 (setenv "PYCONFIG" (if (which "python3-config")
14353 "python3-config --embed"
14354 "python-config"))
14355 (setenv "CC" "gcc")
14356 ;; No need to extend PYTHONPATH to find the built package, since
14357 ;; the Makefile will build anyway
14358 (invoke "make" "check"))))))
14359 (native-inputs
14360 `(("procps" ,procps))) ; required for tests
14361 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14362 (synopsis
14363 "Setproctitle implementation for Python to customize the process title")
14364 (description "The library allows a process to change its title (as displayed
14365 by system tools such as ps and top).
14366
14367 Changing the title is mostly useful in multi-process systems, for
14368 example when a master process is forked: changing the children's title
14369 allows identifying the task each process is busy with. The technique
14370 is used by PostgreSQL and the OpenSSH Server for example.")
14371 (license license:bsd-3)
14372 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14373
14374 (define-public python2-setproctitle
14375 (let ((base (package-with-python2
14376 (strip-python2-variant python-setproctitle))))
14377 (package
14378 (inherit base)
14379 (native-inputs `(("python2-nose" ,python2-nose)
14380 ,@(package-native-inputs base))))))
14381
14382 (define-public python-validictory
14383 (package
14384 (name "python-validictory")
14385 (version "1.0.1")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "validictory" version))
14390 (sha256
14391 (base32
14392 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14393 (build-system python-build-system)
14394 (arguments
14395 '(#:phases
14396 (modify-phases %standard-phases
14397 (add-after 'unpack 'bootstrap
14398 ;; Move the tests out of the package directory to avoid
14399 ;; packaging them.
14400 (lambda* _
14401 (rename-file "validictory/tests" "tests")
14402 (delete-file "tests/__init__.py")))
14403 (replace 'check
14404 (lambda _
14405 ;; Extend PYTHONPATH so the built package will be found.
14406 (setenv "PYTHONPATH"
14407 (string-append (getcwd) "/build/lib:"
14408 (getenv "PYTHONPATH")))
14409 (invoke "py.test" "-vv" ))))))
14410 (native-inputs
14411 `(("python-pytest" ,python-pytest)))
14412 (home-page
14413 "https://github.com/jamesturk/validictory")
14414 (synopsis "General purpose Python data validator")
14415 (description "It allows validation of arbitrary Python data structures.
14416
14417 The schema format is based on the JSON Schema
14418 proposal (http://json-schema.org), so combined with json the library is also
14419 useful as a validator for JSON data.")
14420 (license license:expat)))
14421
14422 (define-public python2-validictory
14423 (package-with-python2 python-validictory))
14424
14425 (define-public python-pyelftools
14426 (package
14427 (name "python-pyelftools")
14428 (version "0.25")
14429 (source
14430 (origin
14431 (method url-fetch)
14432 (uri (pypi-uri "pyelftools" version))
14433 (sha256
14434 (base32
14435 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14436 (build-system python-build-system)
14437 (arguments
14438 `(#:phases
14439 (modify-phases %standard-phases
14440 (add-before 'check 'set-pythonpath
14441 (lambda _
14442 (setenv "PYTHONPATH"
14443 (string-append
14444 (getcwd) "/test/"
14445 ":" (getenv "PYTHONPATH")))
14446 #t)))))
14447 (home-page
14448 "https://github.com/eliben/pyelftools")
14449 (synopsis
14450 "Analyze binary and library file information")
14451 (description "This Python library provides interfaces for parsing and
14452 analyzing two binary and library file formats; the Executable and Linking
14453 Format (ELF), and debugging information in the Debugging With Attributed
14454 Record Format (DWARF).")
14455 (license license:public-domain)))
14456
14457 (define-public python-pyev
14458 (package
14459 (name "python-pyev")
14460 (version "0.9.0")
14461 (source
14462 (origin
14463 (method url-fetch)
14464 (uri (pypi-uri "pyev" version))
14465 (sha256
14466 (base32
14467 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14468 (build-system python-build-system)
14469 (arguments
14470 `(#:tests? #f ; no test suite
14471 #:phases
14472 (modify-phases %standard-phases
14473 (add-after 'unpack 'patch
14474 (lambda* (#:key inputs #:allow-other-keys)
14475 (let ((libev (string-append (assoc-ref inputs "libev")
14476 "/lib/libev.so.4")))
14477 (substitute* "setup.py"
14478 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14479 (string-append "libev_dll_name = \"" libev "\"")))))))))
14480 (inputs
14481 `(("libev" ,libev)))
14482 (home-page "http://pythonhosted.org/pyev/")
14483 (synopsis "Python libev interface")
14484 (description "Pyev provides a Python interface to libev.")
14485 (license license:gpl3)))
14486
14487 (define-public python2-pyev
14488 (package-with-python2 python-pyev))
14489
14490 (define-public python-imagesize
14491 (package
14492 (name "python-imagesize")
14493 (version "1.2.0")
14494 (source
14495 (origin
14496 (method url-fetch)
14497 (uri (pypi-uri "imagesize" version))
14498 (sha256
14499 (base32
14500 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14501 (build-system python-build-system)
14502 (home-page "https://github.com/shibukawa/imagesize_py")
14503 (synopsis "Gets image size of files in various formats in Python")
14504 (description
14505 "This package allows determination of image size from
14506 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14507 (license license:expat)))
14508
14509 (define-public python2-imagesize
14510 (package-with-python2 python-imagesize))
14511
14512 (define-public python-termstyle
14513 (package
14514 (name "python-termstyle")
14515 (version "0.1.11")
14516 (source
14517 (origin
14518 (method url-fetch)
14519 (uri (pypi-uri "termstyle" version))
14520 (sha256
14521 (base32
14522 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14523 (build-system python-build-system)
14524 (arguments
14525 '(#:phases
14526 (modify-phases %standard-phases
14527 (replace 'check
14528 (lambda _
14529 (invoke "python" "test3.py"))))))
14530 (home-page "https://github.com/gfxmonk/termstyle")
14531 (synopsis "Console text coloring for Python")
14532 (description "This package provides console text coloring for Python.")
14533 (license license:bsd-3)))
14534
14535 (define-public python-argcomplete
14536 (package
14537 (name "python-argcomplete")
14538 (version "1.11.1")
14539 (source
14540 (origin
14541 (method url-fetch)
14542 (uri (pypi-uri "argcomplete" version))
14543 (sha256
14544 (base32
14545 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14546 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14547 (build-system python-build-system)
14548 (native-inputs
14549 `(("python-coverage" ,python-coverage)
14550 ("python-flake8" ,python-flake8)
14551 ("python-pexpect" ,python-pexpect)
14552 ("python-wheel" ,python-wheel)
14553 ("tcsh" ,tcsh)
14554 ("fish" ,fish)
14555 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14556 (home-page "https://github.com/kislyuk/argcomplete")
14557 (synopsis "Shell tab completion for Python argparse")
14558 (description "argcomplete provides extensible command line tab completion
14559 of arguments and options for Python scripts using @code{argparse}. It's
14560 particularly useful for programs with many options or sub-parsers that can
14561 dynamically suggest completions; for example, when browsing resources over the
14562 network.")
14563 (license license:asl2.0)))
14564
14565 (define-public python2-argcomplete
14566 (package-with-python2 python-argcomplete))
14567
14568 (define-public python-csscompressor
14569 (package
14570 (name "python-csscompressor")
14571 (version "0.9.5")
14572 (source
14573 (origin
14574 (method url-fetch)
14575 (uri (pypi-uri "csscompressor" version))
14576 (sha256
14577 (base32
14578 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14579 (build-system python-build-system)
14580 (arguments
14581 '(#:phases
14582 (modify-phases %standard-phases
14583 (replace 'check
14584 (lambda _
14585 (invoke "py.test"))))))
14586 (native-inputs
14587 `(("python-pytest" ,python-pytest)))
14588 (home-page "https://github.com/sprymix/csscompressor")
14589 (synopsis "Python port of YUI CSS Compressor")
14590 (description
14591 "This package provides a python port of YUI CSS Compressor.")
14592 (license license:bsd-3)))
14593
14594 (define-public python-rcssmin
14595 (package
14596 (name "python-rcssmin")
14597 (version "1.0.6")
14598 (source
14599 (origin
14600 (method url-fetch)
14601 (uri (pypi-uri "rcssmin" version))
14602 (sha256
14603 (base32
14604 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14605 (build-system python-build-system)
14606 (arguments
14607 '(#:phases
14608 (modify-phases %standard-phases
14609 (replace 'check
14610 (lambda _
14611 (invoke "python" "run_tests.py" "tests"))))))
14612 (home-page "http://opensource.perlig.de/rcssmin/")
14613 (synopsis "CSS Minifier")
14614 (description "The minifier is based on the semantics of the YUI compressor,
14615 which itself is based on the rule list by Isaac Schlueter.")
14616 (license license:asl2.0)))
14617
14618 (define-public python-rjsmin
14619 (package
14620 (name "python-rjsmin")
14621 (version "1.1.0")
14622 (source
14623 (origin
14624 (method url-fetch)
14625 (uri (pypi-uri "rjsmin" version))
14626 (sha256
14627 (base32
14628 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14629 (modules '((guix build utils)))
14630 (snippet
14631 '(begin
14632 (for-each delete-file (find-files "bench" "\\.js$"))
14633 #t))))
14634 (build-system python-build-system)
14635 (arguments
14636 '(#:tests? #f ; Not all test files included.
14637 #:phases
14638 (modify-phases %standard-phases
14639 (replace 'check
14640 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14641 (add-installed-pythonpath inputs outputs)
14642 (if tests?
14643 (invoke "py.test" "-vv" "tests")
14644 #t))))))
14645 (native-inputs
14646 `(("python-pytest" ,python-pytest)))
14647 (home-page "http://opensource.perlig.de/rjsmin/")
14648 (synopsis "Javascript Minifier")
14649 (description "@code{rJSmin} is a javascript minifier written in Python. The
14650 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14651 is a re-implementation aiming for speed, so it can be used at runtime (rather
14652 than during a preprocessing step).")
14653 (license license:asl2.0)))
14654
14655 (define-public python-xopen
14656 (package
14657 (name "python-xopen")
14658 (version "0.5.0")
14659 (source
14660 (origin
14661 (method url-fetch)
14662 (uri (pypi-uri "xopen" version))
14663 (sha256
14664 (base32
14665 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14666 (build-system python-build-system)
14667 (propagated-inputs
14668 `(("python-setuptools-scm" ,python-setuptools-scm)))
14669 (home-page "https://github.com/marcelm/xopen/")
14670 (synopsis "Open compressed files transparently")
14671 (description "This module provides an @code{xopen} function that works like
14672 Python's built-in @code{open} function, but can also deal with compressed files.
14673 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14674 recognized by their file extensions. The focus is on being as efficient as
14675 possible on all supported Python versions.")
14676 (license license:expat)))
14677
14678 (define-public python2-xopen
14679 (let ((base (package-with-python2
14680 (strip-python2-variant python-xopen))))
14681 (package
14682 (inherit base)
14683 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14684 ,@(package-propagated-inputs base))))))
14685
14686 (define-public python-cheetah
14687 (package
14688 (name "python-cheetah")
14689 (version "3.2.4")
14690 (source
14691 (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "Cheetah3" version))
14694 (sha256
14695 (base32
14696 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14697 (build-system python-build-system)
14698 (arguments
14699 `(#:modules ((guix build utils)
14700 (guix build python-build-system)
14701 (ice-9 ftw)
14702 (srfi srfi-1)
14703 (srfi srfi-26))
14704 #:phases (modify-phases %standard-phases
14705 (add-after 'unpack 'use-absolute-python
14706 (lambda _
14707 (substitute* "Cheetah/CheetahWrapper.py"
14708 (("#!/usr/bin/env python")
14709 (string-append "#!" (which "python"))))
14710 #t))
14711 (add-after 'unpack 'fix-tests
14712 (lambda _
14713 (substitute* "Cheetah/Tests/ImportHooks.py"
14714 (("os.path.dirname\\(__file__\\)")
14715 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14716 #t))
14717 (replace 'check
14718 (lambda _
14719 (let ((cwd (getcwd)))
14720 (setenv "PYTHONPATH"
14721 (string-append
14722 cwd "/build/"
14723 (find (cut string-prefix? "lib" <>)
14724 (scandir (string-append cwd "/build")))
14725 ":" (getenv "PYTHONPATH")))
14726 (setenv "PATH"
14727 (string-append (getenv "PATH")
14728 ":" cwd "/bin"))
14729 (setenv "TMPDIR" "/tmp")
14730
14731 (substitute* "Cheetah/Tests/Test.py"
14732 (("unittest.TextTestRunner\\(\\)")
14733 "unittest.TextTestRunner(verbosity=2)"))
14734
14735 (invoke "python" "Cheetah/Tests/Test.py")))))))
14736 (propagated-inputs
14737 `(("python-markdown" ,python-markdown))) ;optional
14738 (home-page "https://cheetahtemplate.org/")
14739 (synopsis "Template engine")
14740 (description "Cheetah is a text-based template engine and Python code
14741 generator.
14742
14743 Cheetah can be used as a standalone templating utility or referenced as
14744 a library from other Python applications. It has many potential uses,
14745 but web developers looking for a viable alternative to ASP, JSP, PHP and
14746 PSP are expected to be its principle user group.
14747
14748 Features:
14749 @enumerate
14750 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14751 text-based format.
14752 @item Cleanly separates content, graphic design, and program code.
14753 @item Blends the power and flexibility of Python with a simple template language
14754 that non-programmers can understand.
14755 @item Gives template writers full access to any Python data structure, module,
14756 function, object, or method in their templates.
14757 @item Makes code reuse easy by providing an object-orientated interface to
14758 templates that is accessible from Python code or other Cheetah templates.
14759 One template can subclass another and selectively reimplement sections of it.
14760 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14761 improve the performance of a dynamic website.
14762 @item Compiles templates into optimized, yet readable, Python code.
14763 @end enumerate")
14764 (license (license:x11-style "file://LICENSE"))))
14765
14766 (define-public python2-cheetah
14767 (package-with-python2 python-cheetah))
14768
14769 (define-public python-dulwich
14770 (package
14771 (name "python-dulwich")
14772 (version "0.19.16")
14773 (source
14774 (origin
14775 (method url-fetch)
14776 (uri (list (string-append "https://www.dulwich.io/releases/"
14777 "dulwich-" version ".tar.gz")
14778 (pypi-uri "dulwich" version)))
14779 (sha256
14780 (base32
14781 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14782 (build-system python-build-system)
14783 (arguments
14784 `(#:phases
14785 (modify-phases %standard-phases
14786 (add-before 'check 'fix-tests
14787 (lambda* (#:key inputs #:allow-other-keys)
14788 ;; The tests use Popen with a custom environment which doesn't
14789 ;; include PATH.
14790 (substitute* "dulwich/tests/compat/utils.py"
14791 (("'git'") (string-append "'"
14792 (which "git")
14793 "'")))
14794 (substitute* '("dulwich/tests/test_repository.py"
14795 "dulwich/tests/test_hooks.py")
14796 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14797 (setenv "TEST_RUNNER" "unittest")
14798 (setenv "PYTHONHASHSEED" "random")
14799 #t)))))
14800 (propagated-inputs
14801 `(("python-fastimport" ,python-fastimport)
14802 ("python-urllib3" ,python-urllib3)))
14803 (native-inputs
14804 `(("python-mock" ,python-mock)
14805 ("python-geventhttpclient" ,python-geventhttpclient)
14806 ("git" ,git)))
14807 (home-page "https://www.dulwich.io/")
14808 (synopsis "Git implementation in Python")
14809 (description "Dulwich is an implementation of the Git file formats and
14810 protocols written in pure Python.")
14811 ;; Can be used with either license.
14812 (license (list license:asl2.0 license:gpl2+))))
14813
14814 (define-public python2-dulwich
14815 (package-with-python2 python-dulwich))
14816
14817 (define-public python-pbkdf2
14818 (package
14819 (name "python-pbkdf2")
14820 (version "1.3")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "pbkdf2" version))
14825 (sha256
14826 (base32
14827 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14828 (build-system python-build-system)
14829 (arguments
14830 '(#:phases
14831 (modify-phases %standard-phases
14832 (replace 'check
14833 (lambda _
14834 (setenv "PYTHONPATH"
14835 (string-append (getcwd) "/build/lib:"
14836 (getenv "PYTHONPATH")))
14837 (invoke "python" "test/test_pbkdf2.py"))))))
14838 (propagated-inputs
14839 `(("python-pycrypto" ,python-pycrypto))) ; optional
14840 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14841 (synopsis "Password-based key derivation")
14842 (description "This module implements the password-based key derivation
14843 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14844
14845 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14846 is part of the RSA Public Key Cryptography Standards series. The provided
14847 implementation takes a password or a passphrase and a salt value (and
14848 optionally a iteration count, a digest module, and a MAC module) and provides
14849 a file-like object from which an arbitrarily-sized key can be read.")
14850 (license license:expat)))
14851
14852 (define-public python2-pbkdf2
14853 (package-with-python2 python-pbkdf2))
14854
14855 (define-public python-qrcode
14856 (package
14857 (name "python-qrcode")
14858 (version "6.1")
14859 (source
14860 (origin
14861 (method url-fetch)
14862 (uri (pypi-uri "qrcode" version))
14863 (sha256
14864 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14865 (build-system python-build-system)
14866 (arguments
14867 ;; FIXME: Tests require packaging 'pymaging'.
14868 '(#:tests? #f))
14869 (propagated-inputs
14870 `(("python-lxml" ,python-lxml) ; for SVG output
14871 ("python-pillow" ,python-pillow) ; for PNG output
14872 ("python-six" ,python-six)))
14873 (home-page "https://github.com/lincolnloop/python-qrcode")
14874 (synopsis "QR Code image generator")
14875 (description "This package provides a pure Python QR Code generator
14876 module. It uses the Python Imaging Library (PIL) to allow for the generation
14877 of QR Codes.
14878
14879 In addition this package provides a command line tool to generate QR codes and
14880 either write these QR codes to a file or do the output as ascii art at the
14881 console.")
14882 (license license:bsd-3)))
14883
14884 (define-public python2-qrcode
14885 (package-with-python2 python-qrcode))
14886
14887 (define-public python-rst2ansi
14888 (package
14889 (name "python-rst2ansi")
14890 (version "0.1.5")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (pypi-uri "rst2ansi" version))
14895 (sha256
14896 (base32
14897 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14898 (build-system python-build-system)
14899 (propagated-inputs
14900 `(("python-docutils" ,python-docutils)))
14901 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14902 (synopsis "Convert RST to ANSI-decorated console output")
14903 (description
14904 "Python module dedicated to rendering RST (reStructuredText) documents
14905 to ansi-escaped strings suitable for display in a terminal.")
14906 (license license:expat)))
14907
14908 (define-public python-ansi2html
14909 (package
14910 (name "python-ansi2html")
14911 (version "1.2.0")
14912 (source
14913 (origin
14914 (method url-fetch)
14915 (uri (pypi-uri "ansi2html" version))
14916 (sha256
14917 (base32
14918 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14919 (build-system python-build-system)
14920 (native-inputs
14921 `(("python-mock" ,python-mock)
14922 ("python-nose" ,python-nose)))
14923 (propagated-inputs
14924 `(("python-six" ,python-six)))
14925 (home-page "https://github.com/ralphbean/ansi2html")
14926 (synopsis "Convert ANSI-decorated console output to HTML")
14927 (description
14928 "@command{ansi2html} is a Python library and command line utility for
14929 converting text with ANSI color codes to HTML or LaTeX.")
14930 (license license:gpl3+)))
14931
14932 (define-public python2-ansi2html
14933 (package-with-python2 python-ansi2html))
14934
14935 (define-public python-ddt
14936 (package
14937 (name "python-ddt")
14938 (version "1.4.1")
14939 (source
14940 (origin
14941 (method url-fetch)
14942 (uri (pypi-uri "ddt" version))
14943 (sha256
14944 (base32
14945 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14946 (build-system python-build-system)
14947 (native-inputs
14948 `(("python-pytest" ,python-pytest)))
14949 (propagated-inputs
14950 `(("python-pyyaml" ,python-pyyaml)))
14951 (home-page "https://github.com/datadriventests/ddt")
14952 (synopsis "Data-Driven Tests")
14953 (description
14954 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14955 running it with different test data, and make it appear as multiple test
14956 cases.")
14957 (license license:expat)))
14958
14959 (define-public python-pycountry
14960 (package
14961 (name "python-pycountry")
14962 (version "18.5.26")
14963 (source
14964 (origin
14965 (method url-fetch)
14966 (uri (pypi-uri "pycountry" version))
14967 (sha256
14968 (base32
14969 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14970 (build-system python-build-system)
14971 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14972 (synopsis "ISO databases for languages, countries, currencies, etc.")
14973 (description
14974 "@code{pycountry} provides the ISO databases for the standards:
14975 @enumerate
14976 @item 639-3 (Languages)
14977 @item 3166 (Countries)
14978 @item 3166-3 (Deleted Countries)
14979 @item 3166-2 (Subdivisions of countries)
14980 @item 4217 (Currencies)
14981 @item 15924 (Scripts)
14982 @end enumerate
14983 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14984 through a Python API.")
14985 (license license:lgpl2.1+)))
14986
14987 (define-public python2-pycountry
14988 (package-with-python2 python-pycountry))
14989
14990 (define-public python-pycosat
14991 (package
14992 (name "python-pycosat")
14993 (version "0.6.3")
14994 (source
14995 (origin
14996 (method url-fetch)
14997 (uri (pypi-uri "pycosat" version ".zip"))
14998 (sha256
14999 (base32
15000 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15001 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15002 (build-system python-build-system)
15003 (native-inputs
15004 `(("unzip" ,unzip)))
15005 (home-page "https://github.com/ContinuumIO/pycosat")
15006 (synopsis "Bindings to picosat (a SAT solver)")
15007 (description
15008 "This package provides efficient Python bindings to @code{picosat} on
15009 the C level. When importing pycosat, the @code{picosat} solver becomes part
15010 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15011 Problem} (SAT) solver.")
15012 (license license:expat)))
15013
15014 (define-public python2-pycosat
15015 (package-with-python2 python-pycosat))
15016
15017 (define-public python2-ruamel.ordereddict
15018 (package
15019 (name "python2-ruamel.ordereddict")
15020 (version "0.4.9")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "ruamel.ordereddict" version))
15025 (sha256
15026 (base32
15027 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15028 (build-system python-build-system)
15029 (arguments
15030 `(#:python ,python-2
15031 #:phases
15032 (modify-phases %standard-phases
15033 (delete 'check)
15034 (add-after 'install 'check
15035 (lambda* (#:key inputs outputs #:allow-other-keys)
15036 (add-installed-pythonpath inputs outputs)
15037 (invoke "python" "test/testordereddict.py"))))))
15038 (home-page "https://bitbucket.org/ruamel/ordereddict")
15039 (synopsis "Version of dict that keeps keys in insertion order")
15040 (description
15041 "This is an implementation of an ordered dictionary with @dfn{Key
15042 Insertion Order} (KIO: updates of values do not affect the position of the
15043 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15044 removed and put at the back). The standard library module @code{OrderedDict},
15045 implemented later, implements a subset of @code{ordereddict} functionality.
15046 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15047 Order} (KSO, no sorting function can be specified, but a transform can be
15048 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15049 (license license:expat)))
15050
15051 (define-public python-pypeg2
15052 (package
15053 (name "python-pypeg2")
15054 (version "2.15.2")
15055 (source
15056 (origin
15057 (method url-fetch)
15058 (uri (pypi-uri "pyPEG2" version))
15059 (sha256
15060 (base32
15061 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15062 (build-system python-build-system)
15063 (propagated-inputs `(("python-lxml" ,python-lxml)))
15064 (arguments
15065 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15066 '(#:tests? #f))
15067 (home-page "https://fdik.org/pyPEG/")
15068 (synopsis "Parsering Expression Grammars in Python")
15069 (description "PyPEG is an intrinsic parser interpreter framework for
15070 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15071 parse many formal languages.")
15072 (license license:gpl2)))
15073
15074 (define-public python-incremental
15075 (package
15076 (name "python-incremental")
15077 (version "17.5.0")
15078 (source
15079 (origin
15080 (method url-fetch)
15081 (uri (pypi-uri "incremental" version))
15082 (sha256
15083 (base32
15084 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15085 (build-system python-build-system)
15086 (home-page "https://github.com/hawkowl/incremental")
15087 (synopsis "Library for versioning Python projects")
15088 (description "Incremental is a small library that versions your Python
15089 projects.")
15090 (license license:expat)))
15091
15092 (define-public python2-incremental
15093 (package-with-python2 python-incremental))
15094
15095 (define-public python-invoke
15096 (package
15097 (name "python-invoke")
15098 (home-page "https://www.pyinvoke.org/")
15099 (version "1.4.1")
15100 (source (origin
15101 (method url-fetch)
15102 (uri (pypi-uri "invoke" version))
15103 (sha256
15104 (base32
15105 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15106 (build-system python-build-system)
15107 (arguments
15108 ;; XXX: Requires many dependencies that are not yet in Guix.
15109 `(#:tests? #f))
15110 (synopsis "Pythonic task execution")
15111 (description
15112 "Invoke is a Python task execution tool and library, drawing inspiration
15113 from various sources to arrive at a powerful and clean feature set. It is
15114 evolved from the Fabric project, but focuses on local and abstract concerns
15115 instead of servers and network commands.")
15116 (license license:bsd-3)))
15117
15118 (define-public python2-invoke
15119 (package-with-python2 python-invoke))
15120
15121 (define-public python-automat
15122 (package
15123 (name "python-automat")
15124 (version "20.2.0")
15125 (source (origin
15126 (method url-fetch)
15127 (uri (pypi-uri "Automat" version))
15128 (sha256
15129 (base32
15130 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15131 (build-system python-build-system)
15132 ;; We disable the tests because they require python-twisted, while
15133 ;; python-twisted depends on python-automat. Twisted is optional, but the
15134 ;; tests fail if it is not available. Also see
15135 ;; <https://github.com/glyph/automat/issues/71>.
15136 (arguments '(#:tests? #f))
15137 (native-inputs
15138 `(("python-m2r" ,python-m2r)
15139 ("python-setuptools-scm" ,python-setuptools-scm)
15140 ("python-graphviz" ,python-graphviz)))
15141 (propagated-inputs
15142 `(("python-six" ,python-six)
15143 ("python-attrs" ,python-attrs)))
15144 (home-page "https://github.com/glyph/Automat")
15145 (synopsis "Self-service finite-state machines")
15146 (description "Automat is a library for concise, idiomatic Python
15147 expression of finite-state automata (particularly deterministic finite-state
15148 transducers).")
15149 (license license:expat)))
15150
15151 (define-public python2-automat
15152 (package-with-python2 python-automat))
15153
15154 (define-public python-m2r
15155 (package
15156 (name "python-m2r")
15157 (version "0.2.1")
15158 (source (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "m2r" version))
15161 (sha256
15162 (base32
15163 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15164 (build-system python-build-system)
15165 (propagated-inputs
15166 `(("python-docutils" ,python-docutils)
15167 ("python-mistune" ,python-mistune)))
15168 (native-inputs
15169 `(("python-pygments" ,python-pygments)
15170 ("python-mock" ,python-mock)))
15171 (home-page "https://github.com/miyakogi/m2r")
15172 (synopsis "Markdown to reStructuredText converter")
15173 (description "M2R converts a markdown file including reST markups to valid
15174 reST format.")
15175 (license license:expat)))
15176
15177 (define-public python2-m2r
15178 (package-with-python2 python-m2r))
15179
15180 (define-public python-constantly
15181 (package
15182 (name "python-constantly")
15183 (version "15.1.0")
15184 (source (origin
15185 (method url-fetch)
15186 (uri (pypi-uri "constantly" version))
15187 (sha256
15188 (base32
15189 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15190 (build-system python-build-system)
15191 (home-page "https://github.com/twisted/constantly")
15192 (synopsis "Symbolic constants in Python")
15193 (description "Constantly is a Python library that provides symbolic
15194 constant support. It includes collections and constants with text, numeric,
15195 and bit flag values.")
15196 (license license:expat)))
15197
15198 (define-public python2-constantly
15199 (package-with-python2 python-constantly))
15200
15201 (define-public python-attrs
15202 (package
15203 (name "python-attrs")
15204 (version "19.3.0")
15205 (source (origin
15206 (method url-fetch)
15207 (uri (pypi-uri "attrs" version))
15208 (sha256
15209 (base32
15210 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15211 (build-system python-build-system)
15212 (arguments
15213 `(#:modules ((guix build utils)
15214 (guix build python-build-system)
15215 (ice-9 ftw)
15216 (srfi srfi-1)
15217 (srfi srfi-26))
15218 #:phases (modify-phases %standard-phases
15219 (replace 'check
15220 (lambda _
15221 (let ((cwd (getcwd)))
15222 (setenv "PYTHONPATH"
15223 (string-append
15224 cwd "/build/"
15225 (find (cut string-prefix? "lib" <>)
15226 (scandir (string-append cwd "/build")))
15227 ":"
15228 (getenv "PYTHONPATH")))
15229 (invoke "python" "-m" "pytest")))))))
15230 (native-inputs
15231 `(("python-coverage" ,python-coverage)
15232 ("python-hypothesis" ,python-hypothesis)
15233 ("python-pympler" ,python-pympler)
15234 ("python-pytest" ,python-pytest)
15235 ("python-six" ,python-six)
15236 ("python-sphinx" ,python-sphinx)
15237 ("python-zope-interface" ,python-zope-interface)))
15238 (home-page "https://github.com/python-attrs/attrs/")
15239 (synopsis "Attributes without boilerplate")
15240 (description "@code{attrs} is a Python package with class decorators that
15241 ease the chores of implementing the most common attribute-related object
15242 protocols.")
15243 (license license:expat)))
15244
15245 (define-public python2-attrs
15246 (package-with-python2 python-attrs))
15247
15248 (define-public python-attrs-bootstrap
15249 (package
15250 (inherit python-attrs)
15251 (name "python-attrs-bootstrap")
15252 (native-inputs `())
15253 (arguments `(#:tests? #f))))
15254
15255 (define-public python2-attrs-bootstrap
15256 (package-with-python2 python-attrs-bootstrap))
15257
15258 (define-public python2-cliapp
15259 (package
15260 (name "python2-cliapp")
15261 (version "1.20180812.1")
15262 (source
15263 (origin
15264 (method url-fetch)
15265 (uri (string-append
15266 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15267 version ".tar.gz"))
15268 (sha256
15269 (base32
15270 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15271 (build-system python-build-system)
15272 (arguments
15273 `(#:python ,python-2
15274 #:phases
15275 (modify-phases %standard-phases
15276 ;; check phase needs to be run before the build phase. If not,
15277 ;; coverage-test-runner looks for tests for the built source files,
15278 ;; and fails.
15279 (delete 'check)
15280 (add-before 'build 'check
15281 (lambda _
15282 ;; Disable python3 tests
15283 (substitute* "check"
15284 (("python3") "# python3"))
15285 (invoke "./check"))))))
15286 (native-inputs
15287 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15288 ("python2-pep8" ,python2-pep8)))
15289 (propagated-inputs
15290 `(("python2-pyaml" ,python2-pyaml)))
15291 (home-page "https://liw.fi/cliapp/")
15292 (synopsis "Python framework for command line programs")
15293 (description "@code{python2-cliapp} is a python framework for
15294 command line programs. It contains the typical stuff such programs
15295 need to do, such as parsing the command line for options, and
15296 iterating over input files.")
15297 (license license:gpl2+)))
15298
15299 (define-public python2-ttystatus
15300 (package
15301 (name "python2-ttystatus")
15302 (version "0.38")
15303 (source
15304 (origin
15305 (method git-fetch)
15306 (uri (git-reference
15307 (url "http://git.liw.fi/ttystatus")
15308 ;; There are no tags after ttystatus-0.36.
15309 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15310 (sha256
15311 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15312 (file-name (git-file-name name version))))
15313 (build-system python-build-system)
15314 (native-inputs
15315 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15316 ("python2-pep8" ,python2-pep8)))
15317 (arguments
15318 `(#:python ,python-2
15319 #:phases
15320 (modify-phases %standard-phases
15321 ;; check phase needs to be run before the build phase. If not,
15322 ;; coverage-test-runner looks for tests for the built source files,
15323 ;; and fails.
15324 (delete 'check)
15325 (add-before 'build 'check
15326 (lambda _ (invoke "make" "check"))))))
15327 (home-page "https://liw.fi/ttystatus/")
15328 (synopsis "Python library for showing progress reporting and
15329 status updates on terminals")
15330 (description "@code{python2-ttystatus} is a python library for
15331 showing progress reporting and status updates on terminals, for
15332 command line programs. Output is automatically adapted to the width
15333 of the terminal: truncated if it does not fit, and resized if the
15334 terminal size changes.")
15335 (license license:gpl3+)))
15336
15337 (define-public python2-tracing
15338 (package
15339 (name "python2-tracing")
15340 (version "0.10")
15341 (source
15342 (origin
15343 (method url-fetch)
15344 (uri (string-append
15345 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15346 version ".tar.gz"))
15347 (sha256
15348 (base32
15349 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15350 (build-system python-build-system)
15351 (arguments
15352 `(#:python ,python-2))
15353 (home-page "https://liw.fi/tracing/")
15354 (synopsis "Python debug logging helper")
15355 (description "@code{python2-tracing} is a python library for
15356 logging debug messages. It provides a way to turn debugging messages
15357 on and off, based on the filename they occur in. It is much faster
15358 than using @code{logging.Filter} to accomplish the same thing, which
15359 matters when code is run in production mode. The actual logging still
15360 happens using the @code{logging} library.")
15361 (license license:gpl3+)))
15362
15363 (define-public python2-larch
15364 (package
15365 (name "python2-larch")
15366 (version "1.20151025")
15367 (source
15368 (origin
15369 (method url-fetch)
15370 (uri (string-append
15371 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15372 version ".tar.gz"))
15373 (patches (search-patches
15374 "python2-larch-coverage-4.0a6-compatibility.patch"))
15375 (sha256
15376 (base32
15377 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15378 (build-system python-build-system)
15379 (arguments
15380 `(#:python ,python-2
15381 #:phases
15382 (modify-phases %standard-phases
15383 ;; check phase needs to be run before the build phase. If not,
15384 ;; coverage-test-runner looks for tests for the built source files,
15385 ;; and fails.
15386 (delete 'check)
15387 (add-before 'build 'check
15388 (lambda _ (invoke "make" "check"))))))
15389 (native-inputs
15390 `(("cmdtest" ,cmdtest)
15391 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15392 (propagated-inputs
15393 `(("python2-tracing" ,python2-tracing)))
15394 (home-page "https://liw.fi/larch/")
15395 (synopsis "Python copy-on-write B-tree library")
15396 (description "@code{python2-larch} is an implementation of
15397 particular kind of B-tree, based on research by Ohad Rodeh. See
15398 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15399 on the data structure.
15400
15401 The distinctive feature of this B-tree is that a node is never
15402 (conceptually) modified. Instead, all updates are done by
15403 copy-on-write. This makes it easy to clone a tree, and modify only the
15404 clone, while other processes access the original tree.")
15405 (license license:gpl3+)))
15406
15407 (define-public python-astroid
15408 (package
15409 (name "python-astroid")
15410 (version "2.4.2")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "astroid" version))
15415 (sha256
15416 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15417 (modules '((guix build utils)))
15418 (snippet
15419 '(begin
15420 ;; Check to see if the version pinning has been removed.
15421 (substitute* "astroid/__pkginfo__.py"
15422 (("==1\\.4\\.\\*") ">=1.4.0"))
15423 #t))))
15424 (build-system python-build-system)
15425 (propagated-inputs
15426 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15427 ("python-six" ,python-six)
15428 ("python-wrapt" ,python-wrapt)))
15429 (native-inputs
15430 `(("python-dateutil" ,python-dateutil)
15431 ("python-pytest" ,python-pytest)
15432 ("python-pytest-runner" ,python-pytest-runner)))
15433 (home-page "https://github.com/PyCQA/astroid")
15434 (synopsis "Common base representation of python source code for pylint and
15435 other projects")
15436 (description "@code{python-astroid} provides a common base representation
15437 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15438
15439 It provides a compatible representation which comes from the _ast module. It
15440 rebuilds the tree generated by the builtin _ast module by recursively walking
15441 down the AST and building an extended ast. The new node classes have
15442 additional methods and attributes for different usages. They include some
15443 support for static inference and local name scopes. Furthermore, astroid
15444 builds partial trees by inspecting living objects.")
15445 (license license:lgpl2.1+)
15446 (properties `((python2-variant . ,(delay python2-astroid))))))
15447
15448 (define-public python2-astroid
15449 (let ((base (package-with-python2
15450 (strip-python2-variant python-astroid))))
15451 (package (inherit base)
15452 ;; Version 2.x removes python2 support.
15453 (version "1.6.5")
15454 (source
15455 (origin
15456 (method url-fetch)
15457 (uri (pypi-uri "astroid" version))
15458 (sha256
15459 (base32
15460 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15461 (arguments
15462 (substitute-keyword-arguments (package-arguments base)
15463 ((#:phases phases)
15464 `(modify-phases ,phases
15465 (add-after 'unpack 'remove-spurious-test
15466 (lambda _
15467 ;; https://github.com/PyCQA/astroid/issues/276
15468 (delete-file "astroid/tests/unittest_brain.py")
15469 #t))
15470 (replace 'check
15471 (lambda _
15472 (invoke"python" "-m" "unittest" "discover"
15473 "-p" "unittest*.py")))))))
15474 (native-inputs `())
15475 (propagated-inputs
15476 `(("python2-backports-functools-lru-cache"
15477 ,python2-backports-functools-lru-cache)
15478 ("python2-enum34" ,python2-enum34)
15479 ("python2-singledispatch" ,python2-singledispatch)
15480 ,@(alist-delete "python-typed-ast"
15481 (package-propagated-inputs base)))))))
15482
15483 (define-public python-isbnlib
15484 (package
15485 (name "python-isbnlib")
15486 (version "3.10.4")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "isbnlib" version))
15491 (sha256
15492 (base32
15493 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15494 (build-system python-build-system)
15495 (arguments '(#:tests? #f)) ; No test
15496 (home-page "https://github.com/xlcnd/isbnlib")
15497 (synopsis "Python library to work with ISBN strings")
15498 (description "@code{python-isbnlib} is a (pure) python library that provides
15499 several useful methods and functions to validate, clean, transform, hyphenate and
15500 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15501 version, is suitable to be include as a dependency in other projects.")
15502 (license license:lgpl3+)))
15503
15504 (define-public python-isort
15505 (package
15506 (name "python-isort")
15507 (version "4.3.4")
15508 (source
15509 (origin
15510 (method git-fetch)
15511 (uri (git-reference
15512 ;; Tests pass only from the Github sources
15513 (url "https://github.com/timothycrosley/isort")
15514 (commit version)))
15515 (file-name (git-file-name name version))
15516 (sha256
15517 (base32
15518 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15519 (build-system python-build-system)
15520 (native-inputs
15521 `(("python-mock" ,python-mock)
15522 ("python-pytest" ,python-pytest)))
15523 (home-page "https://github.com/timothycrosley/isort")
15524 (synopsis "Python utility/library to sort python imports")
15525 (description "@code{python-isort} is a python utility/library to sort
15526 imports alphabetically, and automatically separated into sections. It
15527 provides a command line utility, a python library and plugins for various
15528 editors.")
15529 (license license:expat)
15530 (properties `((python2-variant . ,(delay python2-isort))))))
15531
15532 (define-public python2-isort
15533 (let ((base (package-with-python2
15534 (strip-python2-variant python-isort))))
15535 (package (inherit base)
15536 (native-inputs
15537 `(("python2-futures" ,python2-futures)
15538 ,@(package-native-inputs base))))))
15539
15540 (define-public python2-backports-functools-lru-cache
15541 (package
15542 (name "python2-backports-functools-lru-cache")
15543 (version "1.6.1")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 ;; only the pypi tarballs contain the necessary metadata
15548 (uri (pypi-uri "backports.functools_lru_cache" version))
15549 (sha256
15550 (base32
15551 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15552 (build-system python-build-system)
15553 (native-inputs
15554 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15555 (arguments
15556 `(#:python ,python-2))
15557 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15558 (synopsis "Backport of functools.lru_cache from Python 3.3")
15559 (description "@code{python2-backports-functools-lru-cache} is a backport
15560 of @code{functools.lru_cache} from python 3.3.")
15561 (license license:expat)))
15562
15563 (define-public python-configparser
15564 (package
15565 (name "python-configparser")
15566 (version "4.0.2")
15567 (source
15568 (origin
15569 (method url-fetch)
15570 (uri (pypi-uri "configparser" version))
15571 (sha256
15572 (base32
15573 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15574 (native-inputs
15575 `(("python-setuptools_scm" ,python-setuptools-scm)))
15576 (build-system python-build-system)
15577 (home-page "https://github.com/jaraco/configparser/")
15578 (synopsis "Backport of configparser from python 3.5")
15579 (description "@code{python-configparser} is a backport of
15580 @code{configparser} from Python 3.5 so that it can be used directly
15581 in other versions.")
15582 (license license:expat)))
15583
15584 (define-public python2-configparser
15585 (package-with-python2 python-configparser))
15586
15587 (define-public python-iniconfig
15588 (package
15589 (name "python-iniconfig")
15590 (version "1.1.1")
15591 (source
15592 (origin
15593 (method url-fetch)
15594 (uri (pypi-uri "iniconfig" version))
15595 (sha256
15596 (base32
15597 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15598 (build-system python-build-system)
15599 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15600 (synopsis "Simple INI-file parser")
15601 (description "The @code{iniconfig} package provides a small and simple
15602 INI-file parser module having a unique set of features; @code{iniconfig}
15603 @itemize
15604 @item maintains the order of sections and entries;
15605 @item supports multi-line values with or without line-continuations;
15606 @item supports \"#\" comments everywhere;
15607 @item raises errors with proper line-numbers;
15608 @item raises an error when two sections have the same name.
15609 @end itemize")
15610 (license license:expat)))
15611
15612 (define-public python-mamba
15613 (package
15614 (name "python-mamba")
15615 (version "0.11.2")
15616 (source (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "mamba" version))
15619 (sha256
15620 (base32
15621 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15622 (build-system python-build-system)
15623 (arguments `(#:tests? #f)) ; No test
15624 (propagated-inputs
15625 `(("python-clint" ,python-clint)
15626 ("python-coverage" ,python-coverage)))
15627 (home-page "https://nestorsalceda.com/mamba/")
15628 (synopsis "Test runner for Python")
15629 (description
15630 "Mamba is a Behaviour-Driven Development tool for Python developers.
15631 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15632 (license license:expat)))
15633
15634 (define-public python-mando
15635 (package
15636 (name "python-mando")
15637 (version "0.6.4")
15638 (source (origin
15639 (method url-fetch)
15640 (uri (pypi-uri "mando" version))
15641 (sha256
15642 (base32
15643 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15644 (build-system python-build-system)
15645 (propagated-inputs
15646 `(("python-rst2ansi" ,python-rst2ansi)
15647 ("python-six" ,python-six)))
15648 (native-inputs
15649 `(("python-pytest" ,python-pytest)))
15650 (home-page "https://mando.readthedocs.org/")
15651 (synopsis
15652 "Wrapper around argparse, allowing creation of complete CLI applications")
15653 (description
15654 "This package is a wrapper around argparse, allowing you to write complete CLI
15655 applications in seconds while maintaining all the flexibility.")
15656 (license license:expat)))
15657
15658 (define-public python2-mando
15659 (package-with-python2 python-mando))
15660
15661 (define-public python2-argparse
15662 (package
15663 (name "python2-argparse")
15664 (version "1.4.0")
15665 (source
15666 (origin
15667 (method url-fetch)
15668 (uri (pypi-uri "argparse" version))
15669 (sha256
15670 (base32
15671 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15672 (build-system python-build-system)
15673 (arguments
15674 `(#:python ,python-2))
15675 (home-page "https://github.com/ThomasWaldmann/argparse/")
15676 (synopsis "Python command-line parsing library")
15677 (description
15678 "This package is mostly for people who want to have @code{argparse} on
15679 older Pythons because it was not part of the standard library back then.")
15680 (license license:psfl)))
15681
15682 (define-public python-fudge
15683 (package
15684 (name "python-fudge")
15685 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15686 ;; package, which is currently the only use of this package.
15687 (version "0.9.6")
15688 (source
15689 (origin
15690 (method url-fetch)
15691 (uri (pypi-uri "fudge" version))
15692 (sha256
15693 (base32
15694 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15695 (build-system python-build-system)
15696 (arguments
15697 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15698 (home-page "https://github.com/fudge-py/fudge")
15699 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15700 (description
15701 "Fudge is a Python module for using fake objects (mocks and stubs) to
15702 test real ones.
15703
15704 In readable Python code, you declare the methods available on your fake object
15705 and how they should be called. Then you inject that into your application and
15706 start testing. This declarative approach means you don’t have to record and
15707 playback actions and you don’t have to inspect your fakes after running code.
15708 If the fake object was used incorrectly then you’ll see an informative
15709 exception message with a traceback that points to the culprit.")
15710 (license license:expat)))
15711
15712 (define-public python2-fudge
15713 (package-with-python2 python-fudge))
15714
15715 (define-public python-mwclient
15716 (package
15717 (name "python-mwclient")
15718 (version "0.10.1")
15719 (source
15720 (origin
15721 (method git-fetch)
15722 ;; The PyPI version wouldn't contain tests.
15723 (uri (git-reference
15724 (url "https://github.com/mwclient/mwclient")
15725 (commit (string-append "v" version))))
15726 (file-name (git-file-name name version))
15727 (sha256
15728 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15729 (build-system python-build-system)
15730 (propagated-inputs
15731 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15732 ("python-six" ,python-six)))
15733 (native-inputs
15734 `(("python-mock" ,python-mock)
15735 ("python-pytest" ,python-pytest)
15736 ("python-pytest-cov" ,python-pytest-cov)
15737 ("python-pytest-runner" ,python-pytest-runner)
15738 ("python-responses" ,python-responses)))
15739 (home-page "https://github.com/btongminh/mwclient")
15740 (synopsis "MediaWiki API client")
15741 (description "This package provides a MediaWiki API client.")
15742 (license license:expat)))
15743
15744 (define-public python2-mwclient
15745 (package-with-python2 python-mwclient))
15746
15747 (define-public python-utils
15748 (package
15749 (name "python-utils")
15750 (version "2.4.0")
15751 (source (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "python-utils" version))
15754 (sha256
15755 (base32
15756 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15757 (build-system python-build-system)
15758 (arguments
15759 `(#:phases
15760 (modify-phases %standard-phases
15761 (replace 'check
15762 (lambda* (#:key inputs outputs #:allow-other-keys)
15763 (add-installed-pythonpath inputs outputs)
15764 (delete-file "pytest.ini")
15765 (invoke "pytest" "-vv"))))))
15766 (native-inputs
15767 `(("pytest-runner" ,python-pytest-runner)
15768 ("pytest" ,python-pytest)
15769 ("six" ,python-six)))
15770 (home-page "https://github.com/WoLpH/python-utils")
15771 (synopsis "Convenient utilities not included with the standard Python install")
15772 (description
15773 "Python Utils is a collection of small Python functions and classes which
15774 make common patterns shorter and easier.")
15775 (license license:bsd-2)))
15776
15777 (define-public python2-utils
15778 (package-with-python2 python-utils))
15779
15780 (define-public python-diff-match-patch
15781 (package
15782 (name "python-diff-match-patch")
15783 (version "20121119")
15784 (source
15785 (origin
15786 (method url-fetch)
15787 (uri (pypi-uri "diff-match-patch" version))
15788 (sha256
15789 (base32
15790 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15791 (build-system python-build-system)
15792 (home-page "https://code.google.com/p/google-diff-match-patch")
15793 (synopsis "Synchronize plain text")
15794 (description "Diff Match and Patch libraries offer robust algorithms to
15795 perform the operations required for synchronizing plain text.")
15796 (license license:asl2.0)))
15797
15798 (define-public python2-diff-match-patch
15799 (package-with-python2 python-diff-match-patch))
15800
15801 (define-public python-dirsync
15802 (package
15803 (name "python-dirsync")
15804 (version "2.2.5")
15805 (source
15806 (origin
15807 (method url-fetch)
15808 (uri (pypi-uri "dirsync" version))
15809 (sha256
15810 (base32
15811 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15812 (build-system python-build-system)
15813 (propagated-inputs
15814 `(("six" ,python-six)))
15815 (home-page "https://github.com/tkhyn/dirsync")
15816 (synopsis "Advanced directory tree synchronisation tool")
15817 (description "Advanced directory tree synchronisation tool.")
15818 (license license:expat)))
15819
15820 (define-public python2-dirsync
15821 (package-with-python2 python-dirsync))
15822
15823 (define-public python-levenshtein
15824 (package
15825 (name "python-levenshtein")
15826 (version "0.12.0")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "python-Levenshtein" version))
15831 (sha256
15832 (base32
15833 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15834 (build-system python-build-system)
15835 (home-page "https://github.com/ztane/python-Levenshtein")
15836 (synopsis "Fast computation of Levenshtein distance and string similarity")
15837 (description
15838 "The Levenshtein Python C extension module contains functions for fast computation of
15839 @enumerate
15840 @item Levenshtein (edit) distance, and edit operations
15841 @item string similarity
15842 @item approximate median strings, and generally string averaging
15843 @item string sequence and set similarity
15844 @end enumerate
15845 It supports both normal and Unicode strings.")
15846 (license license:gpl2+)))
15847
15848 (define-public python2-levenshtein
15849 (package-with-python2 python-levenshtein))
15850
15851 (define-public python-scandir
15852 (package
15853 (name "python-scandir")
15854 (version "1.10.0")
15855 (source
15856 (origin
15857 (method url-fetch)
15858 (uri (pypi-uri "scandir" version))
15859 (sha256
15860 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15861 (build-system python-build-system)
15862 (arguments
15863 `(#:phases (modify-phases %standard-phases
15864 (replace 'check
15865 (lambda _
15866 (invoke "python" "test/run_tests.py"))))))
15867 (home-page "https://github.com/benhoyt/scandir")
15868 (synopsis "Directory iteration function")
15869 (description
15870 "Directory iteration function like os.listdir(), except that instead of
15871 returning a list of bare filenames, it yields DirEntry objects that include
15872 file type and stat information along with the name. Using scandir() increases
15873 the speed of os.walk() by 2-20 times (depending on the platform and file
15874 system) by avoiding unnecessary calls to os.stat() in most cases.
15875
15876 This package is part of the Python standard library since version 3.5.")
15877 (license license:bsd-3)))
15878
15879 (define-public python2-scandir
15880 (package-with-python2 python-scandir))
15881
15882 (define-public python2-stemming
15883 (package
15884 (name "python2-stemming")
15885 (version "1.0.1")
15886 (source
15887 (origin
15888 (method url-fetch)
15889 (uri (pypi-uri "stemming" version))
15890 (sha256
15891 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15892 (build-system python-build-system)
15893 (arguments
15894 `(#:python ,python-2))
15895 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15896 (synopsis "Python implementations of various stemming algorithms")
15897 (description
15898 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15899 stemming algorithms for English. These implementations are straightforward and
15900 efficient, unlike some Python versions of the same algorithms available on the
15901 Web. This package is an extraction of the stemming code included in the Whoosh
15902 search engine.")
15903 (license license:public-domain)))
15904
15905 (define-public python-factory-boy
15906 (package
15907 (name "python-factory-boy")
15908 (version "2.8.1")
15909 (source
15910 (origin
15911 (method url-fetch)
15912 (uri (pypi-uri "factory_boy" version))
15913 (sha256
15914 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15915 (build-system python-build-system)
15916 (arguments
15917 ;; Tests are not included in the tarball.
15918 `(#:tests? #f))
15919 (propagated-inputs
15920 `(("faker" ,python-faker)))
15921 (home-page "https://github.com/benhoyt/scandir")
15922 (synopsis "Versatile test fixtures replacement")
15923 (description
15924 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15925
15926 As a fixtures replacement tool, it aims to replace static, hard to maintain
15927 fixtures with easy-to-use factories for complex object.
15928
15929 Instead of building an exhaustive test setup with every possible combination
15930 of corner cases, factory_boy allows you to use objects customized for the
15931 current test, while only declaring the test-specific fields")
15932 (license license:expat)))
15933
15934 (define-public python2-factory-boy
15935 (package-with-python2 python-factory-boy))
15936
15937 (define-public python-translate-toolkit
15938 (package
15939 (name "python-translate-toolkit")
15940 (version "2.1.0")
15941 (source
15942 (origin
15943 (method url-fetch)
15944 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15945 (sha256
15946 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15947 (build-system python-build-system)
15948 (native-inputs
15949 `(("python-pytest" ,python-pytest)
15950 ("python-sphinx" ,python-sphinx)))
15951 (propagated-inputs
15952 `(("python-babel" ,python-babel)
15953 ("python-beautifulsoup4" ,python-beautifulsoup4)
15954 ("python-chardet" ,python-chardet)
15955 ("python-diff-match-patch" ,python-diff-match-patch)
15956 ("python-levenshtein" ,python-levenshtein)
15957 ("python-lxml" ,python-lxml)
15958 ("python-six" ,python-six)
15959 ("python-vobject" ,python-vobject)
15960 ("python-pyyaml" ,python-pyyaml)))
15961 (arguments
15962 ;; TODO: tests are not run, because they end with
15963 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15964 ;; 'parse_funcs'
15965 ;; during test setup.
15966 `(#:tests? #f))
15967 (home-page "https://toolkit.translatehouse.org")
15968 (synopsis "Tools and API for translation and localization engineering")
15969 (description
15970 "Tools and API for translation and localization engineering. It contains
15971 several utilities, as well as an API for building localization tools.")
15972 (license license:gpl2+)))
15973
15974 (define-public python2-translate-toolkit
15975 (package-with-python2 python-translate-toolkit))
15976
15977 (define-public python-packaging
15978 (package
15979 (name "python-packaging")
15980 (version "20.0")
15981 (source
15982 (origin
15983 (method url-fetch)
15984 (uri (pypi-uri "packaging" version))
15985 ;; XXX: The URL in the patch file is wrong, it should be
15986 ;; <https://github.com/pypa/packaging/pull/256>.
15987 (patches (search-patches "python-packaging-test-arch.patch"))
15988 (sha256
15989 (base32
15990 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15991 (build-system python-build-system)
15992 (arguments
15993 `(#:phases (modify-phases %standard-phases
15994 (replace 'check
15995 (lambda* (#:key tests? #:allow-other-keys)
15996 (if tests?
15997 (invoke "py.test" "-vv")
15998 (format #t "test suite not run~%"))
15999 #t)))))
16000 (native-inputs
16001 `(("python-pretend" ,python-pretend)
16002 ("python-pytest" ,python-pytest)))
16003 (propagated-inputs
16004 `(("python-pyparsing" ,python-pyparsing)
16005 ("python-six" ,python-six)))
16006 (home-page "https://github.com/pypa/packaging")
16007 (synopsis "Core utilities for Python packages")
16008 (description "Packaging is a Python module for dealing with Python packages.
16009 It offers an interface for working with package versions, names, and dependency
16010 information.")
16011 ;; From 'LICENSE': This software is made available under the terms of
16012 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16013 ;; Contributions to this software is made under the terms of *both* these
16014 ;; licenses.
16015 (license (list license:asl2.0 license:bsd-2))))
16016
16017 (define-public python2-packaging
16018 (package-with-python2 python-packaging))
16019
16020 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16021 (define-public python-packaging-bootstrap
16022 (hidden-package
16023 (package/inherit
16024 python-packaging
16025 (name "python-packaging-bootstrap")
16026 (native-inputs '())
16027 (propagated-inputs
16028 `(("python-pyparsing" ,python-pyparsing)))
16029 (arguments '(#:tests? #f)))))
16030
16031 (define-public python2-packaging-bootstrap
16032 (hidden-package
16033 (package/inherit
16034 python2-packaging
16035 (name "python2-packaging-bootstrap")
16036 (native-inputs '())
16037 (propagated-inputs
16038 `(("python-pyparsing" ,python2-pyparsing)))
16039 (arguments
16040 `(#:tests? #f
16041 ,@(package-arguments python2-packaging))))))
16042
16043 (define-public python-relatorio
16044 (package
16045 (name "python-relatorio")
16046 (version "0.8.0")
16047 (source
16048 (origin
16049 (method url-fetch)
16050 (uri (pypi-uri "relatorio" version))
16051 (sha256
16052 (base32
16053 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16054 (build-system python-build-system)
16055 (propagated-inputs
16056 `(("python-lxml" ,python-lxml)
16057 ("python-genshi" ,python-genshi)))
16058 (native-inputs
16059 `(("python-magic" ,python-magic)))
16060 (home-page "https://relatorio.tryton.org/")
16061 (synopsis "Templating library able to output ODT and PDF files")
16062 (description "Relatorio is a templating library which provides a way to
16063 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16064 for more filetypes can be easily added by creating plugins for them.")
16065 (license license:gpl3+)))
16066
16067 (define-public python2-relatorio
16068 (package-with-python2 python-relatorio))
16069
16070 (define-public python-radon
16071 (package
16072 (name "python-radon")
16073 (version "4.1.0")
16074 (source
16075 (origin
16076 (method url-fetch)
16077 (uri (pypi-uri "radon" version))
16078 (sha256
16079 (base32
16080 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16081 (build-system python-build-system)
16082 (arguments
16083 `(#:phases (modify-phases %standard-phases
16084 (replace 'check
16085 (lambda _
16086 (invoke "python" "radon/tests/run.py"))))))
16087 (propagated-inputs
16088 `(("python-colorama" ,python-colorama)
16089 ("python-flake8-polyfill" ,python-flake8-polyfill)
16090 ("python-mando" ,python-mando)))
16091 (native-inputs
16092 `(("python-pytest" ,python-pytest)
16093 ("python-pytest-mock" ,python-pytest-mock)))
16094 (home-page "https://radon.readthedocs.org/")
16095 (synopsis "Code Metrics in Python")
16096 (description "Radon is a Python tool which computes various code metrics.
16097 Supported metrics are:
16098 @itemize @bullet
16099 @item raw metrics: SLOC, comment lines, blank lines, &c.
16100 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16101 @item Halstead metrics (all of them)
16102 @item the Maintainability Index (a Visual Studio metric)
16103 @end itemize")
16104 (properties `((python2-variant . ,(delay python2-radon))))
16105 (license license:expat)))
16106
16107 (define-public python2-radon
16108 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16109 (package
16110 (inherit base)
16111 (propagated-inputs
16112 `(("python-configparser" ,python2-configparser)
16113 ("python-future" ,python2-future)
16114 ,@(package-propagated-inputs base))))))
16115
16116 (define-public python-sure
16117 (package
16118 (name "python-sure")
16119 (version "1.4.11")
16120 (source
16121 (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "sure" version))
16124 (sha256
16125 (base32
16126 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16127 (build-system python-build-system)
16128 (propagated-inputs
16129 `(("python-mock" ,python-mock)
16130 ("python-six" ,python-six)))
16131 (native-inputs
16132 `(("python-nose" ,python-nose)))
16133 (home-page "https://github.com/gabrielfalcao/sure")
16134 (synopsis "Automated testing library in python for python")
16135 (description
16136 "Sure is a python library that leverages a DSL for writing assertions.
16137 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16138 (license license:gpl3+)))
16139
16140 (define-public python2-sure
16141 (package-with-python2 python-sure))
16142
16143 (define-public python2-couleur
16144 ;; This package does not seem to support python3 at all, hence,
16145 ;; only the python2 variant definition is provided.
16146 (package
16147 (name "python2-couleur")
16148 (version "0.6.2")
16149 (source
16150 (origin
16151 (method url-fetch)
16152 (uri (pypi-uri "couleur" version))
16153 (sha256
16154 (base32
16155 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16156 (build-system python-build-system)
16157 (arguments
16158 `(#:python ,python-2))
16159 (home-page "https://github.com/gabrielfalcao/couleur")
16160 (synopsis
16161 "ANSI terminal tool for python, colored shell and other handy fancy features")
16162 (description
16163 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16164 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16165 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16166 ;; https://github.com/gabrielfalcao/couleur/issues/11
16167 (license license:lgpl3+)))
16168
16169 (define-public python-misaka
16170 (package
16171 (name "python-misaka")
16172 (version "2.1.1")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (pypi-uri "misaka" version))
16177 (sha256
16178 (base32
16179 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16180 (build-system python-build-system)
16181 (arguments
16182 `(;; Line 37 of setup.py calls self.run_command('develop')
16183 ;; in the 'check' phase. This command seems to be trying
16184 ;; to write to
16185 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16186 ;; for which it does not have the permission to write.
16187 #:tests? #f))
16188 (propagated-inputs
16189 `(("python-cffi" ,python-cffi)))
16190 (home-page "https://github.com/FSX/misaka")
16191 (synopsis "Python binding for Hoedown")
16192 (description
16193 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16194 library written in C. It features a fast HTML renderer and functionality to make custom
16195 renderers (e.g. man pages or LaTeX).")
16196 (license license:expat)))
16197
16198 (define-public python2-misaka
16199 (package-with-python2 python-misaka))
16200
16201 (define-public python2-steadymark
16202 ;; This is forced into being a python2 only variant
16203 ;; due to its dependence on couleur that has no support
16204 ;; for python3
16205 (package
16206 (name "python2-steadymark")
16207 (version "0.7.3")
16208 (source
16209 (origin
16210 (method url-fetch)
16211 (uri (pypi-uri "steadymark" version))
16212 (sha256
16213 (base32
16214 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16215 (build-system python-build-system)
16216 (native-inputs
16217 `(("python-couleur" ,python2-couleur)
16218 ("python-sure" ,python2-sure)
16219 ("python-misaka" ,python2-misaka)))
16220 (arguments
16221 `(#:python ,python-2
16222 #:phases
16223 (modify-phases %standard-phases
16224 (add-before 'build 'patch-setup-py
16225 (lambda _
16226 ;; Update requirements from dependency==version
16227 ;; to dependency>=version
16228 (substitute* "setup.py"
16229 (("==") ">="))
16230 #t)))))
16231 (home-page "https://github.com/gabrielfalcao/steadymark")
16232 (synopsis "Markdown-based test runner for python")
16233 (description
16234 "@code{Steadymark} allows documentation to be written in github-flavoured
16235 markdown. The documentation may contain snippets of code surrounded by python
16236 code blocks and @code{Steadymark} will find these snippets and run them, making
16237 sure that there are no old malfunctional examples in the documentation examples.")
16238 (license license:expat)))
16239
16240 (define-public python-jsonpointer
16241 (package
16242 (name "python-jsonpointer")
16243 (version "1.10")
16244 (source
16245 (origin
16246 (method url-fetch)
16247 (uri (pypi-uri "jsonpointer" version))
16248 (sha256
16249 (base32
16250 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16251 (build-system python-build-system)
16252 (home-page "https://github.com/stefankoegl/python-json-pointer")
16253 (synopsis "Identify specific nodes in a JSON document")
16254 (description "@code{jsonpointer} allows you to access specific nodes
16255 by path in a JSON document (see RFC 6901).")
16256 (license license:bsd-3)))
16257
16258 (define-public python2-jsonpointer
16259 (package-with-python2 python-jsonpointer))
16260
16261 (define-public python-jsonpatch
16262 (package
16263 (name "python-jsonpatch")
16264 (version "1.16")
16265 (source
16266 (origin
16267 (method git-fetch)
16268 ;; pypi version lacks tests.js
16269 (uri (git-reference
16270 (url "https://github.com/stefankoegl/python-json-patch")
16271 (commit (string-append "v" version))))
16272 (file-name (git-file-name name version))
16273 (sha256
16274 (base32
16275 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16276 (build-system python-build-system)
16277 (propagated-inputs
16278 `(("python-jsonpointer" ,python-jsonpointer)))
16279 (home-page "https://github.com/stefankoegl/python-json-patch")
16280 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16281 (description "@code{jsonpatch} is a library and program that allows
16282 applying JSON Patches according to RFC 6902.")
16283 (license license:bsd-3)))
16284
16285 (define-public python2-jsonpatch
16286 (package-with-python2 python-jsonpatch))
16287
16288 (define-public python-jsonpatch-0.4
16289 (package (inherit python-jsonpatch)
16290 (name "python-jsonpatch")
16291 (version "0.4")
16292 (source
16293 (origin
16294 (method git-fetch)
16295 (uri (git-reference
16296 (url "https://github.com/stefankoegl/python-json-patch")
16297 (commit (string-append "v" version))))
16298 (file-name (git-file-name name version))
16299 (sha256
16300 (base32
16301 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16302
16303 (define-public python2-jsonpatch-0.4
16304 (package-with-python2 python-jsonpatch-0.4))
16305
16306 (define-public python-rfc3986
16307 (package
16308 (name "python-rfc3986")
16309 (version "1.4.0")
16310 (source (origin
16311 (method url-fetch)
16312 (uri (pypi-uri "rfc3986" version))
16313 (sha256
16314 (base32
16315 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16316 (build-system python-build-system)
16317 (arguments
16318 `(#:modules ((guix build utils)
16319 (guix build python-build-system)
16320 (ice-9 ftw)
16321 (srfi srfi-1)
16322 (srfi srfi-26))
16323 #:phases
16324 (modify-phases %standard-phases
16325 (replace 'check
16326 (lambda _
16327 (let ((cwd (getcwd)))
16328 (setenv "PYTHONPATH"
16329 (string-append cwd "/build/"
16330 (find (cut string-prefix? "lib" <>)
16331 (scandir (string-append cwd "/build")))
16332 ":"
16333 (getenv "PYTHONPATH")))
16334 (invoke "pytest" "-v")))))))
16335 (native-inputs
16336 `(("python-pytest" ,python-pytest)))
16337 (home-page "https://rfc3986.readthedocs.io/")
16338 (synopsis "Parse and validate URI references")
16339 (description
16340 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16341 validation and authority parsing. This module also supports RFC@tie{}6874
16342 which adds support for zone identifiers to IPv6 addresses.")
16343 (license license:asl2.0)))
16344
16345 (define-public python2-rfc3986
16346 (package-with-python2 python-rfc3986))
16347
16348 (define-public python-rfc3987
16349 (package
16350 (name "python-rfc3987")
16351 (version "1.3.7")
16352 (source
16353 (origin
16354 (method url-fetch)
16355 (uri (pypi-uri "rfc3987" version))
16356 (sha256
16357 (base32
16358 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16359 (build-system python-build-system)
16360 (home-page "https://pypi.org/project/rfc3987/")
16361 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16362 (description "@code{rfc3987} provides routines for parsing and
16363 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16364 (license license:gpl3+)))
16365
16366 (define-public python2-rfc3987
16367 (package-with-python2 python-rfc3987))
16368
16369 ;; The latest commit contains fixes for building with both python3 and python2.
16370 (define-public python-rfc6555
16371 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16372 (revision "1"))
16373 (package
16374 (name "python-rfc6555")
16375 (version (git-version "0.0.0" revision commit))
16376 (source (origin
16377 (method git-fetch)
16378 (uri (git-reference
16379 (url "https://github.com/sethmlarson/rfc6555")
16380 (commit commit)))
16381 (file-name (git-file-name name version))
16382 (sha256
16383 (base32
16384 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16385 (build-system python-build-system)
16386 (arguments
16387 '(#:phases
16388 (modify-phases %standard-phases
16389 (replace 'check
16390 (lambda* (#:key tests? #:allow-other-keys)
16391 (if tests?
16392 ;; Other tests require network access.
16393 (invoke "pytest" "tests/test_ipv6.py")
16394 #t))))))
16395 (native-inputs
16396 `(("python-pytest" ,python-pytest)))
16397 (home-page "https://pypi.org/project/rfc6555/")
16398 (synopsis "Python implementation of RFC 6555")
16399 (description
16400 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16401 6555. Provided with a single file and dead-simple API to allow easy vendoring
16402 and integration into other projects.")
16403 (properties `((python2-variant . ,(delay python2-rfc6555))))
16404 (license license:asl2.0))))
16405
16406 (define-public python2-rfc6555
16407 (let ((base (package-with-python2
16408 (strip-python2-variant python-rfc6555))))
16409 (package
16410 (inherit base)
16411 (propagated-inputs
16412 `(("python2-selectors2" ,python2-selectors2))))))
16413
16414 (define-public python-bagit
16415 (package
16416 (name "python-bagit")
16417 (version "1.7.0")
16418 (source
16419 (origin
16420 (method url-fetch)
16421 (uri (pypi-uri "bagit" version))
16422 (sha256
16423 (base32
16424 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16425 (build-system python-build-system)
16426 (native-inputs
16427 `(("python-setuptools-scm" ,python-setuptools-scm)
16428 ("python-coverage" ,python-coverage)
16429 ("python-mock" ,python-mock)))
16430 (home-page "https://libraryofcongress.github.io/bagit-python/")
16431 (synopsis "Create and validate BagIt packages")
16432 (description "Bagit is a Python library and command line utility for working
16433 with BagIt style packages. BagIt is a minimalist packaging format for digital
16434 preservation.")
16435 (license license:cc0)))
16436
16437 (define-public python-prov
16438 (package
16439 (name "python-prov")
16440 (version "2.0.0")
16441 (source
16442 (origin
16443 (method url-fetch)
16444 (uri (pypi-uri "prov" version))
16445 (sha256
16446 (base32
16447 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16448 (build-system python-build-system)
16449 (propagated-inputs
16450 `(("python-dateutil" ,python-dateutil)
16451 ("python-lxml" ,python-lxml)
16452 ("python-networkx" ,python-networkx)
16453 ("python-rdflib" ,python-rdflib)))
16454 (native-inputs
16455 `(("graphviz" ,graphviz)
16456 ("python-pydot" ,python-pydot)))
16457 (home-page "https://github.com/trungdong/prov")
16458 (synopsis
16459 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16460 (description
16461 "This package provides a library for W3C Provenance Data Model supporting
16462 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16463 (license license:expat)))
16464
16465 (define-public python-arcp
16466 (package
16467 (name "python-arcp")
16468 (version "0.2.1")
16469 (source
16470 (origin
16471 (method url-fetch)
16472 (uri (pypi-uri "arcp" version))
16473 (sha256
16474 (base32
16475 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16476 (build-system python-build-system)
16477 (native-inputs
16478 `(("python-pytest" ,python-pytest)))
16479 (home-page "http://arcp.readthedocs.io/")
16480 (synopsis
16481 "Archive and Package URI parser and generator")
16482 (description
16483 "@acronym{arcp, Archive and Package} provides functions for creating
16484 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16485 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16486 consume or reference hypermedia resources bundled inside a file archive or an
16487 application package, as well as to resolve URIs for archive resources within a
16488 programmatic framework. This URI scheme provides mechanisms to generate a
16489 unique base URI to represent the root of the archive, so that relative URI
16490 references in a bundled resource can be resolved within the archive without
16491 having to extract the archive content on the local file system. An arcp URI can
16492 be used for purposes of isolation (e.g. when consuming multiple archives),
16493 security constraints (avoiding \"climb out\" from the archive), or for
16494 externally identiyfing sub-resources referenced by hypermedia formats.")
16495 (license license:asl2.0)))
16496
16497 (define-public python-shellescape
16498 (package
16499 (name "python-shellescape")
16500 (version "3.8.1")
16501 (source
16502 (origin
16503 (method git-fetch)
16504 (uri (git-reference
16505 (url "https://github.com/chrissimpkins/shellescape")
16506 (commit (string-append "v" version))))
16507 (file-name (git-file-name name version))
16508 (sha256
16509 (base32
16510 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16511 (build-system python-build-system)
16512 (arguments
16513 '(#:phases
16514 (modify-phases %standard-phases
16515 (replace 'check
16516 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16517 (when tests?
16518 (add-installed-pythonpath inputs outputs)
16519 (invoke "python" "tests/test_shellescape.py"))
16520 #t)))))
16521 (native-inputs
16522 `(("python-pytest" ,python-pytest)))
16523 (home-page "https://github.com/chrissimpkins/shellescape")
16524 (synopsis
16525 "Shell escape a string to safely use it as a token in a shell command")
16526 (description
16527 "The shellescape Python module defines the @code{shellescape.quote()}
16528 function that returns a shell-escaped version of a Python string. This is a
16529 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16530 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16531 (license license:expat)))
16532
16533 (define-public python-validators
16534 (package
16535 (name "python-validators")
16536 (version "0.14.2")
16537 (source (origin
16538 (method url-fetch)
16539 (uri (pypi-uri "validators" version))
16540 (sha256
16541 (base32
16542 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16543 (build-system python-build-system)
16544 (arguments
16545 '(#:phases (modify-phases %standard-phases
16546 (replace 'check
16547 (lambda _
16548 (invoke "pytest" "-vv"))))))
16549 (propagated-inputs
16550 `(("python-decorator" ,python-decorator)
16551 ("python-six" ,python-six)))
16552 (native-inputs
16553 `(("python-flake8" ,python-flake8)
16554 ("python-isort" ,python-isort)
16555 ("python-pytest" ,python-pytest)))
16556 (home-page "https://github.com/kvesteri/validators")
16557 (synopsis "Data validation library")
16558 (description
16559 "This package contains validators for different things such as email
16560 addresses, IP addresses, URLs, hashes and more. It has been designed to
16561 be easy to use and not require defining a schema or form just to validate
16562 some input.")
16563 (license license:expat)))
16564
16565 (define-public python2-validators
16566 (package-with-python2 python-validators))
16567
16568 (define-public python-validate-email
16569 (package
16570 (name "python-validate-email")
16571 (version "1.3")
16572 (source
16573 (origin
16574 (method url-fetch)
16575 (uri (pypi-uri "validate_email" version))
16576 (sha256
16577 (base32
16578 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16579 (build-system python-build-system)
16580 (home-page "https://github.com/syrusakbary/validate_email")
16581 (synopsis "Verifies if an email address is valid and really exists")
16582 (description "@code{validate_email} can be used to verify if an email
16583 address is valid and really exists.")
16584 (license license:lgpl3+)))
16585
16586 (define-public python2-validate-email
16587 (package-with-python2 python-validate-email))
16588
16589 (define-public python-flex
16590 (package
16591 (name "python-flex")
16592 (version "6.10.0")
16593 (source
16594 (origin
16595 (method url-fetch)
16596 (uri (pypi-uri "flex" version))
16597 (sha256
16598 (base32
16599 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16600 (build-system python-build-system)
16601 (propagated-inputs
16602 `(("python-click" ,python-click)
16603 ("python-iso8601" ,python-iso8601)
16604 ("python-jsonpointer" ,python-jsonpointer)
16605 ("python-pyyaml" ,python-pyyaml)
16606 ("python-requests" ,python-requests)
16607 ("python-rfc3987" ,python-rfc3987)
16608 ("python-six" ,python-six)
16609 ("python-validate-email" ,python-validate-email)))
16610 (home-page "https://github.com/pipermerriam/flex")
16611 (synopsis "Validates Swagger schemata")
16612 (description "@code{flex} can be used to validate Swagger schemata.")
16613 (license license:bsd-3)))
16614
16615 (define-public python2-flex
16616 (package-with-python2 python-flex))
16617
16618 (define-public python-marshmallow
16619 (package
16620 (name "python-marshmallow")
16621 (version "3.9.1")
16622 (source
16623 (origin
16624 (method url-fetch)
16625 (uri (pypi-uri "marshmallow" version))
16626 (sha256
16627 (base32
16628 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16629 (build-system python-build-system)
16630 (propagated-inputs
16631 `(("python-dateutil" ,python-dateutil)
16632 ("python-simplejson" ,python-simplejson)))
16633 (native-inputs
16634 `(("python-pytest" ,python-pytest)
16635 ("python-pytz" ,python-pytz)))
16636 (home-page "https://github.com/marshmallow-code/marshmallow")
16637 (synopsis "Convert complex datatypes to and from native
16638 Python datatypes.")
16639 (description "@code{marshmallow} provides a library for converting
16640 complex datatypes to and from native Python datatypes.")
16641 (license license:expat)))
16642
16643 (define-public python-apispec
16644 (package
16645 (name "python-apispec")
16646 (version "4.0.0")
16647 (source
16648 (origin
16649 (method url-fetch)
16650 (uri (pypi-uri "apispec" version))
16651 (sha256
16652 (base32
16653 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16654 (build-system python-build-system)
16655 (arguments
16656 '(#:phases (modify-phases %standard-phases
16657 (add-after 'unpack 'disable-prance-tests
16658 (lambda _
16659 ;; Disable validation tests since they require the
16660 ;; optional 'prance' library which is not yet in Guix.
16661 (substitute* "tests/test_ext_marshmallow_openapi.py"
16662 (("def test_openapi_tools_validate.*" all)
16663 (string-append "@pytest.mark.xfail\n" all)))))
16664 (replace 'check
16665 (lambda _
16666 (setenv "PYTHONPATH"
16667 (string-append "./build/lib:"
16668 (getenv "PYTHONPATH")))
16669 (invoke "pytest" "-vv"))))))
16670 (propagated-inputs
16671 `(("python-pyyaml" ,python-pyyaml)))
16672 (native-inputs
16673 `(("python-pytest" ,python-pytest)
16674 ("python-marshmallow" ,python-marshmallow)))
16675 (home-page "https://github.com/marshmallow-code/apispec")
16676 (synopsis "Swagger/OpenAPI specification generator")
16677 (description "@code{python-apispec} is a pluggable API specification
16678 generator. It currently supports the OpenAPI specification, formerly known
16679 as Swagger.")
16680 (license license:expat)))
16681
16682 (define-public python-flasgger
16683 (package
16684 (name "python-flasgger")
16685 (version "0.6.3")
16686 (source
16687 (origin
16688 (method git-fetch)
16689 (uri (git-reference
16690 (url "https://github.com/rochacbruno/flasgger")
16691 (commit version)))
16692 (file-name (git-file-name name version))
16693 (sha256
16694 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16695 (build-system python-build-system)
16696 (arguments
16697 `(#:phases
16698 (modify-phases %standard-phases
16699 (replace 'check
16700 (lambda* (#:key inputs outputs #:allow-other-keys)
16701 (substitute* "Makefile"
16702 (("flake8 flasgger --ignore=F403")
16703 "flake8 flasgger --ignore=E731,F403"))
16704 (setenv "PYTHONPATH" (string-append (getcwd)
16705 ":"
16706 (getenv "PYTHONPATH")))
16707 (invoke "py.test"))))))
16708 (propagated-inputs
16709 `(("python-flask" ,python-flask)
16710 ("python-pyyaml" ,python-pyyaml)
16711 ("python-jsonschema" ,python-jsonschema)
16712 ("python-mistune" ,python-mistune)
16713 ("python-six" ,python-six)))
16714 (native-inputs
16715 `(("python-decorator" ,python-decorator)
16716 ("python-flake8" ,python-flake8)
16717 ("python-flask-restful" ,python-flask-restful)
16718 ("python-flex" ,python-flex)
16719 ("python-pytest" ,python-pytest)
16720 ("python-pytest-cov" ,python-pytest-cov)
16721 ("python-marshmallow" ,python-marshmallow)
16722 ("python-apispec" ,python-apispec)))
16723 (home-page "https://github.com/rochacbruno/flasgger/")
16724 (synopsis "Extract Swagger specs from your Flask project")
16725 (description "@code{python-flasgger} allows extracting Swagger specs
16726 from your Flask project. It is a fork of Flask-Swagger.")
16727 (license license:expat)))
16728
16729 (define-public python-swagger-spec-validator
16730 (package
16731 (name "python-swagger-spec-validator")
16732 (version "2.4.3")
16733 (source
16734 (origin
16735 (method url-fetch)
16736 (uri (pypi-uri "swagger-spec-validator" version))
16737 (sha256
16738 (base32
16739 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16740 (build-system python-build-system)
16741 (propagated-inputs
16742 `(("python-jsonschema" ,python-jsonschema)
16743 ("python-pyyaml" ,python-pyyaml)
16744 ("python-six" ,python-six)))
16745 (home-page
16746 "https://github.com/Yelp/swagger_spec_validator")
16747 (synopsis "Validation of Swagger specifications")
16748 (description "@code{swagger_spec_validator} provides a library for
16749 validating Swagger API specifications.")
16750 (license license:asl2.0)))
16751
16752 (define-public python2-swagger-spec-validator
16753 (package-with-python2 python-swagger-spec-validator))
16754
16755 (define-public python-apache-libcloud
16756 (package
16757 (name "python-apache-libcloud")
16758 (version "3.1.0")
16759 (source
16760 (origin
16761 (method url-fetch)
16762 (uri (pypi-uri "apache-libcloud" version))
16763 (sha256
16764 (base32
16765 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16766 (build-system python-build-system)
16767 (arguments
16768 `(#:phases
16769 (modify-phases %standard-phases
16770 (add-after 'unpack 'patch-ssh
16771 (lambda* (#:key inputs #:allow-other-keys)
16772 (substitute* "libcloud/compute/ssh.py"
16773 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16774 "/bin/ssh" "'")))
16775 #t))
16776 (add-after 'unpack 'patch-tests
16777 (lambda _
16778 (substitute* "libcloud/test/compute/test_ssh_client.py"
16779 (("class ShellOutSSHClientTests")
16780 "@unittest.skip(\"Guix container doesn't have ssh service\")
16781 class ShellOutSSHClientTests"))
16782 #t))
16783 (add-before 'check 'copy-secret
16784 (lambda _
16785 (copy-file "libcloud/test/secrets.py-dist"
16786 "libcloud/test/secrets.py")
16787 #t)))))
16788 (inputs
16789 `(("openssh" ,openssh)))
16790 (propagated-inputs
16791 `(("python-paramiko" ,python-paramiko)
16792 ("python-requests" ,python-requests)))
16793 (native-inputs
16794 `(("python-lockfile" ,python-lockfile)
16795 ("python-mock" ,python-mock)
16796 ("python-pytest" ,python-pytest)
16797 ("python-pytest-runner" ,python-pytest-runner)
16798 ("python-requests-mock" ,python-requests-mock)))
16799 (home-page "https://libcloud.apache.org/")
16800 (synopsis "Unified Cloud API")
16801 (description "@code{libcloud} is a Python library for interacting with
16802 many of the popular cloud service providers using a unified API.")
16803 (license license:asl2.0)))
16804
16805 (define-public python2-apache-libcloud
16806 (package-with-python2 python-apache-libcloud))
16807
16808 (define-public python-smmap
16809 (package
16810 (name "python-smmap")
16811 (version "3.0.1")
16812 (source
16813 (origin
16814 (method url-fetch)
16815 (uri (pypi-uri "smmap" version))
16816 (sha256
16817 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16818 (build-system python-build-system)
16819 (native-inputs
16820 `(("python-nosexcover" ,python-nosexcover)))
16821 (home-page "https://github.com/Byron/smmap")
16822 (synopsis "Python sliding window memory map manager")
16823 (description "@code{smmap} is a pure Python implementation of a sliding
16824 window memory map manager.")
16825 (license license:bsd-3)))
16826
16827 (define-public python-smmap2
16828 (deprecated-package "python-smmap2" python-smmap))
16829
16830 (define-public python2-smmap
16831 (package-with-python2 python-smmap))
16832
16833 (define-public python2-smmap2
16834 (deprecated-package "python2-smmap2" python2-smmap))
16835
16836 (define-public python-regex
16837 (package
16838 (name "python-regex")
16839 (version "2020.6.8")
16840 (source (origin
16841 (method url-fetch)
16842 (uri (pypi-uri "regex" version))
16843 (sha256
16844 (base32
16845 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16846 (build-system python-build-system)
16847 (arguments
16848 '(#:phases
16849 (modify-phases %standard-phases
16850 (replace 'check
16851 (lambda* (#:key inputs outputs #:allow-other-keys)
16852 (add-installed-pythonpath inputs outputs)
16853 (invoke "python" "-c"
16854 "from regex.test_regex import test_main; test_main()"))))))
16855 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16856 (synopsis "Alternative regular expression module")
16857 (description "This regular expression implementation is backwards-
16858 compatible with the standard @code{re} module, but offers additional
16859 functionality like full case-folding for case-insensitive matches in Unicode.")
16860 (license license:psfl)))
16861
16862 (define-public python2-regex
16863 (package-with-python2 python-regex))
16864
16865 (define-public python-pyopengl
16866 (package
16867 (name "python-pyopengl")
16868 (version "3.1.5")
16869 (source
16870 (origin
16871 (method url-fetch)
16872 (uri (pypi-uri "PyOpenGL" version))
16873 (sha256
16874 (base32
16875 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16876 (build-system python-build-system)
16877 (inputs
16878 `(("mesa" ,mesa)
16879 ("freeglut" ,freeglut)
16880 ("glu" ,glu)))
16881 (arguments
16882 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16883 ;attribute 'OSMesa'
16884 #:phases
16885 (modify-phases %standard-phases
16886 (add-before 'build 'fix-paths
16887 (lambda* (#:key inputs outputs #:allow-other-keys)
16888 (substitute* '("OpenGL/platform/ctypesloader.py")
16889 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16890 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16891 (("'GL'")
16892 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16893 (("'GLU'")
16894 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16895 (("'glut',")
16896 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16897 (("'GLESv1_CM'")
16898 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16899 (("'GLESv2'")
16900 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16901 ;; Not providing libgle. It seems to be very old.
16902 #t)))))
16903 (home-page "http://pyopengl.sourceforge.net")
16904 (synopsis "Standard OpenGL bindings for Python")
16905 (description
16906 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16907 related APIs. The binding is created using the standard @code{ctypes}
16908 library.")
16909 (license license:bsd-3)))
16910
16911 (define-public python-pyopengl-accelerate
16912 (package
16913 (inherit python-pyopengl)
16914 (name "python-pyopengl-accelerate")
16915 (version "3.1.5")
16916 (source
16917 (origin
16918 (method url-fetch)
16919 (uri (pypi-uri "PyOpenGL-accelerate" version))
16920 (sha256
16921 (base32
16922 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16923 (inputs
16924 `(("mesa" ,mesa)
16925 ("python-numpy" ,python-numpy))) ; for cython module
16926 ; numpy_formathandler, thus not propagated
16927 (arguments
16928 `(#:tests? #f
16929 #:phases
16930 (modify-phases %standard-phases
16931 (delete 'fix-paths))))
16932 (synopsis "Acceleration code for PyOpenGL")
16933 (description
16934 "This is the Cython-coded accelerator module for PyOpenGL.")))
16935
16936 (define-public python-rencode
16937 (package
16938 (name "python-rencode")
16939 (version "1.0.5")
16940 (source
16941 (origin
16942 (method url-fetch)
16943 (uri (pypi-uri "rencode" version))
16944 (sha256
16945 (base32
16946 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16947 (build-system python-build-system)
16948 (arguments
16949 `(#:phases
16950 (modify-phases %standard-phases
16951 (add-before 'check 'delete-bogus-test
16952 ;; This test requires /home/aresch/Downloads, which is not provided by
16953 ;; the build environment.
16954 (lambda _
16955 (delete-file "rencode/t.py")
16956 #t)))))
16957 (native-inputs `(("pkg-config" ,pkg-config)
16958 ("python-cython" ,python-cython)))
16959 (home-page "https://github.com/aresch/rencode")
16960 (synopsis "Serialization of heterogeneous data structures")
16961 (description
16962 "The @code{rencode} module is a data structure serialization library,
16963 similar to @code{bencode} from the BitTorrent project. For complex,
16964 heterogeneous data structures with many small elements, r-encoding stake up
16965 significantly less space than b-encodings. This version of rencode is a
16966 complete rewrite in Cython to attempt to increase the performance over the
16967 pure Python module.")
16968 (license license:bsd-3)))
16969
16970 (define-public python2-rencode
16971 (package-with-python2 python-rencode))
16972
16973 (define-public python-xenon
16974 (package
16975 (name "python-xenon")
16976 (version "0.7.0")
16977 (source
16978 (origin
16979 (method url-fetch)
16980 (uri (pypi-uri "xenon" version))
16981 (sha256
16982 (base32
16983 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16984 (build-system python-build-system)
16985 (native-inputs
16986 `(("python-pyyaml" ,python-pyyaml)
16987 ("python-radon" ,python-radon)
16988 ("python-requests" ,python-requests)
16989 ("python-flake8" ,python-flake8)
16990 ("python-tox" ,python-tox)))
16991 (arguments
16992 `(#:tests? #f ;test suite not shipped with the PyPI archive
16993 #:phases
16994 (modify-phases %standard-phases
16995 (add-before 'build 'patch-test-requirements
16996 (lambda _
16997 ;; Remove httpretty dependency for tests.
16998 (substitute* "setup.py"
16999 (("httpretty") ""))
17000 #t)))))
17001 (home-page "https://xenon.readthedocs.org/")
17002 (synopsis "Monitor code metrics for Python on your CI server")
17003 (description
17004 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17005 Ideally, @code{xenon} is run every time code is committed. Through command
17006 line options, various thresholds can be set for the complexity of code. It
17007 will fail (i.e. it will exit with a non-zero exit code) when any of these
17008 requirements is not met.")
17009 (license license:expat)))
17010
17011 (define-public python2-xenon
17012 (package-with-python2 python-xenon))
17013
17014 (define-public python-pysocks
17015 (package
17016 (name "python-pysocks")
17017 (version "1.7.1")
17018 (source
17019 (origin
17020 (method url-fetch)
17021 (uri (pypi-uri "PySocks" version))
17022 (sha256
17023 (base32
17024 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17025 (build-system python-build-system)
17026 (arguments `(#:tests? #f))
17027 (home-page "https://github.com/Anorov/PySocks")
17028 (synopsis "SOCKS client module")
17029 (description "@code{pysocks} is an updated and semi-actively maintained
17030 version of @code{SocksiPy} with bug fixes and extra features.")
17031 (license license:bsd-3)))
17032
17033 (define-public python2-pysocks
17034 (package-with-python2 python-pysocks))
17035
17036 (define-public python-pydiff
17037 (package
17038 (name "python-pydiff")
17039 (version "0.2")
17040 (source
17041 (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "pydiff" version))
17044 (sha256
17045 (base32
17046 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17047 (build-system python-build-system)
17048 (home-page "https://github.com/myint/pydiff")
17049 (synopsis "Library to diff two Python files at the bytecode level")
17050 (description
17051 "@code{pydiff} makes it easy to look for actual code changes while
17052 ignoring formatting changes.")
17053 (license license:expat)))
17054
17055 (define-public python2-pydiff
17056 (package-with-python2 python-pydiff))
17057
17058 (define-public python-pydub
17059 (package
17060 (name "python-pydub")
17061 (version "0.24.1")
17062 (source
17063 (origin
17064 (method url-fetch)
17065 (uri (pypi-uri "pydub" version))
17066 (sha256
17067 (base32
17068 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17069 (build-system python-build-system)
17070 (arguments
17071 `(#:phases
17072 (modify-phases %standard-phases
17073 (add-after 'unpack 'fix-ffmpeg-path
17074 (lambda* (#:key inputs #:allow-other-keys)
17075 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17076 (substitute* '("pydub/utils.py")
17077 (("return \"ffmpeg\"")
17078 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17079 (("return \"ffplay\"")
17080 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17081 (("return \"ffprobe\"")
17082 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17083 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17084 #t))))))
17085 (home-page "https://pydub.com")
17086 (inputs
17087 `(("ffmpeg" ,ffmpeg)))
17088 (propagated-inputs
17089 `(("python-scipy" ,python-scipy)))
17090 (synopsis "Manipulate audio with a high level interface in Python")
17091 (description
17092 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17093 @code{ffmpeg} to open various audio formats.")
17094 (license license:expat))) ; MIT license
17095
17096 (define-public python-tqdm
17097 (package
17098 (name "python-tqdm")
17099 (version "4.43.0")
17100 (source
17101 (origin
17102 (method url-fetch)
17103 (uri (pypi-uri "tqdm" version))
17104 (sha256
17105 (base32
17106 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17107 (build-system python-build-system)
17108 (arguments
17109 '(#:phases (modify-phases %standard-phases
17110 (replace 'check
17111 (lambda* (#:key inputs outputs #:allow-other-keys)
17112 (add-installed-pythonpath inputs outputs)
17113 ;; This invokation is taken from tox.ini.
17114 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17115 "-d" "-v" "tqdm/"))))))
17116 (native-inputs
17117 `(("python-nose" ,python-nose)))
17118 (home-page "https://github.com/tqdm/tqdm")
17119 (synopsis "Fast, extensible progress meter")
17120 (description
17121 "Make loops show a progress bar on the console by just wrapping any
17122 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17123 design and layout.")
17124 (license (list license:mpl2.0 license:expat))))
17125
17126 (define-public python2-tqdm
17127 (package-with-python2 python-tqdm))
17128
17129 (define-public python-pkginfo
17130 (package
17131 (name "python-pkginfo")
17132 (version "1.4.2")
17133 (source
17134 (origin
17135 (method url-fetch)
17136 (uri (pypi-uri "pkginfo" version))
17137 (sha256
17138 (base32
17139 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17140 (build-system python-build-system)
17141 (arguments
17142 ;; The tests are broken upstream.
17143 '(#:tests? #f))
17144 (home-page
17145 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17146 (synopsis
17147 "Query metadatdata from sdists, bdists, and installed packages")
17148 (description
17149 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17150 source distriubtion (an sdist) or a binary distribution (e.g., created by
17151 running bdist_egg). It can also query the EGG-INFO directory of an installed
17152 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17153 created by running @code{python setup.py develop}).")
17154 (license license:expat)))
17155
17156 (define-public python2-pkginfo
17157 (package-with-python2 python-pkginfo))
17158
17159 (define-public python-twine
17160 (package
17161 (name "python-twine")
17162 (version "1.15.0")
17163 (source
17164 (origin
17165 (method url-fetch)
17166 (uri (pypi-uri "twine" version))
17167 (sha256
17168 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17169 (build-system python-build-system)
17170 (propagated-inputs
17171 `(("python-tqdm" ,python-tqdm)
17172 ("python-packaging" ,python-packaging)
17173 ("python-pkginfo" ,python-pkginfo)
17174 ("python-readme-renderer" ,python-readme-renderer)
17175 ("python-requests" ,python-requests)
17176 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17177 (home-page "https://github.com/pypa/twine")
17178 (synopsis "Collection of utilities for interacting with PyPI")
17179 (description
17180 "@code{twine} currently supports registering projects and uploading
17181 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17182 their files and supports any packaging format (including wheels).")
17183 (license license:asl2.0)))
17184
17185 (define-public python2-twine
17186 (package-with-python2 python-twine))
17187
17188 (define-public python-linecache2
17189 (package
17190 (name "python-linecache2")
17191 (version "1.0.0")
17192 (source
17193 (origin
17194 (method url-fetch)
17195 (uri (pypi-uri "linecache2" version))
17196 (sha256
17197 (base32
17198 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17199 (build-system python-build-system)
17200 (arguments
17201 `(;; The tests depend on unittest2, and our version is a bit too old.
17202 #:tests? #f))
17203 (native-inputs
17204 `(("python-pbr" ,python-pbr-minimal)))
17205 (home-page
17206 "https://github.com/testing-cabal/linecache2")
17207 (synopsis "Backports of the linecache module")
17208 (description
17209 "The linecache module allows one to get any line from any file, while
17210 attempting to optimize internally, using a cache, the common case where many
17211 lines are read from a single file.")
17212 (license license:psfl)))
17213
17214 (define-public python2-linecache2
17215 (package-with-python2 python-linecache2))
17216
17217 (define-public python-traceback2
17218 (package
17219 (name "python-traceback2")
17220 (version "1.4.0")
17221 (source
17222 (origin
17223 (method url-fetch)
17224 (uri (pypi-uri "traceback2" version))
17225 (sha256
17226 (base32
17227 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17228 (build-system python-build-system)
17229 (arguments
17230 `(;; python-traceback2 and python-unittest2 depend on one another.
17231 #:tests? #f))
17232 (native-inputs
17233 `(("python-pbr" ,python-pbr-minimal)))
17234 (propagated-inputs
17235 `(("python-linecache2" ,python-linecache2)))
17236 (home-page
17237 "https://github.com/testing-cabal/traceback2")
17238 (synopsis "Backports of the traceback module")
17239 (description
17240 "This module provides a standard interface to extract, format and print
17241 stack traces of Python programs. It exactly mimics the behavior of the Python
17242 interpreter when it prints a stack trace.")
17243 (license license:psfl)))
17244
17245 (define-public python2-traceback2
17246 (package-with-python2 python-traceback2))
17247
17248 (define-public python-ratelimiter
17249 (package
17250 (name "python-ratelimiter")
17251 (version "1.2.0")
17252 (source
17253 (origin
17254 (method url-fetch)
17255 (uri (pypi-uri "ratelimiter" version))
17256 (sha256
17257 (base32
17258 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17259 (build-system python-build-system)
17260 (arguments
17261 '(#:tests? #f)) ; There are no tests in the pypi archive.
17262 (home-page "https://github.com/RazerM/ratelimiter")
17263 (synopsis "Simple rate limiting object")
17264 (description
17265 "The @code{ratelimiter} module ensures that an operation will not be
17266 executed more than a given number of times during a given period.")
17267 (license license:asl2.0)))
17268
17269 (define-public python2-ratelimiter
17270 (package-with-python2 python-ratelimiter))
17271
17272 (define-public python-dukpy
17273 (package
17274 (name "python-dukpy")
17275 (version "0.3")
17276 (source
17277 (origin
17278 (method git-fetch)
17279 (uri (git-reference
17280 (url "https://github.com/kovidgoyal/dukpy")
17281 (commit (string-append "v" version))))
17282 (file-name (git-file-name name version))
17283 (sha256
17284 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17285 (build-system python-build-system)
17286 (home-page "https://github.com/kovidgoyal/dukpy")
17287 (synopsis "Run JavaScript in python")
17288 (description
17289 "dukpy is a JavaScript runtime environment for Python using the duktape
17290 embeddable JavaScript engine.")
17291 ;; Dukpy is licensed under MIT like the embedded duktape library,
17292 ;; with 'errors.c' as GPL3.
17293 (license (list license:expat license:gpl3))))
17294
17295 (define-public python2-dukpy
17296 (package-with-python2 python-dukpy))
17297
17298 (define-public python-jsonrpclib-pelix
17299 (package
17300 (name "python-jsonrpclib-pelix")
17301 (version "0.3.2")
17302 (source
17303 (origin
17304 (method url-fetch)
17305 (uri (pypi-uri "jsonrpclib-pelix" version))
17306 (sha256
17307 (base32
17308 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17309 (build-system python-build-system)
17310 (arguments
17311 `(#:tests? #f)) ; no tests in PyPI tarball
17312 (home-page "https://github.com/tcalmant/jsonrpclib/")
17313 (synopsis "JSON-RPC 2.0 client library for Python")
17314 (description
17315 "This library implements the JSON-RPC v2.0
17316 specification (backwards-compatible) as a client library for Python. This
17317 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17318 services.")
17319 (license license:asl2.0)))
17320
17321 (define-public python2-jsonrpclib-pelix
17322 (package-with-python2 python-jsonrpclib-pelix))
17323
17324 (define-public python-setuptools-scm-git-archive
17325 (package
17326 (name "python-setuptools-scm-git-archive")
17327 (version "1.0")
17328 (source
17329 (origin
17330 (method url-fetch)
17331 (uri (pypi-uri "setuptools_scm_git_archive" version))
17332 (sha256
17333 (base32
17334 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17335 (build-system python-build-system)
17336 (native-inputs
17337 `(("python-pytest" ,python-pytest)))
17338 (propagated-inputs
17339 `(("python-setuptools-scm" ,python-setuptools-scm)))
17340 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17341 (synopsis "Setuptools_scm plugin for git archives")
17342 (description
17343 "The setuptools_scm_git_archive package is a plugin to
17344 setuptools_scm, which supports obtaining versions from git archives that
17345 belong to tagged versions.")
17346 (license license:expat)))
17347
17348 (define-public python2-setuptools-scm-git-archive
17349 (package-with-python2 python-setuptools-scm-git-archive))
17350
17351 (define-public python-setuptools-git
17352 (package
17353 (name "python-setuptools-git")
17354 (version "1.2")
17355 (source
17356 (origin
17357 (method url-fetch)
17358 (uri (pypi-uri "setuptools-git" version))
17359 (sha256
17360 (base32
17361 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17362 (build-system python-build-system)
17363 (arguments
17364 `(#:phases
17365 (modify-phases %standard-phases
17366 ;; This is needed for tests.
17367 (add-after 'unpack 'configure-git
17368 (lambda _
17369 (setenv "HOME" "/tmp")
17370 (invoke "git" "config" "--global" "user.email" "guix")
17371 (invoke "git" "config" "--global" "user.name" "guix")
17372 #t)))))
17373 (native-inputs
17374 `(("git" ,git-minimal)))
17375 (home-page "https://github.com/msabramo/setuptools-git")
17376 (synopsis "Setuptools revision control system plugin for Git")
17377 (description
17378 "This package provides a plugin for Setuptools for revision control with
17379 Git.")
17380 (license license:bsd-3)))
17381
17382 (define-public python-pyclipper
17383 (package
17384 (name "python-pyclipper")
17385 (version "1.1.0.post3")
17386 (source
17387 (origin
17388 (method url-fetch)
17389 (uri (pypi-uri "pyclipper" version ".zip"))
17390 (sha256
17391 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17392 (modules '((guix build utils)))
17393 (snippet
17394 '(begin
17395 ;; This file is generated by Cython.
17396 (delete-file "pyclipper/pyclipper.cpp") #t))))
17397 (build-system python-build-system)
17398 (arguments
17399 `(#:phases
17400 (modify-phases %standard-phases
17401 (add-before 'build 'cythonize-sources
17402 (lambda _
17403 (with-directory-excursion "pyclipper"
17404 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17405 (propagated-inputs
17406 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17407 (native-inputs
17408 `(("python-cython" ,python-cython)
17409 ("python-pytest" ,python-pytest)
17410 ("python-pytest-runner" ,python-pytest-runner)
17411 ("python-unittest2" ,python-unittest2)
17412 ("unzip" ,unzip)))
17413 (home-page "https://github.com/greginvm/pyclipper")
17414 (synopsis "Wrapper for Angus Johnson's Clipper library")
17415 (description
17416 "Pyclipper is a Cython wrapper for the C++ translation of the
17417 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17418 (license license:expat)))
17419
17420 (define-public python2-pyclipper
17421 (package-with-python2 python-pyclipper))
17422
17423 (define-public python2-booleanoperations
17424 (package
17425 (name "python2-booleanoperations")
17426 (version "0.7.1")
17427 (source
17428 (origin
17429 (method url-fetch)
17430 (uri (pypi-uri "booleanOperations" version ".zip"))
17431 (sha256
17432 (base32
17433 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17434 (build-system python-build-system)
17435 (arguments
17436 `(#:python ,python-2))
17437 (native-inputs
17438 `(("unzip" ,unzip)
17439 ("python2-pytest" ,python2-pytest)
17440 ("python2-pytest-runner" ,python2-pytest-runner)))
17441 (propagated-inputs
17442 `(("python-fonttools" ,python2-fonttools)
17443 ("python-pyclipper" ,python2-pyclipper)
17444 ("python-ufolib" ,python2-ufolib)))
17445 (home-page "https://github.com/typemytype/booleanOperations")
17446 (synopsis "Boolean operations on paths")
17447 (description
17448 "BooleanOperations provides a Python library that enables
17449 boolean operations on paths.")
17450 (license license:expat)))
17451
17452 (define-public python-tempdir
17453 (package
17454 (name "python-tempdir")
17455 (version "0.7.1")
17456 (source
17457 (origin
17458 (method url-fetch)
17459 (uri (pypi-uri "tempdir" version))
17460 (sha256
17461 (base32
17462 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17463 (build-system python-build-system)
17464 (home-page "https://pypi.org/project/tempdir/")
17465 (arguments
17466 ;; the package has no tests
17467 '(#:tests? #f))
17468 (synopsis "Python library for managing temporary directories")
17469 (description
17470 "This library manages temporary directories that are automatically
17471 deleted with all their contents when they are no longer needed. It is
17472 particularly convenient for use in tests.")
17473 (license license:expat)))
17474
17475 (define-public python2-tempdir
17476 (package-with-python2 python-tempdir))
17477
17478 (define-public python-activepapers
17479 (package
17480 (name "python-activepapers")
17481 (version "0.2.2")
17482 (source
17483 (origin
17484 (method url-fetch)
17485 (uri (pypi-uri "ActivePapers.Py" version))
17486 (sha256
17487 (base32
17488 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17489 (build-system python-build-system)
17490 (arguments
17491 `(#:modules ((ice-9 ftw)
17492 (srfi srfi-1)
17493 (guix build utils)
17494 (guix build python-build-system))
17495
17496 #:phases
17497 (modify-phases %standard-phases
17498 (add-after 'unpack 'delete-python2-code
17499 (lambda _
17500 (for-each delete-file
17501 '("lib/activepapers/builtins2.py"
17502 "lib/activepapers/standardlib2.py"
17503 "lib/activepapers/utility2.py"))))
17504 (replace 'check
17505 (lambda _
17506 ;; Deactivate the test cases that download files
17507 (setenv "NO_NETWORK_ACCESS" "1")
17508 ;; For some strange reason, some tests fail if nosetests runs all
17509 ;; test modules in a single execution. They pass if each test
17510 ;; module is run individually.
17511 (for-each (lambda (filename)
17512 (invoke "nosetests"
17513 (string-append "tests/" filename)))
17514 (scandir "tests"
17515 (lambda (filename)
17516 (string-suffix? ".py" filename)))))))))
17517 (native-inputs
17518 `(("python-tempdir" ,python-tempdir)
17519 ("python-nose" ,python-nose)))
17520 (propagated-inputs
17521 `(("python-h5py" ,python-h5py)))
17522 (home-page "https://www.activepapers.org/")
17523 (synopsis "Executable papers for scientific computing")
17524 (description
17525 "ActivePapers is a tool for working with executable papers, which
17526 combine data, code, and documentation in single-file packages,
17527 suitable for publication as supplementary material or on repositories
17528 such as figshare or Zenodo.")
17529 (properties `((python2-variant . ,(delay python2-activepapers))))
17530 (license license:bsd-3)))
17531
17532 (define-public python2-activepapers
17533 (let ((base (package-with-python2
17534 (strip-python2-variant python-activepapers))))
17535 (package
17536 (inherit base)
17537 (arguments
17538 (substitute-keyword-arguments (package-arguments base)
17539 ((#:phases phases)
17540 `(modify-phases ,phases
17541 (delete 'delete-python2-code)
17542 (add-after 'unpack 'delete-python3-code
17543 (lambda _
17544 (for-each delete-file
17545 '("lib/activepapers/builtins3.py"
17546 "lib/activepapers/standardlib3.py"
17547 "lib/activepapers/utility3.py")))))))))))
17548
17549 (define-public python-semver
17550 (package
17551 (name "python-semver")
17552 (version "2.9.0")
17553 (source
17554 (origin
17555 (method url-fetch)
17556 (uri (pypi-uri "semver" version))
17557 (sha256
17558 (base32
17559 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17560 (build-system python-build-system)
17561 (arguments
17562 `(#:phases (modify-phases %standard-phases
17563 (replace 'check
17564 (lambda _
17565 (delete-file "setup.cfg")
17566 (invoke "py.test"))))))
17567 (native-inputs
17568 `(("python-pytest" ,python-pytest)))
17569 (home-page "https://github.com/k-bx/python-semver")
17570 (synopsis "Python helper for Semantic Versioning")
17571 (description "This package provides a Python library for
17572 @url{Semantic Versioning, http://semver.org/}.")
17573 (license license:bsd-3)))
17574
17575 (define-public python2-semver
17576 (package-with-python2 python-semver))
17577
17578 (define-public python-pyro4
17579 (package
17580 (name "python-pyro4")
17581 (version "4.77")
17582 (source
17583 (origin
17584 (method url-fetch)
17585 (uri (pypi-uri "Pyro4" version))
17586 (sha256
17587 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17588 (build-system python-build-system)
17589 (arguments
17590 '(#:tests? #f)) ;FIXME: Some tests require network access.
17591 (native-inputs
17592 `(("python-cloudpickle" ,python-cloudpickle)
17593 ("python-dill" ,python-dill)
17594 ("python-msgpack" ,python-msgpack)))
17595 (propagated-inputs
17596 `(("python-serpent" ,python-serpent)))
17597 (home-page "https://pyro4.readthedocs.io")
17598 (synopsis "Distributed object middleware for Python")
17599 (description
17600 "Pyro enables you to build applications in which objects can talk to each
17601 other over the network. You can just use normal Python method calls to call
17602 objects on other machines, also known as remote procedure calls (RPC).")
17603 (license license:expat)))
17604
17605 (define-public python2-pyro
17606 (package
17607 (name "python2-pyro")
17608 (version "3.16")
17609 (source
17610 (origin
17611 (method url-fetch)
17612 (uri (pypi-uri "Pyro" version))
17613 (file-name (string-append "Pyro-" version ".tar.gz"))
17614 (sha256
17615 (base32
17616 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17617 (build-system python-build-system)
17618 (arguments
17619 ;; Pyro is not compatible with Python 3
17620 `(#:python ,python-2
17621 ;; Pyro has no test cases for automatic execution
17622 #:tests? #f))
17623 (home-page "https://pythonhosted.org/Pyro/")
17624 (synopsis "Distributed object manager for Python")
17625 (description "Pyro is a Distributed Object Technology system
17626 written in Python that is designed to be easy to use. It resembles
17627 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17628 which is a system and language independent Distributed Object Technology
17629 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17630 longer maintained. New projects should use Pyro4 instead, which
17631 is the new Pyro version that is actively developed.")
17632 (license license:expat)))
17633
17634 (define-public python2-scientific
17635 (package
17636 (name "python2-scientific")
17637 (version "2.9.4")
17638 (source
17639 (origin
17640 (method git-fetch)
17641 (uri (git-reference
17642 (url "https://github.com/khinsen/ScientificPython")
17643 (commit (string-append "rel" version))))
17644 (file-name (git-file-name name version))
17645 (sha256
17646 (base32
17647 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17648 (build-system python-build-system)
17649 (inputs
17650 `(("netcdf" ,netcdf)))
17651 (propagated-inputs
17652 `(("python-numpy" ,python2-numpy-1.8)
17653 ("python-pyro" ,python2-pyro)))
17654 (arguments
17655 ;; ScientificPython is not compatible with Python 3
17656 `(#:python ,python-2
17657 #:tests? #f ; No test suite
17658 #:phases
17659 (modify-phases %standard-phases
17660 (replace 'build
17661 (lambda* (#:key inputs #:allow-other-keys)
17662 (invoke "python" "setup.py" "build"
17663 (string-append "--netcdf_prefix="
17664 (assoc-ref inputs "netcdf"))))))))
17665 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17666 (synopsis "Python modules for scientific computing")
17667 (description "ScientificPython is a collection of Python modules that are
17668 useful for scientific computing. Most modules are rather general (Geometry,
17669 physical units, automatic derivatives, ...) whereas others are more
17670 domain-specific (e.g. netCDF and PDB support). The library is currently
17671 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17672 (license license:cecill-c)))
17673
17674 (define-public python2-mmtk
17675 (package
17676 (name "python2-mmtk")
17677 (version "2.7.12")
17678 (source
17679 (origin
17680 (method git-fetch)
17681 (uri (git-reference
17682 (url "https://github.com/khinsen/MMTK")
17683 (commit (string-append "rel" version))))
17684 (file-name (git-file-name name version))
17685 (sha256
17686 (base32
17687 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17688 (build-system python-build-system)
17689 (native-inputs
17690 `(("netcdf" ,netcdf)))
17691 (propagated-inputs
17692 `(("python-scientific" ,python2-scientific)
17693 ("python-tkinter" ,python-2 "tk")))
17694 (arguments
17695 `(#:python ,python-2
17696 #:tests? #f
17697 #:phases
17698 (modify-phases %standard-phases
17699 (add-before 'build 'includes-from-scientific
17700 (lambda* (#:key inputs #:allow-other-keys)
17701 (mkdir-p "Include/Scientific")
17702 (copy-recursively
17703 (string-append
17704 (assoc-ref inputs "python-scientific")
17705 "/include/python2.7/Scientific")
17706 "Include/Scientific"))))))
17707 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17708 (synopsis "Python library for molecular simulation")
17709 (description "MMTK is a library for molecular simulations with an emphasis
17710 on biomolecules. It provides widely used methods such as Molecular Dynamics
17711 and normal mode analysis, but also basic routines for implementing new methods
17712 for simulation and analysis. The library is currently not actively maintained
17713 and works only with Python 2 and NumPy < 1.9.")
17714 (license license:cecill-c)))
17715
17716 (define-public python-phonenumbers
17717 (package
17718 (name "python-phonenumbers")
17719 (version "8.9.1")
17720 (source
17721 (origin
17722 (method url-fetch)
17723 (uri (pypi-uri "phonenumbers" version))
17724 (sha256
17725 (base32
17726 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17727 (build-system python-build-system)
17728 (home-page
17729 "https://github.com/daviddrysdale/python-phonenumbers")
17730 (synopsis
17731 "Python library for dealing with international phone numbers")
17732 (description
17733 "This package provides a Python port of Google's libphonenumber library.")
17734 (license license:asl2.0)))
17735
17736 (define-public python2-phonenumbers
17737 (package-with-python2 python-phonenumbers))
17738
17739 (define-public python-send2trash
17740 (package
17741 (name "python-send2trash")
17742 (version "1.5.0")
17743 (source
17744 (origin (method git-fetch)
17745 ;; Source tarball on PyPI doesn't include tests.
17746 (uri (git-reference
17747 (url "https://github.com/hsoft/send2trash")
17748 (commit version)))
17749 (file-name (git-file-name name version))
17750 (sha256
17751 (base32
17752 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17753 (build-system python-build-system)
17754 (arguments
17755 '(#:phases
17756 (modify-phases %standard-phases
17757 (add-before 'check 'pre-check
17758 (lambda _
17759 (mkdir-p "/tmp/foo")
17760 (setenv "HOME" "/tmp/foo")
17761 #t)))))
17762 (home-page "https://github.com/hsoft/send2trash")
17763 (synopsis "Send files to the user's @file{~/Trash} directory")
17764 (description "This package provides a Python library to send files to the
17765 user's @file{~/Trash} directory.")
17766 (properties `((python2-variant . ,(delay python2-send2trash))))
17767 (license license:bsd-3)))
17768
17769 (define-public python2-send2trash
17770 (package
17771 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17772 (arguments
17773 (substitute-keyword-arguments (package-arguments python-send2trash)
17774 ((#:phases phases)
17775 `(modify-phases ,phases
17776 (add-before 'check 'setenv
17777 (lambda _
17778 (setenv "PYTHONPATH"
17779 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17780 #t))))))))
17781
17782 (define-public python-pyfavicon
17783 (package
17784 (name "python-pyfavicon")
17785 (version "0.1.1")
17786 (source
17787 (origin
17788 (method url-fetch)
17789 (uri (pypi-uri "pyfavicon" version))
17790 (sha256
17791 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17792 (build-system python-build-system)
17793 (arguments
17794 ;; There are no tests in the PyPI tarball and the tests from the
17795 ;; repository require online data.
17796 '(#:tests? #f))
17797 (propagated-inputs
17798 `(("python-aiohttp" ,python-aiohttp)
17799 ("python-beautifulsoup4" ,python-beautifulsoup4)
17800 ("python-pillow" ,python-pillow)))
17801 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17802 (synopsis "Async favicon fetcher")
17803 (description
17804 "@code{pyfavicon} is an async favicon fetcher.")
17805 (license license:expat)))
17806
17807 (define-public python-yapf
17808 (package
17809 (name "python-yapf")
17810 (version "0.29.0")
17811 (source
17812 (origin
17813 (method url-fetch)
17814 (uri (pypi-uri "yapf" version))
17815 (sha256
17816 (base32
17817 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17818 (build-system python-build-system)
17819 (home-page "https://github.com/google/yapf")
17820 (synopsis "Formatter for Python code")
17821 (description "YAPF is a formatter for Python code. It's based off of
17822 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17823 takes the code and reformats it to the best formatting that conforms to the
17824 style guide, even if the original code didn't violate the style guide.")
17825 (license license:asl2.0)))
17826
17827 (define-public python2-yapf
17828 (package-with-python2 python-yapf))
17829
17830 (define-public python-yq
17831 (package
17832 (name "python-yq")
17833 (version "2.11.1")
17834 (source
17835 (origin
17836 (method url-fetch)
17837 (uri (pypi-uri "yq" version))
17838 (sha256
17839 (base32
17840 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17841 (build-system python-build-system)
17842 (arguments
17843 '(#:phases
17844 (modify-phases %standard-phases
17845 (add-after 'unpack 'patch
17846 (lambda* (#:key inputs #:allow-other-keys)
17847 (substitute* "yq/__init__.py"
17848 (("Popen\\(\\[\"jq")
17849 (string-append
17850 "Popen([\""
17851 (assoc-ref inputs "jq")
17852 "/bin/jq")))
17853 #t)))))
17854 (inputs
17855 `(("python-argcomplete" ,python-argcomplete)
17856 ("python-pyyaml" ,python-pyyaml)
17857 ("python-xmltodict" ,python-xmltodict)
17858 ("jq" ,jq)))
17859 (native-inputs
17860 `(("python-coverage" ,python-coverage)
17861 ("python-flake8" ,python-flake8)
17862 ("python-wheel" ,python-wheel)))
17863 (home-page "https://github.com/kislyuk/yq")
17864 (synopsis "Command-line YAML/XML processor")
17865 (description
17866 "This package provides @command{yq} and @command{xq} for processing YAML
17867 and XML respectively. The processing is done through @command{jq}, @command{jq}
17868 filters can be used to process the data as it passes through.")
17869 (license license:asl2.0)))
17870
17871 (define-public python-gyp
17872 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17873 (revision "0"))
17874 (package
17875 (name "python-gyp")
17876 ;; Google does not release versions,
17877 ;; based on second most recent commit date.
17878 (version (git-version "0.0.0" revision commit))
17879 (source
17880 (origin
17881 ;; Google does not release tarballs,
17882 ;; git checkout is needed.
17883 (method git-fetch)
17884 (uri (git-reference
17885 (url "https://chromium.googlesource.com/external/gyp")
17886 (commit commit)))
17887 (file-name (git-file-name name version))
17888 (sha256
17889 (base32
17890 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17891 (build-system python-build-system)
17892 (home-page "https://gyp.gsrc.io/")
17893 (synopsis "GYP is a Meta-Build system")
17894 (description
17895 "GYP builds build systems for large, cross platform applications.
17896 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17897 files, and Makefiles.")
17898 (license license:bsd-3))))
17899
17900 (define-public python2-gyp
17901 (package-with-python2 python-gyp))
17902
17903 (define-public python-whatever
17904 (package
17905 (name "python-whatever")
17906 (version "0.6")
17907 (source
17908 (origin
17909 (method git-fetch)
17910 (uri (git-reference
17911 (url "https://github.com/Suor/whatever")
17912 (commit version)))
17913 (file-name (git-file-name name version))
17914 (sha256
17915 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17916 (build-system python-build-system)
17917 (arguments
17918 `(#:phases
17919 (modify-phases %standard-phases
17920 (replace 'check
17921 (lambda _
17922 (invoke "py.test"))))))
17923 (native-inputs
17924 `(("python-pytest" ,python-pytest)))
17925 (home-page "https://github.com/Suor/whatever")
17926 (synopsis "Make anonymous functions by partial application of operators")
17927 (description "@code{whatever} provides an easy way to make anonymous
17928 functions by partial application of operators.")
17929 (license license:bsd-3)))
17930
17931 (define-public python2-whatever
17932 (package-with-python2 python-whatever))
17933
17934 (define-public python-funcy
17935 (package
17936 (name "python-funcy")
17937 (version "1.11")
17938 (source
17939 (origin
17940 (method git-fetch)
17941 (uri (git-reference
17942 (url "https://github.com/Suor/funcy")
17943 (commit version)))
17944 (sha256
17945 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17946 (file-name (git-file-name name version))))
17947 (build-system python-build-system)
17948 (arguments
17949 `(#:phases
17950 (modify-phases %standard-phases
17951 (replace 'check
17952 (lambda _
17953 (invoke "py.test"))))))
17954 (native-inputs
17955 `(("python-pytest" ,python-pytest)
17956 ("python-whatever" ,python-whatever)))
17957 (home-page "https://github.com/Suor/funcy")
17958 (synopsis "Functional tools")
17959 (description "@code{funcy} is a library that provides functional tools.
17960 Examples are:
17961 @enumerate
17962 @item merge - Merges collections of the same type
17963 @item walk - Type-preserving map
17964 @item select - Selects a part of a collection
17965 @item take - Takes the first n items of a collection
17966 @item first - Takes the first item of a collection
17967 @item remove - Predicated-removes items of a collection
17968 @item concat - Concatenates two collections
17969 @item flatten - Flattens a collection with subcollections
17970 @item distinct - Returns only distinct items
17971 @item split - Predicated-splits a collection
17972 @item split_at - Splits a collection at a given item
17973 @item group_by - Groups items by group
17974 @item pairwise - Pairs off adjacent items
17975 @item partial - Partially-applies a function
17976 @item curry - Curries a function
17977 @item compose - Composes functions
17978 @item complement - Complements a predicate
17979 @item all_fn - \"all\" with predicate
17980 @end enumerate")
17981 (license license:bsd-3)))
17982
17983 (define-public python2-funcy
17984 (package-with-python2 python-funcy))
17985
17986 (define-public python-isoweek
17987 (package
17988 (name "python-isoweek")
17989 (version "1.3.3")
17990 (source
17991 (origin
17992 (method url-fetch)
17993 (uri (pypi-uri "isoweek" version))
17994 (sha256
17995 (base32
17996 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17997 (build-system python-build-system)
17998 (home-page "https://github.com/gisle/isoweek")
17999 (synopsis "Objects representing a week")
18000 (description "The @code{isoweek} module provide the class Week that
18001 implements the week definition of ISO 8601. This standard also defines
18002 a notation for identifying weeks; yyyyWww (where the W is a literal).
18003 Week instances stringify to this form.")
18004 (license license:bsd-3)))
18005
18006 (define-public python2-isoweek
18007 (package-with-python2 python-isoweek))
18008
18009 (define-public python-pyzbar
18010 (package
18011 (name "python-pyzbar")
18012 (version "0.1.8")
18013 (source
18014 (origin
18015 ;; There's no source tarball on PyPI.
18016 (method git-fetch)
18017 (uri (git-reference
18018 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18019 (commit (string-append "v" version))))
18020 (file-name (git-file-name name version))
18021 (sha256
18022 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18023 (build-system python-build-system)
18024 (arguments
18025 `(#:phases
18026 (modify-phases %standard-phases
18027 (add-after 'unpack 'remove-failing-test
18028 (lambda _
18029 ;; This tests if find_library was called once, but we remove
18030 ;; the call in the stage below to make the library find libzbar.
18031 (delete-file "pyzbar/tests/test_zbar_library.py")
18032 #t))
18033 (add-before 'build 'set-library-file-name
18034 (lambda* (#:key inputs #:allow-other-keys)
18035 (let ((libzbar (assoc-ref inputs "zbar")))
18036 (substitute* "pyzbar/zbar_library.py"
18037 (("find_library\\('zbar'\\)")
18038 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18039 #t))))))
18040 (native-inputs
18041 `(("pkg-config" ,pkg-config)
18042 ("python-numpy" ,python-numpy)
18043 ("python-pillow" ,python-pillow)))
18044 (inputs
18045 `(("zbar" ,zbar)))
18046 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18047 (synopsis "Read one-dimensional barcodes and QR codes")
18048 (description
18049 "Read one-dimensional barcodes and QR codes using the zbar library.
18050
18051 Features:
18052
18053 @itemize
18054 @item Pure python
18055 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18056 @item Decodes locations of barcodes
18057 @item No dependencies, other than the zbar library itself
18058 @end itemize")
18059 (license license:expat)))
18060
18061 (define-public python-tokenize-rt
18062 (package
18063 (name "python-tokenize-rt")
18064 (version "2.0.1")
18065 (source
18066 (origin
18067 (method url-fetch)
18068 (uri (pypi-uri "tokenize-rt" version))
18069 (sha256
18070 (base32
18071 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18072 (build-system python-build-system)
18073 (home-page "https://github.com/asottile/tokenize-rt")
18074 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18075 (description
18076 "This Python library is a wrapper around @code{tokenize} from the Python
18077 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18078 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18079 and @code{tokens_to_src} to roundtrip.")
18080 (license license:expat)))
18081
18082 (define-public python-future-fstrings
18083 (package
18084 (name "python-future-fstrings")
18085 (version "0.4.1")
18086 (source
18087 (origin
18088 (method url-fetch)
18089 (uri (pypi-uri "future_fstrings" version))
18090 (sha256
18091 (base32
18092 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18093 (build-system python-build-system)
18094 (propagated-inputs
18095 `(("python-tokenize-rt" ,python-tokenize-rt)))
18096 (home-page "https://github.com/asottile/future-fstrings")
18097 (synopsis "Backport of fstrings to Python < 3.6")
18098 (description
18099 "This package provides a UTF-8 compatible encoding
18100 @code{future_fstrings}, which performs source manipulation. It decodes the
18101 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18102 @code{f} strings.")
18103 (license license:expat)))
18104
18105 (define-public python-typed-ast
18106 (package
18107 (name "python-typed-ast")
18108 (version "1.4.0")
18109 (source
18110 (origin
18111 (method git-fetch)
18112 (uri (git-reference
18113 (url "https://github.com/python/typed_ast")
18114 (commit version)))
18115 (sha256
18116 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18117 (file-name (git-file-name name version))))
18118 (build-system python-build-system)
18119 (arguments
18120 `(#:modules ((guix build utils)
18121 (guix build python-build-system)
18122 (ice-9 ftw)
18123 (srfi srfi-1)
18124 (srfi srfi-26))
18125 #:phases
18126 (modify-phases %standard-phases
18127 (replace 'check
18128 (lambda _
18129 (let ((cwd (getcwd)))
18130 (setenv "PYTHONPATH"
18131 (string-append cwd "/build/"
18132 (find (cut string-prefix? "lib" <>)
18133 (scandir (string-append cwd "/build")))
18134 ":"
18135 (getenv "PYTHONPATH"))))
18136 (invoke "pytest")
18137 #t)))))
18138 (native-inputs `(("python-pytest" ,python-pytest)))
18139 (home-page "https://github.com/python/typed_ast")
18140 (synopsis "Fork of Python @code{ast} modules with type comment support")
18141 (description "This package provides a parser similar to the standard
18142 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18143 include PEP 484 type comments and are independent of the version of Python
18144 under which they are run. The @code{typed_ast} parsers produce the standard
18145 Python AST (plus type comments), and are both fast and correct, as they are
18146 based on the CPython 2.7 and 3.7 parsers.")
18147 ;; See the file "LICENSE" for the details.
18148 (license (list license:psfl
18149 license:asl2.0
18150 license:expat)))) ;ast27/Parser/spark.py
18151
18152 (define-public python-typing
18153 (package
18154 (name "python-typing")
18155 (version "3.7.4.3")
18156 (source
18157 (origin
18158 (method url-fetch)
18159 (uri (pypi-uri "typing" version))
18160 (sha256
18161 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18162 (build-system python-build-system)
18163 (home-page "https://docs.python.org/3/library/typing.html")
18164 (synopsis "Type hints for Python")
18165 (description "This is a backport of the standard library @code{typing}
18166 module to Python versions older than 3.5. Typing defines a standard notation
18167 for Python function and variable type annotations. The notation can be used
18168 for documenting code in a concise, standard format, and it has been designed
18169 to also be used by static and runtime type checkers, static analyzers, IDEs
18170 and other tools.")
18171 (license license:psfl)))
18172
18173 (define-public python2-typing
18174 (package-with-python2 python-typing))
18175
18176 (define-public python-typing-extensions
18177 (package
18178 (name "python-typing-extensions")
18179 (version "3.7.4.3")
18180 (source
18181 (origin
18182 (method url-fetch)
18183 (uri (pypi-uri "typing_extensions" version))
18184 (sha256
18185 (base32
18186 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18187 (build-system python-build-system)
18188 (home-page
18189 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18190 (synopsis "Experimental type hints for Python")
18191 (description
18192 "The typing_extensions module contains additional @code{typing} hints not
18193 yet present in the of the @code{typing} standard library.
18194 Included are implementations of:
18195 @enumerate
18196 @item ClassVar
18197 @item ContextManager
18198 @item Counter
18199 @item DefaultDict
18200 @item Deque
18201 @item NewType
18202 @item NoReturn
18203 @item overload
18204 @item Protocol
18205 @item runtime
18206 @item Text
18207 @item Type
18208 @item TYPE_CHECKING
18209 @item AsyncGenerator
18210 @end enumerate\n")
18211 (license license:psfl)))
18212
18213 (define-public bpython
18214 (package
18215 (name "bpython")
18216 (version "0.18")
18217 (source
18218 (origin
18219 (method url-fetch)
18220 (uri (pypi-uri "bpython" version))
18221 (sha256
18222 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18223 (build-system python-build-system)
18224 (arguments
18225 `(#:phases
18226 (modify-phases %standard-phases
18227 (add-after 'unpack 'remove-failing-test
18228 (lambda _
18229 ;; Remove failing test. FIXME: make it pass
18230 (delete-file "bpython/test/test_args.py")
18231 #t))
18232 (add-after 'wrap 'add-aliases
18233 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18234 (lambda* (#:key outputs #:allow-other-keys)
18235 (let ((out (assoc-ref outputs "out")))
18236 (for-each
18237 (lambda (old new)
18238 (symlink old (string-append out "/bin/" new)))
18239 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18240 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18241 #t)))))
18242 (propagated-inputs
18243 `(("python-pygments" ,python-pygments)
18244 ("python-requests" ,python-requests)
18245 ("python-babel" ,python-babel) ; optional, for internationalization
18246 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18247 ("python-greenlet" ,python-greenlet)
18248 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18249 ("python-six" ,python-six)))
18250 (native-inputs
18251 `(("python-sphinx" ,python-sphinx)
18252 ("python-mock" ,python-mock)))
18253 (home-page "https://bpython-interpreter.org/")
18254 (synopsis "Fancy interface to the Python interpreter")
18255 (description "Bpython is a fancy interface to the Python
18256 interpreter. bpython's main features are
18257
18258 @enumerate
18259 @item in-line syntax highlighting,
18260 @item readline-like autocomplete with suggestions displayed as you type,
18261 @item expected parameter list for any Python function,
18262 @item \"rewind\" function to pop the last line of code from memory and
18263 re-evaluate,
18264 @item send the code you've entered off to a pastebin,
18265 @item save the code you've entered to a file, and
18266 @item auto-indentation.
18267 @end enumerate")
18268 (license license:expat)))
18269
18270 (define-public python-pyinotify
18271 (package
18272 (name "python-pyinotify")
18273 (version "0.9.6")
18274 (source (origin
18275 (method url-fetch)
18276 (uri (pypi-uri "pyinotify" version))
18277 (sha256
18278 (base32
18279 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18280 (build-system python-build-system)
18281 (arguments `(#:tests? #f)) ;no tests
18282 (home-page "https://github.com/seb-m/pyinotify")
18283 (synopsis "Python library for monitoring inotify events")
18284 (description
18285 "@code{pyinotify} provides a Python interface for monitoring
18286 file system events on Linux.")
18287 (license license:expat)))
18288
18289 (define-public python2-pyinotify
18290 (package-with-python2 python-pyinotify))
18291
18292 ;; Ada parser uses this version.
18293 (define-public python2-quex-0.67.3
18294 (package
18295 (name "python2-quex")
18296 (version "0.67.3")
18297 (source
18298 (origin
18299 (method url-fetch)
18300 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18301 (version-major+minor version)
18302 "/quex-" version ".zip"))
18303 (sha256
18304 (base32
18305 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18306 (build-system python-build-system)
18307 (native-inputs
18308 `(("unzip" ,unzip)))
18309 (arguments
18310 `(#:python ,python-2
18311 #:tests? #f
18312 #:phases
18313 (modify-phases %standard-phases
18314 (delete 'configure)
18315 (delete 'build)
18316 (replace 'install
18317 (lambda* (#:key outputs #:allow-other-keys)
18318 (let* ((out (assoc-ref outputs "out"))
18319 (share/quex (string-append out "/share/quex"))
18320 (bin (string-append out "/bin")))
18321 (copy-recursively "." share/quex)
18322 (mkdir-p bin)
18323 (symlink (string-append share/quex "/quex-exe.py")
18324 (string-append bin "/quex"))
18325 #t))))))
18326 (native-search-paths
18327 (list (search-path-specification
18328 (variable "QUEX_PATH")
18329 (files '("share/quex")))))
18330 (home-page "http://quex.sourceforge.net/")
18331 (synopsis "Lexical analyzer generator in Python")
18332 (description "@code{quex} is a lexical analyzer generator in Python.")
18333 (license license:lgpl2.1+))) ; Non-military
18334
18335 (define-public python2-quex
18336 (package (inherit python2-quex-0.67.3)
18337 (name "python2-quex")
18338 (version "0.68.1")
18339 (source
18340 (origin
18341 (method url-fetch)
18342 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18343 (sha256
18344 (base32
18345 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18346 (file-name (string-append name "-" version ".tar.gz"))))))
18347
18348 (define-public python-more-itertools
18349 (package
18350 (name "python-more-itertools")
18351 (version "8.2.0")
18352 (source
18353 (origin
18354 (method url-fetch)
18355 (uri (pypi-uri "more-itertools" version))
18356 (sha256
18357 (base32
18358 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18359 (build-system python-build-system)
18360 (home-page "https://github.com/erikrose/more-itertools")
18361 (synopsis "More routines for operating on iterables, beyond itertools")
18362 (description "Python's built-in @code{itertools} module implements a
18363 number of iterator building blocks inspired by constructs from APL, Haskell,
18364 and SML. @code{more-itertools} includes additional building blocks for
18365 working with iterables.")
18366 (properties `((python2-variant . ,(delay python2-more-itertools))))
18367 (license license:expat)))
18368
18369 ;; The 5.x series are the last versions supporting Python 2.7.
18370 (define-public python2-more-itertools
18371 (package
18372 (inherit python-more-itertools)
18373 (name "python2-more-itertools")
18374 (version "5.0.0")
18375 (source (origin
18376 (method url-fetch)
18377 (uri (pypi-uri "more-itertools" version))
18378 (sha256
18379 (base32
18380 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18381 (arguments
18382 `(#:python ,python-2))
18383 (propagated-inputs
18384 `(("python2-six" ,python2-six-bootstrap)))))
18385
18386 (define-public python-latexcodec
18387 (package
18388 (name "python-latexcodec")
18389 (version "1.0.7")
18390 (source
18391 (origin
18392 (method url-fetch)
18393 (uri (pypi-uri "latexcodec" version))
18394 (sha256
18395 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18396 (build-system python-build-system)
18397 (inputs
18398 `(("python-six" ,python-six)))
18399 (home-page "https://readthedocs.org/projects/latexcodec/")
18400 (synopsis "Work with LaTeX code in Python")
18401 (description "Lexer and codec to work with LaTeX code in Python.")
18402 (license license:expat)))
18403
18404 (define-public python-pybtex
18405 (package
18406 (name "python-pybtex")
18407 (version "0.22.2")
18408 (source
18409 (origin
18410 (method url-fetch)
18411 (uri (pypi-uri "pybtex" version))
18412 (sha256
18413 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18414 (build-system python-build-system)
18415 (native-inputs
18416 `(("python-nose" ,python-nose)))
18417 (inputs
18418 `(("python-latexcodec" ,python-latexcodec)
18419 ("python-pyyaml" ,python-pyyaml)
18420 ("python-six" ,python-six)))
18421 (arguments
18422 `(#:test-target "nosetests"))
18423 (home-page "https://pybtex.org/")
18424 (synopsis "BibTeX-compatible bibliography processor")
18425 (description "Pybtex is a BibTeX-compatible bibliography processor written
18426 in Python. You can simply type pybtex instead of bibtex.")
18427 (license license:expat)))
18428
18429 (define-public python-onetimepass
18430 (package
18431 (name "python-onetimepass")
18432 (version "1.0.1")
18433 (source
18434 (origin
18435 (method url-fetch)
18436 (uri (pypi-uri "onetimepass" version))
18437 (sha256
18438 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18439 (build-system python-build-system)
18440 (propagated-inputs `(("python-six" ,python-six)))
18441 (home-page "https://github.com/tadeck/onetimepass/")
18442 (synopsis "One-time password library")
18443 (description "Python one-time password library for HMAC-based (HOTP) and
18444 time-based (TOTP) passwords.")
18445 (license license:expat)))
18446
18447 (define-public python-parso
18448 (package
18449 (name "python-parso")
18450 (version "0.7.1")
18451 (source
18452 (origin
18453 (method url-fetch)
18454 (uri (pypi-uri "parso" version))
18455 (sha256
18456 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18457 (native-inputs
18458 `(("python-pytest" ,python-pytest)))
18459 (build-system python-build-system)
18460 (arguments
18461 `(#:phases (modify-phases %standard-phases
18462 (replace 'check
18463 (lambda _ (invoke "pytest" "-vv"))))))
18464 (home-page "https://github.com/davidhalter/parso")
18465 (synopsis "Python Parser")
18466 (description "Parso is a Python parser that supports error recovery and
18467 round-trip parsing for different Python versions (in multiple Python versions).
18468 Parso is also able to list multiple syntax errors in your Python file.")
18469 (license license:expat)))
18470
18471 (define-public python2-parso
18472 (package-with-python2 python-parso))
18473
18474 (define-public python-async-generator
18475 (package
18476 (name "python-async-generator")
18477 (version "1.10")
18478 (source
18479 (origin
18480 (method url-fetch)
18481 (uri (pypi-uri "async_generator" version))
18482 (sha256
18483 (base32
18484 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18485 (build-system python-build-system)
18486 (native-inputs
18487 `(("python-pytest" ,python-pytest)))
18488 (home-page "https://github.com/python-trio/async_generator")
18489 (synopsis "Async generators and context managers for Python 3.5+")
18490 (description "@code{async_generator} back-ports Python 3.6's native async
18491 generators and Python 3.7's context managers into Python 3.5.")
18492 ;; Dual licensed.
18493 (license (list license:expat license:asl2.0))))
18494
18495 (define-public python-async-timeout
18496 (package
18497 (name "python-async-timeout")
18498 (version "3.0.1")
18499 (source
18500 (origin
18501 (method url-fetch)
18502 (uri (pypi-uri "async-timeout" version))
18503 (sha256
18504 (base32
18505 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18506 (build-system python-build-system)
18507 (home-page "https://github.com/aio-libs/async_timeout/")
18508 (synopsis "Timeout context manager for asyncio programs")
18509 (description "@code{async-timeout} provides a timeout timeout context
18510 manager compatible with @code{asyncio}.")
18511 (license license:asl2.0)))
18512
18513 (define-public python-glob2
18514 (package
18515 (name "python-glob2")
18516 (version "0.7")
18517 (source
18518 (origin
18519 (method git-fetch)
18520 (uri (git-reference
18521 (url "https://github.com/miracle2k/python-glob2")
18522 (commit (string-append "v" version))))
18523 (file-name (git-file-name name version))
18524 (sha256
18525 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18526 (build-system python-build-system)
18527 (home-page "https://github.com/miracle2k/python-glob2/")
18528 (synopsis "Extended Version of the python buildin glob module")
18529 (description "This is an extended version of the Python
18530 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18531 adds:
18532
18533 @itemize
18534 @item The ability to capture the text matched by glob patterns, and return
18535 those matches alongside the file names.
18536 @item A recursive @code{**} globbing syntax, akin for example to the
18537 @code{globstar} option of Bash.
18538 @item The ability to replace the file system functions used, in order to glob
18539 on virtual file systems.
18540 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18541 @end itemize
18542
18543 Glob2 currently based on the glob code from Python 3.3.1.")
18544 (license license:bsd-2)))
18545
18546 (define-public python2-glob2
18547 (package-with-python2 python-glob2))
18548
18549 (define-public python-gipc
18550 (package
18551 (name "python-gipc")
18552 (version "0.6.0")
18553 (source
18554 (origin
18555 (method url-fetch)
18556 (uri (pypi-uri "gipc" version ".zip"))
18557 (sha256
18558 (base32
18559 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18560 (build-system python-build-system)
18561 (native-inputs
18562 `(("unzip" ,unzip)))
18563 (propagated-inputs
18564 `(("python-gevent" ,python-gevent)))
18565 (home-page "https://gehrcke.de/gipc/")
18566 (synopsis "Child process management in the context of gevent")
18567 (description "Usage of Python's multiprocessing package in a
18568 gevent-powered application may raise problems. With @code{gipc},
18569 process-based child processes can safely be created anywhere within a
18570 gevent-powered application.")
18571 (license license:expat)))
18572
18573 (define-public python-beautifultable
18574 (package
18575 (name "python-beautifultable")
18576 (version "1.0.0")
18577 (source
18578 (origin
18579 (method url-fetch)
18580 (uri (pypi-uri "beautifultable" version))
18581 (sha256
18582 (base32
18583 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18584 (build-system python-build-system)
18585 (propagated-inputs
18586 `(("python-wcwidth" ,python-wcwidth)))
18587 (arguments
18588 `(#:phases
18589 (modify-phases %standard-phases
18590 (add-after 'unpack 'patch-setup.py
18591 (lambda _
18592 (substitute* "setup.py"
18593 (("setup\\(")
18594 "setup(\n test_suite=\"test\",")))))))
18595 (home-page "https://github.com/pri22296/beautifultable")
18596 (synopsis "Print ASCII tables for terminals")
18597 (description "@code{python-beautifultable} provides a class for easily
18598 printing tabular data in a visually appealing ASCII format to a terminal.
18599
18600 Features include, but are not limited to:
18601 @itemize
18602 @item Full customization of the look and feel of the table
18603 @item Row and column accessors.
18604 @item Full support for colors using ANSI sequences or any library.
18605 @item Plenty of predefined styles and option to create custom ones.
18606 @item Support for Unicode characters.
18607 @item Supports streaming table when data is slow to retrieve.
18608 @end itemize")
18609 (license license:expat)))
18610
18611 (define-public python-globber
18612 (package
18613 (name "python-globber")
18614 (version "0.2.1")
18615 (source
18616 (origin
18617 (method git-fetch)
18618 (uri (git-reference
18619 (url "https://github.com/asharov/globber")
18620 (commit version)))
18621 (file-name (git-file-name name version))
18622 (sha256
18623 (base32
18624 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18625 (build-system python-build-system)
18626 (home-page "https://github.com/asharov/globber")
18627 (synopsis "Library for string matching with glob patterns")
18628 (description
18629 "Globber is a Python library for matching file names against glob patterns.
18630 In contrast to other glob-matching libraries, it matches arbitrary strings and
18631 doesn't require the matched names to be existing files. In addition, it
18632 supports the globstar @code{**} operator to match an arbitrary number of
18633 path components.")
18634 (license license:asl2.0)))
18635
18636 (define-public python-git-hammer
18637 (package
18638 (name "python-git-hammer")
18639 (version "0.3.1")
18640 (source
18641 (origin
18642 (method git-fetch)
18643 (uri (git-reference
18644 (url "https://github.com/asharov/git-hammer")
18645 (commit version)))
18646 (file-name (git-file-name name version))
18647 (sha256
18648 (base32
18649 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18650 (build-system python-build-system)
18651 (arguments
18652 `(#:phases
18653 (modify-phases %standard-phases
18654 (add-after 'unpack 'patch-setup.py
18655 (lambda _
18656 (substitute* "setup.py"
18657 (("setup\\(")
18658 "setup(\n test_suite=\"test\",")))))))
18659 (propagated-inputs
18660 `(("python-beautifultable" ,python-beautifultable)
18661 ("python-dateutil" ,python-dateutil)
18662 ("python-gitpython" ,python-gitpython)
18663 ("python-globber" ,python-globber)
18664 ("python-matplotlib" ,python-matplotlib)
18665 ("python-sqlalchemy" ,python-sqlalchemy)
18666 ("python-sqlalchemy-utils"
18667 ,python-sqlalchemy-utils)))
18668 (home-page "https://github.com/asharov/git-hammer")
18669 (synopsis "Provide statistics for git repositories")
18670 (description
18671 "Git Hammer is a statistics tool for projects in git repositories.
18672 Its major feature is tracking the number of lines authored by each person for every
18673 commit, but it also includes some other useful statistics.")
18674 (license license:asl2.0)))
18675
18676 (define-public python-fusepy
18677 (package
18678 (name "python-fusepy")
18679 (version "2.0.4")
18680 (source
18681 (origin
18682 (method url-fetch)
18683 (uri (pypi-uri "fusepy" version))
18684 (sha256
18685 (base32
18686 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18687 (build-system python-build-system)
18688 (arguments
18689 `(#:phases
18690 (modify-phases %standard-phases
18691 (add-before 'build 'set-library-file-name
18692 (lambda* (#:key inputs #:allow-other-keys)
18693 (let ((fuse (assoc-ref inputs "fuse")))
18694 (substitute* "fuse.py"
18695 (("find_library\\('fuse'\\)")
18696 (string-append "'" fuse "/lib/libfuse.so'")))
18697 #t))))))
18698 (propagated-inputs
18699 `(("fuse" ,fuse)))
18700 (home-page "https://github.com/fusepy/fusepy")
18701 (synopsis "Simple ctypes bindings for FUSE")
18702 (description "Python module that provides a simple interface to FUSE and
18703 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18704 (license license:isc)))
18705
18706 (define-public python2-fusepy
18707 (package-with-python2 python-fusepy))
18708
18709 (define-public python-fusepyng
18710 (package
18711 (name "python-fusepyng")
18712 (version "1.0.7")
18713 (source
18714 (origin
18715 (method url-fetch)
18716 (uri (pypi-uri "fusepyng" version))
18717 (sha256
18718 (base32
18719 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18720 (build-system python-build-system)
18721 (arguments
18722 '(#:phases
18723 (modify-phases %standard-phases
18724 (add-after 'unpack 'set-libfuse-path
18725 (lambda* (#:key inputs #:allow-other-keys)
18726 (let ((fuse (assoc-ref inputs "fuse")))
18727 (substitute* "fusepyng.py"
18728 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18729 (string-append "\"" fuse "/lib/libfuse.so\""))))
18730 #t)))))
18731 (inputs
18732 `(("fuse" ,fuse)))
18733 (propagated-inputs
18734 `(("python-paramiko" ,python-paramiko)))
18735 (home-page "https://github.com/rianhunter/fusepyng")
18736 (synopsis "Simple ctypes bindings for FUSE")
18737 (description "@code{fusepyng} is a Python module that provides a simple
18738 interface to FUSE on various operating systems. It's just one file and is
18739 implemented using @code{ctypes}.")
18740 (license license:isc)))
18741
18742 (define-public python2-gdrivefs
18743 (package
18744 (name "python2-gdrivefs")
18745 (version "0.14.9")
18746 (source
18747 (origin
18748 (method url-fetch)
18749 (uri (pypi-uri "gdrivefs" version))
18750 (sha256
18751 (base32
18752 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18753 (build-system python-build-system)
18754 (arguments
18755 `(#:python ,python-2
18756 #:phases
18757 (modify-phases %standard-phases
18758 (add-before 'build 'patch-setup-py
18759 (lambda _
18760 ;; Update requirements from dependency==version
18761 ;; to dependency>=version
18762 (substitute* "gdrivefs/resources/requirements.txt"
18763 (("==") ">="))
18764 #t)))))
18765 (native-inputs
18766 `(("python2-gipc" ,python2-gipc)
18767 ("python2-gevent" ,python2-gevent)
18768 ("python2-greenlet" ,python2-greenlet)
18769 ("python2-httplib2" ,python2-httplib2)
18770 ("python2-uritemplate" ,python2-uritemplate)
18771 ("python2-oauth2client" ,python2-oauth2client)
18772 ("python2-six" ,python2-six)))
18773 (propagated-inputs
18774 `(("python2-dateutil" ,python2-dateutil)
18775 ("python2-fusepy" ,python2-fusepy)
18776 ("python2-google-api-client" ,python2-google-api-client)))
18777 (home-page "https://github.com/dsoprea/GDriveFS")
18778 (synopsis "Mount Google Drive as a local file system")
18779 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18780 under Python 2.7.")
18781 (license license:gpl2)))
18782
18783 (define-public python-userspacefs
18784 (package
18785 (name "python-userspacefs")
18786 (version "1.0.13")
18787 (source
18788 (origin
18789 (method url-fetch)
18790 (uri (pypi-uri "userspacefs" version))
18791 (sha256
18792 (base32
18793 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18794 (build-system python-build-system)
18795 (propagated-inputs
18796 `(("python-fusepyng" ,python-fusepyng)))
18797 (home-page "https://github.com/rianhunter/userspacefs")
18798 (synopsis "User-space file systems for Python")
18799 (description
18800 "@code{userspacefs} is a library that allows you to easily write
18801 user-space file systems in Python.")
18802 (license license:gpl3+)))
18803
18804 (define-public pybind11
18805 (package
18806 (name "pybind11")
18807 (version "2.4.3")
18808 (source (origin
18809 (method git-fetch)
18810 (uri (git-reference
18811 (url "https://github.com/pybind/pybind11")
18812 (commit (string-append "v" version))))
18813 (sha256
18814 (base32
18815 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18816 (file-name (git-file-name name version))))
18817 (build-system cmake-build-system)
18818 (native-inputs
18819 `(("python" ,python-wrapper)
18820
18821 ;; The following dependencies are used for tests.
18822 ("python-pytest" ,python-pytest)
18823 ("catch" ,catch-framework2-1)
18824 ("eigen" ,eigen)))
18825 (arguments
18826 `(#:configure-flags
18827 (list (string-append "-DCATCH_INCLUDE_DIR="
18828 (assoc-ref %build-inputs "catch")
18829 "/include/catch"))
18830
18831 #:phases (modify-phases %standard-phases
18832 (add-after 'install 'install-python
18833 (lambda* (#:key outputs #:allow-other-keys)
18834 (let ((out (assoc-ref outputs "out")))
18835 (with-directory-excursion "../source"
18836 (setenv "PYBIND11_USE_CMAKE" "yes")
18837 (invoke "python" "setup.py" "install"
18838 "--single-version-externally-managed"
18839 "--root=/"
18840 (string-append "--prefix=" out)))))))
18841
18842 #:test-target "check"))
18843 (home-page "https://github.com/pybind/pybind11/")
18844 (synopsis "Seamless operability between C++11 and Python")
18845 (description
18846 "@code{pybind11} is a lightweight header-only library that exposes C++
18847 types in Python and vice versa, mainly to create Python bindings of existing
18848 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18849 library: to minimize boilerplate code in traditional extension modules by
18850 inferring type information using compile-time introspection.")
18851 (license license:bsd-3)))
18852
18853 (define-public python-fasteners
18854 (package
18855 (name "python-fasteners")
18856 (version "0.15")
18857 (source
18858 (origin
18859 (method url-fetch)
18860 (uri (pypi-uri "fasteners" version))
18861 (sha256
18862 (base32
18863 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18864 (build-system python-build-system)
18865 (propagated-inputs
18866 `(("python-monotonic" ,python-monotonic)
18867 ("python-six" ,python-six)))
18868 (native-inputs
18869 `(("python-testtools" ,python-testtools)))
18870 (home-page "https://github.com/harlowja/fasteners")
18871 (synopsis "Python package that provides useful locks")
18872 (description
18873 "This package provides a Python program that provides following locks:
18874
18875 @itemize
18876 @item Locking decorator
18877 @item Reader-writer locks
18878 @item Inter-process locks
18879 @item Generic helpers
18880 @end itemize\n")
18881 (properties `((python2-variant . ,(delay python2-fasteners))))
18882 (license license:asl2.0)))
18883
18884 (define-public python2-fasteners
18885 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18886 (package
18887 (inherit base)
18888 (propagated-inputs
18889 `(("python2-futures" ,python2-futures)
18890 ,@(package-propagated-inputs base))))))
18891
18892 (define-public python-requests-file
18893 (package
18894 (name "python-requests-file")
18895 (version "1.4.3")
18896 (source
18897 (origin
18898 (method url-fetch)
18899 (uri (pypi-uri "requests-file" version))
18900 (sha256
18901 (base32
18902 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18903 (build-system python-build-system)
18904 (propagated-inputs
18905 `(("python-requests" ,python-requests)
18906 ("python-six" ,python-six)))
18907 (home-page
18908 "https://github.com/dashea/requests-file")
18909 (synopsis "File transport adapter for Requests")
18910 (description
18911 "Requests-File is a transport adapter for use with the Requests Python
18912 library to allow local file system access via @code{file://} URLs.")
18913 (license license:asl2.0)))
18914
18915 (define-public python2-requests-file
18916 (package-with-python2 python-requests-file))
18917
18918 (define-public python-identify
18919 (package
18920 (name "python-identify")
18921 (version "1.4.25")
18922 (source
18923 (origin
18924 ;; There are no tests in the PyPI tarball.
18925 (method git-fetch)
18926 (uri (git-reference
18927 (url "https://github.com/chriskuehl/identify")
18928 (commit (string-append "v" version))))
18929 (file-name (git-file-name name version))
18930 (sha256
18931 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18932 (build-system python-build-system)
18933 (arguments
18934 `(#:phases
18935 (modify-phases %standard-phases
18936 (replace 'check
18937 (lambda _
18938 (invoke "pytest" "-vv"))))))
18939 (native-inputs
18940 `(("python-coverage" ,python-coverage)
18941 ("python-pytest" ,python-pytest)))
18942 (propagated-inputs
18943 `(("python-editdistance" ,python-editdistance)))
18944 (home-page "https://github.com/chriskuehl/identify")
18945 (synopsis "File identification library for Python")
18946 (description
18947 "@code{identify} is a file identification library for Python. Given
18948 a file (or some information about a file), return a set of standardized tags
18949 identifying what the file is.")
18950 (license license:expat)))
18951
18952 (define-public python-tldextract
18953 (package
18954 (name "python-tldextract")
18955 (version "2.2.0")
18956 (source
18957 (origin
18958 (method url-fetch)
18959 (uri (pypi-uri "tldextract" version))
18960 (sha256
18961 (base32
18962 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18963 (build-system python-build-system)
18964 (native-inputs
18965 `(("python-pytest" ,python-pytest)
18966 ("python-responses" ,python-responses)))
18967 (propagated-inputs
18968 `(("python-idna" ,python-idna)
18969 ("python-requests" ,python-requests)
18970 ("python-requests-file" ,python-requests-file)))
18971 (home-page
18972 "https://github.com/john-kurkowski/tldextract")
18973 (synopsis
18974 "Separate the TLD from the registered domain and subdomains of a URL")
18975 (description
18976 "TLDExtract accurately separates the TLD from the registered domain and
18977 subdomains of a URL, using the Public Suffix List. By default, this includes
18978 the public ICANN TLDs and their exceptions. It can optionally support the
18979 Public Suffix List's private domains as well.")
18980 (license license:bsd-3)))
18981
18982 (define-public python2-tldextract
18983 (package-with-python2 python-tldextract))
18984
18985 (define-public python-nodeenv
18986 (package
18987 (name "python-nodeenv")
18988 (version "1.4.0")
18989 (source
18990 (origin
18991 ;; There's no tarball in PyPI.
18992 (method git-fetch)
18993 (uri (git-reference
18994 (url "https://github.com/ekalinin/nodeenv")
18995 (commit version)))
18996 (file-name (git-file-name name version))
18997 (sha256
18998 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18999 (build-system python-build-system)
19000 (arguments
19001 `(#:phases
19002 (modify-phases %standard-phases
19003 (replace 'check
19004 (lambda _
19005 ;; This test fails. It tries to open a network socket.
19006 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19007 (native-inputs
19008 `(("python-coverage" ,python-coverage)
19009 ("python-mock" ,python-mock)
19010 ("python-pytest" ,python-pytest)))
19011 (home-page "https://ekalinin.github.io/nodeenv/")
19012 (synopsis "Create isolated node.js environments")
19013 (description
19014 "Nodeenv (node.js virtual environment) is a tool to create isolated
19015 node.js environments. It creates an environment that has its own installation
19016 directories, that doesn't share libraries with other node.js virtual
19017 environments.")
19018 (license license:bsd-3)))
19019
19020 (define-public python-pynamecheap
19021 (package
19022 (name "python-pynamecheap")
19023 (version "0.0.3")
19024 (source
19025 (origin
19026 (method url-fetch)
19027 (uri (pypi-uri "PyNamecheap" version))
19028 (sha256
19029 (base32
19030 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19031 (build-system python-build-system)
19032 (propagated-inputs
19033 `(("python-requests" ,python-requests)))
19034 (home-page
19035 "https://github.com/Bemmu/PyNamecheap")
19036 (synopsis
19037 "Namecheap API client in Python")
19038 (description
19039 "PyNamecheap is a Namecheap API client in Python.")
19040 (license license:expat)))
19041
19042 (define-public python2-pynamecheap
19043 (package-with-python2 python-pynamecheap))
19044
19045 (define-public python-dns-lexicon
19046 (package
19047 (name "python-dns-lexicon")
19048 (version "2.4.0")
19049 (source
19050 (origin
19051 (method url-fetch)
19052 (uri (pypi-uri "dns-lexicon" version))
19053 (sha256
19054 (base32
19055 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19056 (build-system python-build-system)
19057 (arguments
19058 `(#:tests? #f)) ;requires internet access
19059 (propagated-inputs
19060 `(("python-future" ,python-future)
19061 ("python-pynamecheap" ,python-pynamecheap)
19062 ("python-requests" ,python-requests)
19063 ("python-tldextract" ,python-tldextract)
19064 ("python-urllib3" ,python-urllib3)))
19065 (home-page "https://github.com/AnalogJ/lexicon")
19066 (synopsis
19067 "Manipulate DNS records on various DNS providers")
19068 (description
19069 "Lexicon provides a way to manipulate DNS records on multiple DNS
19070 providers in a standardized way. It has a CLI but it can also be used as a
19071 Python library. It was designed to be used in automation, specifically with
19072 Let's Encrypt.")
19073 (license license:expat)))
19074
19075 (define-public python2-dns-lexicon
19076 (package-with-python2 python-dns-lexicon))
19077
19078 (define-public python-cfgv
19079 (package
19080 (name "python-cfgv")
19081 (version "3.1.0")
19082 (source
19083 (origin
19084 ;; There are no tests in the PyPI tarball.
19085 (method git-fetch)
19086 (uri (git-reference
19087 (url "https://github.com/asottile/cfgv")
19088 (commit (string-append "v" version))))
19089 (file-name (git-file-name name version))
19090 (sha256
19091 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19092 (build-system python-build-system)
19093 (arguments
19094 `(#:phases
19095 (modify-phases %standard-phases
19096 (replace 'check
19097 (lambda _
19098 (invoke "pytest" "-vv"))))))
19099 (native-inputs
19100 `(("python-covdefaults" ,python-covdefaults)
19101 ("python-coverage" ,python-coverage)
19102 ("python-pytest" ,python-pytest)))
19103 (home-page "https://github.com/asottile/cfgv")
19104 (synopsis "Configuration validation library")
19105 (description
19106 "This library helps to validate configuration files and produce human
19107 readable error messages.")
19108 (license license:expat)))
19109
19110 (define-public python-commandlines
19111 (package
19112 (name "python-commandlines")
19113 (version "0.4.1")
19114 (source
19115 (origin
19116 (method url-fetch)
19117 (uri (pypi-uri "commandlines" version))
19118 (sha256
19119 (base32
19120 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19121 (build-system python-build-system)
19122 (home-page "https://github.com/chrissimpkins/commandlines")
19123 (synopsis "Command line argument to object parsing library")
19124 (description
19125 "@code{Commandlines} is a Python library for command line application
19126 development that supports command line argument parsing, command string
19127 validation testing and application logic.")
19128 (license license:expat)))
19129
19130 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19131 ;; python-numba. They have a very unflexible relationship.
19132 (define-public python-numba
19133 (package
19134 (name "python-numba")
19135 (version "0.51.2")
19136 (source
19137 (origin
19138 (method url-fetch)
19139 (uri (pypi-uri "numba" version))
19140 (sha256
19141 (base32
19142 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19143 (build-system python-build-system)
19144 (arguments
19145 `(#:phases
19146 (modify-phases %standard-phases
19147 (add-after 'unpack 'disable-proprietary-features
19148 (lambda _
19149 (setenv "NUMBA_DISABLE_HSA" "1")
19150 (setenv "NUMBA_DISABLE_CUDA" "1")
19151 #t))
19152 (replace 'check
19153 (lambda* (#:key inputs outputs #:allow-other-keys)
19154 (add-installed-pythonpath inputs outputs)
19155 ;; Something is wrong with the PYTHONPATH when running the
19156 ;; tests from the build directory, as it complains about not being
19157 ;; able to import certain modules.
19158 (with-directory-excursion "/tmp"
19159 (setenv "HOME" (getcwd))
19160 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19161 (propagated-inputs
19162 `(("python-llvmlite" ,python-llvmlite)
19163 ("python-numpy" ,python-numpy)
19164 ("python-singledispatch" ,python-singledispatch)))
19165 (native-inputs ;for tests
19166 `(("python-jinja2" ,python-jinja2)
19167 ("python-pygments" ,python-pygments)))
19168 (home-page "https://numba.pydata.org")
19169 (synopsis "Compile Python code using LLVM")
19170 (description "Numba gives you the power to speed up your applications with
19171 high performance functions written directly in Python. With a few
19172 annotations, array-oriented and math-heavy Python code can be just-in-time
19173 compiled to native machine instructions, similar in performance to C, C++ and
19174 Fortran, without having to switch languages or Python interpreters.
19175
19176 Numba works by generating optimized machine code using the LLVM compiler
19177 infrastructure at import time, runtime, or statically (using the included pycc
19178 tool).")
19179 (license license:bsd-3)))
19180
19181 (define-public python-numcodecs
19182 (package
19183 (name "python-numcodecs")
19184 (version "0.6.4")
19185 (source
19186 (origin
19187 (method url-fetch)
19188 (uri (pypi-uri "numcodecs" version))
19189 (sha256
19190 (base32
19191 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19192 (build-system python-build-system)
19193 (propagated-inputs
19194 `(("python-numpy" ,python-numpy)
19195 ("python-msgpack" ,python-msgpack)))
19196 (native-inputs
19197 `(("python-pytest" ,python-pytest)
19198 ("python-setuptools-scm" ,python-setuptools-scm)))
19199 (home-page "https://github.com/zarr-developers/numcodecs")
19200 (synopsis "Buffer compression and transformation codecs")
19201 (description
19202 "This Python package provides buffer compression and transformation
19203 codecs for use in data storage and communication applications.")
19204 (license license:expat)))
19205
19206 (define-public python-asciitree
19207 (package
19208 (name "python-asciitree")
19209 (version "0.3.3")
19210 (source
19211 (origin
19212 (method url-fetch)
19213 (uri (pypi-uri "asciitree" version))
19214 (sha256
19215 (base32
19216 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19217 (build-system python-build-system)
19218 (home-page "https://github.com/mbr/asciitree")
19219 (synopsis "Draws ASCII trees")
19220 (description "This package draws tree structures using characters.")
19221 (license license:expat)))
19222
19223 (define-public python-zarr
19224 (package
19225 (name "python-zarr")
19226 (version "2.4.0")
19227 (source
19228 (origin
19229 (method url-fetch)
19230 (uri (pypi-uri "zarr" version))
19231 (sha256
19232 (base32
19233 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19234 (build-system python-build-system)
19235 (arguments
19236 `(#:phases
19237 (modify-phases %standard-phases
19238 (add-after 'unpack 'disable-service-tests
19239 (lambda _
19240 (setenv "ZARR_TEST_ABS" "0")
19241 (setenv "ZARR_TEST_MONGO" "0")
19242 (setenv "ZARR_TEST_REDIS" "0")
19243 #t))
19244 (replace 'check
19245 (lambda _
19246 (invoke "pytest" "-vv" "-k" "not lmdb")
19247 #t)))))
19248 (propagated-inputs
19249 `(("python-asciitree" ,python-asciitree)
19250 ("python-fasteners" ,python-fasteners)
19251 ("python-numcodecs" ,python-numcodecs)
19252 ("python-numpy" ,python-numpy)))
19253 (native-inputs
19254 `(("python-pytest" ,python-pytest)
19255 ("python-setuptools-scm" ,python-setuptools-scm)))
19256 (home-page "https://github.com/zarr-developers/zarr-python")
19257 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19258 (description
19259 "This package provides an implementation of chunked, compressed,
19260 N-dimensional arrays for Python.")
19261 (license license:expat)))
19262
19263 (define-public python-anndata
19264 (package
19265 (name "python-anndata")
19266 (version "0.7.1")
19267 (source
19268 (origin
19269 (method url-fetch)
19270 (uri (pypi-uri "anndata" version))
19271 (sha256
19272 (base32
19273 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19274 (build-system python-build-system)
19275 (arguments
19276 `(#:phases
19277 (modify-phases %standard-phases
19278 (add-after 'unpack 'delete-inconvenient-tests
19279 (lambda _
19280 ;; This test depends on python-scikit-learn.
19281 (delete-file "anndata/tests/test_inplace_subset.py")
19282 #t))
19283 (delete 'check)
19284 (add-after 'install 'check
19285 (lambda* (#:key inputs outputs #:allow-other-keys)
19286 (add-installed-pythonpath inputs outputs)
19287 (invoke "pytest" "-vv"))))))
19288 (propagated-inputs
19289 `(("python-h5py" ,python-h5py)
19290 ("python-importlib-metadata" ,python-importlib-metadata)
19291 ("python-natsort" ,python-natsort)
19292 ("python-numcodecs" ,python-numcodecs)
19293 ("python-packaging" ,python-packaging)
19294 ("python-pandas" ,python-pandas)
19295 ("python-scipy" ,python-scipy)
19296 ("python-zarr" ,python-zarr)))
19297 (native-inputs
19298 `(("python-joblib" ,python-joblib)
19299 ("python-pytest" ,python-pytest)
19300 ("python-setuptools-scm" ,python-setuptools-scm)))
19301 (home-page "https://github.com/theislab/anndata")
19302 (synopsis "Annotated data for data analysis pipelines")
19303 (description "Anndata is a package for simple (functional) high-level APIs
19304 for data analysis pipelines. In this context, it provides an efficient,
19305 scalable way of keeping track of data together with learned annotations and
19306 reduces the code overhead typically encountered when using a mostly
19307 object-oriented library such as @code{scikit-learn}.")
19308 (license license:bsd-3)))
19309
19310 (define-public python-dill
19311 (package
19312 (name "python-dill")
19313 (version "0.3.1.1")
19314 (source
19315 (origin
19316 (method url-fetch)
19317 (uri (pypi-uri "dill" version))
19318 (sha256
19319 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19320 (build-system python-build-system)
19321 (arguments
19322 `(#:phases
19323 (modify-phases %standard-phases
19324 (replace 'check
19325 (lambda _
19326 (with-directory-excursion "/tmp"
19327 (invoke "nosetests" "-v"))
19328 #t)))))
19329 (native-inputs
19330 `(("python-nose" ,python-nose)))
19331 (home-page "https://pypi.org/project/dill/")
19332 (synopsis "Serialize all of Python")
19333 (description "Dill extends Python's @code{pickle} module for serializing
19334 and de-serializing Python objects to the majority of the built-in Python
19335 types. Dill provides the user the same interface as the @code{pickle} module,
19336 and also includes some additional features. In addition to pickling Python
19337 objects, @code{dill} provides the ability to save the state of an interpreter
19338 session in a single command. Hence, it would be feasible to save a
19339 interpreter session, close the interpreter, ship the pickled file to another
19340 computer, open a new interpreter, unpickle the session and thus continue from
19341 the saved state of the original interpreter session.")
19342 (license license:bsd-3)))
19343
19344 (define-public python-multiprocess
19345 (package
19346 (name "python-multiprocess")
19347 (version "0.70.9")
19348 (source
19349 (origin
19350 (method url-fetch)
19351 (uri (pypi-uri "multiprocess" version))
19352 (sha256
19353 (base32
19354 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19355 (build-system python-build-system)
19356 (arguments
19357 `(#:phases
19358 (modify-phases %standard-phases
19359 (add-after 'unpack 'disable-broken-tests
19360 (lambda _
19361 ;; This test is broken as there is no keyboard interrupt.
19362 (substitute* "py3.7/multiprocess/tests/__init__.py"
19363 (("^(.*)def test_wait_result"
19364 line indent)
19365 (string-append indent
19366 "@unittest.skip(\"Disabled by Guix\")\n"
19367 line)))
19368 #t))
19369 ;; Tests must be run after installation.
19370 (delete 'check)
19371 (add-after 'install 'check
19372 (lambda* (#:key inputs outputs #:allow-other-keys)
19373 (add-installed-pythonpath inputs outputs)
19374 (invoke "python" "-m" "multiprocess.tests")
19375 #t)))))
19376 (propagated-inputs
19377 `(("python-dill" ,python-dill)))
19378 (home-page "https://pypi.org/project/multiprocess/")
19379 (synopsis "Multiprocessing and multithreading in Python")
19380 (description
19381 "This package is a fork of the multiprocessing Python package, a package
19382 which supports the spawning of processes using the API of the standard
19383 library's @code{threading} module.")
19384 (license license:bsd-3)))
19385
19386 (define-public python-toolz
19387 (package
19388 (name "python-toolz")
19389 (version "0.9.0")
19390 (source
19391 (origin
19392 (method url-fetch)
19393 (uri (pypi-uri "toolz" version))
19394 (sha256
19395 (base32
19396 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19397 (build-system python-build-system)
19398 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19399 ;; unregistered loader type"
19400 (arguments '(#:tests? #f))
19401 (home-page "https://github.com/pytoolz/toolz/")
19402 (synopsis "List processing tools and functional utilities")
19403 (description
19404 "This package provides a set of utility functions for iterators,
19405 functions, and dictionaries.")
19406 (license license:bsd-3)))
19407
19408 (define-public python2-toolz
19409 (package-with-python2 python-toolz))
19410
19411 (define-public python-cytoolz
19412 (package
19413 (name "python-cytoolz")
19414 (version "0.9.0.1")
19415 (source
19416 (origin
19417 (method url-fetch)
19418 (uri (pypi-uri "cytoolz" version))
19419 (sha256
19420 (base32
19421 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19422 (build-system python-build-system)
19423 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19424 ;; 'exceptions'"
19425 (arguments '(#:tests? #f))
19426 (propagated-inputs
19427 `(("python-toolz" ,python-toolz)))
19428 (native-inputs
19429 `(("python-cython" ,python-cython)))
19430 (home-page "https://github.com/pytoolz/cytoolz")
19431 (synopsis "High performance functional utilities")
19432 (description
19433 "The cytoolz package implements the same API as provided by toolz. The
19434 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19435 that is accessible to other projects developed in Cython.")
19436 (license license:bsd-3)))
19437
19438 (define-public python-sortedcontainers
19439 (package
19440 (name "python-sortedcontainers")
19441 (version "2.1.0")
19442 (source
19443 (origin
19444 (method url-fetch)
19445 (uri (pypi-uri "sortedcontainers" version))
19446 (sha256
19447 (base32
19448 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19449 (build-system python-build-system)
19450 (arguments
19451 ;; FIXME: Tests require many extra dependencies, and would introduce
19452 ;; a circular dependency on hypothesis, which uses this package.
19453 '(#:tests? #f))
19454 (propagated-inputs
19455 `(("python-appdirs" ,python-appdirs)
19456 ("python-distlib" ,python-distlib)
19457 ("python-filelock" ,python-filelock)
19458 ("python-six" ,python-six-bootstrap)))
19459 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19460 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19461 (description
19462 "This package provides a sorted collections library, written in
19463 pure-Python.")
19464 (license license:asl2.0)))
19465
19466 (define-public python2-sortedcontainers
19467 (package-with-python2 python-sortedcontainers))
19468
19469 (define-public python-cloudpickle
19470 (package
19471 (name "python-cloudpickle")
19472 (version "1.3.0")
19473 (source
19474 (origin
19475 (method url-fetch)
19476 (uri (pypi-uri "cloudpickle" version))
19477 (sha256
19478 (base32
19479 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19480 (build-system python-build-system)
19481 (arguments
19482 '(#:phases (modify-phases %standard-phases
19483 (add-before 'check 'do-not-override-PYTHONPATH
19484 (lambda _
19485 ;; Append to PYTHONPATH instead of overriding it so
19486 ;; that dependencies from Guix can be found.
19487 (substitute* "tests/testutils.py"
19488 (("env\\['PYTHONPATH'\\] = pythonpath")
19489 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19490 #t))
19491 (replace 'check
19492 (lambda* (#:key tests? #:allow-other-keys)
19493 (if tests?
19494 (invoke "pytest" "-s" "-vv")
19495 (format #t "test suite not run~%"))
19496 #t)))))
19497 (native-inputs
19498 `(;; For tests.
19499 ("python-psutil" ,python-psutil)
19500 ("python-pytest" ,python-pytest)
19501 ("python-tornado" ,python-tornado)))
19502 (home-page "https://github.com/cloudpipe/cloudpickle")
19503 (synopsis "Extended pickling support for Python objects")
19504 (description
19505 "Cloudpickle makes it possible to serialize Python constructs not
19506 supported by the default pickle module from the Python standard library. It
19507 is especially useful for cluster computing where Python expressions are
19508 shipped over the network to execute on remote hosts, possibly close to the
19509 data.")
19510 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19511 (license license:bsd-3)))
19512
19513 (define-public python2-cloudpickle
19514 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19515 (package
19516 (inherit base)
19517 (native-inputs
19518 `(("python-mock" ,python2-mock)
19519 ,@(package-native-inputs base)))
19520 (propagated-inputs
19521 `(("python-futures" ,python2-futures)
19522 ,@(package-propagated-inputs base))))))
19523
19524 (define-public python-locket
19525 (package
19526 (name "python-locket")
19527 (version "0.2.0")
19528 (source
19529 (origin
19530 (method url-fetch)
19531 (uri (pypi-uri "locket" version))
19532 (sha256
19533 (base32
19534 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19535 (build-system python-build-system)
19536 (home-page "https://github.com/mwilliamson/locket.py")
19537 (synopsis "File-based locks for Python")
19538 (description
19539 "Locket implements a lock that can be used by multiple processes provided
19540 they use the same path.")
19541 (license license:bsd-2)))
19542
19543 (define-public python2-locket
19544 (package-with-python2 python-locket))
19545
19546 (define-public python-blosc
19547 (package
19548 (name "python-blosc")
19549 (version "1.5.1")
19550 (source
19551 (origin
19552 (method url-fetch)
19553 (uri (pypi-uri "blosc" version))
19554 (sha256
19555 (base32
19556 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19557 (build-system python-build-system)
19558 ;; FIXME: all tests pass, but then this error is printed:
19559 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19560 (arguments '(#:tests? #f))
19561 (propagated-inputs
19562 `(("python-numpy" ,python-numpy)))
19563 (home-page "https://github.com/blosc/python-blosc")
19564 (synopsis "Python wrapper for the Blosc data compressor library")
19565 (description "Blosc is a high performance compressor optimized for binary
19566 data. It has been designed to transmit data to the processor cache faster
19567 than the traditional, non-compressed, direct memory fetch approach via a
19568 @code{memcpy()} system call.
19569
19570 Blosc works well for compressing numerical arrays that contains data with
19571 relatively low entropy, like sparse data, time series, grids with
19572 regular-spaced values, etc.
19573
19574 This Python package wraps the Blosc library.")
19575 (license license:bsd-3)))
19576
19577 (define-public python2-blosc
19578 (package-with-python2 python-blosc))
19579
19580 (define-public python-partd
19581 (package
19582 (name "python-partd")
19583 (version "0.3.9")
19584 (source
19585 (origin
19586 (method url-fetch)
19587 (uri (pypi-uri "partd" version))
19588 (sha256
19589 (base32
19590 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19591 (build-system python-build-system)
19592 (propagated-inputs
19593 `(("python-blosc" ,python-blosc)
19594 ("python-locket" ,python-locket)
19595 ("python-numpy" ,python-numpy)
19596 ("python-pandas" ,python-pandas)
19597 ("python-pyzmq" ,python-pyzmq)
19598 ("python-toolz" ,python-toolz)))
19599 (home-page "https://github.com/dask/partd/")
19600 (synopsis "Appendable key-value storage")
19601 (description "Partd stores key-value pairs. Values are raw bytes. We
19602 append on old values. Partd excels at shuffling operations.")
19603 (license license:bsd-3)))
19604
19605 (define-public python2-partd
19606 (package-with-python2 python-partd))
19607
19608 (define-public python-fsspec
19609 (package
19610 (name "python-fsspec")
19611 (version "0.6.1")
19612 (source
19613 (origin
19614 (method url-fetch)
19615 (uri (pypi-uri "fsspec" version))
19616 (sha256
19617 (base32
19618 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19619 (build-system python-build-system)
19620 (arguments '(#:tests? #f)) ; there are none
19621 (home-page "https://github.com/intake/filesystem_spec")
19622 (synopsis "File-system specification")
19623 (description "The purpose of this package is to produce a template or
19624 specification for a file-system interface, that specific implementations
19625 should follow, so that applications making use of them can rely on a common
19626 behavior and not have to worry about the specific internal implementation
19627 decisions with any given backend.")
19628 (license license:bsd-3)))
19629
19630 (define-public python-dask
19631 (package
19632 (name "python-dask")
19633 (version "2.14.0")
19634 (source
19635 (origin
19636 (method url-fetch)
19637 (uri (pypi-uri "dask" version))
19638 (sha256
19639 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19640 (build-system python-build-system)
19641 (arguments
19642 `(#:phases
19643 (modify-phases %standard-phases
19644 (add-after 'unpack 'disable-broken-tests
19645 (lambda _
19646 ;; This test is marked as xfail when pytest-xdist is used.
19647 (substitute* "dask/tests/test_threaded.py"
19648 (("def test_interrupt\\(\\)" m)
19649 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19650 m)))
19651 ;; This one fails with a type error:
19652 ;; TypeError: Already tz-aware, use tz_convert to convert.
19653 (substitute* "dask/dataframe/tests/test_shuffle.py"
19654 (("def test_set_index_timestamp\\(\\)" m)
19655 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19656 m)))
19657 #t))
19658 (replace 'check
19659 (lambda _ (invoke "pytest" "-vv"))))))
19660 (propagated-inputs
19661 `(("python-cloudpickle" ,python-cloudpickle)
19662 ("python-fsspec" ,python-fsspec)
19663 ("python-numpy" ,python-numpy)
19664 ("python-packaging" ,python-packaging)
19665 ("python-pandas" ,python-pandas)
19666 ("python-partd" ,python-partd)
19667 ("python-toolz" ,python-toolz)
19668 ("python-pyyaml" ,python-pyyaml)))
19669 (native-inputs
19670 `(("python-pytest" ,python-pytest)
19671 ("python-pytest-runner" ,python-pytest-runner)))
19672 (home-page "https://github.com/dask/dask/")
19673 (synopsis "Parallel computing with task scheduling")
19674 (description
19675 "Dask is a flexible parallel computing library for analytics. It
19676 consists of two components: dynamic task scheduling optimized for computation,
19677 and large data collections like parallel arrays, dataframes, and lists that
19678 extend common interfaces like NumPy, Pandas, or Python iterators to
19679 larger-than-memory or distributed environments. These parallel collections
19680 run on top of the dynamic task schedulers. ")
19681 (license license:bsd-3)))
19682
19683 (define-public python-ilinkedlist
19684 (package
19685 (name "python-ilinkedlist")
19686 (version "0.4.0")
19687 (source
19688 (origin
19689 (method url-fetch)
19690 (uri (pypi-uri "ilinkedlist" version))
19691 (sha256
19692 (base32
19693 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19694 (build-system python-build-system)
19695 (native-inputs `(("python-pytest" ,python-pytest)))
19696 (inputs `(("python" ,python)))
19697 (home-page "https://github.com/luther9/ilinkedlist-py")
19698 (synopsis "Immutable linked list library")
19699 (description
19700 "This is a implementation of immutable linked lists for Python. It
19701 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19702 Since a linked list is treated as immutable, it is hashable, and its length
19703 can be retrieved in constant time. Some of the terminology is inspired by
19704 LISP. It is possible to create an improper list by creating a @code{Pair}
19705 with a non-list @code{cdr}.")
19706 (license license:gpl3+)))
19707
19708 (define-public python-readlike
19709 (package
19710 (name "python-readlike")
19711 (version "0.1.3")
19712 (source
19713 (origin
19714 (method url-fetch)
19715 (uri (pypi-uri "readlike" version))
19716 (sha256
19717 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19718 (build-system python-build-system)
19719 (home-page "https://github.com/jangler/readlike")
19720 (synopsis "GNU Readline-like line editing module")
19721 (description
19722 "This Python module provides line editing functions similar to the default
19723 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19724 @code{readline} package, this one allows access to those capabilities in settings
19725 outside of a standard command-line interface. It is especially well-suited to
19726 interfacing with Urwid, due to a shared syntax for describing key inputs.
19727
19728 Currently, all stateless Readline commands are implemented. Yanking and history
19729 are not supported.")
19730 (license license:expat)))
19731
19732 (define-public python2-readlike
19733 (package-with-python2 python-readlike))
19734
19735 (define-public python-reparser
19736 (package
19737 (name "python-reparser")
19738 (version "1.4.3")
19739 (source
19740 (origin
19741 (method url-fetch)
19742 (uri (pypi-uri "ReParser" version))
19743 (sha256
19744 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19745 (build-system python-build-system)
19746 (home-page "https://github.com/xmikos/reparser")
19747 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19748 (description
19749 "This Python library provides a simple lexer/parser for inline markup based
19750 on regular expressions.")
19751 (license license:expat)))
19752
19753 (define-public python2-reparser
19754 (let ((reparser (package-with-python2
19755 (strip-python2-variant python-reparser))))
19756 (package (inherit reparser)
19757 (propagated-inputs
19758 `(("python2-enum34" ,python2-enum34)
19759 ,@(package-propagated-inputs reparser))))))
19760
19761 (define-public python-retrying
19762 (package
19763 (name "python-retrying")
19764 (version "1.3.3")
19765 (source
19766 (origin
19767 (method git-fetch)
19768 (uri (git-reference
19769 (url "https://github.com/rholder/retrying")
19770 (commit (string-append "v" version))))
19771 (file-name (git-file-name name version))
19772 (sha256
19773 (base32
19774 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19775 (build-system python-build-system)
19776 (propagated-inputs
19777 `(("python-six" ,python-six)))
19778 (home-page "https://github.com/rholder/retrying")
19779 (synopsis "Library for adding retry behavior")
19780 (description "Retrying is a general-purpose retrying library to simplify
19781 the task of adding retry behavior to just about anything.
19782
19783 Features:
19784
19785 @itemize
19786 @item Generic Decorator API.
19787 @item Specify stop condition (i.e. limit by number of attempts).
19788 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19789 @item Customize retrying on Exceptions.
19790 @item Customize retrying on expected returned result.
19791 @end itemize")
19792 (license license:asl2.0)))
19793
19794 (define-public python-precis-i18n
19795 (package
19796 (name "python-precis-i18n")
19797 (version "1.0.0")
19798 (source
19799 (origin
19800 (method url-fetch)
19801 (uri (pypi-uri "precis_i18n" version))
19802 (sha256
19803 (base32
19804 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19805 (build-system python-build-system)
19806 (home-page "https://github.com/byllyfish/precis_i18n")
19807 (synopsis "Implementation of the PRECIS framework")
19808 (description
19809 "This module implements the PRECIS Framework as described in RFC 8264,
19810 RFC 8265 and RFC 8266.")
19811 (license license:expat)))
19812
19813 (define-public python-absl-py
19814 (package
19815 (name "python-absl-py")
19816 (version "0.6.1")
19817 (source
19818 (origin
19819 (method url-fetch)
19820 (uri (pypi-uri "absl-py" version))
19821 (sha256
19822 (base32
19823 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19824 (build-system python-build-system)
19825 (propagated-inputs
19826 `(("python-six" ,python-six)))
19827 (home-page "https://github.com/abseil/abseil-py")
19828 (synopsis "Abseil Python common libraries")
19829 (description
19830 "This package provides the Abseil Python Common Libraries, a collection
19831 of Python libraries for building Python applications.")
19832 (license license:asl2.0)))
19833
19834 (define-public python-astor
19835 (package
19836 (name "python-astor")
19837 (version "0.7.1")
19838 (source
19839 (origin
19840 (method url-fetch)
19841 (uri (pypi-uri "astor" version))
19842 (sha256
19843 (base32
19844 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19845 (build-system python-build-system)
19846 ;; FIXME: There are two errors and two test failures.
19847 (arguments `(#:tests? #f))
19848 (home-page "https://github.com/berkerpeksag/astor")
19849 (synopsis "Read and write Python ASTs")
19850 (description "Astor is designed to allow easy manipulation of Python
19851 source via the Abstract Syntax Tree.")
19852 (license license:bsd-3)))
19853
19854 (define-public python2-astor
19855 (package-with-python2 python-astor))
19856
19857 (define-public python-astunparse
19858 (package
19859 (name "python-astunparse")
19860 (version "1.6.2")
19861 (source
19862 (origin
19863 (method url-fetch)
19864 (uri (pypi-uri "astunparse" version))
19865 (sha256
19866 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19867 (build-system python-build-system)
19868 (arguments '(#:tests? #f)) ; there are none
19869 (propagated-inputs
19870 `(("python-six" ,python-six)
19871 ("python-wheel" ,python-wheel)))
19872 (home-page "https://github.com/simonpercivall/astunparse")
19873 (synopsis "AST unparser for Python")
19874 (description "This package provides an AST unparser for Python. It is a
19875 factored out version of @code{unparse} found in the Python source
19876 distribution.")
19877 (license license:bsd-3)))
19878
19879 (define-public python-gast
19880 (package
19881 (name "python-gast")
19882 (version "0.3.3")
19883 (source
19884 (origin
19885 (method url-fetch)
19886 (uri (pypi-uri "gast" version))
19887 (sha256
19888 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19889 (build-system python-build-system)
19890 (propagated-inputs
19891 `(("python-astunparse" ,python-astunparse)))
19892 (home-page "https://pypi.org/project/gast/")
19893 (synopsis "Generic Python AST that abstracts the underlying Python version")
19894 (description
19895 "GAST provides a compatibility layer between the AST of various Python
19896 versions, as produced by @code{ast.parse} from the standard @code{ast}
19897 module.")
19898 (license license:bsd-3)))
19899
19900 (define-public python-wikidata
19901 (package
19902 (name "python-wikidata")
19903 (version "0.6.1")
19904 (source
19905 (origin
19906 (method url-fetch)
19907 (uri (pypi-uri "Wikidata" version))
19908 (sha256
19909 (base32
19910 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19911 (build-system python-build-system)
19912 (propagated-inputs
19913 `(("python-babel" ,python-babel)))
19914 (home-page "https://github.com/dahlia/wikidata")
19915 (synopsis "Wikidata client library")
19916 (description
19917 "This package provides a Python interface to
19918 @url{https://www.wikidata.org/, Wikidata}.")
19919 (properties '((upstream-name . "Wikidata")))
19920 (license license:gpl3+)))
19921
19922 (define-public python-doctest-ignore-unicode
19923 (package
19924 (name "python-doctest-ignore-unicode")
19925 (version "0.1.2")
19926 (source
19927 (origin
19928 (method url-fetch)
19929 (uri (pypi-uri "doctest-ignore-unicode" version))
19930 (sha256
19931 (base32
19932 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19933 (build-system python-build-system)
19934 (native-inputs
19935 `(("python-nose" ,python-nose)))
19936 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19937 (synopsis "Ignore Unicode literal prefixes in doctests")
19938 (description
19939 "This package adds support for a flag to ignore Unicode literal prefixes
19940 in doctests.")
19941 (license license:asl2.0)))
19942
19943 (define-public python-attr
19944 (package
19945 (name "python-attr")
19946 (version "0.3.1")
19947 (source
19948 (origin
19949 (method url-fetch)
19950 (uri (pypi-uri "attr" version))
19951 (sha256
19952 (base32
19953 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19954 (build-system python-build-system)
19955 (home-page "https://github.com/denis-ryzhkov/attr")
19956 (synopsis "Decorator for attributes of target function or class")
19957 (description "Simple decorator to set attributes of target function or
19958 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19959 (license license:expat)))
19960
19961 (define-public python-construct
19962 (package
19963 (name "python-construct")
19964 (version "2.10.56")
19965 (source
19966 (origin
19967 (method url-fetch)
19968 (uri (pypi-uri "construct" version))
19969 (sha256
19970 (base32
19971 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19972 (build-system python-build-system)
19973 (arguments
19974 `(#:tests? #f)) ; No tests exist.
19975 (propagated-inputs
19976 `(("python-extras" ,python-extras)
19977 ("python-arrow" ,python-arrow)
19978 ("python-numpy" ,python-numpy)
19979 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19980 (home-page "https://construct.readthedocs.io")
19981 (synopsis "Declarative and symmetrical parser and builder for binary data")
19982 (description
19983 "This package provides both simple, atomic constructs (such as
19984 integers of various sizes), as well as composite ones which allow you
19985 form hierarchical and sequential structures of increasing complexity.
19986 It features bit and byte granularity, easy debugging and testing, an
19987 easy-to-extend subclass system, and lots of primitive constructs to
19988 make your work easier.")
19989 (license license:expat)))
19990
19991 (define-public python-outcome
19992 (package
19993 (name "python-outcome")
19994 (version "1.0.1")
19995 (source
19996 (origin
19997 (method url-fetch)
19998 (uri (pypi-uri "outcome" version))
19999 (sha256
20000 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20001 (build-system python-build-system)
20002 (arguments
20003 `(#:phases
20004 (modify-phases %standard-phases
20005 (replace 'check
20006 (lambda* (#:key inputs outputs #:allow-other-keys)
20007 (add-installed-pythonpath inputs outputs)
20008 (invoke "pytest" "-vv"))))))
20009 (native-inputs
20010 `(("python-pytest" ,python-pytest)
20011 ("python-pytest-cov" ,python-pytest-cov)
20012 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20013 (propagated-inputs
20014 `(("python-async-generator" ,python-async-generator)
20015 ("python-attrs" ,python-attrs)))
20016 (home-page "https://github.com/python-trio/outcome")
20017 (synopsis "Capture the outcome of Python function calls")
20018 (description
20019 "Capture the outcome of Python function calls. Extracted from the Trio
20020 project.")
20021 ;; Either license applies.
20022 (license (list license:expat license:asl2.0))))
20023
20024 (define-public python-trio
20025 (package
20026 (name "python-trio")
20027 (version "0.17.0")
20028 (source
20029 (origin
20030 (method url-fetch)
20031 (uri (pypi-uri "trio" version))
20032 (sha256
20033 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20034 (build-system python-build-system)
20035 (arguments
20036 `(#:phases
20037 (modify-phases %standard-phases
20038 (add-before 'check 'change-home
20039 (lambda _
20040 ;; Tests require a writable home.
20041 (setenv "HOME" "/tmp")
20042 #t))
20043 (replace 'check
20044 (lambda _
20045 (invoke "pytest" "-vv" "-k"
20046 (string-append
20047 ;; This test times out.
20048 "not test_ki_protection_works"
20049 ;; Assertion errors.
20050 " and not test_guest_mode_ki"
20051 " and not test_run_in_trio_thread_ki"
20052 ;; These try to raise KeyboardInterrupt which does not work
20053 ;; in the build environment.
20054 " and not test_ki_self"
20055 " and not test_ki_wakes_us_up"
20056 ;; Failure in name resolution.
20057 " and not test_getnameinfo"
20058 " and not test_SocketType_resolve"
20059 ;; OSError: protocol not found.
20060 " and not test_getprotobyname")))))))
20061 (native-inputs
20062 `(("python-astor" ,python-astor)
20063 ("python-ipython" ,python-ipython)
20064 ("python-jedi" ,python-jedi)
20065 ("python-pylint" ,python-pylint)
20066 ("python-pyopenssl" ,python-pyopenssl)
20067 ("python-pytest" ,python-pytest)
20068 ("python-pytest-cov" ,python-pytest-cov)
20069 ("python-trustme" ,python-trustme)))
20070 (propagated-inputs
20071 `(("python-attrs" ,python-attrs)
20072 ("python-idna" ,python-idna)
20073 ("python-outcome" ,python-outcome)
20074 ("python-sniffio" ,python-sniffio)
20075 ("python-sortedcontainers"
20076 ,python-sortedcontainers)))
20077 (home-page "https://github.com/python-trio/trio")
20078 (synopsis "Friendly Python library for async concurrency and I/O")
20079 (description
20080 "Trio strives to be a production-quality, async/await-native I/O library
20081 for Python. Like all async libraries, its main purpose is to help you write
20082 programs that do multiple things at the same time with parallelized I/O.")
20083 ;; Either license applies.
20084 (license (list license:expat license:asl2.0))))
20085
20086 (define-public python-trio-typing
20087 (package
20088 (name "python-trio-typing")
20089 (version "0.5.0")
20090 (source
20091 (origin
20092 (method url-fetch)
20093 (uri (pypi-uri "trio-typing" version))
20094 (sha256
20095 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20096 (build-system python-build-system)
20097 (arguments
20098 `(#:phases
20099 (modify-phases %standard-phases
20100 (replace 'check
20101 (lambda _
20102 (invoke "pytest" "-vv"))))))
20103 (native-inputs
20104 `(("python-attrs" ,python-attrs)
20105 ("python-pytest" ,python-pytest)))
20106 (propagated-inputs
20107 `(("python-mypy" ,python-mypy)
20108 ("python-mypy-extensions"
20109 ,python-mypy-extensions)
20110 ("python-trio" ,python-trio)
20111 ("python-typing-extensions"
20112 ,python-typing-extensions)))
20113 (home-page "https://github.com/python-trio/trio-typing")
20114 (synopsis "Static type checking support for Trio and related projects")
20115 (description
20116 "This package provides:
20117
20118 @itemize
20119 @item PEP 561 typing stubs packages for the Trio project packages:
20120
20121 @itemize
20122 @item trio (@code{trio-stubs})
20123 @item outcome (@code{outcome-stubs})
20124 @item async_generator (@code{async_generator-stubs})
20125 @end itemize
20126
20127 @item A package @code{trio_typing} containing types that Trio programs often
20128 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20129 a mypy plugin that smooths over some limitations in the basic type hints.
20130 @end itemize")
20131 ;; Either license applies.
20132 (license (list license:expat license:asl2.0))))
20133
20134 (define-public python-humanize
20135 (package
20136 (name "python-humanize")
20137 (version "0.5.1")
20138 (source
20139 (origin
20140 (method url-fetch)
20141 (uri (pypi-uri "humanize" version))
20142 (sha256
20143 (base32
20144 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20145 (arguments
20146 '(#:tests? #f)) ; tests not in pypi archive
20147 (build-system python-build-system)
20148 (home-page "https://github.com/jmoiron/humanize")
20149 (synopsis "Print numerical information in a human-readable form")
20150 (description "This package provides a Python module that displays numbers
20151 and dates in \"human readable\" forms. For example, it would display
20152 \"12345591313\" as \"12.3 billion\".")
20153 (license license:expat)))
20154
20155 (define-public python-txaio
20156 (package
20157 (name "python-txaio")
20158 (version "18.8.1")
20159 (source
20160 (origin
20161 (method url-fetch)
20162 (uri (pypi-uri "txaio" version))
20163 (sha256
20164 (base32
20165 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20166 (build-system python-build-system)
20167 (propagated-inputs
20168 `(("python-twisted" ,python-twisted)
20169 ("python-six" ,python-six)))
20170 (home-page "https://github.com/crossbario/txaio")
20171 (synopsis "Compatibility layer between Python asyncio and Twisted")
20172 (description "Txaio provides a compatibility layer between the Python
20173 @code{asyncio} module and @code{Twisted}.")
20174 (license license:expat)))
20175
20176 (define-public python-toolshed
20177 (package
20178 (name "python-toolshed")
20179 (version "0.4.6")
20180 (source
20181 (origin
20182 (method url-fetch)
20183 (uri (pypi-uri "toolshed" version))
20184 (sha256
20185 (base32
20186 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20187 (build-system python-build-system)
20188 (native-inputs
20189 `(("python-nose" ,python-nose)))
20190 (home-page "https://github.com/brentp/toolshed/")
20191 (synopsis "Collection of modules and functions for working with data")
20192 (description "This is a collection of well-tested, simple modules and
20193 functions that aim to reduce boilerplate when working with data.")
20194 (license license:bsd-2)))
20195
20196 (define-public python-annoy
20197 (package
20198 (name "python-annoy")
20199 (version "1.15.1")
20200 (source
20201 (origin
20202 (method url-fetch)
20203 (uri (pypi-uri "annoy" version))
20204 (sha256
20205 (base32
20206 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20207 (build-system python-build-system)
20208 (native-inputs
20209 `(("python-nose" ,python-nose)))
20210 (home-page "https://github.com/spotify/annoy/")
20211 (synopsis "Approximate nearest neighbors library")
20212 (description
20213 "Annoy is a C++ library with Python bindings to search for points in
20214 space that are close to a given query point. It also creates large read-only
20215 file-based data structures that are @code{mmap}ped into memory so that many
20216 processes may share the same data.")
20217 (license license:asl2.0)))
20218
20219 (define-public python-croniter
20220 (package
20221 (name "python-croniter")
20222 (version "0.3.34")
20223 (source (origin
20224 (method url-fetch)
20225 (uri (pypi-uri "croniter" version))
20226 (sha256
20227 (base32
20228 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20229 (build-system python-build-system)
20230 (propagated-inputs
20231 `(("python-dateutil" ,python-dateutil)
20232 ("python-natsort" ,python-natsort)))
20233 (home-page "https://github.com/kiorky/croniter")
20234 (synopsis "Iterate datetime objects with cron-like syntax")
20235 (description
20236 "@code{croniter} provides iteration for datetime object with cron-like
20237 format.")
20238 (license license:expat)))
20239
20240 (define-public python-pylzma
20241 (package
20242 (name "python-pylzma")
20243 (version "0.5.0")
20244 (source
20245 (origin
20246 (method url-fetch)
20247 (uri (pypi-uri "pylzma" version))
20248 (sha256
20249 (base32
20250 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20251 (build-system python-build-system)
20252 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20253 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20254 (description "This package provides Python bindings for the LZMA library
20255 by Igor Pavlov.")
20256 (license license:lgpl2.1+)))
20257
20258 (define-public python2-pylzma
20259 (package-with-python2 python-pylzma))
20260
20261 (define-public python2-zeroconf
20262 (package
20263 (name "python2-zeroconf")
20264
20265 ;; This is the last version that supports Python 2.x.
20266 (version "0.19.1")
20267 (source
20268 (origin
20269 (method url-fetch)
20270 (uri (pypi-uri "zeroconf" version))
20271 (sha256
20272 (base32
20273 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20274 (build-system python-build-system)
20275 (arguments
20276 `(#:python ,python-2
20277 #:phases
20278 (modify-phases %standard-phases
20279 (add-after 'unpack 'patch-requires
20280 (lambda* (#:key inputs #:allow-other-keys)
20281 (substitute* "setup.py"
20282 (("enum-compat")
20283 "enum34"))
20284 #t)))))
20285 (native-inputs
20286 `(("python2-six" ,python2-six)
20287 ("python2-enum32" ,python2-enum34)
20288 ("python2-netifaces" ,python2-netifaces)
20289 ("python2-typing" ,python2-typing)))
20290 (home-page "https://github.com/jstasiak/python-zeroconf")
20291 (synopsis "Pure Python mDNS service discovery")
20292 (description
20293 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20294 compatible).")
20295 (license license:lgpl2.1+)))
20296
20297 (define-public python-bsddb3
20298 (package
20299 (name "python-bsddb3")
20300 (version "6.2.6")
20301 (source
20302 (origin
20303 (method url-fetch)
20304 (uri (pypi-uri "bsddb3" version))
20305 (sha256
20306 (base32
20307 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20308 (build-system python-build-system)
20309 (inputs
20310 `(("bdb" ,bdb)))
20311 (arguments
20312 '(#:phases
20313 (modify-phases %standard-phases
20314 (add-after 'unpack 'configure-locations
20315 (lambda* (#:key inputs #:allow-other-keys)
20316 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20317 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20318 #t))
20319 (replace 'check
20320 (lambda _
20321 (invoke "python3" "test3.py" "-v"))))))
20322 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20323 (synopsis "Python bindings for Oracle Berkeley DB")
20324 (description
20325 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20326 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20327 Transaction objects, and each of these is exposed as a Python type in the
20328 bsddb3.db module. The database objects can use various access methods: btree,
20329 hash, recno, and queue. Complete support of Berkeley DB distributed
20330 transactions. Complete support for Berkeley DB Replication Manager.
20331 Complete support for Berkeley DB Base Replication. Support for RPC.")
20332 (license license:bsd-3)))
20333
20334 (define-public python-dbfread
20335 (package
20336 (name "python-dbfread")
20337 (version "2.0.7")
20338 (source (origin
20339 (method url-fetch)
20340 (uri (pypi-uri "dbfread" version))
20341 (sha256
20342 (base32
20343 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20344 (build-system python-build-system)
20345 (native-inputs
20346 `(("python-pytest" ,python-pytest)))
20347 (home-page "https://dbfread.readthedocs.io")
20348 (synopsis "Read DBF Files with Python")
20349 (description
20350 "This library reads DBF files and returns the data as native Python data
20351 types for further processing. It is primarily intended for batch jobs and
20352 one-off scripts.")
20353 (license license:expat)))
20354
20355 (define-public python-cached-property
20356 (package
20357 (name "python-cached-property")
20358 (version "1.5.1")
20359 (source
20360 (origin
20361 (method url-fetch)
20362 (uri (pypi-uri "cached-property" version))
20363 (sha256
20364 (base32
20365 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20366 (build-system python-build-system)
20367 (arguments
20368 `(#:phases
20369 (modify-phases %standard-phases
20370 ;; https://github.com/pydanny/cached-property/issues/131
20371 ;; recent versions of freezegun break one test
20372 (add-after 'unpack 'disable-broken-test
20373 (lambda _
20374 (substitute* "tests/test_cached_property.py"
20375 (("def test_threads_ttl_expiry\\(self\\)" m)
20376 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20377 " " m)))
20378 #t)))))
20379 (native-inputs
20380 `(("python-freezegun" ,python-freezegun)))
20381 (home-page
20382 "https://github.com/pydanny/cached-property")
20383 (synopsis
20384 "Decorator for caching properties in classes")
20385 (description
20386 "This package provides a decorator which makes caching
20387 time-or-computationally-expensive properties quick and easy and works in Python
20388 2 or 3.")
20389 (license license:bsd-3)))
20390
20391 (define-public python-folium
20392 (package
20393 (name "python-folium")
20394 (version "0.11.0")
20395 (source
20396 (origin
20397 (method url-fetch)
20398 (uri (pypi-uri "folium" version))
20399 (sha256
20400 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20401 (build-system python-build-system)
20402 (propagated-inputs
20403 `(("python-branca" ,python-branca)
20404 ("python-jinja2" ,python-jinja2)
20405 ("python-numpy" ,python-numpy)
20406 ("python-requests" ,python-requests)))
20407 (native-inputs
20408 `(("python-pytest" ,python-pytest)))
20409 (home-page "https://github.com/python-visualization/folium")
20410 (synopsis "Make beautiful maps with Leaflet.js & Python")
20411 (description "@code{folium} makes it easy to visualize data that’s been
20412 manipulated in Python on an interactive leaflet map. It enables both the
20413 binding of data to a map for @code{choropleth} visualizations as well as
20414 passing rich vector/raster/HTML visualizations as markers on the map.
20415
20416 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20417 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20418 supports Image, Video, GeoJSON and TopoJSON overlays.")
20419 (license license:expat)))
20420
20421 (define-public jube
20422 (package
20423 ;; This is a command-line tool, so no "python-" prefix.
20424 (name "jube")
20425 (version "2.2.2")
20426 (source (origin
20427 (method url-fetch)
20428 (uri (string-append
20429 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20430 version))
20431 (sha256
20432 (base32
20433 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20434 (file-name (string-append "jube-" version ".tar.gz"))))
20435 (build-system python-build-system)
20436 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20437 (synopsis "Benchmarking environment")
20438 (description
20439 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20440 benchmarked application, benchmark data is stored in a format that allows JUBE
20441 to deduct the desired information. This data can be parsed by automatic pre-
20442 and post-processing scripts that draw information and store it more densely
20443 for manual interpretation.")
20444 (license license:gpl3+)))
20445
20446 (define-public python-pyroutelib3
20447 (package
20448 (name "python-pyroutelib3")
20449 (version "1.3.post1")
20450 (source
20451 (origin
20452 (method url-fetch)
20453 (uri (pypi-uri "pyroutelib3" version))
20454 (sha256
20455 (base32
20456 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20457 (build-system python-build-system)
20458 (propagated-inputs
20459 `(("python-dateutil" ,python-dateutil)))
20460 (home-page "https://github.com/MKuranowski/pyroutelib3")
20461 (synopsis "Library for simple routing on OSM data")
20462 (description "Library for simple routing on OSM data")
20463 (license license:gpl3+)))
20464
20465 (define-public python-bibtexparser
20466 (package
20467 (name "python-bibtexparser")
20468 (version "1.1.0")
20469 (source
20470 (origin
20471 (method url-fetch)
20472 (uri (pypi-uri "bibtexparser" version))
20473 (sha256
20474 (base32
20475 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20476 (build-system python-build-system)
20477 (propagated-inputs
20478 `(("python-pyparsing" ,python-pyparsing)))
20479 (native-inputs
20480 `(("python-future" ,python-future)))
20481 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20482 (synopsis "Python library to parse BibTeX files")
20483 (description "BibtexParser is a Python library to parse BibTeX files.")
20484 (license (list license:bsd-3 license:lgpl3))))
20485
20486 (define-public python-distro
20487 (package
20488 (name "python-distro")
20489 (version "1.4.0")
20490 (source
20491 (origin
20492 (method url-fetch)
20493 (uri (pypi-uri "distro" version))
20494 (sha256
20495 (base32
20496 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20497 (build-system python-build-system)
20498 (native-inputs
20499 `(("python-pytest" ,python-pytest)))
20500 (home-page "https://github.com/nir0s/distro")
20501 (synopsis
20502 "OS platform information API")
20503 (description
20504 "@code{distro} provides information about the OS distribution it runs on,
20505 such as a reliable machine-readable ID, or version information.
20506
20507 It is the recommended replacement for Python's original
20508 `platform.linux_distribution` function (which will be removed in Python 3.8).
20509 @code{distro} also provides a command-line interface to output the platform
20510 information in various formats.")
20511 (license license:asl2.0)))
20512
20513 (define-public python-cairosvg
20514 (package
20515 (name "python-cairosvg")
20516 (version "2.5.0")
20517 (source
20518 (origin
20519 (method url-fetch)
20520 (uri (pypi-uri "CairoSVG" version))
20521 (sha256
20522 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20523 (build-system python-build-system)
20524 (arguments
20525 `(#:phases
20526 (modify-phases %standard-phases
20527 (replace 'check
20528 (lambda _ (invoke "pytest"))))))
20529 (propagated-inputs
20530 `(("python-cairocffi" ,python-cairocffi)
20531 ("python-cssselect2" ,python-cssselect2)
20532 ("python-defusedxml" ,python-defusedxml)
20533 ("python-pillow" ,python-pillow)
20534 ("python-tinycss2" ,python-tinycss2)))
20535 (native-inputs
20536 `(("python-pytest-flake8" ,python-pytest-flake8)
20537 ("python-pytest-isort" ,python-pytest-isort)
20538 ("python-pytest-runner" ,python-pytest-runner)))
20539 (home-page "https://cairosvg.org/")
20540 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20541 (description "CairoSVG is a SVG converter based on Cairo. It can export
20542 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20543 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20544 parsed, the result is drawn to a Cairo surface that can be exported to
20545 qvarious formats: PDF, PostScript, PNG and even SVG.")
20546 (license license:lgpl3+)))
20547
20548 (define-public python-pyphen
20549 (package
20550 (name "python-pyphen")
20551 (version "0.10.0")
20552 (source
20553 (origin
20554 (method url-fetch)
20555 (uri (pypi-uri "Pyphen" version))
20556 (sha256
20557 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20558 (build-system python-build-system)
20559 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20560 ;; embedded set provided by upstream - like Debian does.
20561 (home-page "https://github.com/Kozea/Pyphen")
20562 (synopsis "Pure Python module to hyphenate text")
20563 (description "Pyphen is a pure Python module to hyphenate text using
20564 existing Hunspell hyphenation dictionaries.")
20565 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20566
20567 (define-public python-intelhex
20568 (package
20569 (name "python-intelhex")
20570 (version "2.2.1")
20571 (source
20572 (origin
20573 (method url-fetch)
20574 (uri (pypi-uri "intelhex" version))
20575 (sha256
20576 (base32
20577 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20578 (build-system python-build-system)
20579 (arguments '(#:tests? #f)) ;issue with version
20580 (home-page "https://pypi.org/project/IntelHex/")
20581 (synopsis "Python library for Intel HEX files manipulations")
20582 (description "The Intel HEX file format is widely used in microprocessors
20583 and microcontrollers area (embedded systems etc.) as the de facto standard for
20584 representation of code to be programmed into microelectronic devices. This
20585 package provides an intelhex Python library to read, write, create from
20586 scratch and manipulate data from Intel HEX file format. It also includes
20587 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20588 converters and more, those based on the library itself.")
20589 (license license:bsd-3)))
20590
20591 (define-public python-pykwalify
20592 (package
20593 (name "python-pykwalify")
20594 (version "1.7.0")
20595 (source
20596 (origin
20597 (method url-fetch)
20598 (uri (pypi-uri "pykwalify" version))
20599 (sha256
20600 (base32
20601 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20602 (build-system python-build-system)
20603 (arguments '(#:tests? #f)) ;missing dependencies
20604 (propagated-inputs
20605 `(("python-dateutil" ,python-dateutil)
20606 ("python-docopt" ,python-docopt)
20607 ("python-pyyaml" ,python-pyyaml)))
20608 (home-page "https://github.com/grokzen/pykwalify")
20609 (synopsis
20610 "Python lib/cli for JSON/YAML schema validation")
20611 (description
20612 "This package provides a parser, schema validator, and data binding tool
20613 for YAML and JSON.")
20614 (license license:expat)))
20615
20616 (define-public python-dbusmock
20617 (package
20618 (name "python-dbusmock")
20619 (version "0.18.3")
20620 (source
20621 (origin
20622 (method url-fetch)
20623 (uri (pypi-uri "python-dbusmock" version))
20624 (sha256
20625 (base32
20626 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20627 (build-system python-build-system)
20628 (arguments
20629 '(#:phases
20630 (modify-phases %standard-phases
20631 (add-after 'unpack 'patch-shell-path
20632 (lambda _
20633 (substitute* "tests/test_code.py"
20634 (("/bin/bash") (which "bash")))
20635 #t)))))
20636 (native-inputs
20637 `(;; For tests.
20638 ("dbus" ,dbus) ; for dbus-daemon
20639 ("python-nose" ,python-nose)
20640 ("which" ,which)))
20641 (propagated-inputs
20642 `(("python-dbus" ,python-dbus)
20643 ("python-pygobject" ,python-pygobject)))
20644 (home-page "https://github.com/martinpitt/python-dbusmock")
20645 (synopsis "Python library for mock D-Bus objects")
20646 (description "python-dbusmock allows for the easy creation of mock objects on
20647 D-Bus. This is useful for writing tests for software which talks to D-Bus
20648 services such as upower, systemd, logind, gnome-session or others, and it is
20649 hard (or impossible without root privileges) to set the state of the real
20650 services to what you expect in your tests.")
20651 (license license:lgpl3+)))
20652
20653 (define-public python-jsonplus
20654 (package
20655 (name "python-jsonplus")
20656 (version "0.8.0")
20657 (home-page "https://github.com/randomir/jsonplus")
20658 (source (origin
20659 (method url-fetch)
20660 (uri (pypi-uri "jsonplus" version))
20661 (sha256
20662 (base32
20663 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20664 (build-system python-build-system)
20665 ;; XXX: No tests on PyPI, and the repository has no tags.
20666 (arguments '(#:tests? #f))
20667 (propagated-inputs
20668 `(("python-dateutil" ,python-dateutil)
20669 ("python-simplejson" ,python-simplejson)
20670 ("python-sortedcontainers" ,python-sortedcontainers)))
20671 (synopsis "Serialize Python types to/from JSON")
20672 (description
20673 "This package provides functionality to serialize arbitrary data types
20674 to and from JSON. Common data types are implemented and it is easy to
20675 register custom encoders and decoders.")
20676 (license license:expat)))
20677
20678 (define-public python-ujson
20679 (package
20680 (name "python-ujson")
20681 (version "4.0.1")
20682 (source
20683 (origin
20684 (method url-fetch)
20685 (uri (pypi-uri "ujson" version))
20686 (sha256
20687 (base32
20688 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20689 (modules '((guix build utils)))
20690 (snippet
20691 '(begin (delete-file-recursively "deps") #t))))
20692 (build-system python-build-system)
20693 (arguments
20694 `(#:phases
20695 (modify-phases %standard-phases
20696 (add-after 'unpack 'link-to-system-double-conversion
20697 (lambda* (#:key inputs #:allow-other-keys)
20698 (let ((d-c (assoc-ref inputs "double-conversion")))
20699 (substitute* "setup.py"
20700 (("./deps/double-conversion/double-conversion\"")
20701 (string-append d-c "/include/double-conversion\""))
20702 (("-lstdc++" stdc)
20703 (string-append "-L" d-c "/lib\","
20704 " \"-ldouble-conversion\","
20705 " \"" stdc)))
20706 #t)))
20707 (replace 'check
20708 (lambda* (#:key inputs outputs #:allow-other-keys)
20709 (add-installed-pythonpath inputs outputs)
20710 (invoke "pytest"))))))
20711 (native-inputs
20712 `(("double-conversion" ,double-conversion)
20713 ("python-setuptools-scm" ,python-setuptools-scm)
20714 ("python-pytest" ,python-pytest)))
20715 (home-page "https://github.com/ultrajson/ultrajson")
20716 (synopsis "Ultra fast JSON encoder and decoder for Python")
20717 (description
20718 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20719 bindings for Python 3.")
20720 (license license:bsd-3)))
20721
20722 (define-public python-iocapture
20723 ;; The latest release is more than a year older than this commit.
20724 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20725 (revision "1"))
20726 (package
20727 (name "python-iocapture")
20728 (version "0.1.2")
20729 (source
20730 (origin
20731 (method git-fetch)
20732 (uri (git-reference
20733 (url "https://github.com/oinume/iocapture")
20734 (commit commit)))
20735 (file-name (git-file-name name version))
20736 (sha256
20737 (base32
20738 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20739 (build-system python-build-system)
20740 (arguments
20741 `(#:phases
20742 (modify-phases %standard-phases
20743 (delete 'check)
20744 (add-after 'install 'check
20745 (lambda* (#:key inputs outputs #:allow-other-keys)
20746 (add-installed-pythonpath inputs outputs)
20747 (invoke "py.test" "-v" "tests")
20748 #t)))))
20749 (propagated-inputs
20750 `(("python-flexmock" ,python-flexmock)
20751 ("python-pytest" ,python-pytest)
20752 ("python-pytest-cov" ,python-pytest-cov)
20753 ("python-six" ,python-six)))
20754 (home-page "https://github.com/oinume/iocapture")
20755 (synopsis "Python capturing tool for stdout and stderr")
20756 (description
20757 "This package helps you to capture the standard out (stdout) and the
20758 standard error channel (stderr) in your program.")
20759 (license license:expat))))
20760
20761 (define-public python-argh
20762 ;; There are 21 commits since the latest release containing important
20763 ;; improvements.
20764 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20765 (revision "1"))
20766 (package
20767 (name "python-argh")
20768 (version (git-version "0.26.2" revision commit))
20769 (source
20770 (origin
20771 (method git-fetch)
20772 (uri (git-reference
20773 (url "https://github.com/neithere/argh")
20774 (commit commit)))
20775 (file-name (git-file-name name version))
20776 (sha256
20777 (base32
20778 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20779 (build-system python-build-system)
20780 (propagated-inputs
20781 `(("python-iocapture" ,python-iocapture)
20782 ("python-mock" ,python-mock)
20783 ("python-pytest" ,python-pytest)
20784 ("python-pytest-cov" ,python-pytest-cov)
20785 ("python-pytest-xdist" ,python-pytest-xdist)
20786 ("python-tox" ,python-tox)))
20787 (home-page "https://github.com/neithere/argh/")
20788 (synopsis "Argparse wrapper with natural syntax")
20789 (description
20790 "python-argh is a small library that provides several layers of
20791 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20792 always possible to declare a command with the highest possible (and least
20793 flexible) layer and then tune the behaviour with any of the lower layers
20794 including the native API of @code{python-argparse}.")
20795 (license license:lgpl3+))))
20796
20797 (define-public python-ppft
20798 (package
20799 (name "python-ppft")
20800 (version "1.6.6.1")
20801 (source
20802 (origin
20803 (method url-fetch)
20804 (uri (pypi-uri "ppft" version))
20805 (sha256
20806 (base32
20807 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20808 (build-system python-build-system)
20809 (arguments '(#:tests? #f)) ; there are none
20810 (propagated-inputs
20811 `(("python-six" ,python-six)))
20812 (home-page "https://pypi.org/project/ppft/")
20813 (synopsis "Fork of Parallel Python")
20814 (description
20815 "This package is a fork of Parallel Python. The Parallel Python
20816 module (@code{pp}) provides an easy and efficient way to create
20817 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20818 computers and clusters. It features cross-platform portability and dynamic
20819 load balancing.")
20820 (license license:bsd-3)))
20821
20822 (define-public python-pox
20823 (package
20824 (name "python-pox")
20825 (version "0.2.7")
20826 (source
20827 (origin
20828 (method url-fetch)
20829 (uri (pypi-uri "pox" version))
20830 (sha256
20831 (base32
20832 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20833 (build-system python-build-system)
20834 (arguments
20835 `(#:phases
20836 (modify-phases %standard-phases
20837 (replace 'check
20838 (lambda _
20839 (mkdir-p "/tmp/guix")
20840 (setenv "SHELL" "bash")
20841 (setenv "USERNAME" "guix")
20842 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20843 (invoke "py.test" "-vv")
20844 #t)))))
20845 (native-inputs
20846 `(("python-pytest" ,python-pytest)
20847 ("which" ,which)))
20848 (home-page "https://pypi.org/project/pox/")
20849 (synopsis "Python utilities for file system exploration and automated builds")
20850 (description
20851 "Pox provides a collection of utilities for navigating and manipulating
20852 file systems. This module is designed to facilitate some of the low-level
20853 operating system interactions that are useful when exploring a file system on a
20854 remote host. Pox provides Python equivalents of several shell commands such
20855 as @command{which} and @command{find}. These commands allow automated
20856 discovery of what has been installed on an operating system, and where the
20857 essential tools are located.")
20858 (license license:bsd-3)))
20859
20860 (define-public python-pathos
20861 (package
20862 (name "python-pathos")
20863 (version "0.2.5")
20864 (source
20865 (origin
20866 (method url-fetch)
20867 (uri (pypi-uri "pathos" version))
20868 (sha256
20869 (base32
20870 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20871 (build-system python-build-system)
20872 (arguments
20873 '(#:phases
20874 (modify-phases %standard-phases
20875 (replace 'check
20876 (lambda _
20877 (setenv "PYTHONPATH"
20878 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20879 (invoke "python" "./tests/__main__.py"))))))
20880 (propagated-inputs
20881 `(("python-dill" ,python-dill)
20882 ("python-multiprocess" ,python-multiprocess)
20883 ("python-pox" ,python-pox)
20884 ("python-ppft" ,python-ppft)))
20885 (native-inputs
20886 `(("python-pytest" ,python-pytest)))
20887 (home-page "https://pypi.org/project/pathos/")
20888 (synopsis
20889 "Parallel graph management and execution in heterogeneous computing")
20890 (description
20891 "Python-pathos is a framework for heterogeneous computing. It provides a
20892 consistent high-level interface for configuring and launching parallel
20893 computations across heterogeneous resources. Python-pathos provides configurable
20894 launchers for parallel and distributed computing, where each launcher contains
20895 the syntactic logic to configure and launch jobs in an execution environment.")
20896 (license license:bsd-3)))
20897
20898 (define-public python-flit
20899 (package
20900 (name "python-flit")
20901 (version "3.0.0")
20902 (source
20903 (origin
20904 (method url-fetch)
20905 (uri (pypi-uri "flit" version))
20906 (sha256
20907 (base32
20908 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
20909 (build-system python-build-system)
20910 (arguments
20911 `(#:tests? #f)) ; XXX: Check requires network access.
20912 (home-page "https://flit.readthedocs.io/")
20913 (synopsis
20914 "Simple packaging tool for simple packages")
20915 (description
20916 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20917 packages a single importable module or package at a time, using the import
20918 name as the name on PyPI. All subpackages and data files within a package
20919 are included automatically.")
20920 (license license:bsd-3)))
20921
20922 (define-public python-pathtools
20923 (package
20924 (name "python-pathtools")
20925 (version "0.1.2")
20926 (source
20927 (origin
20928 (method url-fetch)
20929 (uri (pypi-uri "pathtools" version))
20930 (sha256
20931 (base32
20932 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20933 (build-system python-build-system)
20934 (home-page
20935 "https://github.com/gorakhargosh/pathtools")
20936 (synopsis "Path utilities for Python")
20937 (description "Pattern matching and various utilities for file systems
20938 paths.")
20939 (license license:expat)))
20940
20941 (define-public python-fastentrypoints
20942 (package
20943 (name "python-fastentrypoints")
20944 (version "0.12")
20945 (source
20946 (origin
20947 (method url-fetch)
20948 (uri (pypi-uri "fastentrypoints" version))
20949 (sha256
20950 (base32
20951 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20952 (build-system python-build-system)
20953 (home-page
20954 "https://github.com/ninjaaron/fast-entry_points")
20955 (synopsis
20956 "Makes entry_points specified in setup.py load more quickly")
20957 (description
20958 "Using entry_points in your setup.py makes scripts that start really
20959 slowly because it imports pkg_resources. This package allows such setup
20960 scripts to load entry points more quickly.")
20961 (license license:bsd-3)))
20962
20963 (define-public python-funcparserlib
20964 (package
20965 (name "python-funcparserlib")
20966 (version "0.3.6")
20967 (source
20968 (origin
20969 (method url-fetch)
20970 (uri (pypi-uri "funcparserlib" version))
20971 (sha256
20972 (base32
20973 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20974 (native-inputs
20975 `(("python-tox" ,python-tox)))
20976 (arguments
20977 `(#:phases
20978 (modify-phases %standard-phases
20979 (replace 'check
20980 (lambda _
20981 (invoke "tox"))))))
20982 (build-system python-build-system)
20983 (home-page
20984 "https://github.com/vlasovskikh/funcparserlib")
20985 (synopsis
20986 "Recursive descent parsing library based on functional combinators")
20987 (description
20988 "This package is a recursive descent parsing library for Python based on
20989 functional combinators. Parser combinators are just higher-order functions
20990 that take parsers as their arguments and return them as result values.")
20991 (license license:expat)))
20992
20993 (define-public python-speg
20994 (package
20995 (name "python-speg")
20996 (version "0.3")
20997 (source
20998 (origin
20999 (method url-fetch)
21000 (uri (pypi-uri "speg" version ".zip"))
21001 (sha256
21002 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21003 (arguments
21004 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21005 (native-inputs
21006 `(("unzip" ,unzip)))
21007 (build-system python-build-system)
21008 (home-page "https://github.com/avakar/speg")
21009 (synopsis "PEG-based parser interpreter with memoization")
21010 (description "This package is a PEG-based parser and interpreter with
21011 memoization.")
21012 (license license:expat)))
21013
21014 (define-public python-cson
21015 (package
21016 (name "python-cson")
21017 (version "0.8")
21018 (source
21019 (origin
21020 (method url-fetch)
21021 (uri (pypi-uri "cson" version))
21022 (sha256
21023 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21024 (build-system python-build-system)
21025 (propagated-inputs
21026 `(("python-speg" ,python-speg)))
21027 (home-page "https://github.com/avakar/pycson")
21028 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21029 (description "This package is a parser for Coffeescript Object
21030 Notation (CSON).")
21031 (license license:expat)))
21032
21033 (define-public python-asynctest
21034 (package
21035 (name "python-asynctest")
21036 (version "0.13.0")
21037 (source
21038 (origin
21039 (method url-fetch)
21040 (uri (pypi-uri "asynctest" version))
21041 (sha256
21042 (base32
21043 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21044 (build-system python-build-system)
21045 (arguments
21046 '(#:phases
21047 (modify-phases %standard-phases
21048 (replace 'check
21049 (lambda _
21050 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21051 (add-after 'unpack 'disable-tests
21052 (lambda* _
21053 ;; XXX: 7 tests fail out of 220. Disable them for now.
21054 (substitute* (list "test/test_selector.py"
21055 "test/test_mock.py")
21056 (("def test_events_watched_outside_test_are_ignored")
21057 "@unittest.skip('disabled by guix')
21058 def test_events_watched_outside_test_are_ignored")
21059 (("def test_awaited_from_autospec_mock.*" line)
21060 (string-append line " return True\n"))
21061 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21062 (string-append line " return True\n"))
21063 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21064 (string-append line " return True\n"))
21065 (("def test_multiple_patches_on_coroutine.*" line)
21066 (string-append line " return True\n"))
21067 (("def test_patch_coroutine_only_when_running.*" line)
21068 (string-append line " return True\n")))
21069 #t)))))
21070 (home-page "https://github.com/Martiusweb/asynctest")
21071 (synopsis "Extension of unittest for testing asyncio libraries")
21072 (description
21073 "The package asynctest is built on top of the standard unittest module
21074 and cuts down boilerplate code when testing libraries for asyncio.")
21075 (license license:asl2.0)))
21076
21077 (define-public python-aionotify
21078 (package
21079 (name "python-aionotify")
21080 (version "0.2.0")
21081 (source
21082 (origin
21083 ;; Source tarball on PyPi lacks tests
21084 (method git-fetch)
21085 (uri (git-reference
21086 (url "https://github.com/rbarrois/aionotify")
21087 (commit (string-append "v" version))))
21088 (file-name (git-file-name name version))
21089 (sha256
21090 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21091 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21092 (build-system python-build-system)
21093 (home-page "https://github.com/rbarrois/aionotify")
21094 (synopsis "Asyncio-powered inotify library")
21095 (description
21096 "@code{aionotify} is a simple, asyncio-based inotify library.")
21097 (license license:bsd-3)))
21098
21099 (define-public python-forbiddenfruit
21100 (package
21101 (name "python-forbiddenfruit")
21102 (version "0.1.3")
21103 (source
21104 (origin
21105 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21106 (method git-fetch)
21107 (uri (git-reference
21108 (url "https://github.com/clarete/forbiddenfruit")
21109 (commit version)))
21110 (file-name (git-file-name name version))
21111 (sha256
21112 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21113 (build-system python-build-system)
21114 (arguments
21115 '(#:phases
21116 (modify-phases %standard-phases
21117 (replace 'check
21118 (lambda _
21119 (invoke "make" "SKIP_DEPS=1"))))))
21120 (native-inputs
21121 `(("python-nose" ,python-nose)
21122 ("python-coverage" ,python-coverage)))
21123 (home-page "https://github.com/clarete/forbiddenfruit")
21124 (synopsis "Patch python built-in objects")
21125 (description "This project allows Python code to extend built-in types.")
21126 (license (list license:gpl3+ license:expat))))
21127
21128 (define-public python-shouldbe
21129 (package
21130 (name "python-shouldbe")
21131 (version "0.1.2")
21132 (source
21133 (origin
21134 (method url-fetch)
21135 (uri (pypi-uri "shouldbe" version))
21136 (sha256
21137 (base32
21138 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21139 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21140 (build-system python-build-system)
21141 (propagated-inputs
21142 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21143 (native-inputs
21144 `(("python-nose" ,python-nose)))
21145 (home-page "https://github.com/directxman12/should_be")
21146 (synopsis "Python Assertion Helpers inspired by Shouldly")
21147 (description
21148 "Python Assertion Helpers inspired by Shouldly.")
21149 (license license:isc)))
21150
21151 (define-public python-k5test
21152 (package
21153 (name "python-k5test")
21154 (version "0.9.2")
21155 (source
21156 (origin
21157 (method url-fetch)
21158 (uri (pypi-uri "k5test" version))
21159 (sha256
21160 (base32
21161 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21162 (build-system python-build-system)
21163 (propagated-inputs
21164 `(("python-six" ,python-six)
21165 ;; `which`, `kadmin.local` binaries called inside library
21166 ("which" ,which)
21167 ("mit-krb5" ,mit-krb5)))
21168 (native-inputs `(("mit-krb5" ,mit-krb5)))
21169 (arguments
21170 '(#:phases
21171 (modify-phases %standard-phases
21172 (add-after 'unpack 'patch-paths
21173 (lambda* _
21174 (substitute* "k5test/realm.py"
21175 (("'kadmin_local'") "'kadmin.local'")))))))
21176 (home-page "https://github.com/pythongssapi/k5test")
21177 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21178 (description
21179 "@code{k5test} is a library for setting up self-contained Kerberos 5
21180 environments, and running Python unit tests inside those environments. It is
21181 based on the file of the same name found alongside the MIT Kerberos 5 unit
21182 tests.")
21183 (license license:isc)))
21184
21185 (define-public python-gssapi
21186 (package
21187 (name "python-gssapi")
21188 (version "1.6.9")
21189 (source
21190 (origin
21191 (method url-fetch)
21192 (uri (pypi-uri "gssapi" version))
21193 (sha256
21194 (base32
21195 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21196 (build-system python-build-system)
21197 (arguments
21198 `(#:phases
21199 (modify-phases %standard-phases
21200 ;; Work around
21201 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21202 (add-before 'check 'disable-failing-tests
21203 (lambda _
21204 (let ((reason "Disabled failing test (see: \
21205 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21206 (substitute* "gssapi/tests/test_high_level.py"
21207 ((".*def test_add_with_impersonate.*" all)
21208 (string-append all " self.skipTest('" reason "')\n")))
21209 (substitute* "gssapi/tests/test_raw.py"
21210 ((".*def test_.*impersonate_name.*" all)
21211 (string-append all " self.skipTest('" reason "')\n")))
21212 #t))))))
21213 (propagated-inputs
21214 `(("python-decorator" ,python-decorator)
21215 ("python-six" ,python-six)))
21216 (inputs
21217 `(("mit-krb5" ,mit-krb5)))
21218 ;; for tests
21219 (native-inputs
21220 `(("python-shouldbe" ,python-shouldbe)
21221 ("python-parameterized" ,python-parameterized)
21222 ("python-k5test" ,python-k5test)
21223 ("python-nose" ,python-nose)))
21224 (home-page "https://github.com/pythongssapi/python-gssapi")
21225 (synopsis "Python GSSAPI Wrapper")
21226 (description
21227 "Python-GSSAPI provides both low-level and high level wrappers around the
21228 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21229 also be usable with other GSSAPI mechanisms.")
21230 (license license:isc)))
21231
21232 (define-public python-check-manifest
21233 (package
21234 (name "python-check-manifest")
21235 (version "0.37")
21236 (source
21237 (origin
21238 (method url-fetch)
21239 (uri (pypi-uri "check-manifest" version))
21240 (sha256
21241 (base32
21242 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21243 (build-system python-build-system)
21244 (native-inputs
21245 `(("python-mock" ,python-mock)
21246 ("git" ,git)))
21247 (home-page "https://github.com/mgedmin/check-manifest")
21248 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21249 (description "Python package can include a MANIFEST.in file to help with
21250 sending package files to the Python Package Index. This package checks that
21251 file to ensure it completely and accurately describes your project.")
21252 (license license:expat)))
21253
21254 (define-public python-android-stringslib
21255 (package
21256 (name "python-android-stringslib")
21257 (version "0.1.2")
21258 (source
21259 (origin
21260 (method git-fetch)
21261 (uri (git-reference
21262 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21263 (commit (string-append "v" version))))
21264 (file-name (git-file-name name version))
21265 (sha256
21266 (base32
21267 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21268 (build-system python-build-system)
21269 (arguments
21270 `(#:tests? #f))
21271 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21272 (synopsis "Android strings.xml support")
21273 (description "Android Strings Lib provides support for android's strings.xml
21274 files. These files are used to translate strings in android apps.")
21275 (license license:expat)))
21276
21277 (define-public python-watchdog
21278 (package
21279 (name "python-watchdog")
21280 (version "0.9.0")
21281 (source
21282 (origin
21283 (method url-fetch)
21284 (uri (pypi-uri "watchdog" version))
21285 (sha256
21286 (base32
21287 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21288 (build-system python-build-system)
21289 (arguments
21290 `(#:phases
21291 (modify-phases %standard-phases
21292 (add-before 'check 'remove-failing
21293 (lambda _
21294 (delete-file "tests/test_inotify_buffer.py")
21295 (delete-file "tests/test_snapshot_diff.py")
21296 #t)))))
21297 (propagated-inputs
21298 `(("python-argh" ,python-argh)
21299 ("python-pathtools" ,python-pathtools)
21300 ("python-pyyaml" ,python-pyyaml)))
21301 (native-inputs
21302 `(("python-pytest-cov" ,python-pytest-cov)
21303 ("python-pytest-timeout" ,python-pytest-timeout)))
21304 (home-page "https://github.com/gorakhargosh/watchdog")
21305 (synopsis "File system events monitoring")
21306 (description "This package provides a way to monitor file system events
21307 such as a file modification and trigger an action. This is similar to inotify,
21308 but portable.")
21309 (license license:asl2.0)))
21310
21311 (define-public python-watchgod
21312 (package
21313 (name "python-watchgod")
21314 (version "0.6")
21315 (source
21316 (origin
21317 ;; There are no tests in the PyPI tarball.
21318 (method git-fetch)
21319 (uri (git-reference
21320 (url "https://github.com/samuelcolvin/watchgod")
21321 (commit (string-append "v" version))))
21322 (file-name (git-file-name name version))
21323 (sha256
21324 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21325 (build-system python-build-system)
21326 (arguments
21327 `(#:phases
21328 (modify-phases %standard-phases
21329 (replace 'check
21330 (lambda _
21331 (invoke "pytest" "-vv"))))))
21332 (native-inputs
21333 `(("python-coverage" ,python-coverage)
21334 ("python-docutils" ,python-docutils)
21335 ("python-flake8" ,python-flake8)
21336 ("python-isort" ,python-isort)
21337 ("python-pycodestyle" ,python-pycodestyle)
21338 ("python-pyflakes" ,python-pyflakes)
21339 ("python-pygments" ,python-pygments)
21340 ("python-pytest" ,python-pytest)
21341 ("python-pytest-cov" ,python-pytest-cov)
21342 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21343 ("python-pytest-mock" ,python-pytest-mock)
21344 ("python-pytest-sugar" ,python-pytest-sugar)
21345 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21346 (home-page "https://github.com/samuelcolvin/watchgod")
21347 (synopsis "Simple, modern file watching and code reload in Python")
21348 (description
21349 "Simple, modern file watching and code reload in Python inspired by
21350 @code{watchdog}. Among the differences are a unified approach for each
21351 operating systems and an elegant approach to concurrency using threading.")
21352 (license license:expat)))
21353
21354 (define-public python-wget
21355 (package
21356 (name "python-wget")
21357 (version "3.2")
21358 (source
21359 (origin
21360 (method url-fetch)
21361 (uri (pypi-uri "wget" version ".zip"))
21362 (sha256
21363 (base32
21364 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21365 (build-system python-build-system)
21366 (native-inputs `(("unzip" ,unzip)))
21367 (home-page "https://bitbucket.org/techtonik/python-wget/")
21368 (synopsis "Pure Python download utility")
21369 (description "The python-wget library provides an API to download files
21370 with features similar to the @command{wget} utility.")
21371 (license license:unlicense)))
21372
21373 (define-public offlate
21374 (package
21375 (name "offlate")
21376 (version "0.5")
21377 (source
21378 (origin
21379 (method git-fetch)
21380 (uri (git-reference
21381 (url "https://framagit.org/tyreunom/offlate")
21382 (commit version)))
21383 (file-name (git-file-name name version))
21384 (sha256
21385 (base32
21386 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21387 (build-system python-build-system)
21388 (arguments
21389 ;; No tests
21390 `(#:tests? #f))
21391 (propagated-inputs
21392 `(("python-android-stringslib" ,python-android-stringslib)
21393 ("python-dateutil" ,python-dateutil)
21394 ("python-gitlab" ,python-gitlab)
21395 ("python-lxml" ,python-lxml)
21396 ("python-polib" ,python-polib)
21397 ("python-pyenchant" ,python-pyenchant)
21398 ("python-pygit2" ,python-pygit2)
21399 ("python-pygithub" ,python-pygithub)
21400 ("python-pyqt" ,python-pyqt)
21401 ("python-requests" ,python-requests)
21402 ("python-ruamel.yaml" ,python-ruamel.yaml)
21403 ("python-translation-finder" ,python-translation-finder)
21404 ("python-watchdog" ,python-watchdog)))
21405 (native-inputs
21406 `(("qttools" ,qttools)))
21407 (home-page "https://framagit.org/tyreunom/offlate")
21408 (synopsis "Offline translation interface for online translation tools")
21409 (description "Offlate offers a unified interface for different translation
21410 file formats, as well as many different online translation platforms. You can
21411 use it to get work from online platforms, specialized such as the Translation
21412 Project, or not such a gitlab instance when your upstream doesn't use any
21413 dedicated platform. The tool proposes a unified interface for any format and
21414 an upload option to send your work back to the platform.")
21415 (license license:gpl3+)))
21416
21417 (define-public python-titlecase
21418 (package
21419 (name "python-titlecase")
21420 (version "0.12.0")
21421 (source
21422 (origin
21423 (method url-fetch)
21424 (uri (pypi-uri "titlecase" version))
21425 (sha256
21426 (base32
21427 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21428 (build-system python-build-system)
21429 (native-inputs
21430 `(("python-nose" ,python-nose)))
21431 (home-page "https://github.com/ppannuto/python-titlecase")
21432 (synopsis "Capitalize strings similar to book titles")
21433 (description
21434 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21435 It capitalizes (predominantly English) strings in a way that is similar to
21436 book titles, using the New York Times Manual of Style to leave certain words
21437 lowercase.")
21438 (license license:expat)))
21439
21440 (define-public python-pypng
21441 (package
21442 (name "python-pypng")
21443 (version "0.0.20")
21444 (source
21445 (origin
21446 (method url-fetch)
21447 (uri (pypi-uri "pypng" version))
21448 (sha256
21449 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21450 (build-system python-build-system)
21451 (home-page "https://github.com/drj11/pypng")
21452 (synopsis "Pure Python PNG image encoder/decoder")
21453 (description
21454 "The PyPNG module implements support for PNG images. It reads and writes
21455 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21456 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21457 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21458 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21459 A number of optional chunks can be specified (when writing) and
21460 understood (when reading): tRNS, bKGD, gAMA.
21461
21462 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21463 aim at being a replacement or competitor. Its strength lies in fine-grained
21464 extensive support of PNG features. It can also read and write Netpbm PAM
21465 files, with a focus on its use as an intermediate format for implementing
21466 custom PNG processing.")
21467 (license license:expat)))
21468
21469 (define-public python-fuzzywuzzy
21470 (package
21471 (name "python-fuzzywuzzy")
21472 (version "0.18.0")
21473 (source
21474 (origin
21475 (method url-fetch)
21476 (uri (pypi-uri "fuzzywuzzy" version))
21477 (sha256
21478 (base32
21479 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21480 (build-system python-build-system)
21481 (native-inputs
21482 `(("python-hypothesis" ,python-hypothesis)
21483 ("python-pycodestyle" ,python-pycodestyle)
21484 ("python-pytest" ,python-pytest)))
21485 (propagated-inputs
21486 `(("python-levenshtein" ,python-levenshtein)))
21487 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21488 (synopsis "Fuzzy string matching in Python")
21489 (description "Approximate string matching using
21490 @emph{Levenshtein Distance} to calculate the differences between
21491 sequences.")
21492 (license license:gpl2)))
21493
21494 (define-public python2-fuzzywuzzy
21495 (package-with-python2 python-fuzzywuzzy))
21496
21497 (define-public python-block-tracing
21498 (package
21499 (name "python-block-tracing")
21500 (version "1.0.1")
21501 (source
21502 (origin
21503 (method url-fetch)
21504 (uri (pypi-uri "block_tracing" version))
21505 (sha256
21506 (base32
21507 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21508 (build-system python-build-system)
21509 (arguments '(#:tests? #f)) ; no tests
21510 (home-page "https://github.com/rianhunter/block_tracing")
21511 (synopsis "Protect process memory")
21512 (description
21513 "@code{block_tracing} is a tiny Python library that can be used to
21514 prevent debuggers and other applications from inspecting the memory within
21515 your process.")
21516 (license license:expat)))
21517
21518 (define-public python-gcovr
21519 (package
21520 (name "python-gcovr")
21521 (version "4.2")
21522 (source
21523 (origin
21524 (method url-fetch)
21525 (uri (pypi-uri "gcovr" version))
21526 (sha256
21527 (base32
21528 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21529 (build-system python-build-system)
21530 (propagated-inputs
21531 `(("python-lxml" ,python-lxml)
21532 ("python-jinja2" ,python-jinja2)))
21533 (home-page "https://gcovr.com/")
21534 (synopsis "Utility for generating code coverage results")
21535 (description
21536 "Gcovr provides a utility for managing the use of the GNU gcov
21537 utility and generating summarized code coverage results. It is inspired
21538 by the Python coverage.py package, which provides a similar utility for
21539 Python.")
21540 (license license:bsd-3)))
21541
21542 (define-public python-owslib
21543 (package
21544 (name "python-owslib")
21545 (version "0.19.2")
21546 (source
21547 (origin
21548 (method url-fetch)
21549 (uri (pypi-uri "OWSLib" version))
21550 (sha256
21551 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21552 (build-system python-build-system)
21553 (arguments
21554 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21555 (synopsis "Interface for Open Geospatial Consortium web service")
21556 (description
21557 "OWSLib is a Python package for client programming with Open Geospatial
21558 Consortium (OGC) web service (hence OWS) interface standards, and their related
21559 content models.")
21560 (home-page "https://geopython.github.io/OWSLib/")
21561 (license license:bsd-3)))
21562
21563 (define-public python-docusign-esign
21564 (package
21565 (name "python-docusign-esign")
21566 (version "3.1.0")
21567 (source (origin
21568 (method url-fetch)
21569 (uri (pypi-uri "docusign_esign" version))
21570 (sha256
21571 (base32
21572 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21573 (build-system python-build-system)
21574 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21575 (arguments `(#:tests? #f))
21576 (propagated-inputs
21577 `(("python-certifi" ,python-certifi)
21578 ("python-six" ,python-six)
21579 ("python-dateutil" ,python-dateutil)
21580 ("python-urllib3" ,python-urllib3)
21581 ("python-pyjwt" ,python-pyjwt)
21582 ("python-cryptography" ,python-cryptography)
21583 ("python-nose" ,python-nose)))
21584 (synopsis "DocuSign Python Client")
21585 (description "The Official DocuSign Python Client Library used to interact
21586 with the eSign REST API. Send, sign, and approve documents using this client.")
21587 (home-page "https://www.docusign.com/devcenter")
21588 (license license:expat)))
21589
21590 (define-public python-xattr
21591 (package
21592 (name "python-xattr")
21593 (version "0.9.7")
21594 (source
21595 (origin
21596 (method url-fetch)
21597 (uri (pypi-uri "xattr" version))
21598 (sha256
21599 (base32
21600 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21601 (build-system python-build-system)
21602 (propagated-inputs
21603 `(("python-cffi" ,python-cffi)))
21604 (home-page "https://github.com/xattr/xattr")
21605 (synopsis
21606 "Python wrapper for extended file system attributes")
21607 (description "This package provides a Python wrapper for using extended
21608 file system attributes. Extended attributes extend the basic attributes of files
21609 and directories in the file system. They are stored as name:data pairs
21610 associated with file system objects (files, directories, symlinks, etc).")
21611 (license license:expat)))
21612
21613 (define-public python-json-logger
21614 (package
21615 (name "python-json-logger")
21616 (version "0.1.11")
21617 (source
21618 (origin
21619 (method url-fetch)
21620 (uri (pypi-uri "python-json-logger" version))
21621 (sha256
21622 (base32
21623 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21624 (build-system python-build-system)
21625 (home-page
21626 "https://github.com/madzak/python-json-logger")
21627 (synopsis "JSON log formatter in Python")
21628 (description "This library allows standard Python logging to output log data
21629 as JSON objects. With JSON we can make our logs more readable by machines and
21630 we can stop writing custom parsers for syslog-type records.")
21631 (license license:bsd-3)))
21632
21633 (define-public python-daiquiri
21634 (package
21635 (name "python-daiquiri")
21636 (version "2.1.1")
21637 (source
21638 (origin
21639 (method url-fetch)
21640 (uri (pypi-uri "daiquiri" version))
21641 (sha256
21642 (base32
21643 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21644 (build-system python-build-system)
21645 (propagated-inputs
21646 `(("python-json-logger" ,python-json-logger)))
21647 (native-inputs
21648 `(("python-mock" ,python-mock)
21649 ("python-pytest" ,python-pytest)
21650 ("python-setuptools-scm" ,python-setuptools-scm)
21651 ("python-six" ,python-six)))
21652 (home-page "https://github.com/jd/daiquiri")
21653 (synopsis
21654 "Library to configure Python logging easily")
21655 (description "The daiquiri library provides an easy way to configure
21656 logging in Python. It also provides some custom formatters and handlers.")
21657 (license license:asl2.0)))
21658
21659 (define-public python-pifpaf
21660 (package
21661 (name "python-pifpaf")
21662 (version "2.5.0")
21663 (source
21664 (origin
21665 (method url-fetch)
21666 (uri (pypi-uri "pifpaf" version))
21667 (sha256
21668 (base32
21669 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21670 (build-system python-build-system)
21671 (arguments
21672 '(#:phases
21673 (modify-phases %standard-phases
21674 (replace 'check
21675 (lambda _
21676 (invoke "python" "setup.py" "testr" "--slowest"
21677 "--testr-args=until-failure"))))))
21678 (propagated-inputs
21679 `(("python-click" ,python-click)
21680 ("python-daiquiri" ,python-daiquiri)
21681 ("python-fixtures" ,python-fixtures)
21682 ("python-jinja2" ,python-jinja2)
21683 ("python-pbr" ,python-pbr)
21684 ("python-psutil" ,python-psutil)
21685 ("python-six" ,python-six)
21686 ("python-xattr" ,python-xattr)))
21687 (native-inputs
21688 `(("python-mock" ,python-mock)
21689 ("python-os-testr" ,python-os-testr)
21690 ("python-requests" ,python-requests)
21691 ("python-testrepository" ,python-testrepository)
21692 ("python-testtools" ,python-testtools)))
21693 (home-page "https://github.com/jd/pifpaf")
21694 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21695 (description "Pifpaf is a suite of fixtures and a command-line tool that
21696 starts and stops daemons for a quick throw-away usage. This is typically
21697 useful when needing these daemons to run integration testing. It originally
21698 evolved from its precursor @code{overtest}.")
21699 (license license:asl2.0)))
21700
21701 (define-public python-pytest-check-links
21702 (package
21703 (name "python-pytest-check-links")
21704 (version "0.3.0")
21705 (source
21706 (origin
21707 (method url-fetch)
21708 ;; URI uses underscores
21709 (uri (pypi-uri "pytest_check_links" version))
21710 (sha256
21711 (base32
21712 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21713 (build-system python-build-system)
21714 (propagated-inputs
21715 `(("python-docutils" ,python-docutils)
21716 ("python-html5lib" ,python-html5lib)
21717 ("python-nbconvert" ,python-nbconvert)
21718 ("python-nbformat" ,python-nbformat)
21719 ("python-pytest" ,python-pytest)
21720 ("python-six" ,python-six)))
21721 (native-inputs
21722 `(("python-pbr-minimal" ,python-pbr-minimal)))
21723 (home-page "https://github.com/minrk/pytest-check-links")
21724 (synopsis "Check links in files")
21725 (description "This package provides a pytest plugin that checks URLs for
21726 HTML-containing files.")
21727 (license license:bsd-3)))
21728
21729 (define-public python-json5
21730 (package
21731 (name "python-json5")
21732 (version "0.8.5")
21733 (source
21734 (origin
21735 ;; sample.json5 is missing from PyPi source tarball
21736 (method git-fetch)
21737 (uri (git-reference
21738 (url "https://github.com/dpranke/pyjson5")
21739 (commit (string-append "v" version))))
21740 (file-name (git-file-name name version))
21741 (sha256
21742 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21743 (build-system python-build-system)
21744 (home-page "https://github.com/dpranke/pyjson5")
21745 (synopsis
21746 "Python implementation of the JSON5 data format")
21747 (description
21748 "JSON5 extends the JSON data interchange format to make it slightly more
21749 usable as a configuration language. This Python package implements parsing and
21750 dumping of JSON5 data structures.")
21751 (license license:asl2.0)))
21752
21753 (define-public python-frozendict
21754 (package
21755 (name "python-frozendict")
21756 (version "1.2")
21757 (source
21758 (origin
21759 (method url-fetch)
21760 (uri (pypi-uri "frozendict" version))
21761 (sha256
21762 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21763 (build-system python-build-system)
21764 (home-page "https://github.com/slezica/python-frozendict")
21765 (synopsis "Simple immutable mapping for Python")
21766 (description
21767 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21768 implements the complete mapping interface. It can be used as a drop-in
21769 replacement for dictionaries where immutability is desired.")
21770 (license license:expat)))
21771
21772 (define-public python-unpaddedbase64
21773 (package
21774 (name "python-unpaddedbase64")
21775 (version "1.1.0")
21776 (source
21777 (origin
21778 (method git-fetch)
21779 (uri (git-reference
21780 (url "https://github.com/matrix-org/python-unpaddedbase64")
21781 (commit (string-append "v" version))))
21782 (file-name (git-file-name name version))
21783 (sha256
21784 (base32
21785 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21786 (build-system python-build-system)
21787 (home-page "https://pypi.org/project/unpaddedbase64/")
21788 (synopsis "Encode and decode Base64 without “=” padding")
21789 (description
21790 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21791 using “=” characters. However this conveys no benefit so many protocols
21792 choose to use Base64 without the “=” padding.")
21793 (license license:asl2.0)))
21794
21795 (define-public python-py-cpuinfo
21796 (package
21797 (name "python-py-cpuinfo")
21798 (version "5.0.0")
21799 (source
21800 (origin
21801 (method url-fetch)
21802 (uri (pypi-uri "py-cpuinfo" version))
21803 (sha256
21804 (base32
21805 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21806 (build-system python-build-system)
21807 (home-page "https://github.com/workhorsy/py-cpuinfo")
21808 (synopsis "Get CPU info with Python")
21809 (description
21810 "This Python module returns the CPU info by using the best sources of
21811 information for your operating system.")
21812 (license license:expat)))
21813
21814 (define-public python-canonicaljson
21815 (package
21816 (name "python-canonicaljson")
21817 (version "1.4.0")
21818 (source
21819 (origin
21820 (method url-fetch)
21821 (uri (pypi-uri "canonicaljson" version))
21822 (sha256
21823 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21824 (build-system python-build-system)
21825 (propagated-inputs
21826 `(("python-six" ,python-six)
21827 ("python-frozendict" ,python-frozendict)
21828 ("python-simplejson" ,python-simplejson)))
21829 (home-page "https://github.com/matrix-org/python-canonicaljson")
21830 (synopsis "Canonical JSON")
21831 (description
21832 "Deterministically encode JSON.
21833
21834 @itemize
21835 @item Encodes objects and arrays as RFC 7159 JSON.
21836 @item Sorts object keys so that you get the same result each time.
21837 @item Has no insignificant whitespace to make the output as small as possible.
21838 @item Escapes only the characters that must be escaped, U+0000 to
21839 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21840 @item Uses the shortest escape sequence for each escaped character.
21841 @item Encodes the JSON as UTF-8.
21842 @item Can encode frozendict immutable dictionaries.
21843 @end itemize")
21844 (license license:asl2.0)))
21845
21846 (define-public python-signedjson
21847 (package
21848 (name "python-signedjson")
21849 (version "1.1.1")
21850 (source
21851 (origin
21852 (method url-fetch)
21853 (uri (pypi-uri "signedjson" version))
21854 (sha256
21855 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21856 (build-system python-build-system)
21857 (propagated-inputs
21858 `(("python-canonicaljson" ,python-canonicaljson)
21859 ("python-importlib-metadata" ,python-importlib-metadata)
21860 ("python-pynacl" ,python-pynacl)
21861 ("python-typing-extensions" ,python-typing-extensions)
21862 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21863 (native-inputs
21864 `(("python-setuptools-scm" ,python-setuptools-scm)))
21865 (home-page "https://github.com/matrix-org/python-signedjson")
21866 (synopsis "Sign JSON objects with ED25519 signatures")
21867 (description
21868 "Sign JSON objects with ED25519 signatures.
21869
21870 @itemize
21871 @item More than one entity can sign the same object.
21872 @item Each entity can sign the object with more than one key making it easier to
21873 rotate keys
21874 @item ED25519 can be replaced with a different algorithm.
21875 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21876 key.
21877 @end itemize")
21878 (license license:asl2.0)))
21879
21880 (define-public python-daemonize
21881 (package
21882 (name "python-daemonize")
21883 (version "2.5.0")
21884 (source
21885 (origin
21886 (method url-fetch)
21887 (uri (pypi-uri "daemonize" version))
21888 (sha256
21889 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21890 (build-system python-build-system)
21891 (home-page "https://github.com/thesharp/daemonize")
21892 (synopsis "Library for writing system daemons in Python")
21893 (description "Daemonize is a library for writing system daemons in Python.")
21894 (license license:expat)))
21895
21896 (define-public python-pymacaroons
21897 (package
21898 (name "python-pymacaroons")
21899 (version "0.13.0")
21900 (source
21901 (origin
21902 (method url-fetch)
21903 (uri (pypi-uri "pymacaroons" version))
21904 (sha256
21905 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21906 (build-system python-build-system)
21907 (propagated-inputs
21908 `(("python-six" ,python-six)
21909 ("python-pynacl" ,python-pynacl)))
21910 (home-page "https://github.com/ecordell/pymacaroons")
21911 (synopsis "Python Macaroon Library")
21912 (description
21913 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21914 tokens, macaroons embed caveats that define specific authorization
21915 requirements for the target service, the service that issued the root macaroon
21916 and which is capable of verifying the integrity of macaroons it receives.
21917
21918 Macaroons allow for delegation and attenuation of authorization. They are
21919 simple and fast to verify, and decouple authorization policy from the
21920 enforcement of that policy.")
21921 (license license:expat)))
21922
21923 (define-public python-ldap3
21924 (package
21925 (name "python-ldap3")
21926 (version "2.7")
21927 (home-page "https://github.com/cannatag/ldap3")
21928 (source
21929 (origin
21930 (method git-fetch)
21931 (uri (git-reference (url home-page)
21932 (commit (string-append "v" version))))
21933 (file-name (git-file-name name version))
21934 (sha256
21935 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21936 (build-system python-build-system)
21937 (arguments
21938 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21939 #:phases (modify-phases %standard-phases
21940 (replace 'check
21941 (lambda* (#:key tests? #:allow-other-keys)
21942 (when tests?
21943 (invoke "nosetests" "-s" "test"))
21944 #t)))))
21945 (native-inputs
21946 `(("python-nose" ,python-nose)))
21947 (propagated-inputs
21948 `(("python-gssapi" ,python-gssapi)
21949 ("python-pyasn1" ,python-pyasn1)))
21950 (synopsis "Python LDAP client")
21951 (description
21952 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21953 library.")
21954 (license license:lgpl3+)))
21955
21956 (define-public python-boltons
21957 (package
21958 (name "python-boltons")
21959 (version "20.0.0")
21960 (source
21961 (origin
21962 (method url-fetch)
21963 (uri (pypi-uri "boltons" version))
21964 (sha256
21965 (base32
21966 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21967 (build-system python-build-system)
21968 (home-page "https://github.com/mahmoud/boltons")
21969 (synopsis "Extensions to the Python standard library")
21970 (description
21971 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21972 as — and yet conspicuously missing from — the standard library, including:
21973
21974 @itemize
21975 @item Atomic file saving, bolted on with fileutils
21976 @item A highly-optimized OrderedMultiDict, in dictutils
21977 @item Two types of PriorityQueue, in queueutils
21978 @item Chunked and windowed iteration, in iterutils
21979 @item Recursive data structure iteration and merging, with iterutils.remap
21980 @item Exponential backoff functionality, including jitter, through
21981 iterutils.backoff
21982 @item A full-featured TracebackInfo type, for representing stack traces, in
21983 tbutils
21984 @end itemize")
21985 (license license:bsd-3)))
21986
21987 (define-public python-eliot
21988 (package
21989 (name "python-eliot")
21990 (version "1.12.0")
21991 (source
21992 (origin
21993 (method url-fetch)
21994 (uri (pypi-uri "eliot" version))
21995 (sha256
21996 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21997 (build-system python-build-system)
21998 (arguments
21999 `(#:phases
22000 (modify-phases %standard-phases
22001 (add-after 'unpack 'remove-journald-support
22002 (lambda _
22003 (for-each delete-file
22004 '("eliot/tests/test_journald.py"
22005 "eliot/journald.py"))
22006 #t))
22007 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22008 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22009 ;; be installed and these tests should pass.
22010 (lambda _
22011 (delete-file "eliot/tests/test_prettyprint.py")
22012 #t)))))
22013 (propagated-inputs
22014 `(("python-boltons" ,python-boltons)
22015 ("python-pyrsistent" ,python-pyrsistent)
22016 ("python-six" ,python-six)
22017 ("python-zope-interface" ,python-zope-interface)))
22018 (native-inputs
22019 `(("python-black" ,python-black)
22020 ("python-coverage" ,python-coverage)
22021 ("python-dask" ,python-dask)
22022 ("python-flake8" ,python-flake8)
22023 ("python-hypothesis" ,python-hypothesis)
22024 ("python-pytest" ,python-pytest)
22025 ("python-setuptools" ,python-setuptools)
22026 ("python-sphinx" ,python-sphinx)
22027 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22028 ("python-testtools" ,python-testtools)
22029 ("python-twine" ,python-twine)
22030 ("python-twisted" ,python-twisted)))
22031 (home-page "https://github.com/itamarst/eliot/")
22032 (synopsis "Eliot: the logging system that tells you why it happened")
22033 (description
22034 "@dfn{eliot} is a Python logging system that outputs causal chains of
22035 actions: actions can spawn other actions, and eventually they either succeed
22036 or fail. The resulting logs tell you the story of what your software did: what
22037 happened, and what caused it.")
22038 (license license:asl2.0)))
22039
22040 (define-public python-pem
22041 (package
22042 (name "python-pem")
22043 (version "20.1.0")
22044 (source
22045 (origin
22046 (method url-fetch)
22047 (uri (pypi-uri "pem" version))
22048 (sha256
22049 (base32
22050 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22051 (build-system python-build-system)
22052 (native-inputs
22053 `(("python-certifi" ,python-certifi)
22054 ("python-coverage" ,python-coverage)
22055 ("python-pretend" ,python-pretend)
22056 ("python-pyopenssl" ,python-pyopenssl)
22057 ("python-pytest" ,python-pytest)
22058 ("python-sphinx" ,python-sphinx)
22059 ("python-twisted" ,python-twisted)))
22060 (home-page "https://pem.readthedocs.io/")
22061 (synopsis "Easy PEM file parsing in Python")
22062 (description
22063 "This package provides a Python module for parsing and splitting PEM files.")
22064 (license license:expat)))
22065
22066 (define-public python-txsni
22067 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22068 ;; Python and OpenSSL.
22069 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22070 (revision "0"))
22071 (package
22072 (name "python-txsni")
22073 (version (git-version "0.1.9" revision commit))
22074 (home-page "https://github.com/glyph/txsni")
22075 (source
22076 (origin
22077 (method git-fetch)
22078 (uri (git-reference (url home-page) (commit commit)))
22079 (file-name (git-file-name name version))
22080 (sha256
22081 (base32
22082 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22083 (build-system python-build-system)
22084 (propagated-inputs
22085 `(("python-pyopenssl" ,python-pyopenssl)
22086 ("python-service-identity" ,python-service-identity)
22087 ("python-twisted" ,python-twisted)))
22088 (synopsis "Run TLS servers with Twisted")
22089 (description
22090 "This package provides an easy-to-use SNI endpoint for use
22091 with the Twisted web framework.")
22092 (license license:expat))))
22093
22094 (define-public python-txacme
22095 (package
22096 (name "python-txacme")
22097 (version "0.9.2")
22098 (source
22099 (origin
22100 (method url-fetch)
22101 (uri (pypi-uri "txacme" version))
22102 (sha256
22103 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22104 (build-system python-build-system)
22105 (propagated-inputs
22106 `(("python-acme" ,python-acme)
22107 ("python-attrs" ,python-attrs)
22108 ("python-eliot" ,python-eliot)
22109 ("python-josepy" ,python-josepy)
22110 ("python-pem" ,python-pem)
22111 ("python-treq" ,python-treq)
22112 ("python-twisted" ,python-twisted)
22113 ("python-txsni" ,python-txsni)))
22114 (native-inputs
22115 `(("python-fixtures" ,python-fixtures)
22116 ("python-hypothesis" ,python-hypothesis)
22117 ("python-mock" ,python-mock)
22118 ("python-service-identity"
22119 ,python-service-identity)
22120 ("python-testrepository" ,python-testrepository)
22121 ("python-testscenarios" ,python-testscenarios)
22122 ("python-testtools" ,python-testtools)))
22123 (home-page "https://github.com/twisted/txacme")
22124 (synopsis "Twisted implexmentation of the ACME protocol")
22125 (description
22126 "ACME is Automatic Certificate Management Environment, a protocol that
22127 allows clients and certificate authorities to automate verification and
22128 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22129 Certificate Authority.
22130
22131 txacme is an implementation of the protocol for Twisted, the event-driven
22132 networking engine for Python.")
22133 (license license:expat)))
22134
22135 (define-public python-pysaml2
22136 (package
22137 (name "python-pysaml2")
22138 (version "5.0.0")
22139 (source
22140 (origin
22141 (method url-fetch)
22142 (uri (pypi-uri "pysaml2" version))
22143 (sha256
22144 (base32
22145 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22146 (build-system python-build-system)
22147 (propagated-inputs
22148 `(("python-cryptography" ,python-cryptography)
22149 ("python-dateutil" ,python-dateutil)
22150 ("python-defusedxml" ,python-defusedxml)
22151 ("python-pyopenssl" ,python-pyopenssl)
22152 ("python-pytz" ,python-pytz)
22153 ("python-requests" ,python-requests)
22154 ("python-six" ,python-six)))
22155 (home-page "https://idpy.org")
22156 (synopsis "Python implementation of SAML Version 2 Standard")
22157 (description
22158 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22159 It contains all necessary pieces for building a SAML2 service provider or
22160 an identity provider. The distribution contains examples of both.
22161
22162 This package was originally written to work in a WSGI environment, but
22163 there are extensions that allow you to use it with other frameworks.")
22164 (license license:asl2.0)))
22165
22166 (define-public python-click-plugins
22167 (package
22168 (name "python-click-plugins")
22169 (version "1.1.1")
22170 (source
22171 (origin
22172 (method url-fetch)
22173 (uri (pypi-uri "click-plugins" version))
22174 (sha256
22175 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22176 (build-system python-build-system)
22177 (native-inputs
22178 `(("python-pytest" ,python-pytest)))
22179 (propagated-inputs
22180 `(("python-click" ,python-click)))
22181 (synopsis "Extension for Click to register external CLI commands")
22182 (description "This package provides n extension module for Click to
22183 register external CLI commands via setuptools entry-points.")
22184 (home-page "https://github.com/click-contrib/click-plugins")
22185 (license license:bsd-3)))
22186
22187 (define-public python-diceware
22188 (package
22189 (name "python-diceware")
22190 (version "0.9.6")
22191 (source
22192 (origin
22193 (method url-fetch)
22194 (uri (pypi-uri "diceware" version))
22195 (sha256
22196 (base32
22197 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22198 (build-system python-build-system)
22199 (native-inputs
22200 `(("python-coverage" ,python-coverage)
22201 ("python-pytest" ,python-pytest)
22202 ("python-pytest-runner" ,python-pytest-runner)))
22203 (home-page "https://github.com/ulif/diceware/")
22204 (synopsis "Generates memorable passphrases")
22205 (description "This package generates passphrases by concatenating words
22206 randomly picked from wordlists. It supports several sources of
22207 randomness (including real life dice) and different wordlists (including
22208 cryptographically signed ones).")
22209 (license license:gpl3+)))
22210
22211 (define-public python-dictdiffer
22212 (package
22213 (name "python-dictdiffer")
22214 (version "0.8.1")
22215 (source (origin
22216 (method url-fetch)
22217 (uri (pypi-uri "dictdiffer" version))
22218 (sha256
22219 (base32
22220 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22221 (build-system python-build-system)
22222 (native-inputs
22223 `(("python-check-manifest" ,python-check-manifest)
22224 ("python-coverage" ,python-coverage)
22225 ("python-isort" ,python-isort)
22226 ("python-mock" ,python-mock)
22227 ("python-pydoctstyle" ,python-pydocstyle)
22228 ("python-pytest-cache" ,python-pytest-cache)
22229 ("python-pytest-cov" ,python-pytest-cov)
22230 ("python-pytest-pep8" ,python-pytest-pep8)
22231 ("python-pytest-runner" ,python-pytest-runner)
22232 ("python-pytest" ,python-pytest)
22233 ("python-setuptools-scm" ,python-setuptools-scm)
22234 ("python-tox" ,python-tox)))
22235 (home-page "https://github.com/inveniosoftware/dictdiffer")
22236 (synopsis "Diff and patch Python dictionary objects")
22237 (description
22238 "Dictdiffer is a Python module that helps you to diff and patch
22239 dictionaries.")
22240 (license license:expat)))
22241
22242 (define-public pyzo
22243 (package
22244 (name "pyzo")
22245 (version "4.11.2")
22246 (source
22247 (origin
22248 (method url-fetch)
22249 (uri (pypi-uri "pyzo" version))
22250 (sha256
22251 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22252 (build-system python-build-system)
22253 (arguments
22254 `(#:phases
22255 (modify-phases %standard-phases
22256 (add-before 'check 'fix-home-directory
22257 (lambda _
22258 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22259 (setenv "HOME" "/tmp")
22260 #t)))
22261 ;; Tests fail with "Uncaught Python exception: python: undefined
22262 ;; symbol: objc_getClass".
22263 #:tests? #f))
22264 (propagated-inputs
22265 `(("python-pyqt" ,python-pyqt)))
22266 (home-page "https://pyzo.org")
22267 (synopsis
22268 "Python IDE for scientific computing")
22269 (description
22270 "Pyzo is a Python IDE focused on interactivity and introspection,
22271 which makes it very suitable for scientific computing. Its practical
22272 design is aimed at simplicity and efficiency.
22273
22274 It consists of two main components, the editor and the shell, and uses
22275 a set of pluggable tools to help the programmer in various ways. Some
22276 example tools are source structure, project manager, interactive help,
22277 workspace...")
22278 (license license:bsd-2)))
22279
22280 (define-public python-osc
22281 (package
22282 (name "python-osc")
22283 (version "1.7.4")
22284 (source
22285 (origin
22286 (method url-fetch)
22287 (uri (pypi-uri "python-osc" version))
22288 (sha256
22289 (base32
22290 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22291 (build-system python-build-system)
22292 (home-page "https://github.com/attwad/python-osc")
22293 (synopsis "Open Sound Control server and client implementations")
22294 (description
22295 "@code{python-osc} is a pure Python library with no external
22296 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22297 Open Sound Control 1.0} specification.")
22298 (license license:unlicense)))
22299
22300 (define-public python-voluptuous
22301 (package
22302 (name "python-voluptuous")
22303 (version "0.11.7")
22304 (source
22305 (origin
22306 (method url-fetch)
22307 (uri (pypi-uri "voluptuous" version))
22308 (sha256
22309 (base32
22310 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22311 (build-system python-build-system)
22312 (native-inputs
22313 `(("python-nose" ,python-nose)))
22314 (home-page "https://github.com/alecthomas/voluptuous")
22315 (synopsis "Python data validation library")
22316 (description
22317 "Voluptuous is a Python data validation library. It is primarily
22318 intended for validating data coming into Python as JSON, YAML, etc.")
22319 (license license:bsd-3)))
22320
22321 (define-public python-cmd2
22322 (package
22323 (name "python-cmd2")
22324 (version "1.0.2")
22325 (source
22326 (origin
22327 (method url-fetch)
22328 (uri (pypi-uri "cmd2" version))
22329 (sha256
22330 (base32
22331 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22332 (build-system python-build-system)
22333 (propagated-inputs
22334 `(("python-attrs" ,python-attrs)
22335 ("python-colorama" ,python-colorama)
22336 ("python-pyperclip" ,python-pyperclip)
22337 ("python-wcwidth" ,python-wcwidth)))
22338 (native-inputs
22339 `(("python-codecov" ,python-codecov)
22340 ("python-coverage" ,python-coverage)
22341 ("python-doc8" ,python-doc8)
22342 ("python-flake8" ,python-flake8)
22343 ("python-invoke" ,python-invoke)
22344 ("python-mock" ,python-mock)
22345 ("python-pytest" ,python-pytest)
22346 ("python-pytest-cov" ,python-pytest-cov)
22347 ("python-pytest-mock" ,python-pytest-mock)
22348 ("python-setuptools-scm" ,python-setuptools-scm)
22349 ("python-sphinx" ,python-sphinx)
22350 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22351 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22352 ("python-tox" ,python-tox)
22353 ("python-twine" ,python-twine)
22354 ("which" ,which)))
22355 (home-page "https://github.com/python-cmd2/cmd2")
22356 (synopsis "Tool for building interactive command line applications")
22357 (description
22358 "Cmd2 is a tool for building interactive command line applications in
22359 Python. Its goal is to make it quick and easy for developers to build
22360 feature-rich and user-friendly interactive command line applications. It
22361 provides a simple API which is an extension of Python's built-in @code{cmd}
22362 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22363 make your life easier and eliminates much of the boilerplate code which would
22364 be necessary when using @code{cmd}.")
22365 (license license:expat)))
22366
22367 (define-public python-pytidylib
22368 (package
22369 (name "python-pytidylib")
22370 (version "0.3.2")
22371 (source (origin
22372 (method url-fetch)
22373 (uri (pypi-uri "pytidylib" version))
22374 (sha256
22375 (base32
22376 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22377 (build-system python-build-system)
22378 (arguments
22379 '(#:phases
22380 (modify-phases %standard-phases
22381 (add-before 'build 'qualify-libtidy
22382 (lambda* (#:key inputs #:allow-other-keys)
22383 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22384 "/lib/libtidy.so")))
22385 (substitute* "tidylib/tidy.py"
22386 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22387 (format #f "'~a'" libtidy)))
22388 #t))))))
22389 (inputs `(("tidy" ,tidy)))
22390 (home-page "https://github.com/countergram/pytidylib")
22391 (synopsis "Python wrapper for HTML Tidy library")
22392 (description
22393 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22394 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22395 (license license:expat)))
22396
22397 (define-public python2-pytidylib
22398 (package-with-python2 python-pytidylib))
22399
22400 (define-public python-mujson
22401 (package
22402 (name "python-mujson")
22403 (version "1.4")
22404 (source
22405 (origin
22406 (method url-fetch)
22407 (uri (pypi-uri "mujson" version))
22408 (sha256
22409 (base32
22410 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22411 (build-system python-build-system)
22412 (home-page "https://github.com/mattgiles/mujson")
22413 (synopsis "Use the fastest JSON functions available at import time")
22414 (description "This package selects the fastest JSON functions available
22415 at import time.")
22416 (license license:expat)))
22417
22418 (define-public python-bashlex
22419 (package
22420 (name "python-bashlex")
22421 (version "0.14")
22422 (source
22423 (origin
22424 (method url-fetch)
22425 (uri (pypi-uri "bashlex" version))
22426 (sha256
22427 (base32
22428 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22429 (build-system python-build-system)
22430 (arguments
22431 `(#:phases
22432 (modify-phases %standard-phases
22433 (add-before 'build 'pregenerate-yacc-tables
22434 (lambda _
22435 ;; parser.py caches tables, which attempts to write to site lib
22436 ;; see https://github.com/idank/bashlex/issues/51
22437 (invoke "python" "-c" "import bashlex"))))))
22438 (home-page
22439 "https://github.com/idank/bashlex")
22440 (synopsis "Python parser for bash")
22441 (description "@code{bashlex} is a Python port of the parser used
22442 internally by GNU bash.
22443
22444 For the most part it's transliterated from C, the major differences are:
22445
22446 @itemize
22447 @item it does not execute anything
22448 @item it is reentrant
22449 @item it generates a complete AST
22450 @end itemize
22451 ")
22452 (license license:gpl3+)))
22453
22454 (define-public python-jinxed
22455 (package
22456 (name "python-jinxed")
22457 (version "1.0.0")
22458 (source
22459 (origin
22460 (method url-fetch)
22461 (uri (pypi-uri "jinxed" version))
22462 (sha256
22463 (base32
22464 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22465 (build-system python-build-system)
22466 (arguments
22467 '(#:phases
22468 (modify-phases %standard-phases
22469 (add-before 'check 'set-environment-variables
22470 (lambda* (#:key inputs #:allow-other-keys)
22471 (let ((ncurses (assoc-ref inputs "ncurses")))
22472 (setenv "TERM" "LINUX")
22473 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22474 #t))))
22475 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22476 (native-inputs
22477 `(("ncurses" ,ncurses)))
22478 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22479 (synopsis "Jinxed Terminal Library")
22480 (description
22481 "Jinxed is an implementation of a subset of the Python curses library.")
22482 (license license:mpl2.0)))
22483
22484 (define-public python-blessed
22485 (package
22486 (name "python-blessed")
22487 (version "1.17.8")
22488 (source
22489 (origin
22490 (method url-fetch)
22491 (uri (pypi-uri "blessed" version))
22492 (sha256
22493 (base32
22494 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22495 (modules '((guix build utils)))
22496 (snippet
22497 '(begin
22498 ;; Don't get hung up on Windows test failures.
22499 (delete-file "blessed/win_terminal.py") #t))))
22500 (build-system python-build-system)
22501 (propagated-inputs
22502 `(("python-jinxed" ,python-jinxed)
22503 ("python-six" ,python-six)
22504 ("python-wcwidth" ,python-wcwidth)))
22505 (native-inputs
22506 `(("python-mock" ,python-mock)
22507 ("python-pytest" ,python-pytest)))
22508 (home-page "https://github.com/jquast/blessed")
22509 (synopsis "Wrapper around terminal capabilities")
22510 (description
22511 "Blessed is a thin, practical wrapper around terminal styling, screen
22512 positioning, and keyboard input.")
22513 (license license:expat)))
22514
22515 (define-public python-readme-renderer
22516 (package
22517 (name "python-readme-renderer")
22518 (version "26.0")
22519 (source
22520 (origin
22521 (method url-fetch)
22522 (uri (pypi-uri "readme_renderer" version))
22523 (sha256
22524 (base32
22525 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22526 (build-system python-build-system)
22527 (propagated-inputs
22528 `(("python-bleach" ,python-bleach)
22529 ("python-docutils" ,python-docutils)
22530 ("python-pygments" ,python-pygments)
22531 ("python-six" ,python-six)))
22532 (native-inputs
22533 `(("python-mock" ,python-mock)
22534 ("python-pytest" ,python-pytest)))
22535 (home-page "https://github.com/pypa/readme_renderer")
22536 (synopsis "Render README files in Warehouse")
22537 (description
22538 "Readme Renderer is a library that will safely render arbitrary README
22539 files into HTML. It is designed to be used in Warehouse to render the
22540 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22541 and plain text.")
22542 (license license:asl2.0)))
22543
22544 (define-public python-lazr-delegates
22545 (package
22546 (name "python-lazr-delegates")
22547 (version "2.0.4")
22548 (source
22549 (origin
22550 (method url-fetch)
22551 (uri (pypi-uri "lazr.delegates" version))
22552 (sha256
22553 (base32
22554 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22555 (build-system python-build-system)
22556 (arguments
22557 '(#:phases
22558 (modify-phases %standard-phases
22559 (replace 'check
22560 (lambda _
22561 (invoke "python" "setup.py" "nosetests"))))))
22562 (native-inputs
22563 `(("python-nose" ,python-nose)))
22564 (propagated-inputs
22565 `(("python-zope-interface" ,python-zope-interface)))
22566 (home-page "https://launchpad.net/lazr.delegates")
22567 (synopsis "Easily write objects that delegate behavior")
22568 (description
22569 "The @code{lazr.delegates} package makes it easy to write objects that
22570 delegate behavior to another object. The new object adds some property or
22571 behavior on to the other object, while still providing the underlying interface,
22572 and delegating behavior.")
22573 (license license:lgpl3)))
22574
22575 (define-public python-lazr-config
22576 (package
22577 (name "python-lazr-config")
22578 (version "2.2.2")
22579 (source
22580 (origin
22581 (method url-fetch)
22582 (uri (pypi-uri "lazr.config" version))
22583 (sha256
22584 (base32
22585 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22586 (build-system python-build-system)
22587 (arguments
22588 '(#:phases
22589 (modify-phases %standard-phases
22590 (replace 'check
22591 (lambda _
22592 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22593 (native-inputs
22594 `(("python-nose" ,python-nose)))
22595 (propagated-inputs
22596 `(("python-lazr-delegates" ,python-lazr-delegates)
22597 ("python-zope-interface" ,python-zope-interface)))
22598 (home-page "https://launchpad.net/lazr.config")
22599 (synopsis "Create configuration schemas and process and validate configurations")
22600 (description
22601 "The LAZR config system is typically used to manage process configuration.
22602 Process configuration is for saying how things change when we run systems on
22603 different machines, or under different circumstances. This system uses ini-like
22604 file format of section, keys, and values. The config file supports inheritance
22605 to minimize duplication of information across files. The format supports schema
22606 validation.")
22607 (license license:lgpl3)))
22608
22609 (define-public python-flufl-bounce
22610 (package
22611 (name "python-flufl-bounce")
22612 (version "3.0.1")
22613 (source
22614 (origin
22615 (method url-fetch)
22616 (uri (pypi-uri "flufl.bounce" version))
22617 (sha256
22618 (base32
22619 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22620 (build-system python-build-system)
22621 (propagated-inputs
22622 `(("python-atpublic" ,python-atpublic)
22623 ("python-zope-interface" ,python-zope-interface)))
22624 (native-inputs
22625 `(("python-nose2" ,python-nose2)))
22626 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22627 (synopsis "Email bounce detectors")
22628 (description "The @code{flufl.bounce} library provides a set of heuristics
22629 and an API for detecting the original bouncing email addresses from a bounce
22630 message. Many formats found in the wild are supported, as are VERP and
22631 RFC 3464.")
22632 (license (list license:asl2.0
22633 license:lgpl3)))) ; only for setup_headers.py
22634
22635 (define-public python-flufl-i18n
22636 (package
22637 (name "python-flufl-i18n")
22638 (version "3.0")
22639 (source
22640 (origin
22641 (method url-fetch)
22642 (uri (pypi-uri "flufl.i18n" version))
22643 (sha256
22644 (base32
22645 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22646 (build-system python-build-system)
22647 (propagated-inputs
22648 `(("python-atpublic" ,python-atpublic)))
22649 (home-page "https://flufli18n.readthedocs.io")
22650 (synopsis "API for Python internationalization")
22651 (description
22652 "This package provides a high-level, convenient API for managing
22653 internationalization/translation contexts in Python applications. There is a
22654 simple API for single-context applications, such as command line scripts which
22655 only need to translate into one language during the entire course of their
22656 execution. There is a more flexible, but still convenient API for multi-context
22657 applications, such as servers, which may need to switch language contexts for
22658 different tasks.")
22659 (license license:asl2.0)))
22660
22661 (define-public python-flufl-lock
22662 (package
22663 (name "python-flufl-lock")
22664 (version "4.0")
22665 (source
22666 (origin
22667 (method url-fetch)
22668 (uri (pypi-uri "flufl.lock" version))
22669 (sha256
22670 (base32
22671 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22672 (build-system python-build-system)
22673 (propagated-inputs
22674 `(("python-atpublic" ,python-atpublic)
22675 ("python-psutil" ,python-psutil)))
22676 (home-page "https://flufllock.readthedocs.io")
22677 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22678 (description
22679 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22680 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22681 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22682 and have a maximum lifetime built-in.")
22683 (license (list license:asl2.0
22684 license:lgpl3)))) ; only for setup_helpers.py
22685
22686 (define-public python-flufl-testing
22687 (package
22688 (name "python-flufl-testing")
22689 (version "0.8")
22690 (source
22691 (origin
22692 (method url-fetch)
22693 (uri (pypi-uri "flufl.testing" version))
22694 (sha256
22695 (base32
22696 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22697 (build-system python-build-system)
22698 (native-inputs
22699 `(("python-nose2" ,python-nose2)))
22700 (home-page "https://gitlab.com/warsaw/flufl.testing")
22701 (synopsis "Collection of test tool plugins")
22702 (description
22703 "This package contains a small collection of test tool plugins for
22704 @code{nose2} and @code{flake8}.")
22705 (license license:asl2.0)))
22706
22707 (define-public python-devtools
22708 (package
22709 (name "python-devtools")
22710 (version "0.6")
22711 (source
22712 (origin
22713 (method git-fetch)
22714 (uri (git-reference
22715 (url "https://github.com/samuelcolvin/python-devtools")
22716 (commit (string-append "v" version))))
22717 (file-name (git-file-name name version))
22718 (sha256
22719 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22720 (build-system python-build-system)
22721 (native-inputs
22722 `(("python-pytest" ,python-pytest)
22723 ("python-pytest-mock" ,python-pytest-mock)))
22724 (propagated-inputs
22725 `(("python-pygments" ,python-pygments)))
22726 (arguments
22727 `(#:phases (modify-phases %standard-phases
22728 (replace 'check
22729 (lambda _
22730 (invoke "pytest")
22731 #t)))))
22732 (home-page "https://github.com/samuelcolvin/python-devtools")
22733 (synopsis "Debug command and development tools")
22734 (description
22735 "This package provides a debug print command and other development tools.
22736 It adds a simple and readable way to print stuff during development.")
22737 (license license:expat)))
22738
22739 (define-public python-dateparser
22740 (package
22741 (name "python-dateparser")
22742 (version "0.7.6")
22743 (source
22744 (origin
22745 (method url-fetch)
22746 (uri (pypi-uri "dateparser" version))
22747 (sha256
22748 (base32
22749 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22750 (build-system python-build-system)
22751 (propagated-inputs
22752 `(("python-dateutil" ,python-dateutil)
22753 ("python-pytz" ,python-pytz)
22754 ("python-regex" ,python-regex)
22755 ("python-ruamel.yaml" ,python-ruamel.yaml)
22756 ("python-tzlocal" ,python-tzlocal)))
22757 (native-inputs
22758 `(("python-mock" ,python-mock)
22759 ("python-parameterized" ,python-parameterized)
22760 ("tzdata" ,tzdata-for-tests)))
22761 (arguments
22762 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22763 #:tests? #f
22764 #:phases
22765 (modify-phases %standard-phases
22766 (add-before 'check 'set-check-environment
22767 (lambda* (#:key inputs #:allow-other-keys)
22768 (setenv "TZ" "UTC")
22769 (setenv "TZDIR"
22770 (string-append (assoc-ref inputs "tzdata")
22771 "/share/zoneinfo"))
22772 #t)))))
22773 (home-page "https://github.com/scrapinghub/dateparser")
22774 (synopsis
22775 "Date parsing library designed to parse dates from HTML pages")
22776 (description
22777 "@code{python-dateparser} provides modules to easily parse localized
22778 dates in almost any string formats commonly found on web pages.")
22779 (license license:bsd-3)))
22780
22781 (define-public python-dparse
22782 (package
22783 (name "python-dparse")
22784 (version "0.5.1")
22785 (source
22786 (origin
22787 (method url-fetch)
22788 (uri (pypi-uri "dparse" version))
22789 (sha256
22790 (base32
22791 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22792 (build-system python-build-system)
22793 (native-inputs
22794 `(("python-pytest" ,python-pytest)))
22795 (propagated-inputs
22796 `(("python-packaging" ,python-packaging)
22797 ("python-pyyaml" ,python-pyyaml)
22798 ("python-toml" ,python-toml)))
22799 (home-page "https://github.com/pyupio/dparse")
22800 (synopsis "Parser for Python dependency files")
22801 (description "This package provides a parser for Python dependency files.")
22802 (license license:expat)))
22803
22804 (define-public python-dpath
22805 (package
22806 (name "python-dpath")
22807 (version "2.0.1")
22808 (source
22809 (origin
22810 (method url-fetch)
22811 (uri (pypi-uri "dpath" version))
22812 (sha256
22813 (base32
22814 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22815 (build-system python-build-system)
22816 (native-inputs
22817 `(("python-hypothesis" ,python-hypothesis)
22818 ("python-mock" ,python-mock)
22819 ("python-nose" ,python-nose)))
22820 (arguments
22821 '(#:phases
22822 (modify-phases %standard-phases
22823 (replace 'check
22824 (lambda* (#:key inputs outputs #:allow-other-keys)
22825 (add-installed-pythonpath inputs outputs)
22826 ;; This invokation is taken from tox.ini.
22827 (invoke "nosetests" "-d" "-v" "tests/"))))))
22828 (home-page "https://github.com/akesterson/dpath-python")
22829 (synopsis "Filesystem-like pathing and searching for dictionaries")
22830 (description
22831 "@code{python-dpath} is a library for accessing and searching
22832 dictionaries via /slashed/paths ala xpath.
22833
22834 Basically it lets you glob over a dictionary as if it were a filesystem. It
22835 allows you to specify globs (ala the bash eglob syntax, through some advanced
22836 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22837 facility for filtering those results.")
22838 (license license:expat)))
22839
22840 (define-public python-safety
22841 (package
22842 (name "python-safety")
22843 (version "1.9.0")
22844 (source
22845 (origin
22846 (method url-fetch)
22847 (uri (pypi-uri "safety" version))
22848 (sha256
22849 (base32
22850 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22851 (build-system python-build-system)
22852 (arguments
22853 `(#:phases
22854 (modify-phases %standard-phases
22855 (add-after 'unpack 'disable-tests
22856 (lambda _
22857 (substitute* "tests/test_safety.py"
22858 ;; requires network
22859 (("def test_check_live") "def _test_check_live"))
22860 #t)))))
22861 (propagated-inputs
22862 `(("python-click" ,python-click)
22863 ("python-dparse" ,python-dparse)
22864 ("python-packaging" ,python-packaging)
22865 ("python-requests" ,python-requests)))
22866 (home-page "https://github.com/pyupio/safety")
22867 (synopsis "Check installed dependencies for known vulnerabilities")
22868 (description "Safety checks installed dependencies for known vulnerabilities.
22869 By default it uses the open Python vulnerability database Safety DB.")
22870 (license license:expat)))
22871
22872 (define-public python-pypandoc
22873 (package
22874 (name "python-pypandoc")
22875 (version "1.5")
22876 (source
22877 (origin
22878 (method url-fetch)
22879 (uri (pypi-uri "pypandoc" version))
22880 (sha256
22881 (base32
22882 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22883 (build-system python-build-system)
22884 (inputs
22885 `(("pandoc" ,pandoc)
22886 ("pandoc-citeproc" ,pandoc-citeproc)))
22887 (propagated-inputs
22888 `(("wheel" ,python-wheel)))
22889 (native-inputs
22890 `(("texlive" ,(texlive-union (list texlive-amsfonts
22891 texlive-fonts-ec
22892 texlive-latex-hyperref
22893 texlive-latex-oberdiek
22894 texlive-lm
22895 texlive-xcolor)))))
22896 (arguments
22897 `(#:phases
22898 (modify-phases %standard-phases
22899 (add-before 'check 'disable-tests
22900 (lambda _
22901 ;; Disable test requiring network access
22902 (substitute* "tests.py"
22903 (("test_basic_conversion_from_http_url")
22904 "skip_test_basic_conversion_from_http_url"))
22905 ;; Needed by texlive-union to generate fonts
22906 (setenv "HOME" "/tmp")
22907 #t)))))
22908 (home-page "https://github.com/bebraw/pypandoc")
22909 (synopsis "Python wrapper for pandoc")
22910 (description "pypandoc is a thin Python wrapper around pandoc
22911 and pandoc-citeproc.")
22912 (license license:expat)))
22913
22914 (define-public python-rnc2rng
22915 (package
22916 (name "python-rnc2rng")
22917 (version "2.6.4")
22918 (source
22919 (origin
22920 (method url-fetch)
22921 (uri (pypi-uri "rnc2rng" version))
22922 (sha256
22923 (base32
22924 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22925 (build-system python-build-system)
22926 (propagated-inputs
22927 `(("python-rply" ,python-rply)))
22928 (arguments
22929 `(#:phases (modify-phases %standard-phases
22930 (replace 'check
22931 (lambda _
22932 (invoke "python" "test.py"))))))
22933 (home-page "https://github.com/djc/rnc2rng")
22934 (synopsis "Convert RELAX NG Compact to regular syntax")
22935 (description
22936 "This package provides the @command{rnc2rng} command-line tool as well as
22937 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22938 equivalent schemata in the XML-based default RELAX NG syntax.")
22939 (license license:expat)))
22940
22941 (define-public python-telethon
22942 (package
22943 (name "python-telethon")
22944 (version "1.17.5")
22945 (source
22946 (origin
22947 (method git-fetch)
22948 (uri (git-reference
22949 (url "https://github.com/LonamiWebs/Telethon")
22950 (commit (string-append "v" version))))
22951 (file-name (git-file-name name version))
22952 (sha256
22953 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22954 (build-system python-build-system)
22955 (arguments
22956 '(#:phases
22957 (modify-phases %standard-phases
22958 (replace 'check
22959 (lambda* (#:key tests? #:allow-other-keys)
22960 (when tests?
22961 (invoke "py.test" "-v"))
22962 #t)))))
22963 (propagated-inputs
22964 `(("python-rsa" ,python-rsa)
22965 ("python-pyaes" ,python-pyaes)))
22966 (native-inputs
22967 `(("python-pytest" ,python-pytest)
22968 ("python-pytest-asyncio" ,python-pytest-asyncio)
22969 ("python-pytest-trio" ,python-pytest-trio)))
22970 (home-page "https://docs.telethon.dev")
22971 (synopsis "Full-featured Telegram client library for Python 3")
22972 (description "This library is designed to make it easy to write Python
22973 programs that can interact with Telegram.")
22974 (license license:expat)))
22975
22976 (define-public python-citeproc-py
22977 (package
22978 (name "python-citeproc-py")
22979 (version "0.5.1")
22980 (source
22981 (origin
22982 (method url-fetch)
22983 (uri (pypi-uri "citeproc-py" version))
22984 (sha256
22985 (base32
22986 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22987 (build-system python-build-system)
22988 (propagated-inputs
22989 `(("python-lxml" ,python-lxml)
22990 ("python-rnc2rng" ,python-rnc2rng)))
22991 (home-page
22992 "https://github.com/brechtm/citeproc-py")
22993 (synopsis "Citations and bibliography formatter")
22994 (description
22995 "Citeproc-py is a CSL processor for Python. It aims to implement the
22996 CSL 1.0.1 specification. citeproc-py can output styled citations and
22997 bibliographies in a number of different output formats. Currently supported
22998 are plain text, reStructuredText and HTML.")
22999 (license license:bsd-2)))
23000
23001 (define-public python-inform
23002 (package
23003 (name "python-inform")
23004 (version "1.23.0")
23005 (source
23006 (origin
23007 (method url-fetch)
23008 (uri (pypi-uri "inform" version))
23009 (sha256
23010 (base32
23011 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23012 (build-system python-build-system)
23013 (arguments
23014 `(#:tests? #f)) ; PyPI tarball lacks tests
23015 (native-inputs
23016 `(("python-hypothesis" ,python-hypothesis)
23017 ("python-pytest-cov" ,python-pytest-cov)
23018 ("python-pytest-runner" ,python-pytest-runner)))
23019 (propagated-inputs
23020 `(("python-arrow" ,python-arrow)
23021 ("python-six" ,python-six)))
23022 (home-page "https://inform.readthedocs.io")
23023 (synopsis "Print & logging utilities for communicating with user")
23024 (description
23025 "Inform is designed to display messages from programs that are typically run from
23026 a console. It provides a collection of ‘print’ functions that allow you to simply and
23027 cleanly print different types of messages.")
23028 (license license:gpl3+)))
23029
23030 (define-public python-nestedtext
23031 (package
23032 (name "python-nestedtext")
23033 (version "1.0.0")
23034 (source
23035 (origin
23036 (method url-fetch)
23037 (uri (pypi-uri "nestedtext" version))
23038 (sha256
23039 (base32
23040 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23041 (build-system python-build-system)
23042 (arguments
23043 `(#:tests? #f)) ; PyPI tarball lacks tests
23044 (propagated-inputs
23045 `(("python-inform" ,python-inform)))
23046 (home-page "https://nestedtext.org")
23047 (synopsis "Human readable and writable data interchange format")
23048 (description
23049 "NestedText is a file format for holding data that is to be entered, edited, or
23050 viewed by people. It allows data to be organized into a nested collection of
23051 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23052 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23053 NestedText is both simple and natural. Only a small number of concepts and rules must
23054 be kept in mind when creating it. It is easily created, modified, or viewed with
23055 a text editor and easily understood and used by both programmers and non-programmers.")
23056 (license license:expat))) ; MIT license
23057
23058 (define-public python-parallel
23059 (package
23060 (name "python-parallel")
23061 (version "1.6.4.4")
23062 (source
23063 (origin
23064 (method url-fetch)
23065 (uri (string-append
23066 "https://www.parallelpython.com/downloads/pp/pp-"
23067 version ".zip"))
23068 (sha256
23069 (base32
23070 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23071 (native-inputs
23072 `(("unzip" ,unzip)))
23073 (build-system python-build-system)
23074 (arguments '(#:tests? #f)) ; No test suite.
23075 (home-page "https://www.parallelpython.com")
23076 (synopsis "Parallel and distributed programming for Python")
23077 (description "Parallel Python module (PP) provides an easy and efficient
23078 way to create parallel-enabled applications for SMP computers and clusters.
23079 PP module features cross-platform portability and dynamic load balancing.
23080 Thus applications written with PP will parallelize efficiently even on
23081 heterogeneous and multi-platform clusters (including clusters running other
23082 applications with variable CPU loads).")
23083 (license license:bsd-3)))
23084
23085 (define-public python2-parallel
23086 (package-with-python2 python-parallel))
23087
23088 (define-public python-djvulibre
23089 (package
23090 (name "python-djvulibre")
23091 (version "0.8.5")
23092 (source
23093 (origin
23094 (method url-fetch)
23095 (uri (pypi-uri "python-djvulibre" version))
23096 (sha256
23097 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23098 (build-system python-build-system)
23099 (native-inputs
23100 `(("ghostscript" ,ghostscript)
23101 ("pkg-config" ,pkg-config)
23102 ("python-nose" ,python-nose)))
23103 (inputs
23104 `(("djvulibre" ,djvulibre)
23105 ("python-cython" ,python-cython)))
23106 (arguments
23107 `(#:phases
23108 (modify-phases %standard-phases
23109 (add-after 'unpack 'fix-tests
23110 (lambda _
23111 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23112 ;; doesn't make sense on GNU/Linux.
23113 (delete-file "djvu/dllpath.py")
23114 #t)))))
23115 (synopsis "Python bindings for DjVuLibre")
23116 (description "This is a set of Python bindings for the DjVuLibre library.")
23117 (home-page "https://jwilk.net/software/python-djvulibre")
23118 (license license:gpl2)))
23119
23120 (define-public python2-djvulibre
23121 (package-with-python2 python-djvulibre))
23122
23123 (define-public python-versioneer
23124 (package
23125 (name "python-versioneer")
23126 (version "0.19")
23127 (source
23128 (origin
23129 (method url-fetch)
23130 (uri (pypi-uri "versioneer" version))
23131 (sha256
23132 (base32
23133 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23134 (build-system python-build-system)
23135 (home-page
23136 "https://github.com/python-versioneer/python-versioneer")
23137 (synopsis
23138 "Version-string management for VCS-controlled trees")
23139 (description
23140 "@code{versioneer} is a tool for managing a recorded version number in
23141 distutils-based python projects. The goal is to remove the tedious and
23142 error-prone \"update the embedded version string\" step from your release
23143 process.")
23144 (license license:public-domain)))
23145
23146 (define-public python2-gamera
23147 (package
23148 (name "python2-gamera")
23149 (version "3.4.4")
23150 (source
23151 (origin
23152 (method url-fetch)
23153 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23154 "gamera-" version ".tar.gz"))
23155 (sha256
23156 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23157 (modules '((guix build utils)))
23158 (snippet
23159 '(begin
23160 ;; Remove bundled libraries.
23161 (for-each delete-file-recursively
23162 '("src/libpng-1.2.5"
23163 "src/libtiff"
23164 "src/zlib-1.2.8"))))))
23165 (build-system python-build-system)
23166 (inputs
23167 `(("libpng" ,libpng)
23168 ("libtiff" ,libtiff)
23169 ("python2-wxpython" ,python2-wxpython)
23170 ("zlib" ,zlib)))
23171 (arguments
23172 `(#:python ,python-2))
23173 (synopsis "Framework for building document analysis applications")
23174 (description
23175 "Gamera is a toolkit for building document image recognition systems.")
23176 (home-page "https://gamera.informatik.hsnr.de/")
23177 (license license:gpl2+)))
23178
23179 (define-public python-contextvars
23180 (package
23181 (name "python-contextvars")
23182 (version "2.4")
23183 (source
23184 (origin
23185 (method url-fetch)
23186 (uri (pypi-uri "contextvars" version))
23187 (sha256
23188 (base32
23189 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23190 (build-system python-build-system)
23191 (propagated-inputs
23192 `(("python-immutables" ,python-immutables)))
23193 (home-page
23194 "https://github.com/MagicStack/contextvars")
23195 (synopsis "PEP 567 Backport")
23196 (description "This package implements a backport of Python 3.7
23197 @code{contextvars} module (see PEP 567) for Python 3.6.")
23198 (license license:asl2.0)))
23199
23200 (define-public python-aiofiles
23201 (package
23202 (name "python-aiofiles")
23203 (version "0.5.0")
23204 (source
23205 (origin
23206 (method url-fetch)
23207 (uri (pypi-uri "aiofiles" version))
23208 (sha256
23209 (base32
23210 "1bqmv019x16qa3zah0z915cw6z4va3fjs60fk2s7vyah3gyvrrlq"))))
23211 (build-system python-build-system)
23212 (home-page "https://github.com/Tinche/aiofiles")
23213 (synopsis "File support for @code{asyncio}")
23214 (description "@code{python-aiofiles} is a library for handling local
23215 disk files in asyncio applications.")
23216 (license license:asl2.0)))
23217
23218 (define-public python-pyre-extensions
23219 (package
23220 (name "python-pyre-extensions")
23221 (version "0.0.18")
23222 (source
23223 (origin
23224 (method url-fetch)
23225 (uri (pypi-uri "pyre-extensions" version))
23226 (sha256
23227 (base32
23228 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23229 (build-system python-build-system)
23230 (propagated-inputs
23231 `(("python-typing-extensions"
23232 ,python-typing-extensions)
23233 ("python-typing-inspect" ,python-typing-inspect)))
23234 (home-page "https://pyre-check.org")
23235 (synopsis
23236 "Type system extensions for use with @code{python-pyre}")
23237 (description
23238 "@code{python-pyre-extensions} defines extensions to the standard
23239 @code{typing} module that are supported by the Pyre typechecker.")
23240 (license license:expat)))
23241
23242 (define-public python-dataclasses
23243 (package
23244 (name "python-dataclasses")
23245 (version "0.7")
23246 (source
23247 (origin
23248 (method url-fetch)
23249 (uri (pypi-uri "dataclasses" version))
23250 (sha256
23251 (base32
23252 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23253 (build-system python-build-system)
23254 (home-page
23255 "https://github.com/ericvsmith/dataclasses")
23256 (synopsis
23257 "Backport of the @code{dataclasses} module for Python 3.6")
23258 (description
23259 "This is an implementation of PEP 557, Data Classes. It is a
23260 backport of the @code{dataclasses} module for Python 3.6.")
23261 (license license:asl2.0)))
23262
23263 (define-public python-pywatchman
23264 (package
23265 (name "python-pywatchman")
23266 (version "1.4.1")
23267 (source
23268 (origin
23269 (method url-fetch)
23270 (uri (pypi-uri "pywatchman" version))
23271 (sha256
23272 (base32
23273 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23274 (build-system python-build-system)
23275 (arguments
23276 `(#:tests? #f)) ;there are none
23277 (home-page
23278 "https://facebook.github.io/watchman/")
23279 (synopsis "Watchman client for python")
23280 (description "@code{python-pywatchman} is a library to connect and
23281 query Watchman to discover file changes.")
23282 (license license:bsd-3)))