gnu: python-license-expression: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;;
97 ;;; This file is part of GNU Guix.
98 ;;;
99 ;;; GNU Guix is free software; you can redistribute it and/or modify it
100 ;;; under the terms of the GNU General Public License as published by
101 ;;; the Free Software Foundation; either version 3 of the License, or (at
102 ;;; your option) any later version.
103 ;;;
104 ;;; GNU Guix is distributed in the hope that it will be useful, but
105 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
106 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 ;;; GNU General Public License for more details.
108 ;;;
109 ;;; You should have received a copy of the GNU General Public License
110 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
111
112 (define-module (gnu packages python-xyz)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (gnu packages)
115 #:use-module (gnu packages algebra)
116 #:use-module (gnu packages adns)
117 #:use-module (gnu packages aidc)
118 #:use-module (gnu packages attr)
119 #:use-module (gnu packages backup)
120 #:use-module (gnu packages bash)
121 #:use-module (gnu packages check)
122 #:use-module (gnu packages cmake)
123 #:use-module (gnu packages compression)
124 #:use-module (gnu packages crypto)
125 #:use-module (gnu packages databases)
126 #:use-module (gnu packages dbm)
127 #:use-module (gnu packages djvu)
128 #:use-module (gnu packages docker)
129 #:use-module (gnu packages enchant)
130 #:use-module (gnu packages file)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages gcc)
133 #:use-module (gnu packages geo)
134 #:use-module (gnu packages ghostscript)
135 #:use-module (gnu packages gl)
136 #:use-module (gnu packages glib)
137 #:use-module (gnu packages gnome)
138 #:use-module (gnu packages gnupg)
139 #:use-module (gnu packages graphviz)
140 #:use-module (gnu packages graphics)
141 #:use-module (gnu packages gsasl)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages haskell-xyz)
145 #:use-module (gnu packages icu4c)
146 #:use-module (gnu packages image)
147 #:use-module (gnu packages kerberos)
148 #:use-module (gnu packages libevent)
149 #:use-module (gnu packages libffi)
150 #:use-module (gnu packages libidn)
151 #:use-module (gnu packages linux)
152 #:use-module (gnu packages llvm)
153 #:use-module (gnu packages man)
154 #:use-module (gnu packages maths)
155 #:use-module (gnu packages monitoring)
156 #:use-module (gnu packages multiprecision)
157 #:use-module (gnu packages networking)
158 #:use-module (gnu packages ncurses)
159 #:use-module (gnu packages openstack)
160 #:use-module (gnu packages pcre)
161 #:use-module (gnu packages perl)
162 #:use-module (gnu packages photo)
163 #:use-module (gnu packages pkg-config)
164 #:use-module (gnu packages python)
165 #:use-module (gnu packages python-check)
166 #:use-module (gnu packages python-compression)
167 #:use-module (gnu packages python-crypto)
168 #:use-module (gnu packages python-science)
169 #:use-module (gnu packages python-web)
170 #:use-module (gnu packages qt)
171 #:use-module (gnu packages rdf)
172 #:use-module (gnu packages readline)
173 #:use-module (gnu packages sdl)
174 #:use-module (gnu packages search)
175 #:use-module (gnu packages shells)
176 #:use-module (gnu packages sphinx)
177 #:use-module (gnu packages ssh)
178 #:use-module (gnu packages terminals)
179 #:use-module (gnu packages tex)
180 #:use-module (gnu packages texinfo)
181 #:use-module (gnu packages textutils)
182 #:use-module (gnu packages time)
183 #:use-module (gnu packages tls)
184 #:use-module (gnu packages version-control)
185 #:use-module (gnu packages video)
186 #:use-module (gnu packages web)
187 #:use-module (gnu packages 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 python2-eventlet
1746 (let ((base (package-with-python2
1747 (strip-python2-variant python-eventlet))))
1748 (package (inherit base)
1749 (propagated-inputs
1750 `(("python2-enum34" ,python2-enum34)
1751 ,@(package-propagated-inputs base))))))
1752
1753 (define-public python-six
1754 (package
1755 (name "python-six")
1756 (version "1.14.0")
1757 (source
1758 (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "six" version))
1761 (sha256
1762 (base32
1763 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1764 (build-system python-build-system)
1765 (arguments
1766 `(#:phases
1767 (modify-phases %standard-phases
1768 (replace 'check
1769 (lambda _
1770 (invoke "py.test" "-v"))))))
1771 (native-inputs
1772 `(("python-pytest" ,python-pytest-bootstrap)))
1773 (home-page "https://pypi.org/project/six/")
1774 (synopsis "Python 2 and 3 compatibility utilities")
1775 (description
1776 "Six is a Python 2 and 3 compatibility library. It provides utility
1777 functions for smoothing over the differences between the Python versions with
1778 the goal of writing Python code that is compatible on both Python versions.
1779 Six supports every Python version since 2.5. It is contained in only one
1780 Python file, so it can be easily copied into your project.")
1781 (license license:x11)))
1782
1783 (define-public python2-six
1784 (package-with-python2 python-six))
1785
1786 (define-public python-six-bootstrap
1787 (package
1788 (inherit python-six)
1789 (name "python-six-bootstrap")
1790 (native-inputs `())
1791 (arguments `(#:tests? #f))))
1792
1793 (define-public python2-six-bootstrap
1794 (package-with-python2 python-six-bootstrap))
1795
1796 (define-public python-schedule
1797 (package
1798 (name "python-schedule")
1799 (version "0.4.3")
1800 (source
1801 (origin
1802 (method url-fetch)
1803 (uri (pypi-uri "schedule" version))
1804 (sha256
1805 (base32
1806 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1807 (build-system python-build-system)
1808 (native-inputs
1809 `(("python-pytest" ,python-pytest)
1810 ("python-mock" ,python-mock)))
1811 (home-page "https://github.com/dbader/schedule")
1812 (synopsis "Schedule periodic function calls in Python")
1813 (description
1814 "Schedule is an in-process scheduler for periodic jobs that uses the
1815 builder pattern for configuration. Schedule lets you run Python functions (or
1816 any other callable) periodically at pre-determined intervals using a simple,
1817 human-friendly syntax.")
1818 (license license:expat)))
1819
1820 (define-public python2-schedule
1821 (package-with-python2 python-schedule))
1822
1823 (define-public python-scour
1824 (package
1825 (name "python-scour")
1826 (version "038.1")
1827 (source
1828 (origin
1829 (method git-fetch)
1830 (uri
1831 (git-reference
1832 (url "https://github.com/scour-project/scour")
1833 (commit
1834 (string-append "v" version))))
1835 (file-name (git-file-name name version))
1836 (sha256
1837 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1838 (propagated-inputs
1839 `(("python-six" ,python-six)))
1840 (build-system python-build-system)
1841 (home-page "https://github.com/scour-project/scour")
1842 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1843 (description "The goal of Scour is to output a file that renderes
1844 identically at a fraction of the size by removing a lot of redundant
1845 information created by most SVG editors. Optimization options are typically
1846 lossless but can be tweaked for more aggressive cleaning.")
1847 (license license:asl2.0)))
1848
1849 (define-public python-mechanize
1850 (package
1851 (name "python-mechanize")
1852 (version "0.4.5")
1853 (source
1854 (origin
1855 (method url-fetch)
1856 (uri (pypi-uri "mechanize" version))
1857 (sha256
1858 (base32
1859 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1860 (build-system python-build-system)
1861 (propagated-inputs
1862 `(("python-html5lib" ,python-html5lib)))
1863 (home-page "https://github.com/python-mechanize/mechanize")
1864 (synopsis
1865 "Stateful programmatic web browsing in Python")
1866 (description
1867 "Mechanize implements stateful programmatic web browsing in Python,
1868 after Andy Lester’s Perl module WWW::Mechanize.")
1869 (license license:bsd-3)))
1870
1871 (define-public python2-mechanize
1872 (package-with-python2 python-mechanize))
1873
1874 (define-public python-simpleaudio
1875 (package
1876 (name "python-simpleaudio")
1877 (version "1.0.4")
1878 (source
1879 (origin
1880 (method url-fetch)
1881 (uri (pypi-uri "simpleaudio" version))
1882 (sha256
1883 (base32
1884 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1885 (build-system python-build-system)
1886 (arguments
1887 `(#:tests? #f))
1888 (inputs
1889 `(("alsa-lib" ,alsa-lib)))
1890 (home-page
1891 "https://github.com/hamiltron/py-simple-audio")
1892 (synopsis "Simple, asynchronous audio playback for Python 3")
1893 (description
1894 "The @code{simplaudio} package provides cross-platform, dependency-free
1895 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1896 (license license:expat))) ; MIT license
1897
1898 (define-public python-simplejson
1899 (package
1900 (name "python-simplejson")
1901 (version "3.17.0")
1902 (source
1903 (origin
1904 (method url-fetch)
1905 (uri (pypi-uri "simplejson" version))
1906 (sha256
1907 (base32
1908 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1909 (build-system python-build-system)
1910 (home-page "http://simplejson.readthedocs.org/en/latest/")
1911 (synopsis
1912 "Json library for Python")
1913 (description
1914 "JSON (JavaScript Object Notation) is a subset of JavaScript
1915 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1916 format.
1917
1918 Simplejson exposes an API familiar to users of the standard library marshal
1919 and pickle modules. It is the externally maintained version of the json
1920 library contained in Python 2.6, but maintains compatibility with Python 2.5
1921 and (currently) has significant performance advantages, even without using
1922 the optional C extension for speedups. Simplejson is also supported on
1923 Python 3.3+.")
1924 (license license:x11)))
1925
1926 (define-public python2-simplejson
1927 (package-with-python2 python-simplejson))
1928
1929
1930 (define-public python-pyicu
1931 (package
1932 (name "python-pyicu")
1933 (version "2.4.3")
1934 (source
1935 (origin
1936 (method url-fetch)
1937 (uri (pypi-uri "PyICU" version))
1938 (sha256
1939 (base32
1940 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1941 (build-system python-build-system)
1942 (inputs
1943 `(("icu4c" ,icu4c)))
1944 (native-inputs
1945 `(("python-pytest" ,python-pytest)
1946 ("python-six" ,python-six)))
1947 (home-page "https://github.com/ovalhub/pyicu")
1948 (synopsis "Python extension wrapping the ICU C++ API")
1949 (description
1950 "PyICU is a python extension wrapping the ICU C++ API.")
1951 (license license:x11)))
1952
1953 (define-public python2-pyicu
1954 (package-with-python2 python-pyicu))
1955
1956 (define-public python-dogtail
1957 (package
1958 (name "python-dogtail")
1959 (version "0.9.11")
1960 (source (origin
1961 (method url-fetch)
1962 (uri
1963 (string-append
1964 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1965 "dogtail-" version ".tar.gz"))
1966 (sha256
1967 (base32
1968 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1969 (build-system python-build-system)
1970 (arguments
1971 `(#:tests? #f ; TODO Launching dbus for the tests
1972 ; fails
1973 #:phases
1974 (modify-phases %standard-phases
1975 (replace 'check
1976 (lambda* (#:key tests? #:allow-other-keys)
1977 (when tests?
1978 (system "Xvfb :1 &")
1979 (setenv "DISPLAY" ":1")
1980 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1981 #t)))))
1982 (propagated-inputs
1983 `(("python-pygobject" ,python-pygobject)
1984 ("python-pycairo" ,python-pycairo)
1985 ("python-pyatspi" ,python-pyatspi)))
1986 (native-inputs
1987 `(("python-nose" ,python-nose)
1988 ("gtk+" ,gtk+)
1989 ("xvfb" ,xorg-server)
1990 ("dbus" ,dbus)
1991 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1992 ("gobject-introspection" ,gobject-introspection)))
1993 (home-page "https://gitlab.com/dogtail/dogtail/")
1994 (synopsis "GUI test tool and automation framework written in Python")
1995 (description
1996 "Dogtail is a GUI test tool and automation framework written in Python.
1997 It uses Accessibility (a11y) technologies to communicate with desktop
1998 applications. dogtail scripts are written in Python and executed like any
1999 other Python program.")
2000 (license license:gpl2+)))
2001
2002 (define-public python2-dogtail
2003 (package-with-python2 python-dogtail))
2004
2005 (define-public python-empy
2006 (package
2007 (name "python-empy")
2008 (version "3.3.3")
2009 (source (origin
2010 (method url-fetch)
2011 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2012 version ".tar.gz"))
2013 (sha256
2014 (base32
2015 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2016 (build-system python-build-system)
2017 (arguments
2018 `(#:tests? #f)) ; python2 only
2019 (home-page "http://www.alcyone.com/software/empy/")
2020 (synopsis "Templating system for Python")
2021 (description
2022 "EmPy is a system for embedding Python expressions and statements in
2023 template text; it takes an EmPy source file, processes it, and produces
2024 output. This is accomplished via expansions, which are special signals to the
2025 EmPy system and are set off by a special prefix (by default the at sign, @@).
2026 EmPy can expand arbitrary Python expressions and statements in this way, as
2027 well as a variety of special forms. Textual data not explicitly delimited in
2028 this way is sent unaffected to the output, allowing Python to be used in
2029 effect as a markup language. Also supported are callbacks via hooks,
2030 recording and playback via diversions, and dynamic, chainable filters. The
2031 system is highly configurable via command line options and embedded
2032 commands.")
2033 (license license:lgpl2.1+)))
2034
2035 (define-public python2-empy
2036 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2037 (package
2038 (inherit base)
2039 (arguments `(,@(package-arguments base)
2040 #:tests? #t)))))
2041
2042 (define-public python2-element-tree
2043 (package
2044 (name "python2-element-tree")
2045 (version "1.2.6")
2046 (source (origin
2047 (method url-fetch)
2048 (uri (string-append
2049 "http://effbot.org/media/downloads/elementtree-"
2050 version "-20050316.tar.gz"))
2051 (sha256
2052 (base32
2053 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2054 (build-system python-build-system)
2055 (arguments
2056 `(#:python ,python-2 ; seems to be part of Python 3
2057 #:tests? #f)) ; no 'test' sub-command
2058 (synopsis "Toolkit for XML processing in Python")
2059 (description
2060 "ElementTree is a Python library supporting lightweight XML processing.")
2061 (home-page "https://effbot.org/zone/element-index.htm")
2062 (license (license:x11-style
2063 "http://docs.python.org/2/license.html"
2064 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2065
2066 (define-public python2-pybugz
2067 (package
2068 (name "python2-pybugz")
2069 (version "0.6.11")
2070 (source (origin
2071 (method url-fetch)
2072 (uri (string-append
2073 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2074 version ".tar.gz"))
2075 (sha256
2076 (base32
2077 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2078 (patches (search-patches "pybugz-stty.patch"
2079 "pybugz-encode-error.patch"))))
2080 (build-system python-build-system)
2081 (arguments
2082 `(#:python ,python-2 ; SyntaxError with Python 3
2083 #:tests? #f)) ; no 'test' sub-command
2084 (propagated-inputs
2085 `(("element-tree" ,python2-element-tree)))
2086 (synopsis "Python and command-line interface to Bugzilla")
2087 (description
2088 "PyBugz is a Python library and command-line tool to query the Bugzilla
2089 bug tracking system. It is meant as an aid to speed up interaction with the
2090 bug tracker.")
2091 (home-page "http://www.liquidx.net/pybugz/")
2092 (license license:gpl2)))
2093
2094 (define-public python2-enum
2095 (package
2096 (name "python2-enum")
2097 (version "0.4.6")
2098 (source (origin
2099 (method url-fetch)
2100 (uri (pypi-uri "enum" version))
2101 (sha256
2102 (base32
2103 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2104 (build-system python-build-system)
2105 (arguments
2106 `(#:python ,python-2))
2107 (home-page "https://pypi.org/project/enum/")
2108 (synopsis "Robust enumerated type support in Python")
2109 (description
2110 "This provides a module for robust enumerations in Python. It has
2111 been superseded by the Python standard library and is provided only for
2112 compatibility.")
2113 ;; Choice of either license.
2114 (license (list license:gpl3+ license:psfl))))
2115
2116 (define-public python-enum34
2117 (package
2118 (name "python-enum34")
2119 (version "1.1.6")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (pypi-uri "enum34" version))
2124 (sha256
2125 (base32
2126 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2127 (build-system python-build-system)
2128 (home-page "https://pypi.org/project/enum34/")
2129 (synopsis "Backported Python 3.4 Enum")
2130 (description
2131 "Enum34 is the new Python stdlib enum module available in Python 3.4
2132 backported for previous versions of Python from 2.4 to 3.3.")
2133 (license license:bsd-3)))
2134
2135 (define-public python2-enum34
2136 (package-with-python2 python-enum34))
2137
2138 (define-public python-parse-type
2139 (package
2140 (name "python-parse-type")
2141 (version "0.4.2")
2142 (source
2143 (origin
2144 (method url-fetch)
2145 (uri (pypi-uri "parse_type" version))
2146 (sha256
2147 (base32
2148 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2149 (build-system python-build-system)
2150 (propagated-inputs
2151 `(("python-six" ,python-six)
2152 ("python-parse" ,python-parse)))
2153 (native-inputs
2154 `(("python-pytest" ,python-pytest)
2155 ("python-pytest-runner" ,python-pytest-runner)))
2156 (home-page "https://github.com/jenisys/parse_type")
2157 (synopsis "Extended parse module")
2158 (description
2159 "Parse_type extends the python parse module.")
2160 (properties
2161 `((python2-variant . ,(delay python2-parse-type))))
2162 (license license:bsd-3)))
2163
2164 (define-public python2-parse-type
2165 (let ((base (package-with-python2
2166 (strip-python2-variant python-parse-type))))
2167 (package (inherit base)
2168 (propagated-inputs
2169 `(("python2-enum34" ,python2-enum34)
2170 ,@(package-propagated-inputs base))))))
2171
2172 (define-public python-parse
2173 (package
2174 (name "python-parse")
2175 (version "1.18.0")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (pypi-uri "parse" version))
2180 (sha256
2181 (base32
2182 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2183 (build-system python-build-system)
2184 (arguments
2185 `(#:phases
2186 (modify-phases %standard-phases
2187 (replace 'check
2188 (lambda _ (invoke "python" "test_parse.py"))))))
2189 (home-page "https://github.com/r1chardj0n3s/parse")
2190 (synopsis "Parse strings")
2191 (description
2192 "Parse strings using a specification based on the Python @code{format()}
2193 syntax.")
2194 (license license:x11)))
2195
2196 (define-public python-polib
2197 (package
2198 (name "python-polib")
2199 (version "1.0.8")
2200 (source (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "polib" version))
2203 (sha256
2204 (base32
2205 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2206 (build-system python-build-system)
2207 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2208 (synopsis "Manipulate, create and modify gettext files")
2209 (description "Polib can manipulate any gettext format (po, pot and mo)
2210 files. It can be used to create po files from scratch or to modify
2211 existing ones.")
2212 (license license:expat)))
2213
2214 (define-public python2-polib
2215 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2216 (package
2217 (inherit base)
2218 (arguments `(,@(package-arguments base)
2219 ;; Tests don't work with python2.
2220 #:tests? #f)))))
2221
2222 (define-public python-poyo
2223 (package
2224 (name "python-poyo")
2225 (version "0.5.0")
2226 (source
2227 (origin
2228 (method url-fetch)
2229 (uri (pypi-uri "poyo" version))
2230 (sha256
2231 (base32
2232 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2233 (build-system python-build-system)
2234 (home-page "https://github.com/hackebrot/poyo")
2235 (synopsis "Lightweight YAML Parser for Python")
2236 (description
2237 "This package provides a lightweight YAML Parser for Python. It supports
2238 only a chosen subset of the YAML format that is required to parse cookiecutter
2239 user configuration files. It does not have support for serializing into YAML
2240 and is not compatible with JSON.")
2241 (license license:expat)))
2242
2243 (define-public scons
2244 (package
2245 (name "scons")
2246 (version "3.0.4")
2247 (source (origin
2248 (method git-fetch)
2249 (uri (git-reference
2250 (url "https://github.com/SCons/scons")
2251 (commit version)))
2252 (file-name (git-file-name name version))
2253 (sha256
2254 (base32
2255 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:use-setuptools? #f ; still relies on distutils
2259 #:tests? #f ; no 'python setup.py test' command
2260 #:phases
2261 (modify-phases %standard-phases
2262 (add-before 'build 'bootstrap
2263 (lambda _
2264 (substitute* "src/engine/SCons/compat/__init__.py"
2265 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2266 "sys.modules[new] = __import__(old)"))
2267 (substitute* "src/engine/SCons/Platform/__init__.py"
2268 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2269 "mod = __import__(full_name)"))
2270 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2271 (chdir "build/scons")
2272 #t)))))
2273 (home-page "https://scons.org/")
2274 (synopsis "Software construction tool written in Python")
2275 (description
2276 "SCons is a software construction tool. Think of SCons as an improved,
2277 cross-platform substitute for the classic Make utility with integrated
2278 functionality similar to autoconf/automake and compiler caches such as ccache.
2279 In short, SCons is an easier, more reliable and faster way to build
2280 software.")
2281 (license license:x11)))
2282
2283 (define-public scons-python2
2284 (package
2285 (inherit (package-with-python2 scons))
2286 (name "scons-python2")))
2287
2288 (define-public python-extras
2289 (package
2290 (name "python-extras")
2291 (version "1.0.0")
2292 (source
2293 (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "extras" version))
2296 (sha256
2297 (base32
2298 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2299 (build-system python-build-system)
2300 (arguments
2301 ;; FIXME: Circular dependency on testtools.
2302 '(#:tests? #f))
2303 (home-page "https://github.com/testing-cabal/extras")
2304 (synopsis "Useful extensions to the Python standard library")
2305 (description
2306 "Extras is a set of extensions to the Python standard library.")
2307 (license license:expat)))
2308
2309 (define-public python2-extras
2310 (package-with-python2 python-extras))
2311
2312 (define-public python-mimeparse
2313 (package
2314 (name "python-mimeparse")
2315 (version "1.6.0")
2316 (source
2317 (origin
2318 (method url-fetch)
2319 (uri (pypi-uri "python-mimeparse" version))
2320 (sha256
2321 (base32
2322 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2323 (build-system python-build-system)
2324 (arguments
2325 '(#:phases
2326 (modify-phases %standard-phases
2327 (replace 'check
2328 (lambda _
2329 (invoke "./mimeparse_test.py"))))))
2330 (home-page
2331 "https://github.com/dbtsai/python-mimeparse")
2332 (synopsis "Python library for parsing MIME types")
2333 (description
2334 "Mimeparse provides basic functions for parsing MIME type names and
2335 matching them against a list of media-ranges.")
2336 (license license:expat)))
2337
2338 (define-public python2-mimeparse
2339 (package-with-python2 python-mimeparse))
2340
2341 (define-public python-miniboa
2342 (package
2343 (name "python-miniboa")
2344 (version "1.0.7")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "miniboa" version))
2349 (sha256
2350 (base32
2351 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2352 (build-system python-build-system)
2353 (home-page "https://github.com/shmup/miniboa")
2354 (synopsis "Simple, single-threaded Telnet server")
2355 (description
2356 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2357 server.")
2358 (license license:asl2.0)))
2359
2360 (define-public python2-miniboa
2361 (package-with-python2 python-miniboa))
2362
2363 (define-public python-pafy
2364 (package
2365 (name "python-pafy")
2366 (version "0.5.3.1")
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "pafy" version))
2371 (sha256
2372 (base32
2373 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2374 (build-system python-build-system)
2375 (arguments
2376 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2377 (propagated-inputs
2378 ;; Youtube-dl is a python package which is imported in the file
2379 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2380 `(("youtube-dl" ,youtube-dl)))
2381 (home-page "https://np1.github.io/pafy/")
2382 (synopsis "Retrieve YouTube content and metadata")
2383 (description
2384 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2385 (license license:lgpl3+)))
2386
2387 (define-public python2-funcsigs
2388 (package
2389 (name "python2-funcsigs")
2390 (version "1.0.2")
2391 (source (origin
2392 (method url-fetch)
2393 (uri (pypi-uri "funcsigs" version))
2394 (sha256
2395 (base32
2396 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2397 (build-system python-build-system)
2398 (arguments
2399 `(#:python ,python-2))
2400 (native-inputs
2401 `(("python2-unittest2" ,python2-unittest2)))
2402 (home-page "http://funcsigs.readthedocs.org")
2403 (synopsis "Python function signatures from PEP362")
2404 (description
2405 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2406 (license license:asl2.0)))
2407
2408 (define-public python2-funcsigs-bootstrap
2409 (package
2410 (inherit python2-funcsigs)
2411 (name "python2-funcsigs-bootstrap")
2412 (native-inputs `())
2413 (arguments
2414 `(#:tests? #f
2415 ,@(package-arguments python2-funcsigs)))))
2416
2417 (define-public python-py
2418 (package
2419 (name "python-py")
2420 (version "1.8.1")
2421 (source
2422 (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "py" version))
2425 (sha256
2426 (base32
2427 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2428 (build-system python-build-system)
2429 (arguments
2430 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2431 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2432 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2433 ;; Is this module globally installed?"
2434 '(#:tests? #f))
2435 (native-inputs
2436 `(("python-setuptools-scm" ,python-setuptools-scm)))
2437 (home-page "https://github.com/pytest-dev/py")
2438 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2439 (description
2440 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2441 code introspection, and logging.")
2442 (license license:expat)))
2443
2444 (define-public python-py-next
2445 (package
2446 (inherit python-py)
2447 (version "1.9.0")
2448 (source
2449 (origin
2450 (method url-fetch)
2451 (uri (pypi-uri "py" version))
2452 (sha256
2453 (base32
2454 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2455
2456 (define-public python2-py
2457 (package-with-python2 python-py))
2458
2459 ;; Recent versions of python-fixtures and python-testrepository need
2460 ;; python-pbr for packaging, which itself needs these two packages for
2461 ;; testing.
2462 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2463 ;; same source, just without any test dependencies and with tests disabled.
2464 ;; python-pbr-minmal is then used to package python-fixtures and
2465 ;; python-testrepository.
2466 ;; Strictly speaking we currently could remove the test-requirements from the
2467 ;; normal python-pbr package (and save this package) since test are disabled
2468 ;; there anyway. But this may change in future.
2469 (define-public python-pbr-minimal
2470 (package
2471 (name "python-pbr-minimal")
2472 (version "3.0.1")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "pbr" version))
2477 (sha256
2478 (base32
2479 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2480 (build-system python-build-system)
2481 (arguments
2482 `(#:tests? #f))
2483 (home-page "https://docs.openstack.org/pbr/latest/")
2484 (synopsis "Minimal build of python-pbr used for bootstrapping")
2485 (description
2486 "Used only for bootstrapping python2-pbr, you should not need this.")
2487 (license license:asl2.0)))
2488
2489 (define-public python2-pbr-minimal
2490 (package-with-python2 python-pbr-minimal))
2491
2492 (define-public python-pbr
2493 (package
2494 (inherit python-pbr-minimal)
2495 (name "python-pbr")
2496 (arguments
2497 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2498 (propagated-inputs
2499 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2500 (native-inputs
2501 `(("python-fixtures" ,python-fixtures-bootstrap)
2502 ;; discover, coverage, hacking, subunit
2503 ("python-mock" ,python-mock)
2504 ("python-six" ,python-six)
2505 ("python-sphinx" ,python-sphinx)
2506 ("python-testrepository" ,python-testrepository-bootstrap)
2507 ("python-testresources" ,python-testresources-bootstrap)
2508 ("python-testscenarios" ,python-testscenarios-bootstrap)
2509 ("python-testtools" ,python-testtools-bootstrap)
2510 ("python-virtualenv" ,python-virtualenv)))
2511 (synopsis "Enhance the default behavior of Python’s setuptools")
2512 (description
2513 "Python Build Reasonableness (PBR) is a library that injects some useful
2514 and sensible default behaviors into your setuptools run. It will set
2515 versions, process requirements files and generate AUTHORS and ChangeLog file
2516 from git information.
2517 ")))
2518
2519 (define-public python2-pbr
2520 (package-with-python2 python-pbr))
2521
2522 (define-public python-pyrsistent
2523 (package
2524 (name "python-pyrsistent")
2525 (version "0.16.0")
2526 (home-page "https://github.com/tobgu/pyrsistent")
2527 (source (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "pyrsistent" version))
2530 (sha256
2531 (base32
2532 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2533 (build-system python-build-system)
2534 (arguments
2535 '(#:phases (modify-phases %standard-phases
2536 ;; The package works fine with newer Pytest and Hypothesis, but
2537 ;; has pinned older versions to stay compatible with Python 2.
2538 (add-before 'check 'loosen-pytest-requirement
2539 (lambda _
2540 (substitute* "setup.py"
2541 (("pytest<5") "pytest")
2542 (("hypothesis<5") "hypothesis"))
2543 #t)))))
2544 (native-inputs
2545 `(("python-hypothesis" ,python-hypothesis)
2546 ("python-pytest" ,python-pytest)
2547 ("python-pytest-runner" ,python-pytest-runner)))
2548 (propagated-inputs
2549 `(("python-six" ,python-six)))
2550 (synopsis "Persistent data structures for Python")
2551 (description
2552 "Pyrsistent is a number of persistent collections (by some referred to as
2553 functional data structures). Persistent in the sense that they are immutable.
2554
2555 All methods on a data structure that would normally mutate it instead return a
2556 new copy of the structure containing the requested updates. The original
2557 structure is left untouched.")
2558 (license license:expat)))
2559
2560 (define-public python2-pyrsistent
2561 (package-with-python2 python-pyrsistent))
2562
2563 (define-public python-exif-read
2564 (package
2565 (name "python-exif-read")
2566 (version "2.1.2")
2567 (source (origin
2568 (method url-fetch)
2569 (uri (pypi-uri "ExifRead" version))
2570 (sha256
2571 (base32
2572 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2573 (build-system python-build-system)
2574 (arguments `(#:tests? #f)) ; no tests
2575 (home-page "https://github.com/ianare/exif-py")
2576 (synopsis "Python library to extract EXIF data from image files")
2577 (description
2578 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2579 files.")
2580 (license license:bsd-3)))
2581
2582 (define-public python2-exif-read
2583 (package-with-python2 python-exif-read))
2584
2585 (define-public python-pyld
2586 (package
2587 (name "python-pyld")
2588 (version "1.0.5")
2589 (source (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "PyLD" version))
2592 (sha256
2593 (base32
2594 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2595 (build-system python-build-system)
2596 (home-page "https://github.com/digitalbazaar/pyld")
2597 (synopsis "Python implementation of the JSON-LD specification")
2598 (description
2599 "PyLD is an implementation of the JSON-LD specification.")
2600 (license license:bsd-3)))
2601
2602 (define-public python2-pyld
2603 (package-with-python2 python-pyld))
2604
2605 (define-public python-cli-helpers
2606 (package
2607 (name "python-cli-helpers")
2608 (version "2.0.1")
2609 (source
2610 (origin
2611 ;; There's no source tarball on PyPI.
2612 (method git-fetch)
2613 (uri (git-reference
2614 (url "https://github.com/dbcli/cli_helpers")
2615 (commit (string-append "v" version))))
2616 (file-name (git-file-name name version))
2617 (sha256
2618 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2619 (build-system python-build-system)
2620 (native-inputs
2621 `(("python-pytest" ,python-pytest)))
2622 (propagated-inputs
2623 `(("python-wcwidth" ,python-wcwidth)
2624 ("python-configobj" ,python-configobj)
2625 ("python-tabulate" ,python-tabulate)
2626 ("python-terminaltables" ,python-terminaltables)))
2627 (home-page "https://github.com/dbcli/cli_helpers")
2628 (synopsis "Helpers for building command-line apps")
2629 (description
2630 "CLI Helpers is a Python package that makes it easy to perform common
2631 tasks when building command-line apps. It's a helper library for command-line
2632 interfaces.")
2633 (license license:bsd-3)))
2634
2635 (define-public python-click
2636 (package
2637 (name "python-click")
2638 (version "7.1.2")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "click" version))
2643 (sha256
2644 (base32
2645 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2646 (build-system python-build-system)
2647 (arguments
2648 `(#:phases
2649 (modify-phases %standard-phases
2650 (add-after 'unpack 'fix-paths
2651 (lambda* (#:key inputs #:allow-other-keys)
2652 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2653 "cross-libc" "libc"))))
2654 (substitute* "src/click/_unicodefun.py"
2655 (("'locale'")
2656 (string-append "'" glibc "/bin/locale'"))))
2657 #t))
2658 (replace 'check
2659 (lambda _
2660 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2661 (invoke "python" "-m" "pytest"))))))
2662 (native-inputs
2663 `(("python-pytest" ,python-pytest)))
2664 (home-page "https://palletsprojects.com/p/click/")
2665 (synopsis "Command line library for Python")
2666 (description
2667 "Click is a Python package for creating command line interfaces in a
2668 composable way with as little code as necessary. Its name stands for
2669 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2670 with sensible defaults out of the box.")
2671 (license license:bsd-3)))
2672
2673 (define-public python2-click
2674 (package-with-python2 python-click))
2675
2676 (define-public python-click-5
2677 (package (inherit python-click)
2678 (name "python-click")
2679 (version "5.1")
2680 (source
2681 (origin
2682 (method url-fetch)
2683 (uri (pypi-uri "click" version))
2684 (sha256
2685 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2686 (arguments `())))
2687
2688 (define-public python-wheel
2689 (package
2690 (name "python-wheel")
2691 (version "0.33.6")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "wheel" version))
2696 (sha256
2697 (base32
2698 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2699 (build-system python-build-system)
2700 (arguments
2701 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2702 ;; fails to find the newly-built bdist_wheel library, even though it is
2703 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2704 '(#:tests? #f))
2705 (home-page "https://bitbucket.org/pypa/wheel/")
2706 (synopsis "Format for built Python packages")
2707 (description
2708 "A wheel is a ZIP-format archive with a specially formatted filename and
2709 the @code{.whl} extension. It is designed to contain all the files for a PEP
2710 376 compatible install in a way that is very close to the on-disk format. Many
2711 packages will be properly installed with only the @code{Unpack} step and the
2712 unpacked archive preserves enough information to @code{Spread} (copy data and
2713 scripts to their final locations) at any later time. Wheel files can be
2714 installed with a newer @code{pip} or with wheel's own command line utility.")
2715 (license license:expat)))
2716
2717 (define-public python2-wheel
2718 (package-with-python2 python-wheel))
2719
2720 (define-public python-vcversioner
2721 (package
2722 (name "python-vcversioner")
2723 (version "2.16.0.0")
2724 (source
2725 (origin
2726 (method url-fetch)
2727 (uri (pypi-uri "vcversioner" version))
2728 (sha256
2729 (base32
2730 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2731 (build-system python-build-system)
2732 (synopsis "Python library for version number discovery")
2733 (description "Vcversioner is a Python library that inspects tagging
2734 information in a variety of version control systems in order to discover
2735 version numbers.")
2736 (home-page "https://github.com/habnabit/vcversioner")
2737 (license license:isc)))
2738
2739 (define-public python2-vcversioner
2740 (package-with-python2 python-vcversioner))
2741
2742 (define-public python-jdcal
2743 (package
2744 (name "python-jdcal")
2745 (version "1.4")
2746 (source
2747 (origin
2748 (method url-fetch)
2749 (uri (pypi-uri "jdcal" version))
2750 (sha256
2751 (base32
2752 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2753 (build-system python-build-system)
2754 (arguments
2755 `(#:phases (modify-phases %standard-phases
2756 (replace 'check
2757 (lambda _
2758 (invoke "pytest"))))))
2759 (native-inputs
2760 `(("python-pytest" ,python-pytest)))
2761 (home-page "https://github.com/phn/jdcal")
2762 (synopsis "Functions to convert between Julian dates Gregorian dates")
2763 (description "This Python library provides functions for converting
2764 between Julian dates and Gregorian dates.")
2765 (license license:bsd-2)))
2766
2767 (define-public python2-jdcal
2768 (package-with-python2 python-jdcal))
2769
2770 (define-public python-jsondiff
2771 (package
2772 (name "python-jsondiff")
2773 (version "1.2.0")
2774 (source
2775 (origin
2776 (method url-fetch)
2777 (uri (pypi-uri "jsondiff" version))
2778 (sha256
2779 (base32
2780 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2781 (build-system python-build-system)
2782 (native-inputs
2783 `(("python-nose" ,python-nose)
2784 ("python-nose-random" ,python-nose-random)))
2785 (home-page
2786 "https://github.com/fzumstein/jsondiff")
2787 (synopsis "Compare JSON and JSON-like structures in Python")
2788 (description "@code{jsondiff} is a Python library which lets you
2789 compare, diff, and patch JSON and JSON-like structures in Python.")
2790 (license license:expat)))
2791
2792 (define-public python-jsonschema
2793 (package
2794 (name "python-jsonschema")
2795 (version "3.2.0")
2796 (source (origin
2797 (method url-fetch)
2798 (uri (pypi-uri "jsonschema" version))
2799 (sha256
2800 (base32
2801 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2802 (build-system python-build-system)
2803 (arguments
2804 '(#:phases
2805 (modify-phases %standard-phases
2806 (replace 'check
2807 (lambda* (#:key inputs outputs #:allow-other-keys)
2808 (add-installed-pythonpath inputs outputs)
2809 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2810 (invoke "trial" "jsonschema"))))))
2811 (native-inputs
2812 `(("python-setuptools_scm" ,python-setuptools-scm)
2813 ("python-twisted" ,python-twisted)))
2814 (propagated-inputs
2815 `(("python-attrs" ,python-attrs)
2816 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2817 ("python-pyrsistent" ,python-pyrsistent)
2818 ("python-six" ,python-six)))
2819 (home-page "https://github.com/Julian/jsonschema")
2820 (synopsis "Implementation of JSON Schema for Python")
2821 (description
2822 "Jsonschema is an implementation of JSON Schema for Python.")
2823 (license license:expat)
2824 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2825
2826 (define-public python2-jsonschema
2827 (let ((jsonschema (package-with-python2
2828 (strip-python2-variant python-jsonschema))))
2829 (package (inherit jsonschema)
2830 (propagated-inputs
2831 `(("python2-functools32" ,python2-functools32)
2832 ,@(package-propagated-inputs jsonschema))))))
2833
2834 (define-public python-schema
2835 (package
2836 (name "python-schema")
2837 (version "0.6.6")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "schema" version))
2842 (sha256
2843 (base32
2844 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2845 (build-system python-build-system)
2846 (native-inputs
2847 `(("python-pytest" ,python-pytest)))
2848 (home-page "https://github.com/keleshev/schema")
2849 (synopsis "Simple data validation library")
2850 (description
2851 "@code{python-schema} is a library for validating Python data
2852 structures, such as those obtained from config-files, forms, external
2853 services or command-line parsing, converted from JSON/YAML (or
2854 something else) to Python data-types.")
2855 (license license:psfl)))
2856
2857 (define-public python2-schema
2858 (package-with-python2 python-schema))
2859
2860 (define-public python-schema-0.5
2861 (package (inherit python-schema)
2862 (version "0.5.0")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "schema" version))
2867 (sha256
2868 (base32
2869 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2870
2871 (define-public python2-schema-0.5
2872 (package-with-python2 python-schema-0.5))
2873
2874 (define-public python-kitchen
2875 (package
2876 (name "python-kitchen")
2877 (version "1.2.5")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "kitchen" version))
2882 (sha256
2883 (base32
2884 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2885 (build-system python-build-system)
2886 (propagated-inputs
2887 `(("python-chardet" ,python-chardet)))
2888 (home-page "https://github.com/fedora-infra/kitchen")
2889 (synopsis "Python API for snippets")
2890 (description "@code{kitchen} module provides a python API for all sorts of
2891 little useful snippets of code that everybody ends up writing for their projects
2892 but never seem big enough to build an independent release. Use kitchen and stop
2893 cutting and pasting that code over and over.")
2894 (license (list license:lgpl2.1+
2895 ;; subprocess.py, test_subprocess.py,
2896 ;; kitchen/pycompat25/defaultdict.py:
2897 license:psfl))))
2898
2899 (define-public python2-kitchen
2900 (package-with-python2 python-kitchen))
2901
2902 (define-public python-unidecode
2903 (package
2904 (name "python-unidecode")
2905 (version "1.1.1")
2906 (source (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "Unidecode" version))
2909 (sha256
2910 (base32
2911 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2912 (build-system python-build-system)
2913 (home-page "https://pypi.org/project/Unidecode/")
2914 (synopsis "ASCII transliterations of Unicode text")
2915 (description
2916 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2917 useful when integrating with legacy code that doesn't support Unicode, or for
2918 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2919 machine identifiers from human-readable Unicode strings that should still be
2920 somewhat intelligible.")
2921 (license license:gpl2+)))
2922
2923 (define-public python2-unidecode
2924 (package-with-python2 python-unidecode))
2925
2926 (define-public python-text-unidecode
2927 (package
2928 (name "python-text-unidecode")
2929 (version "1.3")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "text-unidecode" version))
2933 (sha256
2934 (base32
2935 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2936 (build-system python-build-system)
2937 (arguments
2938 '(#:phases (modify-phases %standard-phases
2939 (replace 'check
2940 (lambda _
2941 (setenv "PYTHONPATH"
2942 (string-append "./build/lib:"
2943 (getenv "PYTHONPATH")))
2944 (invoke "pytest" "-vv"))))))
2945 (native-inputs
2946 `(("python-pytest" ,python-pytest)))
2947 (home-page "https://github.com/kmike/text-unidecode/")
2948 (synopsis "Decode Unicode data")
2949 (description
2950 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2951 Perl library. It can create ASCII representations of Unicode data. In general
2952 users should prefer the @code{python-unidecode} package which offers better
2953 memory usage and transliteration quality.")
2954 ;; The user can choose either license.
2955 (license (list license:clarified-artistic license:gpl2+))))
2956
2957 (define-public python2-text-unidecode
2958 (package-with-python2 python-text-unidecode))
2959
2960 (define-public python-pyjwt
2961 (package
2962 (name "python-pyjwt")
2963 (version "1.7.1")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "PyJWT" version))
2968 (sha256
2969 (base32
2970 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2971 (modules '((guix build utils)))
2972 (snippet
2973 '(begin
2974 (for-each delete-file-recursively
2975 (find-files "." "\\.pyc$"))
2976 #t))))
2977 (build-system python-build-system)
2978 (arguments
2979 '(#:phases (modify-phases %standard-phases
2980 (replace 'check
2981 (lambda _
2982 ;; Mimic upstream commit 3a20892442b34c7 to get
2983 ;; rid of dependency on pytest-runner < 5.0.
2984 ;; Remove substitution for PyJWT > 1.7.1.
2985 (substitute* "setup.py"
2986 ((".*pytest-runner.*")
2987 ""))
2988 (invoke "pytest" "-vv"))))))
2989 (native-inputs
2990 `(("python-pytest" ,python-pytest)
2991 ("python-pytest-cov" ,python-pytest-cov)))
2992 (home-page "https://github.com/progrium/pyjwt")
2993 (synopsis "JSON Web Token implementation in Python")
2994 (description
2995 "PyJWT is a JSON Web Token implementation written in Python.")
2996 (license license:expat)))
2997
2998 (define-public python2-pyjwt
2999 (package-with-python2 python-pyjwt))
3000
3001 (define-public python-pykka
3002 (package
3003 (name "python-pykka")
3004 (version "1.2.1")
3005 (source
3006 (origin
3007 (method url-fetch)
3008 (uri (pypi-uri "Pykka" version))
3009 (sha256
3010 (base32
3011 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3012 (build-system python-build-system)
3013 (native-inputs
3014 `(("python-mock" ,python-mock)
3015 ("python-nose" ,python-nose)
3016 ("python-gevent" ,python-gevent)
3017 ("python-eventlet" ,python-eventlet)))
3018 (home-page "https://www.pykka.org/")
3019 (synopsis "Pykka is a Python implementation of the actor model")
3020 (description
3021 "Pykka is a Python implementation of the actor model.
3022 The actor model introduces some simple rules to control the sharing
3023 of state and cooperation between execution units, which makes it
3024 easier to build concurrent applications.")
3025 (license license:asl2.0)))
3026
3027 (define-public python2-pykka
3028 (package-with-python2 python-pykka))
3029
3030 (define-public python-pymsgbox
3031 (package
3032 (name "python-pymsgbox")
3033 (version "1.0.6")
3034 (source
3035 (origin
3036 (method git-fetch)
3037 (uri (git-reference
3038 ;; LICENSE.txt is not present on pypi
3039 (url "https://github.com/asweigart/PyMsgBox")
3040 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3041 (file-name (git-file-name name version))
3042 (sha256
3043 (base32
3044 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3045 (arguments
3046 ;; Circular dependency to run tests:
3047 ;; Tests need pyautogui, which depends on pymsgbox.
3048 '(#:tests? #f))
3049 (build-system python-build-system)
3050 (home-page "https://github.com/asweigart/PyMsgBox")
3051 (synopsis "Python module for JavaScript-like message boxes")
3052 (description
3053 "PyMsgBox is a simple, cross-platform, pure Python module for
3054 JavaScript-like message boxes. Types of dialog boxes include:
3055 @enumerate
3056 @item alert
3057 @item confirm
3058 @item prompt
3059 @item password
3060 @end enumerate
3061 ")
3062 (license license:bsd-3)))
3063
3064 (define-public python-pympler
3065 (package
3066 (name "python-pympler")
3067 (home-page "https://pythonhosted.org/Pympler/")
3068 (version "0.8")
3069 (source (origin
3070 (method url-fetch)
3071 (uri (pypi-uri "Pympler" version))
3072 (sha256
3073 (base32
3074 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3075 (build-system python-build-system)
3076 (arguments
3077 `(#:phases (modify-phases %standard-phases
3078 (delete 'check)
3079 (add-after 'install 'check
3080 (lambda* (#:key inputs outputs #:allow-other-keys)
3081 (add-installed-pythonpath inputs outputs)
3082 (invoke "python" "setup.py" "test"))))))
3083 (synopsis "Measure, monitor and analyze memory behavior")
3084 (description
3085 "Pympler is a development tool to measure, monitor and analyze
3086 the memory behavior of Python objects in a running Python application.
3087
3088 By pympling a Python application, detailed insight in the size and the
3089 lifetime of Python objects can be obtained. Undesirable or unexpected
3090 runtime behavior like memory bloat and other @samp{pymples} can easily
3091 be identified.
3092
3093 A web profiling frontend exposes process statistics, garbage
3094 visualisation and class tracker statistics.")
3095 (license license:asl2.0)))
3096
3097 (define-public python2-pympler
3098 (package-with-python2 python-pympler))
3099
3100 (define-public python-itsdangerous
3101 (package
3102 (name "python-itsdangerous")
3103 (version "1.1.0")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "itsdangerous" version))
3108 (sha256
3109 (base32
3110 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3111 (build-system python-build-system)
3112 (home-page "https://palletsprojects.com/p/itsdangerous/")
3113 (synopsis "Python library for passing data to/from untrusted environments")
3114 (description
3115 "Itsdangerous provides various helpers to pass trusted data to untrusted
3116 environments and back.")
3117 (license license:bsd-3)))
3118
3119 (define-public python2-itsdangerous
3120 (package-with-python2 python-itsdangerous))
3121
3122 (define-public python-pyyaml
3123 (package
3124 (name "python-pyyaml")
3125 (version "5.3.1")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "PyYAML" version))
3130 (sha256
3131 (base32
3132 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3133 (build-system python-build-system)
3134 (inputs
3135 `(("libyaml" ,libyaml)))
3136 (home-page "https://pyyaml.org")
3137 (synopsis "YAML parser and emitter for Python")
3138 (description
3139 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3140 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3141 API, and sensible error messages. PyYAML supports standard YAML tags and
3142 provides Python-specific tags that represent an arbitrary Python object.")
3143 (license license:expat)))
3144
3145 (define-public python2-pyyaml
3146 (package-with-python2 python-pyyaml))
3147
3148 (define-public python-vine
3149 (package
3150 (name "python-vine")
3151 (version "1.1.4")
3152 (source
3153 (origin
3154 (method url-fetch)
3155 (uri (pypi-uri "vine" version))
3156 (sha256
3157 (base32
3158 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3159 (build-system python-build-system)
3160 (native-inputs
3161 `(("python-pytest" ,python-pytest)
3162 ("python-case" ,python-case)))
3163 (home-page "https://github.com/celery/vine")
3164 (synopsis "Promises for Python")
3165 (description
3166 "@code{vine} provides a special implementation of promises in that it can
3167 be used both for \"promise of a value\" and lazy evaluation. The biggest
3168 upside for this is that everything in a promise can also be a promise,
3169 e.g. filters, callbacks and errbacks can all be promises.")
3170 (license license:bsd-3)))
3171
3172 (define-public python-virtualenv
3173 (package
3174 (name "python-virtualenv")
3175 (version "20.2.1")
3176 (source
3177 (origin
3178 (method url-fetch)
3179 (uri (pypi-uri "virtualenv" version))
3180 (sha256
3181 (base32
3182 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3183 (build-system python-build-system)
3184 (native-inputs
3185 `(("python-mock" ,python-mock)
3186 ("python-pytest" ,python-pytest)
3187 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3188 ;; be an input at all". However, removing the input makes the build error:
3189 ;; File "setup.py", line 4, in <module>
3190 ;; raise RuntimeError("setuptools >= 41 required to build")
3191 ("python-setuptools" ,python-setuptools)
3192 ("python-setuptools-scm" ,python-setuptools-scm)))
3193 (propagated-inputs
3194 `(("python-appdirs" ,python-appdirs)
3195 ("python-distlib" ,python-distlib/next)
3196 ("python-filelock" ,python-filelock)
3197 ("python-six" ,python-six)
3198 ("python-importlib-metadata" ,python-importlib-metadata)))
3199 (home-page "https://virtualenv.pypa.io/")
3200 (synopsis "Virtual Python environment builder")
3201 (description
3202 "Virtualenv is a tool to create isolated Python environments.")
3203 (properties `((python2-variant . ,(delay python2-virtualenv))))
3204 (license license:expat)))
3205
3206 (define-public python2-virtualenv
3207 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3208 (package
3209 (inherit base)
3210 (arguments
3211 `(#:python ,python-2
3212 #:phases
3213 (modify-phases %standard-phases
3214 (add-after 'set-paths 'adjust-PYTHONPATH
3215 (lambda* (#:key inputs #:allow-other-keys)
3216 (let* ((python (assoc-ref inputs "python"))
3217 (python-sitedir (string-append python "/lib/python2.7"
3218 "/site-packages")))
3219 ;; XXX: 'python2' always comes first on PYTHONPATH
3220 ;; and shadows the 'setuptools' input. Move python2
3221 ;; last: this should be fixed in python-build-system
3222 ;; in a future rebuild cycle.
3223 (setenv "PYTHONPATH"
3224 (string-append (string-join (delete python-sitedir
3225 (string-split
3226 (getenv "PYTHONPATH")
3227 #\:))
3228 ":")
3229 ":" python-sitedir))
3230 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3231 (getenv "PYTHONPATH"))
3232 #t))))))
3233 (propagated-inputs
3234 `(("python-contextlib2" ,python2-contextlib2)
3235 ,@(package-propagated-inputs base))))))
3236
3237 (define-public python-markupsafe
3238 (package
3239 (name "python-markupsafe")
3240 (version "1.1.1")
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "MarkupSafe" version))
3245 (sha256
3246 (base32
3247 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3248 (build-system python-build-system)
3249 (arguments
3250 `(#:modules ((ice-9 ftw)
3251 (srfi srfi-1)
3252 (srfi srfi-26)
3253 (guix build utils)
3254 (guix build python-build-system))
3255 #:phases (modify-phases %standard-phases
3256 (replace 'check
3257 (lambda _
3258 (let ((cwd (getcwd))
3259 (libdir (find (cut string-prefix? "lib." <>)
3260 (scandir "build"))))
3261 (setenv "PYTHONPATH"
3262 (string-append cwd "/build/" libdir ":"
3263 (getenv "PYTHONPATH")))
3264 (invoke "pytest" "-vv")))))))
3265 (native-inputs
3266 `(("python-pytest" ,python-pytest)))
3267 (home-page "https://github.com/mitsuhiko/markupsafe")
3268 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3269 (description
3270 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3271 for Python.")
3272 (license license:bsd-3)))
3273
3274 (define-public python2-markupsafe
3275 (package-with-python2 python-markupsafe))
3276
3277 (define-public python-jinja2
3278 (package
3279 (name "python-jinja2")
3280 (version "2.11.2")
3281 (source
3282 (origin
3283 (method url-fetch)
3284 (uri (pypi-uri "Jinja2" version))
3285 (sha256
3286 (base32
3287 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3288 (build-system python-build-system)
3289 (arguments
3290 '(#:phases (modify-phases %standard-phases
3291 (replace 'check
3292 (lambda* (#:key tests? #:allow-other-keys)
3293 (if tests?
3294 (begin
3295 (setenv "PYTHONPATH"
3296 (string-append "./build/lib:"
3297 (getenv "PYTHONPATH")))
3298 (invoke "pytest" "-vv"))
3299 (format #t "test suite not run~%"))
3300 #t)))))
3301 (native-inputs
3302 `(("python-pytest" ,python-pytest)))
3303 (propagated-inputs
3304 `(("python-markupsafe" ,python-markupsafe)))
3305 (home-page "http://jinja.pocoo.org/")
3306 (synopsis "Python template engine")
3307 (description
3308 "Jinja2 is a small but fast and easy to use stand-alone template engine
3309 written in pure Python.")
3310 (license license:bsd-3)))
3311
3312 (define-public python2-jinja2
3313 (package-with-python2 python-jinja2))
3314
3315 (define-public python-jinja2-time
3316 (package
3317 (name "python-jinja2-time")
3318 (version "0.2.0")
3319 (source
3320 (origin
3321 (method url-fetch)
3322 (uri (pypi-uri "jinja2-time" version))
3323 (sha256
3324 (base32
3325 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3326 (build-system python-build-system)
3327 (propagated-inputs
3328 `(("python-arrow" ,python-arrow)
3329 ("python-jinja2" ,python-jinja2)))
3330 (home-page
3331 "https://github.com/hackebrot/jinja2-time")
3332 (synopsis "Jinja2 Extension for Dates and Times")
3333 (description
3334 "This package provides an extension for the template engine Jinja2. It
3335 adds a 'now' tag providing a convenient access to the arrow.now() API from
3336 templates. A format string can be provided to control the output.")
3337 (license license:expat)))
3338
3339 (define-public python-pystache
3340 (package
3341 (name "python-pystache")
3342 (version "0.5.4")
3343 (source (origin
3344 (method url-fetch)
3345 (uri (pypi-uri "pystache" version))
3346 (sha256
3347 (base32
3348 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3349 (build-system python-build-system)
3350 (arguments
3351 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3352 (home-page "http://defunkt.io/pystache/")
3353 (synopsis "Python logic-less template engine")
3354 (description
3355 "Pystache is a Python implementation of the framework agnostic,
3356 logic-free templating system Mustache.")
3357 (license license:expat)
3358 (properties `((python2-variant . ,(delay python2-pystache))))))
3359
3360 (define-public python2-pystache
3361 (package (inherit (package-with-python2
3362 (strip-python2-variant python-pystache)))
3363 (arguments
3364 `(#:python ,python-2
3365 #:phases
3366 (modify-phases %standard-phases
3367 (replace 'check
3368 (lambda _
3369 (invoke "python" "test_pystache.py"))))))))
3370
3371 (define-public python-joblib
3372 (package
3373 (name "python-joblib")
3374 (version "0.14.1")
3375 (source (origin
3376 (method url-fetch)
3377 (uri (pypi-uri "joblib" version))
3378 (sha256
3379 (base32
3380 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3381 (build-system python-build-system)
3382 (arguments
3383 `(#:phases
3384 (modify-phases %standard-phases
3385 (replace 'check
3386 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3387 (native-inputs
3388 `(("python-pytest" ,python-pytest)))
3389 (home-page "https://joblib.readthedocs.io/")
3390 (synopsis "Using Python functions as pipeline jobs")
3391 (description
3392 "Joblib is a set of tools to provide lightweight pipelining in Python.
3393 In particular, joblib offers: transparent disk-caching of the output values
3394 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3395 logging and tracing of the execution.")
3396 (license license:bsd-3)))
3397
3398 (define-public python2-joblib
3399 (package-with-python2 python-joblib))
3400
3401 (define-public python-daemon
3402 (package
3403 (name "python-daemon")
3404 (version "2.2.3")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "python-daemon" version))
3409 (sha256
3410 (base32
3411 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3412 (build-system python-build-system)
3413 (arguments
3414 `(#:phases
3415 (modify-phases %standard-phases
3416 (add-before 'check 'disable-tests
3417 (lambda _
3418 ;; FIXME: Determine why test fails
3419 (substitute* "test/test_daemon.py"
3420 (("test_detaches_process_context")
3421 "skip_test_detaches_process_context"))
3422 #t)))))
3423 (propagated-inputs
3424 `(("python-lockfile" ,python-lockfile)))
3425 (native-inputs
3426 `(("python-unittest2" ,python-unittest2)
3427 ("python-testtools" ,python-testtools)
3428 ("python-testscenarios" ,python-testscenarios)
3429 ("python-mock" ,python-mock)
3430 ("python-docutils" ,python-docutils)))
3431 (home-page "https://pagure.io/python-daemon/")
3432 (synopsis "Python library for making a Unix daemon process")
3433 (description "Python-daemon is a library that assists a Python program to
3434 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3435
3436 This library provides a @code{DaemonContext} class that manages the following
3437 important tasks for becoming a daemon process:
3438 @enumerate
3439 @item Detach the process into its own process group.
3440 @item Set process environment appropriate for running inside a chroot.
3441 @item Renounce suid and sgid privileges.
3442 @item Close all open file descriptors.
3443 @item Change the working directory, uid, gid, and umask.
3444 @item Set appropriate signal handlers.
3445 @item Open new file descriptors for stdin, stdout, and stderr.
3446 @item Manage a specified PID lock file.
3447 @item Register cleanup functions for at-exit processing.
3448 @end enumerate")
3449 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3450 (license (list license:asl2.0 license:gpl3+))))
3451
3452 (define-public python-anytree
3453 (package
3454 (name "python-anytree")
3455 (version "2.8.0")
3456 (source (origin
3457 (method url-fetch)
3458 (uri (pypi-uri "anytree" version))
3459 (sha256
3460 (base32
3461 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3462 (build-system python-build-system)
3463 (propagated-inputs
3464 `(("python-six" ,python-six)))
3465 (native-inputs
3466 `(;; For tests.
3467 ("graphviz" ,graphviz) ;for 'dot'
3468 ("python-nose" ,python-nose)))
3469 (home-page "https://github.com/c0fec0de/anytree")
3470 (synopsis "Lightweight tree data library")
3471 (description
3472 "@code{anytree} is a simple, lightweight, and extensible tree data
3473 structure for Python.")
3474 (license license:asl2.0)))
3475
3476 (define-public python-docutils
3477 (package
3478 (name "python-docutils")
3479 (version "0.16")
3480 (source
3481 (origin
3482 (method url-fetch)
3483 (uri (pypi-uri "docutils" version))
3484 (sha256
3485 (base32
3486 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3487 (build-system python-build-system)
3488 (arguments
3489 '(#:phases (modify-phases %standard-phases
3490 (replace 'check
3491 (lambda* (#:key tests? #:allow-other-keys)
3492 (if tests?
3493 (invoke "python" "test/alltests.py")
3494 (format #t "test suite not run~%"))
3495 #t)))))
3496 (home-page "http://docutils.sourceforge.net/")
3497 (synopsis "Python Documentation Utilities")
3498 (description
3499 "Docutils is a modular system for processing documentation into useful
3500 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3501 easy to use markup language, for input.
3502
3503 This package provides tools for converting @file{.rst} files to other formats
3504 via commands such as @command{rst2man}, as well as supporting Python code.")
3505 ;; Most of the source code is public domain, but some source files are
3506 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3507 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3508
3509 (define-public python2-docutils
3510 (package-with-python2 python-docutils))
3511
3512 ;; python2-sphinx fails its test suite with newer versions.
3513 (define-public python2-docutils-0.14
3514 (package
3515 (inherit python2-docutils)
3516 (version "0.14")
3517 (source (origin
3518 (method url-fetch)
3519 (uri (pypi-uri "docutils" version))
3520 (sha256
3521 (base32
3522 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3523
3524 (define-public python-restructuredtext-lint
3525 (package
3526 (name "python-restructuredtext-lint")
3527 (version "1.3.0")
3528 (source
3529 (origin
3530 (method url-fetch)
3531 (uri (pypi-uri "restructuredtext-lint" version))
3532 (sha256
3533 (base32
3534 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3535 (build-system python-build-system)
3536 (arguments
3537 `(#:phases
3538 (modify-phases %standard-phases
3539 (delete 'check)
3540 (add-after 'install 'check
3541 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3542 (when tests?
3543 (add-installed-pythonpath inputs outputs)
3544 (invoke "nosetests" "-v"))
3545 #t)))))
3546 (propagated-inputs
3547 `(("python-docutils" ,python-docutils)))
3548 (native-inputs
3549 `(("python-nose" ,python-nose)))
3550 (home-page "https://github.com/twolfson/restructuredtext-lint")
3551 (synopsis "reStructuredText linter")
3552 (description "This package provides a linter for the reStructuredText
3553 format.")
3554 (license license:unlicense)))
3555
3556 (define-public python-doc8
3557 (package
3558 (name "python-doc8")
3559 (version "0.8.0")
3560 (source
3561 (origin
3562 (method url-fetch)
3563 (uri (pypi-uri "doc8" version))
3564 (sha256
3565 (base32
3566 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3567 (build-system python-build-system)
3568 (arguments
3569 `(#:phases
3570 (modify-phases %standard-phases
3571 (delete 'check)
3572 (add-after 'install 'check
3573 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3574 (when tests?
3575 (add-installed-pythonpath inputs outputs)
3576 (invoke "pytest" "-v"))
3577 #t)))))
3578 (propagated-inputs
3579 `(("python-chardet" ,python-chardet)
3580 ("python-docutils" ,python-docutils)
3581 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3582 ("python-six" ,python-six)
3583 ("python-stevedore" ,python-stevedore)))
3584 (native-inputs
3585 `(("python-testtools" ,python-testtools)
3586 ("python-pytest" ,python-pytest)))
3587 (home-page "https://launchpad.net/doc8")
3588 (synopsis
3589 "Style checker for Sphinx (or other) RST documentation")
3590 (description
3591 "Doc8 is an opinionated style checker for reStructured Text and plain
3592 text styles of documentation.")
3593 (license license:asl2.0)))
3594
3595 (define-public python-pygments
3596 (package
3597 (name "python-pygments")
3598 (version "2.6.1")
3599 (source
3600 (origin
3601 (method url-fetch)
3602 (uri (pypi-uri "Pygments" version))
3603 (sha256
3604 (base32
3605 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3606 (build-system python-build-system)
3607 (arguments
3608 ;; FIXME: Tests require sphinx, which depends on this.
3609 '(#:tests? #f))
3610 (home-page "https://pygments.org/")
3611 (synopsis "Syntax highlighting")
3612 (description
3613 "Pygments is a syntax highlighting package written in Python.")
3614 (license license:bsd-2)
3615 (properties `((python2-variant . ,(delay python2-pygments))))))
3616
3617 ;; Pygments 2.6 and later does not support Python 2.
3618 (define-public python2-pygments
3619 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3620 (package
3621 (inherit base)
3622 (version "2.5.2")
3623 (source (origin
3624 (method url-fetch)
3625 (uri (pypi-uri "Pygments" version))
3626 (sha256
3627 (base32
3628 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3629
3630 (define-public python-bumpversion
3631 (package
3632 (name "python-bumpversion")
3633 (version "0.5.3")
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "bumpversion" version))
3638 (sha256
3639 (base32
3640 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3641 (build-system python-build-system)
3642 (home-page "https://github.com/peritus/bumpversion")
3643 (synopsis "Tool to bump software version")
3644 (description "This tool provides a command-line interface (CLI) to bump a
3645 software version simply.")
3646 (license license:expat)))
3647
3648 (define-public python-deprecated
3649 (package
3650 (name "python-deprecated")
3651 (version "1.2.5")
3652 (source
3653 (origin
3654 (method git-fetch)
3655 (uri (git-reference
3656 (url "https://github.com/tantale/deprecated")
3657 (commit (string-append "v" version))))
3658 (file-name (git-file-name name version))
3659 (sha256
3660 (base32
3661 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3662 (build-system python-build-system)
3663 (arguments
3664 `(#:phases (modify-phases %standard-phases
3665 (replace 'check
3666 (lambda _
3667 (invoke "pytest"))))))
3668 (propagated-inputs
3669 `(("python-wrapt" ,python-wrapt)))
3670 (native-inputs
3671 `(("python-bumpversion" ,python-bumpversion)
3672 ("python-pytest" ,python-pytest)
3673 ("python-pytest-cov" ,python-pytest-cov)
3674 ("python-sphinx" ,python-sphinx)
3675 ("python-tox" ,python-tox)))
3676 (home-page "https://github.com/tantale/deprecated")
3677 (synopsis "Python decorator to deprecate classes, functions or methods")
3678 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3679 to deprecate classes, functions or methods.")
3680 (license license:expat)))
3681
3682 (define-public python-pygithub
3683 (package
3684 (name "python-pygithub")
3685 (version "1.43.8")
3686 (source
3687 ;; We fetch from the Git repo because there are no tests in the PyPI
3688 ;; archive.
3689 (origin
3690 (method git-fetch)
3691 (uri (git-reference
3692 (url "https://github.com/PyGithub/PyGithub")
3693 (commit (string-append "v" version))))
3694 (file-name (git-file-name name version))
3695 (sha256
3696 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3697 (build-system python-build-system)
3698 (arguments
3699 `(#:phases (modify-phases %standard-phases
3700 ;; Some tests rely on the network.
3701 (add-after 'unpack 'disable-failing-tests
3702 (lambda _
3703 (substitute* "tests/Issue142.py"
3704 (("testDecodeJson") "disabled_testDecodeJson"))
3705 #t))
3706 (add-before 'check 'prepare-for-tests
3707 (lambda _
3708 (for-each (lambda (f)
3709 (chmod f #o666))
3710 (find-files "./tests"))
3711 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3712 (setenv "PYTHONPATH"
3713 (string-append "./tests:" (getenv "PYTHONPATH")))
3714 #t)))))
3715 (propagated-inputs
3716 `(("python-deprecated" ,python-deprecated)
3717 ("python-pyjwt" ,python-pyjwt)
3718 ("python-requests" ,python-requests)))
3719 (native-inputs `(("python-httpretty" ,python-httpretty)))
3720 (home-page "https://pygithub.readthedocs.io/en/latest/")
3721 (synopsis "Python library for the GitHub API")
3722 (description "This library allows managing GitHub resources such as
3723 repositories, user profiles, and organizations in your Python applications,
3724 using version 3 of the GitHub application programming interface (API).")
3725 (license license:lgpl3+)))
3726
3727 (define-public python-rellu
3728 (package
3729 (name "python-rellu")
3730 (version "0.7")
3731 (source
3732 (origin
3733 (method url-fetch)
3734 (uri (pypi-uri "rellu" version))
3735 (sha256
3736 (base32
3737 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3738 (build-system python-build-system)
3739 (propagated-inputs
3740 `(("python-invoke" ,python-invoke)
3741 ("python-pygithub" ,python-pygithub)))
3742 (home-page "https://github.com/robotframework/rellu")
3743 (synopsis "Utilities to create PyPI releases")
3744 (description "This collection of utilities contains tooling and templates
3745 to assist in creating releases on GitHub and publishing them on PyPI. It is
3746 designed to be used by Robot Framework and tools and libraries in its
3747 ecosystem, but can naturally be used also by other projects.")
3748 (license license:asl2.0)))
3749
3750 (define-public python-robotframework
3751 (package
3752 (name "python-robotframework")
3753 (version "3.2.2")
3754 ;; There are no tests in the PyPI archive.
3755 (source
3756 (origin
3757 (method git-fetch)
3758 (uri (git-reference
3759 (url "https://github.com/robotframework/robotframework")
3760 (commit (string-append "v" version))))
3761 (file-name (git-file-name name version))
3762 (sha256
3763 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3764 (patches (search-patches
3765 "python-robotframework-source-date-epoch.patch"))))
3766 (build-system python-build-system)
3767 (arguments
3768 `(#:phases (modify-phases %standard-phases
3769 (add-before 'build 'build-and-install-doc
3770 (lambda* (#:key outputs #:allow-other-keys)
3771 (let* ((doc-output (assoc-ref outputs "doc"))
3772 (doc (string-append doc-output "/share/"
3773 ,name "-" ,version "/")))
3774 (invoke "invoke" "library-docs" "all")
3775 (mkdir-p doc)
3776 (copy-recursively "doc/libraries"
3777 (string-append doc "/libraries"))
3778 #t)))
3779 (replace 'check
3780 (lambda* (#:key inputs #:allow-other-keys)
3781 ;; Some tests require timezone data. Otherwise, they
3782 ;; look up /etc/localtime, which doesn't exist, and fail
3783 ;; with:
3784 ;;
3785 ;; OverflowError: mktime argument out of range
3786 (setenv "TZDIR"
3787 (string-append (assoc-ref inputs "tzdata")
3788 "/share/zoneinfo"))
3789 (setenv "TZ" "Europe/Paris")
3790
3791 (invoke "python" "utest/run.py"))))))
3792 (native-inputs
3793 `(("python-invoke" ,python-invoke)
3794 ("python-rellu" ,python-rellu)
3795 ("python:tk" ,python "tk") ;used when building the HTML doc
3796 ("tzdata" ,tzdata-for-tests)))
3797 (outputs '("out" "doc"))
3798 (home-page "https://robotframework.org")
3799 (synopsis "Generic automation framework")
3800 (description "Robot Framework is a generic automation framework for
3801 acceptance testing, acceptance test driven development (ATDD), and robotic
3802 process automation (RPA).")
3803 (license license:asl2.0)))
3804
3805 (define-public python-robotframework-lint
3806 ;; There is no properly tagged release; the commit below seems to correspond
3807 ;; to the 0.9 stable release available from PyPI. The tests are not
3808 ;; included in the PyPI archive, so we fetch the sources from the upstream
3809 ;; Git repo.
3810 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3811 (revision "0"))
3812 (package
3813 (name "python-robotframework-lint")
3814 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3815 revision commit))
3816 (source
3817 (origin
3818 (method git-fetch)
3819 (uri (git-reference
3820 (url "https://github.com/boakley/robotframework-lint")
3821 (commit commit)))
3822 (file-name (git-file-name name version))
3823 (sha256
3824 (base32
3825 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3826 (build-system python-build-system)
3827 (arguments
3828 `(#:phases
3829 (modify-phases %standard-phases
3830 (replace 'check
3831 (lambda _
3832 (invoke "python" "-m" "robot" "-A"
3833 "tests/conf/default.args" "tests"))))))
3834 (propagated-inputs
3835 `(("python-robotframework" ,python-robotframework)))
3836 (home-page "https://github.com/boakley/robotframework-lint/")
3837 (synopsis "Static analysis tool (linter) for Robot Framework")
3838 (description "This package provides the @code{rflint} command-line
3839 utility, a static analysis tool (linter) for Robot Framework source files.")
3840 (license license:asl2.0))))
3841
3842 (define-public python-robotframework-sshlibrary
3843 (package
3844 (name "python-robotframework-sshlibrary")
3845 (version "3.3.0")
3846 ;; There are no tests in the PyPI archive.
3847 (source
3848 (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/robotframework/SSHLibrary")
3852 (commit (string-append "v" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32
3856 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3857 (build-system python-build-system)
3858 (arguments
3859 `(#:phases
3860 (modify-phases %standard-phases
3861 (add-before 'build 'build-and-install-doc
3862 (lambda* (#:key outputs #:allow-other-keys)
3863 (let* ((doc-output (assoc-ref outputs "doc"))
3864 (doc (string-append doc-output "/share/"
3865 ,name "-" ,version "/")))
3866 (invoke "chmod" "-R" "+w" "docs")
3867 (invoke "invoke" "kw-docs" "project-docs")
3868 (mkdir-p doc)
3869 (for-each delete-file (find-files "docs" "\\.rst"))
3870 (copy-recursively "docs" doc)
3871 #t)))
3872 (replace 'check
3873 (lambda _
3874 ;; Some tests require an SSH server; we remove them.
3875 (delete-file "utest/test_client_api.py")
3876 (delete-file "utest/test_scp.py")
3877 (invoke "python" "utest/run.py"))))))
3878 (propagated-inputs
3879 `(("python-robotframework" ,python-robotframework)
3880 ("python-paramiko" ,python-paramiko)
3881 ("python-scp" ,python-scp)))
3882 (native-inputs
3883 `(("openssh" ,openssh)
3884 ("which" ,which)
3885 ;; To generate the documentation
3886 ("python-docutils" ,python-docutils)
3887 ("python-invoke" ,python-invoke)
3888 ("python-pygments" ,python-pygments)
3889 ("python-rellu" ,python-rellu)))
3890 (outputs '("out" "doc"))
3891 (home-page "https://github.com/robotframework/SSHLibrary")
3892 (synopsis "Robot Framework library for SSH and SFTP")
3893 (description "SSHLibrary is a Robot Framework library providing support
3894 for SSH and SFTP. It has the following main usages:
3895 @itemize @bullet
3896 @item Executing commands on the remote machine, either blocking or non-blocking.
3897 @item Writing and reading in an interactive shell.
3898 @item Transferring files and directories over SFTP.
3899 @item Ensuring that files and directories exist on the remote machine.
3900 @end itemize")
3901 (license license:asl2.0)))
3902
3903 (define-public python-rstr
3904 (package
3905 (name "python-rstr")
3906 (version "2.2.6")
3907 (source
3908 (origin
3909 (method url-fetch)
3910 (uri (pypi-uri "rstr" version))
3911 (sha256
3912 (base32
3913 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3914 (build-system python-build-system)
3915 (home-page
3916 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3917 (synopsis "Generate random strings in Python")
3918 (description "This package provides a python module for generating
3919 random strings of various types. It could be useful for fuzz testing,
3920 generating dummy data, or other applications. It has no dependencies
3921 outside the standard library.")
3922 (license license:bsd-3)))
3923
3924 (define-public python-scp
3925 (package
3926 (name "python-scp")
3927 (version "0.13.3")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (pypi-uri "scp" version))
3932 (sha256
3933 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3934 (build-system python-build-system)
3935 (arguments
3936 '(#:tests? #f)) ;tests require an SSH server
3937 (propagated-inputs
3938 `(("python-paramiko" ,python-paramiko)))
3939 (home-page "https://github.com/jbardin/scp.py")
3940 (synopsis "SCP protocol module for Python and Paramiko")
3941 (description "The scp module extends the Paramiko library to send and
3942 receive files via the SCP1 protocol, as implemented by the OpenSSH
3943 @command{scp} program.")
3944 (license license:gpl2+)))
3945
3946 (define-public python-rst.linker
3947 (package
3948 (name "python-rst.linker")
3949 (version "1.11")
3950 (source
3951 (origin
3952 (method url-fetch)
3953 (uri (pypi-uri "rst.linker" version))
3954 (sha256
3955 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3956 (build-system python-build-system)
3957 (propagated-inputs
3958 `(("python-dateutil" ,python-dateutil)
3959 ("python-six" ,python-six)))
3960 (native-inputs
3961 `(("python-setuptools-scm" ,python-setuptools-scm)))
3962 ;; Test would require path.py, which would introduce a cyclic dependence.
3963 (arguments `(#:tests? #f))
3964 ;; Note: As of version 1.7 the documentation is not worth building.
3965 (home-page "https://github.com/jaraco/rst.linker")
3966 (synopsis "Sphinx plugin to add links and timestamps")
3967 (description "rst.linker automatically replaces text by a
3968 reStructuredText external reference or timestamps. It's primary purpose is to
3969 augment the changelog, but it can be used for other documents, too.")
3970 (license license:expat)))
3971
3972 (define-public python2-rst.linker
3973 (package-with-python2 python-rst.linker))
3974
3975 (define-public python-sshpubkeys
3976 (package
3977 (name "python-sshpubkeys")
3978 (version "3.1.0")
3979 (home-page "https://github.com/ojarva/python-sshpubkeys")
3980 (source (origin
3981 (method git-fetch)
3982 (uri (git-reference
3983 (url home-page)
3984 (commit (string-append "v" version))))
3985 (file-name (git-file-name name version))
3986 (sha256
3987 (base32
3988 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3989 (build-system python-build-system)
3990 (propagated-inputs
3991 `(("python-cryptography" ,python-cryptography)
3992 ("python-ecdsa" ,python-ecdsa)))
3993 (synopsis "OpenSSH public key parser")
3994 (description
3995 "This package provides a library for parsing and validating OpenSSH
3996 public key files.")
3997 (license license:bsd-3)))
3998
3999 (define-public python-feedgenerator
4000 (package
4001 (name "python-feedgenerator")
4002 (version "1.9")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "feedgenerator" version))
4007 (sha256
4008 (base32
4009 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4010 (modules '((guix build utils)))
4011 (snippet
4012 '(begin
4013 ;; Remove pre-compiled .pyc files from source.
4014 (for-each delete-file-recursively
4015 (find-files "." "__pycache__" #:directories? #t))
4016 (for-each delete-file (find-files "." "\\.pyc$"))
4017 #t))))
4018 (build-system python-build-system)
4019 (propagated-inputs
4020 `(("python-pytz" ,python-pytz)
4021 ("python-six" ,python-six)))
4022 (home-page "https://github.com/getpelican/feedgenerator")
4023 (synopsis
4024 "Standalone version of Django's Atom/RSS feed generator")
4025 (description
4026 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4027 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4028 (license license:bsd-3)))
4029
4030 (define-public python2-feedgenerator
4031 (package-with-python2 python-feedgenerator))
4032
4033 (define-public python-toml
4034 (package
4035 (name "python-toml")
4036 (version "0.10.1")
4037 (source
4038 (origin
4039 (method url-fetch)
4040 (uri (pypi-uri "toml" version))
4041 (sha256
4042 (base32
4043 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4044 (build-system python-build-system)
4045 (arguments
4046 `(#:tests? #f)) ;no tests suite in release
4047 (home-page "https://github.com/uiri/toml")
4048 (synopsis "Library for TOML")
4049 (description
4050 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4051 Language (TOML) configuration files.")
4052 (license license:expat)))
4053
4054 (define-public python-jsonrpc-server
4055 (package
4056 (name "python-jsonrpc-server")
4057 (version "0.4.0")
4058 (source
4059 (origin
4060 (method url-fetch)
4061 (uri (pypi-uri "python-jsonrpc-server" version))
4062 (sha256
4063 (base32
4064 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4065 (build-system python-build-system)
4066 (propagated-inputs
4067 `(("python-mock" ,python-mock)
4068 ("python-pytest" ,python-pytest)
4069 ("python-ujson" ,python-ujson)))
4070 (home-page
4071 "https://github.com/palantir/python-jsonrpc-server")
4072 (synopsis "JSON RPC 2.0 server library")
4073 (description
4074 "This package provides a JSON RPC 2.0 server library for Python.")
4075 (license license:expat)))
4076
4077 (define-public python-pydantic
4078 (package
4079 (name "python-pydantic")
4080 (version "1.6.1")
4081 (source
4082 (origin
4083 (method git-fetch)
4084 (uri (git-reference
4085 (url "https://github.com/samuelcolvin/pydantic")
4086 (commit (string-append "v" version))))
4087 (file-name (git-file-name name version))
4088 (sha256
4089 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4090 (build-system python-build-system)
4091 (arguments
4092 '(#:phases
4093 (modify-phases %standard-phases
4094 ;; Reported upstream:
4095 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4096 ;; Disable the faulty test as the fix is unclear.
4097 (add-before 'check 'disable-test
4098 (lambda _
4099 (substitute* "tests/test_validators.py"
4100 (("test_assert_raises_validation_error")
4101 "_test_assert_raises_validation_error"))
4102 #t))
4103 (replace 'check
4104 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4105 (native-inputs
4106 `(("python-pytest" ,python-pytest)))
4107 (home-page "https://github.com/samuelcolvin/pydantic")
4108 (synopsis "Python data validation and settings management")
4109 (description
4110 "Pydantic enforces type hints at runtime, and provides user friendly
4111 errors when data is invalid.")
4112 (license license:expat)))
4113
4114 (define-public python-pydocstyle
4115 (package
4116 (name "python-pydocstyle")
4117 (version "3.0.0")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 (uri (pypi-uri "pydocstyle" version))
4122 (sha256
4123 (base32
4124 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4125 (build-system python-build-system)
4126 (propagated-inputs
4127 `(("python-six" ,python-six)
4128 ("python-snowballstemmer" ,python-snowballstemmer)))
4129 (home-page
4130 "https://github.com/PyCQA/pydocstyle/")
4131 (synopsis "Python docstring style checker")
4132 (description
4133 "This package provides a style checker for the Python Language
4134 Server (PLS).")
4135 (license license:expat)))
4136
4137 (define-public python-language-server
4138 (package
4139 (name "python-language-server")
4140 (version "0.36.1")
4141 (source
4142 (origin
4143 (method url-fetch)
4144 (uri (pypi-uri "python-language-server" version))
4145 (sha256
4146 (base32
4147 "0ljzc50z5v08is8fis1fg2dk9sb6275jlvzxb6nij0w6ys772pf8"))))
4148 (build-system python-build-system)
4149 (propagated-inputs
4150 `(("python-autopep8" ,python-autopep8)
4151 ("python-configparser" ,python-configparser)
4152 ("python-pydocstyle" ,python-pydocstyle)
4153 ("python-future" ,python-future)
4154 ("python-jedi" ,python-jedi)
4155 ("python-jsonrpc-server" ,python-jsonrpc-server)
4156 ("python-pluggy" ,python-pluggy)
4157 ("python-pycodestyle" ,python-pycodestyle)
4158 ("python-pyflakes" ,python-pyflakes)
4159 ("python-rope" ,python-rope)
4160 ("python-ujson" ,python-ujson)
4161 ("python-yapf" ,python-yapf)))
4162 (native-inputs
4163 `(("python-coverage" ,python-coverage)
4164 ("python-flaky" ,python-flaky)
4165 ("python-matplotlib" ,python-matplotlib)
4166 ("python-mock" ,python-mock)
4167 ("python-numpy" ,python-numpy)
4168 ("python-pandas" ,python-pandas)
4169 ("python-pylint" ,python-pylint)
4170 ("python-pytest" ,python-pytest)
4171 ("python-pytest-cov" ,python-pytest-cov)
4172 ("python-versioneer" ,python-versioneer)))
4173 (home-page "https://github.com/palantir/python-language-server")
4174 (synopsis "Python implementation of the Language Server Protocol")
4175 (description
4176 "The Python Language Server (pyls) is an implementation of the Python 3
4177 language specification for the Language Server Protocol (LSP). This tool is
4178 used in text editing environments to provide a complete and integrated
4179 feature-set for programming Python effectively.")
4180 (license license:expat)))
4181
4182 (define-public python-pathspec
4183 (package
4184 (name "python-pathspec")
4185 (version "0.7.0")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "pathspec" version))
4190 (sha256
4191 (base32
4192 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4193 (build-system python-build-system)
4194 (home-page "https://github.com/cpburnz/python-path-specification")
4195 (synopsis "Utility library for gitignore style pattern matching of file paths")
4196 (description
4197 "This package provides a utility library for gitignore style pattern
4198 matching of file paths.")
4199 (license license:mpl2.0)))
4200
4201 (define-public python-black
4202 (package
4203 (name "python-black")
4204 (version "20.8b1")
4205 (source
4206 (origin
4207 (method url-fetch)
4208 (uri (pypi-uri "black" version))
4209 (sha256
4210 (base32
4211 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4212 (build-system python-build-system)
4213 (arguments
4214 `(#:phases
4215 (modify-phases %standard-phases
4216 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4217 (lambda _
4218 (let ((python3 (which "python3")))
4219 (substitute* '("tests/data/fmtonoff.py"
4220 "tests/data/string_prefixes.py"
4221 "tests/data/function.py"
4222 "tests/data/python37.py")
4223 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4224 (string-append "#!" python3 (if (string? minor-version)
4225 minor-version
4226 "")))))
4227 #t))
4228 (add-after 'unpack 'disable-broken-tests
4229 (lambda* (#:key outputs inputs #:allow-other-keys)
4230 ;; Make installed package available for running the tests
4231 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4232 ":" (getenv "PATH")))
4233
4234 ;; These tests are supposed to be skipped when the blackd
4235 ;; dependencies are missing, but this doesn't quite work.
4236 (substitute* "tests/test_black.py"
4237 (("( *)class BlackDTestCase.*" match indent)
4238 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4239 indent "class BlackDTestCase(unittest.TestCase):\n"))
4240 (("web.Application") "False")
4241 (("@unittest_run_loop") ""))
4242
4243 ;; Patching the above file breaks the self test
4244 (substitute* "tests/test_black.py"
4245 (("( *)def test_self" match indent)
4246 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4247
4248 (substitute* "tests/test_black.py"
4249 (("( *)def test_python38" match indent)
4250 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4251 #t)))))
4252 (propagated-inputs
4253 `(("python-click" ,python-click)
4254 ("python-attrs" ,python-attrs)
4255 ("python-appdirs" ,python-appdirs)
4256 ("python-pathspec" ,python-pathspec)
4257 ("python-mypy-extensions" ,python-mypy-extensions)
4258 ("python-regex" ,python-regex)
4259 ("python-toml" ,python-toml)
4260 ("python-typed-ast" ,python-typed-ast)
4261 ("python-typing-extensions" ,python-typing-extensions)))
4262 (native-inputs
4263 `(("python-setuptools-scm" ,python-setuptools-scm)))
4264 (home-page "https://github.com/ambv/black")
4265 (synopsis "The uncompromising code formatter")
4266 (description "Black is the uncompromising Python code formatter.")
4267 (license license:expat)))
4268
4269 (define-public python-black-macchiato
4270 (package
4271 (name "python-black-macchiato")
4272 (version "1.3.0")
4273 (source
4274 (origin
4275 (method url-fetch)
4276 (uri (pypi-uri "black-macchiato" version))
4277 (sha256
4278 (base32
4279 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4280 (build-system python-build-system)
4281 (propagated-inputs
4282 `(("python-black" ,python-black)))
4283 (home-page "https://github.com/wbolster/black-macchiato")
4284 (synopsis "Partial @code{python-black} formatting")
4285 (description
4286 "This package is built on top the @{python-black} code formatter to
4287 enable formatting of partial files.")
4288 (license license:bsd-3)))
4289
4290 (define-public python-blinker
4291 (package
4292 (name "python-blinker")
4293 (version "1.4")
4294 (source
4295 (origin
4296 (method url-fetch)
4297 (uri (pypi-uri "blinker" version))
4298 (sha256
4299 (base32
4300 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4301 (build-system python-build-system)
4302 (home-page "https://pythonhosted.org/blinker/")
4303 (synopsis "Fast, simple object-to-object and broadcast signaling")
4304 (description
4305 "Blinker provides a fast dispatching system that allows any number of
4306 interested parties to subscribe to events, or \"signals\".")
4307 (license license:expat)))
4308
4309 (define-public python2-blinker
4310 (package-with-python2 python-blinker))
4311
4312 (define-public pelican
4313 (package
4314 (name "pelican")
4315 (version "4.2.0")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "pelican" version))
4320 (sha256
4321 (base32
4322 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4323 (build-system python-build-system)
4324 (propagated-inputs
4325 `(("python-blinker" ,python-blinker)
4326 ("python-dateutil" ,python-dateutil)
4327 ("python-docutils" ,python-docutils)
4328 ("python-feedgenerator" ,python-feedgenerator)
4329 ("python-jinja2" ,python-jinja2)
4330 ("python-markdown" ,python-markdown)
4331 ("python-pygments" ,python-pygments)
4332 ("python-pytz" ,python-pytz)
4333 ("python-six" ,python-six)
4334 ("python-unidecode" ,python-unidecode)))
4335 (home-page "https://getpelican.com/")
4336 (arguments
4337 `(;; XXX Requires a lot more packages to do unit tests :P
4338 #:tests? #f))
4339 (synopsis "Python-based static site publishing system")
4340 (description
4341 "Pelican is a tool to generate a static blog from reStructuredText,
4342 Markdown input files, and more. Pelican uses Jinja2 for templating
4343 and is very extensible.")
4344 (license license:agpl3+)))
4345
4346 (define-public mallard-ducktype
4347 (package
4348 (name "mallard-ducktype")
4349 (version "1.0.2")
4350 (source
4351 (origin
4352 (method git-fetch)
4353 ;; git-reference because tests are not included in pypi source tarball
4354 ;; https://issues.guix.gnu.org/issue/36755#2
4355 (uri (git-reference
4356 (url "https://github.com/projectmallard/mallard-ducktype")
4357 (commit version)))
4358 (file-name (git-file-name name version))
4359 (sha256
4360 (base32
4361 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4362 (build-system python-build-system)
4363 (arguments
4364 '(#:phases
4365 (modify-phases %standard-phases
4366 (replace 'check
4367 (lambda _
4368 (with-directory-excursion "tests"
4369 (invoke "sh" "runtests")))))))
4370 (home-page "http://projectmallard.org")
4371 (synopsis "Convert Ducktype to Mallard documentation markup")
4372 (description
4373 "Ducktype is a lightweight syntax that can represent all the semantics
4374 of the Mallard XML documentation system. Ducktype files can be converted to
4375 Mallard using the @command{ducktype} tool. The yelp-tools package
4376 provides additional functionality on the produced Mallard documents.")
4377 (license license:expat)))
4378
4379 (define-public python-cython
4380 (package
4381 (name "python-cython")
4382 (version "0.29.21")
4383 (source
4384 (origin
4385 (method url-fetch)
4386 (uri (pypi-uri "Cython" version))
4387 (sha256
4388 (base32
4389 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4390 (build-system python-build-system)
4391 ;; we need the full python package and not just the python-wrapper
4392 ;; because we need libpython3.3m.so
4393 (inputs
4394 `(("python" ,python)))
4395 (arguments
4396 `(#:phases
4397 (modify-phases %standard-phases
4398 (add-before 'check 'set-HOME
4399 ;; some tests require access to "$HOME/.cython"
4400 (lambda _ (setenv "HOME" "/tmp") #t))
4401 (replace 'check
4402 (lambda _
4403 ;; Disable compiler optimizations to greatly reduce the running
4404 ;; time of the test suite.
4405 (setenv "CFLAGS" "-O0")
4406
4407 (invoke "python" "runtests.py" "-vv"
4408 "-j" (number->string (parallel-job-count))
4409 ;; XXX: On 32-bit architectures, running the parallel tests
4410 ;; fails on many-core systems, see
4411 ;; <https://github.com/cython/cython/issues/2807>.
4412 ,@(if (not (target-64bit?))
4413 '("-x" "run.parallel")
4414 '())))))))
4415 (home-page "https://cython.org/")
4416 (synopsis "C extensions for Python")
4417 (description "Cython is an optimising static compiler for both the Python
4418 programming language and the extended Cython programming language. It makes
4419 writing C extensions for Python as easy as Python itself.")
4420 (license license:asl2.0)
4421 (properties `((python2-variant . ,(delay python2-cython))))))
4422
4423 (define-public python2-cython
4424 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4425 (package
4426 (inherit base)
4427 (name "python2-cython")
4428 (inputs
4429 `(("python-2" ,python-2))) ;this is not automatically changed
4430 (arguments
4431 (substitute-keyword-arguments (package-arguments base)
4432 ((#:phases phases)
4433 `(modify-phases ,phases
4434 (add-before 'check 'adjust-test_embed
4435 (lambda _
4436 (substitute* "runtests.py"
4437 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4438 ;; so it can give the right -L flag to GCC when embedding static
4439 ;; builds of Python. It is unaware that the Python "config"
4440 ;; directory (where the static library lives) was renamed in
4441 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4442 ;; which works fine, because that is where the shared library is.
4443 ;;
4444 ;; It also appears to be unaware that the Makefile in Demos/embed
4445 ;; already unconditionally pass the static library location to GCC,
4446 ;; after checking sysconfig.get_config_var('LIBPL).
4447 ;;
4448 ;; The effect is that the linker is unable to resolve libexpat
4449 ;; symbols when building for Python 2, because neither the Python 2
4450 ;; shared library nor Expat is available. To fix it, we can either
4451 ;; add Expat as an input and make it visible to the linker, or just
4452 ;; prevent it from overriding the Python shared library location.
4453 ;; The end result is identical, so we take the easy route.
4454 ((" or libname not in os\\.listdir\\(libdir\\)")
4455 ""))
4456 #t)))))))))
4457
4458 ;; The RPython toolchain currently does not support Python 3.
4459 (define-public python2-rpython
4460 (package
4461 (name "python2-rpython")
4462 (version "0.2.1")
4463 (source
4464 (origin
4465 (method url-fetch)
4466 (uri (pypi-uri "rpython" version))
4467 (sha256
4468 (base32
4469 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4470 (build-system python-build-system)
4471 (arguments `(#:python ,python-2))
4472 (native-inputs
4473 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4474 (home-page "https://rpython.readthedocs.org")
4475 (synopsis "Framework for implementing interpreters and virtual machines")
4476 (description "RPython is a translation and support framework for
4477 producing implementations of dynamic languages, emphasizing a clean separation
4478 between language specification and implementation aspects.")
4479 (license license:expat)))
4480
4481 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4482 ;; python-scipy still build, as these three packages are often used together.
4483 (define-public python-numpy
4484 (package
4485 (name "python-numpy")
4486 (version "1.17.3")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (string-append
4491 "https://github.com/numpy/numpy/releases/download/v"
4492 version "/numpy-" version ".tar.gz"))
4493 (sha256
4494 (base32
4495 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4496 (build-system python-build-system)
4497 (inputs
4498 `(("openblas" ,openblas)
4499 ("lapack" ,lapack)))
4500 (native-inputs
4501 `(("python-cython" ,python-cython)
4502 ("python-pytest" ,python-pytest)
4503 ("gfortran" ,gfortran)))
4504 (arguments
4505 `(#:phases
4506 (modify-phases %standard-phases
4507 (add-before 'build 'configure-blas-lapack
4508 (lambda* (#:key inputs #:allow-other-keys)
4509 (call-with-output-file "site.cfg"
4510 (lambda (port)
4511 (format port
4512 "[openblas]
4513 libraries = openblas
4514 library_dirs = ~a/lib
4515 include_dirs = ~a/include
4516
4517 # backslash-n to make emacs happy
4518 \n[lapack]
4519 lapack_libs = lapack
4520 library_dirs = ~a/lib
4521 include_dirs = ~a/include
4522 "
4523 (assoc-ref inputs "openblas")
4524 (assoc-ref inputs "openblas")
4525 (assoc-ref inputs "lapack")
4526 (assoc-ref inputs "lapack"))))
4527 #t))
4528 (add-before 'build 'fix-executable-paths
4529 (lambda* (#:key inputs #:allow-other-keys)
4530 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4531 ;; instead of /bin/sh.
4532 (substitute* "numpy/distutils/exec_command.py"
4533 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4534 (string-append match-start (assoc-ref inputs "bash") match-end)))
4535 ;; Use "gcc" executable, not "cc".
4536 (substitute* "numpy/distutils/system_info.py"
4537 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4538 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4539 #t))
4540 ;; Tests can only be run after the library has been installed and not
4541 ;; within the source directory.
4542 (delete 'check)
4543 (add-after 'install 'check
4544 (lambda* (#:key outputs inputs #:allow-other-keys)
4545 ;; Make installed package available for running the tests
4546 (add-installed-pythonpath inputs outputs)
4547 ;; Make sure "f2py" etc is found.
4548 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4549 ":" (getenv "PATH")))
4550 (with-directory-excursion "/tmp"
4551 (invoke "python" "-c"
4552 "import numpy; numpy.test(verbose=2)")))))))
4553 (home-page "https://numpy.org")
4554 (synopsis "Fundamental package for scientific computing with Python")
4555 (description "NumPy is the fundamental package for scientific computing
4556 with Python. It contains among other things: a powerful N-dimensional array
4557 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4558 and Fortran code, useful linear algebra, Fourier transform, and random number
4559 capabilities.")
4560 (properties `((python2-variant . ,(delay python2-numpy))))
4561 (license license:bsd-3)))
4562
4563 ;; Numpy 1.16.x are the last versions that support Python 2.
4564 (define-public python2-numpy
4565 (let ((numpy (package-with-python2
4566 (strip-python2-variant python-numpy))))
4567 (package/inherit
4568 numpy
4569 (version "1.16.5")
4570 (source (origin
4571 (method url-fetch)
4572 (uri (string-append
4573 "https://github.com/numpy/numpy/releases/download/v"
4574 version "/numpy-" version ".tar.gz"))
4575 (sha256
4576 (base32
4577 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4578
4579 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4580 ;; interest only for legacy code going back to NumPy's predecessor
4581 ;; Numeric.
4582 (define-public python2-numpy-1.8
4583 (package (inherit python2-numpy)
4584 (version "1.8.2")
4585 (source
4586 (origin
4587 (method git-fetch)
4588 (uri (git-reference
4589 (url "https://github.com/numpy/numpy")
4590 (commit (string-append "v" version))))
4591 (file-name (git-file-name "numpy" version))
4592 (sha256
4593 (base32
4594 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4595 (arguments
4596 (substitute-keyword-arguments (package-arguments python2-numpy)
4597 ((#:phases phases)
4598 `(modify-phases ,phases
4599 (replace 'configure-blas-lapack
4600 (lambda* (#:key inputs #:allow-other-keys)
4601 (call-with-output-file "site.cfg"
4602 (lambda (port)
4603 (format port
4604 "[openblas]
4605 libraries = openblas,lapack
4606 library_dirs = ~a/lib:~a/lib
4607 include_dirs = ~a/include:~a/include
4608 "
4609 (assoc-ref inputs "openblas")
4610 (assoc-ref inputs "lapack")
4611 (assoc-ref inputs "openblas")
4612 (assoc-ref inputs "lapack"))))
4613 #t))))))
4614 (native-inputs
4615 `(("python2-nose" ,python2-nose)))
4616 (description "NumPy is the fundamental package for scientific computing
4617 with Python. It contains among other things: a powerful N-dimensional array
4618 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4619 and Fortran code, useful linear algebra, Fourier transform, and random number
4620 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4621 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4622 Numeric.")
4623 (license license:bsd-3)))
4624
4625 (define-public python-munch
4626 (package
4627 (name "python-munch")
4628 (version "2.0.4")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (pypi-uri "munch" version))
4633 (sha256
4634 (base32
4635 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4636 (build-system python-build-system)
4637 (home-page "https://github.com/Infinidat/munch")
4638 (synopsis "Dot-accessible dictionary")
4639 (description "Munch is a dot-accessible dictionary similar to JavaScript
4640 objects.")
4641 (license license:expat)))
4642
4643 (define-public python2-munch
4644 (package-with-python2 python-munch))
4645
4646 (define-public python-colormath
4647 (package
4648 (name "python-colormath")
4649 (version "3.0.0")
4650 (source
4651 (origin
4652 (method url-fetch)
4653 (uri (pypi-uri "colormath" version))
4654 (sha256
4655 (base32
4656 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4657 (build-system python-build-system)
4658 (propagated-inputs
4659 `(("python-networkx" ,python-networkx)
4660 ("python-numpy" ,python-numpy)))
4661 (home-page "https://github.com/gtaylor/python-colormath")
4662 (synopsis "Color math and conversion library")
4663 (description
4664 "This is a Python library for color math and conversions.")
4665 (license license:bsd-3)))
4666
4667 (define-public python2-colormath
4668 (package-with-python2 python-colormath))
4669
4670 (define-public python-spectra
4671 (package
4672 (name "python-spectra")
4673 (version "0.0.11")
4674 (source
4675 (origin
4676 (method url-fetch)
4677 (uri (pypi-uri "spectra" version))
4678 (sha256
4679 (base32
4680 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4681 (build-system python-build-system)
4682 (arguments
4683 `(#:phases
4684 (modify-phases %standard-phases
4685 (replace 'check
4686 (lambda _ (invoke "nosetests" "-v"))))))
4687 (propagated-inputs
4688 `(("python-colormath" ,python-colormath)))
4689 (native-inputs
4690 `(("python-nose" ,python-nose)))
4691 (home-page "https://github.com/jsvine/spectra")
4692 (synopsis "Color scales and color conversion")
4693 (description
4694 "This package provides a Python library intended to make color math,
4695 color scales, and color space conversion easy. It has support for:
4696
4697 @enumerate
4698 @item Color scales
4699 @item Color ranges
4700 @item Color blending
4701 @item Brightening/darkening colors
4702 @item Saturating/desaturating colors
4703 @item Conversion to/from multiple color spaces.
4704 @end enumerate\n")
4705 (license license:expat)))
4706
4707 (define-public python2-spectra
4708 (package-with-python2 python-spectra))
4709
4710 (define-public python-numpy-documentation
4711 (package
4712 (name "python-numpy-documentation")
4713 (version (package-version python-numpy))
4714 (source (package-source python-numpy))
4715 (build-system python-build-system)
4716 (native-inputs
4717 `(("python-matplotlib" ,python-matplotlib)
4718 ("python-numpy" ,python-numpy)
4719 ("pkg-config" ,pkg-config)
4720 ("python-sphinx" ,python-sphinx)
4721 ("python-numpydoc" ,python-numpydoc)
4722 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4723 texlive-fonts-ec
4724 texlive-generic-ifxetex
4725 texlive-generic-pdftex
4726 texlive-amsfonts
4727 texlive-latex-capt-of
4728 texlive-latex-cmap
4729 texlive-latex-environ
4730 texlive-latex-eqparbox
4731 texlive-latex-etoolbox
4732 texlive-latex-expdlist
4733 texlive-latex-fancyhdr
4734 texlive-latex-fancyvrb
4735 texlive-latex-fncychap
4736 texlive-latex-float
4737 texlive-latex-framed
4738 texlive-latex-geometry
4739 texlive-latex-graphics
4740 texlive-latex-hyperref
4741 texlive-latex-mdwtools
4742 texlive-latex-multirow
4743 texlive-latex-needspace
4744 texlive-latex-oberdiek
4745 texlive-latex-parskip
4746 texlive-latex-preview
4747 texlive-latex-tabulary
4748 texlive-latex-threeparttable
4749 texlive-latex-titlesec
4750 texlive-latex-trimspaces
4751 texlive-latex-ucs
4752 texlive-latex-upquote
4753 texlive-latex-url
4754 texlive-latex-varwidth
4755 texlive-latex-wrapfig)))
4756 ("texinfo" ,texinfo)
4757 ("perl" ,perl)
4758 ("scipy-sphinx-theme"
4759 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4760 (method git-fetch)
4761 (uri (git-reference
4762 (url "https://github.com/scipy/scipy-sphinx-theme")
4763 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4764 (sha256
4765 (base32
4766 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4767 ,@(package-native-inputs python-numpy)))
4768 (arguments
4769 `(#:tests? #f ; we're only generating the documentation
4770 #:phases
4771 (modify-phases %standard-phases
4772 (delete 'build)
4773 (replace 'install
4774 (lambda* (#:key inputs outputs #:allow-other-keys)
4775 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4776 (doc (string-append
4777 data "/doc/" ,name "-"
4778 ,(package-version python-numpy)))
4779 (info-reader (string-append data "/info"))
4780 (html (string-append doc "/html"))
4781 (scipy-sphinx-theme "scipy-sphinx-theme")
4782 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4783 (pyver ,(string-append "PYVER=")))
4784
4785 ;; FIXME: this is needed to for texlive-union to generate
4786 ;; fonts, which are not found.
4787 (setenv "HOME" "/tmp")
4788
4789 (with-directory-excursion "doc"
4790 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4791 (mkdir-p html)
4792 (invoke "make" "html" pyver)
4793 (invoke "make" "latex" "PAPER=a4" pyver)
4794 (invoke "make" "-C" "build/latex"
4795 "all-pdf" "PAPER=a4" pyver)
4796 ;; FIXME: Generation of the info file fails.
4797 ;; (invoke "make" "info" pyver)
4798 ;; (mkdir-p info)
4799 ;; (copy-file "build/texinfo/numpy.info"
4800 ;; (string-append info "/numpy.info"))
4801 (for-each (lambda (file)
4802 (copy-file (string-append "build/latex" file)
4803 (string-append doc file)))
4804 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4805 (with-directory-excursion "build/html"
4806 (for-each (lambda (file)
4807 (let* ((dir (dirname file))
4808 (tgt-dir (string-append html "/" dir)))
4809 (unless (equal? "." dir)
4810 (mkdir-p tgt-dir))
4811 (install-file file html)))
4812 (find-files "." ".*")))))
4813 #t)))))
4814 (home-page (package-home-page python-numpy))
4815 (synopsis "Documentation for the python-numpy package")
4816 (description (package-description python-numpy))
4817 (license (package-license python-numpy))))
4818
4819 (define-public python2-numpy-documentation
4820 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4821 (package
4822 (inherit numpy-documentation)
4823 (native-inputs `(("python2-functools32" ,python2-functools32)
4824 ,@(package-native-inputs numpy-documentation))))))
4825
4826 (define-public python-pygit2
4827 (package
4828 (name "python-pygit2")
4829 (version "1.4.0")
4830 (source
4831 (origin
4832 (method url-fetch)
4833 (uri (pypi-uri "pygit2" version))
4834 (sha256
4835 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4836 (build-system python-build-system)
4837 (arguments
4838 '(#:tests? #f)) ; tests don't run correctly in our environment
4839 (propagated-inputs
4840 `(("python-cached-property" ,python-cached-property)
4841 ("python-cffi" ,python-cffi)
4842 ("libgit2" ,libgit2)))
4843 (native-inputs
4844 `(("python-pytest" ,python-pytest)))
4845 (home-page "https://github.com/libgit2/pygit2")
4846 (synopsis "Python bindings for libgit2")
4847 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4848 library, libgit2 implements Git plumbing.")
4849 ;; GPL2.0 only, with linking exception.
4850 (license license:gpl2)))
4851
4852 (define-public python-patiencediff
4853 (package
4854 (name "python-patiencediff")
4855 (version "0.2.0")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri (pypi-uri "patiencediff" version))
4860 (sha256
4861 (base32
4862 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4863 (build-system python-build-system)
4864 (home-page "https://www.breezy-vcs.org/")
4865 (synopsis "Python implementation of the patiencediff algorithm")
4866 (description
4867 "This package contains a Python implementation of the @code{patiencediff}
4868 algorithm. Patiencediff provides a good balance of performance, nice output for
4869 humans, and implementation simplicity.")
4870 (license license:gpl2)))
4871
4872 (define-public python-pyparsing
4873 (package
4874 (name "python-pyparsing")
4875 (version "2.4.6")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "pyparsing" version))
4880 (sha256
4881 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4882 (build-system python-build-system)
4883 (outputs '("out" "doc"))
4884 (arguments
4885 `(#:tests? #f ; no test target
4886 #:phases
4887 (modify-phases %standard-phases
4888 (add-after 'install 'install-doc
4889 (lambda* (#:key outputs #:allow-other-keys)
4890 (let* ((doc (string-append (assoc-ref outputs "doc")
4891 "/share/doc/" ,name "-" ,version))
4892 (html-doc (string-append doc "/html"))
4893 (examples (string-append doc "/examples")))
4894 (mkdir-p html-doc)
4895 (mkdir-p examples)
4896 (for-each
4897 (lambda (dir tgt)
4898 (map (lambda (file)
4899 (install-file file tgt))
4900 (find-files dir ".*")))
4901 (list "docs" "htmldoc" "examples")
4902 (list doc html-doc examples))
4903 #t))))))
4904 (home-page "https://github.com/pyparsing/pyparsing")
4905 (synopsis "Python parsing class library")
4906 (description
4907 "The pyparsing module is an alternative approach to creating and
4908 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4909 of regular expressions. The pyparsing module provides a library of classes
4910 that client code uses to construct the grammar directly in Python code.")
4911 (license license:expat)))
4912
4913 (define-public python2-pyparsing
4914 (package-with-python2 python-pyparsing))
4915
4916 (define-public python-pyparsing-2.4.7
4917 (package
4918 (inherit python-pyparsing)
4919 (version "2.4.7")
4920 (source
4921 (origin
4922 (method url-fetch)
4923 (uri (pypi-uri "pyparsing" version))
4924 (sha256
4925 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4926
4927 (define-public python-numpydoc
4928 (package
4929 (name "python-numpydoc")
4930 (version "0.8.0")
4931 (source
4932 (origin
4933 (method url-fetch)
4934 (uri (pypi-uri "numpydoc" version))
4935 (sha256
4936 (base32
4937 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4938 (build-system python-build-system)
4939 (propagated-inputs
4940 `(("python-sphinx" ,python-sphinx)))
4941 (native-inputs
4942 `(("python-nose" ,python-nose)))
4943 (home-page "https://pypi.org/project/numpydoc/")
4944 (synopsis
4945 "Numpy's Sphinx extensions")
4946 (description
4947 "Sphinx extension to support docstrings in Numpy format.")
4948 (license license:bsd-2)))
4949
4950 (define-public python2-numpydoc
4951 (package-with-python2 python-numpydoc))
4952
4953 (define-public python-numexpr
4954 (package
4955 (name "python-numexpr")
4956 (version "2.6.5")
4957 (source
4958 (origin
4959 (method url-fetch)
4960 (uri (pypi-uri "numexpr" version))
4961 (sha256
4962 (base32
4963 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4964 (build-system python-build-system)
4965 (arguments `(#:tests? #f)) ; no tests included
4966 (propagated-inputs
4967 `(("python-numpy" ,python-numpy)))
4968 (home-page "https://github.com/pydata/numexpr")
4969 (synopsis "Fast numerical expression evaluator for NumPy")
4970 (description
4971 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4972 expressions that operate on arrays are accelerated and use less memory than
4973 doing the same calculation in Python. In addition, its multi-threaded
4974 capabilities can make use of all your cores, which may accelerate
4975 computations, most specially if they are not memory-bounded (e.g. those using
4976 transcendental functions).")
4977 (license license:expat)))
4978
4979 (define-public python2-numexpr
4980 (package-with-python2 python-numexpr))
4981
4982 (define-public python-cycler
4983 (package
4984 (name "python-cycler")
4985 (version "0.10.0")
4986 (source (origin
4987 (method url-fetch)
4988 (uri (pypi-uri "cycler" version))
4989 (sha256
4990 (base32
4991 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4992 (build-system python-build-system)
4993 (arguments
4994 ;; XXX: The current version requires 'coveralls' which we don't have.
4995 ;; Enable this for the next release which uses 'python-pytest'.
4996 '(#:tests? #f))
4997 (propagated-inputs
4998 `(("python-six" ,python-six)))
4999 (home-page "http://matplotlib.org/cycler/")
5000 (synopsis "Composable keyword argument iterator")
5001 (description
5002 "When using @code{matplotlib} and plotting more than one line, it is
5003 common to want to be able to want to be able to cycle over one or more artist
5004 styles; but the plotting logic can quickly become involved.
5005 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5006 @code{Cycler} class was developed.")
5007 (license license:bsd-3)))
5008
5009 (define-public python2-cycler
5010 (package-with-python2 python-cycler))
5011
5012 (define-public python-colorspacious
5013 (package
5014 (name "python-colorspacious")
5015 (version "1.1.2")
5016 (source
5017 (origin
5018 (method git-fetch)
5019 (uri (git-reference
5020 (url "https://github.com/njsmith/colorspacious")
5021 (commit (string-append "v" version))))
5022 (file-name (git-file-name name version))
5023 (sha256
5024 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5025 (build-system python-build-system)
5026 (propagated-inputs
5027 `(("python-numpy" ,python-numpy)))
5028 (native-inputs
5029 `(("python-nose" ,python-nose)))
5030 (arguments
5031 `(#:phases
5032 (modify-phases %standard-phases
5033 (replace 'check
5034 (lambda _
5035 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5036 (home-page "https://github.com/njsmith/colorspacious")
5037 (synopsis "Python library for colorspace conversions")
5038 (description "@code{colorspacious} is a Python library that lets you
5039 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5040 (license license:expat)))
5041
5042 (define-public python2-colorspacious
5043 (package-with-python2 python-colorspacious))
5044
5045 (define-public python-matplotlib
5046 (package
5047 (name "python-matplotlib")
5048 (version "3.1.2")
5049 (source
5050 (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "matplotlib" version))
5053 (sha256
5054 (base32
5055 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5056 (build-system python-build-system)
5057 (propagated-inputs ; the following packages are all needed at run time
5058 `(("python-cycler" ,python-cycler)
5059 ("python-kiwisolver" ,python-kiwisolver)
5060 ("python-pyparsing" ,python-pyparsing)
5061 ("python-pygobject" ,python-pygobject)
5062 ("gobject-introspection" ,gobject-introspection)
5063 ("python-tkinter" ,python "tk")
5064 ("python-dateutil" ,python-dateutil)
5065 ("python-numpy" ,python-numpy)
5066 ("python-pillow" ,python-pillow)
5067 ("python-pytz" ,python-pytz)
5068 ("python-six" ,python-six)
5069 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5070 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5071 ;; object. For this reason we need to import both libraries.
5072 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5073 ("python-pycairo" ,python-pycairo)
5074 ("python-cairocffi" ,python-cairocffi)))
5075 (inputs
5076 `(("libpng" ,libpng)
5077 ("freetype" ,freetype)
5078 ("cairo" ,cairo)
5079 ("glib" ,glib)
5080 ;; FIXME: Add backends when available.
5081 ;("python-wxpython" ,python-wxpython)
5082 ("tcl" ,tcl)
5083 ("tk" ,tk)))
5084 (native-inputs
5085 `(("pkg-config" ,pkg-config)
5086 ("python-pytest" ,python-pytest)
5087 ("python-mock" ,python-mock)
5088 ("unzip" ,unzip)
5089 ("jquery-ui"
5090 ,(origin
5091 (method url-fetch)
5092 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5093 (sha256
5094 (base32
5095 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5096 (arguments
5097 `(#:phases
5098 (modify-phases %standard-phases
5099 ;; XXX We disable all image comparison tests because we're using a
5100 ;; newer version of FreeType than matplotlib expects. This leads to
5101 ;; minor differences throughout the tests.
5102 (add-after 'unpack 'fix-and-disable-failing-tests
5103 (lambda _
5104 (substitute* (append (find-files "lib/matplotlib/tests/"
5105 "test_.*\\.py$")
5106 (find-files "lib/mpl_toolkits/tests"
5107 "test_.*\\.py$"))
5108 (("^from matplotlib" match)
5109 (string-append "import pytest\n" match))
5110 (("( *)@image_comparison" match indent)
5111 (string-append indent
5112 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5113 match)))
5114 (substitute* "lib/matplotlib/tests/test_animation.py"
5115 (("/bin/sh") (which "sh")))
5116 (for-each delete-file
5117 ;; test_normal_axes, test_get_tightbbox_polar
5118 '("lib/matplotlib/tests/test_axes.py"
5119 ;; We don't use the webagg backend and this test forces it.
5120 "lib/matplotlib/tests/test_backend_webagg.py"
5121 ;; test_outward_ticks
5122 "lib/matplotlib/tests/test_tightlayout.py"
5123 ;; test_hidden_axes fails with minor extent
5124 ;; differences, possibly due to the use of a
5125 ;; different version of FreeType.
5126 "lib/matplotlib/tests/test_constrainedlayout.py"
5127 ;; Fontconfig returns no fonts.
5128 "lib/matplotlib/tests/test_font_manager.py"))
5129 #t))
5130 (add-before 'install 'install-jquery-ui
5131 (lambda* (#:key outputs inputs #:allow-other-keys)
5132 (let ((dir (string-append (assoc-ref outputs "out")
5133 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5134 (mkdir-p dir)
5135 (invoke "unzip"
5136 (assoc-ref inputs "jquery-ui")
5137 "-d" dir))
5138 #t))
5139 (replace 'check
5140 (lambda* (#:key outputs inputs #:allow-other-keys)
5141 (add-installed-pythonpath inputs outputs)
5142 (invoke "python" "tests.py" "-v"
5143 "-m" "not network and not webagg")))
5144 (add-before 'build 'configure-environment
5145 (lambda* (#:key outputs inputs #:allow-other-keys)
5146 (let ((cairo (assoc-ref inputs "cairo")))
5147 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5148 ;; has not effect.
5149 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5150 (setenv "HOME" (getcwd))
5151 ;; Fix rounding errors when using the x87 FPU.
5152 (when (string-prefix? "i686" ,(%current-system))
5153 (setenv "CFLAGS" "-ffloat-store"))
5154 (call-with-output-file "setup.cfg"
5155 (lambda (port)
5156 (format port "[directories]~%
5157 basedirlist = ~a,~a~%
5158 [packages]~%
5159 tests = True~%"
5160 (assoc-ref inputs "tcl")
5161 (assoc-ref inputs "tk")))))
5162 #t)))))
5163 (home-page "https://matplotlib.org/")
5164 (synopsis "2D plotting library for Python")
5165 (description
5166 "Matplotlib is a Python 2D plotting library which produces publication
5167 quality figures in a variety of hardcopy formats and interactive environments
5168 across platforms. Matplotlib can be used in Python scripts, the python and
5169 ipython shell, web application servers, and six graphical user interface
5170 toolkits.")
5171 (license license:psfl)
5172 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5173
5174 (define-public python2-matplotlib
5175 (let ((matplotlib (package-with-python2
5176 (strip-python2-variant python-matplotlib))))
5177 (package (inherit matplotlib)
5178 (version "2.2.4")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (pypi-uri "matplotlib" version))
5183 (sha256
5184 (base32
5185 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5186 (arguments
5187 (substitute-keyword-arguments (package-arguments matplotlib)
5188 ((#:phases phases)
5189 `(modify-phases ,phases
5190 (replace 'install-jquery-ui
5191 (lambda* (#:key outputs inputs #:allow-other-keys)
5192 (let ((dir (string-append (assoc-ref outputs "out")
5193 "/lib/python2.7/site-packages/"
5194 "matplotlib/backends/web_backend/")))
5195 (mkdir-p dir)
5196 (invoke "unzip"
5197 (assoc-ref inputs "jquery-ui")
5198 "-d" dir))
5199 #t))
5200 (delete 'fix-and-disable-failing-tests)
5201 (delete 'check))))) ; These tests weren't run the the past.
5202 ;; Make sure to use special packages for Python 2 instead
5203 ;; of those automatically rewritten by package-with-python2.
5204 (propagated-inputs
5205 `(("python2-pycairo" ,python2-pycairo)
5206 ("python2-backports-functools-lru-cache"
5207 ,python2-backports-functools-lru-cache)
5208 ("python2-functools32" ,python2-functools32)
5209 ("python2-pygobject-2" ,python2-pygobject-2)
5210 ("python2-subprocess32" ,python2-subprocess32)
5211 ("python2-tkinter" ,python-2 "tk")
5212 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5213 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5214
5215 (define-public python-matplotlib-documentation
5216 (package
5217 (name "python-matplotlib-documentation")
5218 (version (package-version python-matplotlib))
5219 (source (package-source python-matplotlib))
5220 (build-system python-build-system)
5221 (native-inputs
5222 `(("python-matplotlib" ,python-matplotlib)
5223 ("python-colorspacious" ,python-colorspacious)
5224 ("python-sphinx" ,python-sphinx)
5225 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5226 ("python-sphinx-gallery" ,python-sphinx-gallery)
5227 ("python-numpydoc" ,python-numpydoc)
5228 ("python-ipython" ,python-ipython)
5229 ("python-ipykernel" ,python-ipykernel)
5230 ("python-mock" ,python-mock)
5231 ("graphviz" ,graphviz)
5232 ("texlive" ,(texlive-union (list texlive-amsfonts
5233 texlive-latex-amsmath
5234 texlive-latex-enumitem
5235 texlive-latex-expdlist
5236 texlive-latex-geometry
5237 texlive-latex-preview
5238 texlive-latex-type1cm
5239 texlive-latex-ucs
5240
5241 texlive-generic-pdftex
5242
5243 texlive-fonts-ec
5244 texlive-fonts-adobe-times
5245 texlive-fonts-txfonts)))
5246 ("texinfo" ,texinfo)
5247 ,@(package-native-inputs python-matplotlib)))
5248 (arguments
5249 `(#:tests? #f ; we're only generating documentation
5250 #:phases
5251 (modify-phases %standard-phases
5252 ;; The tests in python-matplotlib are run after the install phase, so
5253 ;; we need to delete the extra phase here.
5254 (delete 'check)
5255 (replace 'build
5256 (lambda _
5257 (chdir "doc")
5258 (setenv "PYTHONPATH"
5259 (string-append (getenv "PYTHONPATH")
5260 ":" (getcwd) "/../examples/units"))
5261 (substitute* "conf.py"
5262 ;; Don't use git.
5263 (("^SHA = check_output.*")
5264 (string-append "SHA = \"" ,version "\"\n"))
5265 ;; Don't fetch intersphinx files from the Internet
5266 (("^explicit_order_folders" m)
5267 (string-append "intersphinx_mapping = {}\n" m))
5268 (("'sphinx.ext.intersphinx',") "")
5269 ;; Disable URL embedding which requires internet access.
5270 (("'https://docs.scipy.org/doc/numpy'") "None")
5271 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5272 (invoke "make"
5273 "SPHINXBUILD=sphinx-build"
5274 "SPHINXOPTS=" ; don't abort on warnings
5275 "html" "texinfo")))
5276 (replace 'install
5277 (lambda* (#:key inputs outputs #:allow-other-keys)
5278 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5279 (doc (string-append data "/doc/python-matplotlib-" ,version))
5280 (info (string-append data "/info"))
5281 (html (string-append doc "/html")))
5282 (mkdir-p html)
5283 (mkdir-p info)
5284 (copy-recursively "build/html" html)
5285 (symlink (string-append html "/_images")
5286 (string-append info "/matplotlib-figures"))
5287 (with-directory-excursion "build/texinfo"
5288 (substitute* "matplotlib.texi"
5289 (("@image\\{([^,]*)" all file)
5290 (string-append "@image{matplotlib-figures/" file)))
5291 (symlink (string-append html "/_images")
5292 "./matplotlib-figures")
5293 (invoke "makeinfo" "--no-split"
5294 "-o" "matplotlib.info" "matplotlib.texi"))
5295 (install-file "build/texinfo/matplotlib.info" info))
5296 #t)))))
5297 (home-page (package-home-page python-matplotlib))
5298 (synopsis "Documentation for the python-matplotlib package")
5299 (description (package-description python-matplotlib))
5300 (license (package-license python-matplotlib))))
5301
5302 (define-public python2-matplotlib-documentation
5303 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5304 (package
5305 (inherit parent)
5306 (native-inputs
5307 (alist-delete "python-sphinx-copybutton"
5308 (package-native-inputs parent))))))
5309
5310 (define-public python-matplotlib-venn
5311 (package
5312 (name "python-matplotlib-venn")
5313 (version "0.11.5")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5318 (sha256
5319 (base32
5320 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5321 (build-system python-build-system)
5322 (arguments '(#:tests? #f)) ; tests are not included
5323 (propagated-inputs
5324 `(("python-matplotlib" ,python-matplotlib)
5325 ("python-numpy" ,python-numpy)
5326 ("python-scipy" ,python-scipy)))
5327 (native-inputs
5328 `(("unzip" ,unzip)))
5329 (home-page "https://github.com/konstantint/matplotlib-venn")
5330 (synopsis "Plot area-proportional Venn diagrams")
5331 (description
5332 "This package provides tools for plotting area-proportional two- and
5333 three-way Venn diagrams in @code{matplotlib}.")
5334 (license license:expat)))
5335
5336 (define-public python-pysnptools
5337 (package
5338 (name "python-pysnptools")
5339 (version "0.4.11")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "pysnptools" version))
5344 (sha256
5345 (base32
5346 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5347 (build-system python-build-system)
5348 (arguments
5349 `(#:tests? #f ; no test data are included
5350 #:phases
5351 (modify-phases %standard-phases
5352 (replace 'check
5353 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5354 (if tests?
5355 (begin
5356 (add-installed-pythonpath inputs outputs)
5357 (invoke "python3" "pysnptools/test.py"))
5358 #t))))))
5359 (propagated-inputs
5360 `(("python-dill" ,python-dill)
5361 ("python-h5py" ,python-h5py)
5362 ("python-numpy" ,python-numpy)
5363 ("python-pandas" ,python-pandas)
5364 ("python-psutil" ,python-psutil)
5365 ("python-scipy" ,python-scipy)))
5366 (native-inputs
5367 `(("python-cython" ,python-cython)))
5368 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5369 (synopsis "Library for reading and manipulating genetic data")
5370 (description
5371 "PySnpTools is a library for reading and manipulating genetic data. It
5372 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5373 those files. It can also efficiently manipulate ranges of integers using set
5374 operators such as union, intersection, and difference.")
5375 (license license:asl2.0)))
5376
5377 (define-public python2-pysnptools
5378 (package-with-python2 python-pysnptools))
5379
5380 (define-public python-wurlitzer
5381 (package
5382 (name "python-wurlitzer")
5383 (version "2.0.1")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "wurlitzer" version))
5388 (sha256
5389 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5390 (build-system python-build-system)
5391 (arguments
5392 '(#:phases
5393 (modify-phases %standard-phases
5394 (replace 'check
5395 (lambda _
5396 (invoke "pytest" "-vv" "test.py"))))))
5397 (native-inputs
5398 `(("python-mock" ,python-mock)
5399 ("python-pytest" ,python-pytest)))
5400 (home-page "https://github.com/minrk/wurlitzer")
5401 (synopsis "Capture C-level output in context managers")
5402 (description
5403 "This library helps to redirect @code{sys.stdout} to a stream or a file
5404 while executing some piece of code, including C code running within a Python
5405 process.")
5406 (license license:expat)))
5407
5408 (define-public python-socksipy-branch
5409 (package
5410 (name "python-socksipy-branch")
5411 (version "1.01")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "SocksiPy-branch" version))
5416 (sha256
5417 (base32
5418 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5419 (build-system python-build-system)
5420 (arguments
5421 `(#:tests? #f)) ; There are no tests
5422 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5423 (synopsis "Python SOCKS module")
5424 (description
5425 "SocksiPy - A Python SOCKS client module. It provides a
5426 socket-like interface that supports connections to any TCP
5427 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5428 The original version was developed by Dan Haim, this is a
5429 branch created by Mario Vilas to address some open issues,
5430 as the original project seems to have been abandoned circa 2007.")
5431 (license license:bsd-3)))
5432
5433 (define-public python2-socksipy-branch
5434 (package-with-python2 python-socksipy-branch))
5435
5436 (define-public python-socksipychain
5437 (package
5438 (name "python-socksipychain")
5439 (version "2.1.2")
5440 (source
5441 (origin
5442 (method git-fetch)
5443 (uri (git-reference
5444 (url "https://github.com/pagekite/PySocksipyChain")
5445 (commit (string-append "v" version))))
5446 (file-name (git-file-name name version))
5447 (sha256
5448 (base32
5449 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5450 (build-system python-build-system)
5451 (arguments
5452 `(#:tests? #f)) ; Tests try to access the network.
5453 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5454 (synopsis "Python SOCKS module with chained proxies support")
5455 (description
5456 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5457 adds support for arbitrary chaining of proxy servers and various modes of
5458 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5459 a simple netcat replacement with chaining support.")
5460 (license license:bsd-3)))
5461
5462 (define-public python-pycodestyle
5463 (package
5464 (name "python-pycodestyle")
5465 (version "2.6.0")
5466 (source
5467 (origin
5468 (method url-fetch)
5469 (uri (pypi-uri "pycodestyle" version))
5470 (sha256
5471 (base32
5472 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5473 (build-system python-build-system)
5474 (arguments
5475 `(#:phases
5476 (modify-phases %standard-phases
5477 (replace 'check
5478 (lambda _
5479 (invoke "pytest" "-vv"))))))
5480 (native-inputs
5481 `(("python-pytest" ,python-pytest)))
5482 (home-page "https://pycodestyle.readthedocs.io/")
5483 (synopsis "Python style guide checker")
5484 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5485 Python code against some of the style conventions in
5486 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5487 (license license:expat)))
5488
5489 (define-public python2-pycodestyle
5490 (package-with-python2 python-pycodestyle))
5491
5492 (define-public python-multidict
5493 (package
5494 (name "python-multidict")
5495 (version "4.7.5")
5496 (source
5497 (origin
5498 (method url-fetch)
5499 (uri (pypi-uri "multidict" version))
5500 (sha256
5501 (base32
5502 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5503 (build-system python-build-system)
5504 (arguments
5505 '(#:modules ((ice-9 ftw)
5506 (srfi srfi-1)
5507 (srfi srfi-26)
5508 (guix build utils)
5509 (guix build python-build-system))
5510 #:phases (modify-phases %standard-phases
5511 (replace 'check
5512 (lambda* (#:key tests? #:allow-other-keys)
5513 (if tests?
5514 (begin
5515 (let ((libdir (find (cut string-prefix? "lib." <>)
5516 (scandir "build"))))
5517 (setenv "PYTHONPATH"
5518 (string-append "./build/" libdir ":"
5519 (getenv "PYTHONPATH")))
5520 (invoke "pytest" "-vv")))
5521 (format #t "test suite not run~%"))
5522 #t)))))
5523 (native-inputs
5524 `(("python-pytest" ,python-pytest)
5525 ("python-pytest-cov" ,python-pytest-cov)))
5526 (home-page "https://github.com/aio-libs/multidict/")
5527 (synopsis "Multidict implementation")
5528 (description "Multidict is dict-like collection of key-value pairs
5529 where key might be occurred more than once in the container.")
5530 (license license:asl2.0)))
5531
5532 (define-public python-orderedmultidict
5533 (package
5534 (name "python-orderedmultidict")
5535 (version "1.0")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (pypi-uri "orderedmultidict" version))
5540 (sha256
5541 (base32
5542 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5543 (build-system python-build-system)
5544 (arguments
5545 `(#:phases
5546 (modify-phases %standard-phases
5547 (add-after 'unpack 'fix-tests
5548 (lambda _
5549 ;; The package uses nosetest for running the tests.
5550 ;; Adding this initfile allows to run the test suite
5551 ;; without requiring nosetest.
5552 (with-output-to-file "tests/__init__.py" newline)
5553 #t)))))
5554 (propagated-inputs
5555 `(("python-six" ,python-six)))
5556 (native-inputs
5557 `(("python-pycodestyle" ,python-pycodestyle)))
5558 (home-page "https://github.com/gruns/orderedmultidict")
5559 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5560 (description "This package contains a library for ordered multivalue
5561 dictionaries. A multivalue dictionary is a dictionary that can store
5562 multiple values for the same key. An ordered multivalue dictionary is a
5563 multivalue dictionary that retains the order of insertions and deletions.")
5564 (license license:unlicense)))
5565
5566 (define-public python2-orderedmultidict
5567 (package-with-python2 python-orderedmultidict))
5568
5569 (define-public python-autopep8
5570 (package
5571 (name "python-autopep8")
5572 (version "1.5.3")
5573 (source
5574 (origin
5575 (method url-fetch)
5576 (uri (pypi-uri "autopep8" version))
5577 (sha256
5578 (base32
5579 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5580 (build-system python-build-system)
5581 (propagated-inputs
5582 `(("python-pycodestyle" ,python-pycodestyle)
5583 ("python-toml" ,python-toml)))
5584 (home-page "https://github.com/hhatto/autopep8")
5585 (synopsis "Format Python code according to the PEP 8 style guide")
5586 (description
5587 "@code{autopep8} automatically formats Python code to conform to
5588 the PEP 8 style guide. It uses the pycodestyle utility to determine
5589 what parts of the code needs to be formatted. @code{autopep8} is
5590 capable of fixing most of the formatting issues that can be reported
5591 by pycodestyle.")
5592 (license (license:non-copyleft
5593 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5594
5595 (define-public python2-autopep8
5596 (package-with-python2 python-autopep8))
5597
5598 (define-public python-distlib
5599 (package
5600 (name "python-distlib")
5601 (version "0.3.0")
5602 (source
5603 (origin
5604 (method url-fetch)
5605 (uri (pypi-uri "distlib" version ".zip"))
5606 (sha256
5607 (base32
5608 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5609 (build-system python-build-system)
5610 (arguments
5611 `(#:phases
5612 (modify-phases %standard-phases
5613 (add-before 'build 'no-/bin/sh
5614 (lambda _
5615 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5616 (("/bin/sh") (which "sh")))
5617 #t))
5618 (add-before 'check 'prepare-test-env
5619 (lambda _
5620 (setenv "HOME" "/tmp")
5621 ;; NOTE: Any value works, the variable just has to be present.
5622 (setenv "SKIP_ONLINE" "1")
5623 #t)))))
5624 (native-inputs `(("unzip" ,unzip)))
5625 (home-page "https://bitbucket.org/pypa/distlib")
5626 (synopsis "Distribution utilities")
5627 (description "Distlib is a library which implements low-level functions that
5628 relate to packaging and distribution of Python software. It is intended to be
5629 used as the basis for third-party packaging tools.")
5630 (license license:psfl)))
5631
5632 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5633 (define-public python-distlib/next
5634 (package
5635 (inherit python-distlib)
5636 (version "0.3.1")
5637 (source
5638 (origin
5639 (method url-fetch)
5640 (uri (pypi-uri "distlib" version ".zip"))
5641 (sha256
5642 (base32
5643 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5644
5645 (define-public python-distutils-extra
5646 (package
5647 (name "python-distutils-extra")
5648 (version "2.38")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5653 version "/+download/python-distutils-extra-"
5654 version ".tar.gz"))
5655 (sha256
5656 (base32
5657 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5658 (build-system python-build-system)
5659 (home-page "https://launchpad.net/python-distutils-extra/")
5660 (synopsis "Enhancements to Python's distutils")
5661 (description
5662 "The python-distutils-extra module enables you to easily integrate
5663 gettext support, themed icons, and scrollkeeper-based documentation into
5664 Python's distutils.")
5665 (license license:gpl2)))
5666
5667 (define-public python2-distutils-extra
5668 (package-with-python2 python-distutils-extra))
5669
5670 (define-public python2-elib.intl
5671 (package
5672 (name "python2-elib.intl")
5673 (version "0.0.3")
5674 (source
5675 (origin
5676 ;; This project doesn't tag releases or publish tarballs, so we take
5677 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5678 (method git-fetch)
5679 (uri (git-reference
5680 (url "https://github.com/dieterv/elib.intl")
5681 (commit "d09997cfef")))
5682 (file-name (string-append name "-" version "-checkout"))
5683 (sha256
5684 (base32
5685 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5686 (build-system python-build-system)
5687 (arguments
5688 ;; incompatible with Python 3 (exception syntax)
5689 `(#:python ,python-2
5690 #:tests? #f))
5691 (home-page "https://github.com/dieterv/elib.intl")
5692 (synopsis "Enhanced internationalization for Python")
5693 (description
5694 "The elib.intl module provides enhanced internationalization (I18N)
5695 services for your Python modules and applications.")
5696 (license license:lgpl3+)))
5697
5698 (define-public python-olefile
5699 (package
5700 (name "python-olefile")
5701 (version "0.46")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5706 "download/v" version "/olefile-" version ".tar.gz"))
5707 (file-name (string-append name "-" version ".tar.gz"))
5708 (sha256
5709 (base32
5710 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5711 (build-system python-build-system)
5712 (home-page "https://www.decalage.info/python/olefileio")
5713 (synopsis "Read and write Microsoft OLE2 files.")
5714 (description
5715 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5716 Storage or Compound Document, Microsoft Office). It is an improved version of
5717 the OleFileIO module from PIL, the Python Image Library.")
5718 (license license:bsd-3)))
5719
5720 (define-public python2-olefile
5721 (package-with-python2 python-olefile))
5722
5723 (define-public python-pillow
5724 (package
5725 (name "python-pillow")
5726 (version "8.0.1")
5727 (source
5728 (origin
5729 (method url-fetch)
5730 (uri (pypi-uri "Pillow" version))
5731 (sha256
5732 (base32
5733 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5734 (build-system python-build-system)
5735 (native-inputs
5736 `(("python-pytest" ,python-pytest)))
5737 (inputs
5738 `(("freetype" ,freetype)
5739 ("lcms" ,lcms)
5740 ("libjpeg" ,libjpeg-turbo)
5741 ("libtiff" ,libtiff)
5742 ("libwebp" ,libwebp)
5743 ("openjpeg" ,openjpeg)
5744 ("zlib" ,zlib)))
5745 (propagated-inputs
5746 `(("python-olefile" ,python-olefile)))
5747 (arguments
5748 `(#:phases
5749 (modify-phases %standard-phases
5750 (add-after 'unpack 'patch-ldconfig
5751 (lambda _
5752 (substitute* "setup.py"
5753 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5754 (replace 'check
5755 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5756 (if tests?
5757 (begin
5758 (setenv "HOME" (getcwd))
5759 ;; Make installed package available for running the tests.
5760 (add-installed-pythonpath inputs outputs)
5761 (invoke "python" "selftest.py" "--installed")
5762 (invoke "python" "-m" "pytest" "-vv"))
5763 #t))))))
5764 (home-page "https://python-pillow.org")
5765 (synopsis "Fork of the Python Imaging Library")
5766 (description
5767 "The Python Imaging Library adds image processing capabilities to your
5768 Python interpreter. This library provides extensive file format support, an
5769 efficient internal representation, and fairly powerful image processing
5770 capabilities. The core image library is designed for fast access to data
5771 stored in a few basic pixel formats. It should provide a solid foundation for
5772 a general image processing tool.")
5773 (properties `((python2-variant . ,(delay python2-pillow))))
5774 (license (license:x11-style
5775 "http://www.pythonware.com/products/pil/license.htm"
5776 "The PIL Software License"))))
5777
5778 (define-public python2-pillow
5779 (package-with-python2
5780 (package
5781 (inherit (strip-python2-variant python-pillow))
5782 ;; Version 6 is the last series with Python 2 support.
5783 (version "6.2.2")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "Pillow" version))
5788 (sha256
5789 (base32
5790 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5791
5792 (define-public python-pillow-2.9
5793 (package
5794 (inherit python-pillow)
5795 (version "2.9.0")
5796 (source
5797 (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "Pillow" version))
5800 (sha256
5801 (base32
5802 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5803 (arguments
5804 (substitute-keyword-arguments (package-arguments python-pillow)
5805 ((#:tests? _ #f) #f)))
5806 (properties '((hidden? #t)))))
5807
5808 (define-public python-roifile
5809 (package
5810 (name "python-roifile")
5811 (version "2020.5.28")
5812 (source
5813 (origin
5814 (method url-fetch)
5815 (uri (pypi-uri "roifile" version))
5816 (sha256
5817 (base32
5818 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5819 (build-system python-build-system)
5820 (arguments `(#:tests? #f)) ; there are none
5821 (propagated-inputs
5822 `(("python-numpy" ,python-numpy)))
5823 (home-page "https://www.lfd.uci.edu/~gohlke/")
5824 (synopsis "Read and write ImageJ ROI format")
5825 (description "Roifile is a Python library to read, write, create, and plot
5826 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5827 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5828 (license license:bsd-3)))
5829
5830 (define-public python-tifffile
5831 (package
5832 (name "python-tifffile")
5833 (version "2020.6.3")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "tifffile" version))
5838 (sha256
5839 (base32
5840 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5841 (build-system python-build-system)
5842 ;; Tests require lfdfiles, which depends on tifffile
5843 (arguments `(#:tests? #f))
5844 (propagated-inputs
5845 `(("python-numpy" ,python-numpy)
5846 ;;("python-lfdfiles" ,python-lfdfiles)
5847 ("python-roifile" ,python-roifile)))
5848 (home-page "https://www.lfd.uci.edu/~gohlke/")
5849 (synopsis "Read and write TIFF(r) files")
5850 (description "This package lets you read image and metadata from many
5851 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5852 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5853 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5854 (license license:bsd-3)))
5855
5856 (define-public python-lfdfiles
5857 (package
5858 (name "python-lfdfiles")
5859 (version "2020.1.1")
5860 (source
5861 (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "lfdfiles" version))
5864 (sha256
5865 (base32
5866 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5867 (build-system python-build-system)
5868 (propagated-inputs
5869 `(("python-click" ,python-click)
5870 ("python-numpy" ,python-numpy)
5871 ("python-tifffile" ,python-tifffile)))
5872 (home-page "https://www.lfd.uci.edu/~gohlke/")
5873 (synopsis "Work with LFD data files")
5874 (description
5875 "Lfdfiles is a Python library and console script for reading, writing,
5876 converting, and viewing many of the proprietary file formats used to store
5877 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5878 (license license:bsd-3)))
5879
5880 (define-public python-imageio
5881 (package
5882 (name "python-imageio")
5883 (version "2.8.0")
5884 (source
5885 (origin
5886 (method url-fetch)
5887 (uri (pypi-uri "imageio" version))
5888 (sha256
5889 (base32
5890 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5891 (build-system python-build-system)
5892 (arguments
5893 `(#:tests? #f ; many tests require online data
5894 #:phases
5895 (modify-phases %standard-phases
5896 (replace 'check
5897 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5898 (if tests?
5899 (begin
5900 ;; Make installed package available for running the tests.
5901 (add-installed-pythonpath inputs outputs)
5902 (invoke "pytest" "-vv"))
5903 #t))))))
5904 (propagated-inputs
5905 `(("python-numpy" ,python-numpy)
5906 ("python-pillow" ,python-pillow)
5907 ("python-psutil" ,python-psutil)))
5908 (native-inputs
5909 `(("python-pytest" ,python-pytest)))
5910 (home-page "https://imageio.github.io/")
5911 (synopsis "Library for reading and writing a wide range of image data")
5912 (description
5913 "Imageio is a Python library that provides an easy interface to read and
5914 write a wide range of image data, including animated images, video, volumetric
5915 data, and scientific formats.")
5916 (license license:bsd-2)))
5917
5918 (define-public python-pycparser
5919 (package
5920 (name "python-pycparser")
5921 (version "2.20")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "pycparser" version))
5926 (sha256
5927 (base32
5928 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5929 (outputs '("out" "doc"))
5930 (build-system python-build-system)
5931 (native-inputs
5932 `(("pkg-config" ,pkg-config)))
5933 (arguments
5934 `(#:phases
5935 (modify-phases %standard-phases
5936 (replace 'check
5937 (lambda _
5938 (with-directory-excursion "tests"
5939 (invoke "python" "all_tests.py"))
5940 #t))
5941 (add-after 'install 'install-doc
5942 (lambda* (#:key outputs #:allow-other-keys)
5943 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5944 (doc (string-append data "/doc/" ,name "-" ,version))
5945 (examples (string-append doc "/examples")))
5946 (mkdir-p examples)
5947 (for-each (lambda (file)
5948 (copy-file (string-append "." file)
5949 (string-append doc file)))
5950 '("/README.rst" "/CHANGES" "/LICENSE"))
5951 (copy-recursively "examples" examples)
5952 #t))))))
5953 (home-page "https://github.com/eliben/pycparser")
5954 (synopsis "C parser in Python")
5955 (description
5956 "Pycparser is a complete parser of the C language, written in pure Python
5957 using the PLY parsing library. It parses C code into an AST and can serve as
5958 a front-end for C compilers or analysis tools.")
5959 (license license:bsd-3)))
5960
5961 (define-public python2-pycparser
5962 (package-with-python2 python-pycparser))
5963
5964 (define-public python-xlsxwriter
5965 (package
5966 (name "python-xlsxwriter")
5967 (version "1.3.7")
5968 (source
5969 (origin
5970 ;; There are no tests in the PyPI tarball.
5971 (method git-fetch)
5972 (uri (git-reference
5973 (url "https://github.com/jmcnamara/XlsxWriter")
5974 (commit (string-append "RELEASE_" version))))
5975 (file-name (git-file-name name version))
5976 (sha256
5977 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
5978 (build-system python-build-system)
5979 (home-page "https://github.com/jmcnamara/XlsxWriter")
5980 (synopsis "Python module for creating Excel XLSX files")
5981 (description
5982 "XlsxWriter is a Python module that can be used to write text, numbers,
5983 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
5984 (license license:bsd-2)))
5985
5986 (define-public python-pywavelets
5987 (package
5988 (name "python-pywavelets")
5989 (version "1.1.1")
5990 (home-page "https://github.com/PyWavelets/pywt")
5991 (source (origin
5992 (method url-fetch)
5993 (uri (pypi-uri "PyWavelets" version))
5994 (sha256
5995 (base32
5996 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5997 (build-system python-build-system)
5998 (arguments
5999 '(#:modules ((ice-9 ftw)
6000 (srfi srfi-1)
6001 (srfi srfi-26)
6002 (guix build utils)
6003 (guix build python-build-system))
6004 #:phases
6005 (modify-phases %standard-phases
6006 (replace 'check
6007 (lambda _
6008 (let ((cwd (getcwd))
6009 (libdir (find (cut string-prefix? "lib." <>)
6010 (scandir "build"))))
6011 (with-directory-excursion (string-append cwd "/build/" libdir)
6012 (invoke "pytest" "-vv"))))))))
6013 (native-inputs
6014 `(("python-matplotlib" ,python-matplotlib) ;for tests
6015 ("python-pytest" ,python-pytest)))
6016 (propagated-inputs
6017 `(("python-numpy" ,python-numpy)))
6018 (synopsis "Wavelet transforms in Python")
6019 (description
6020 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6021 mathematical basis functions that are localized in both time and frequency.
6022 Wavelet transforms are time-frequency transforms employing wavelets. They are
6023 similar to Fourier transforms, the difference being that Fourier transforms are
6024 localized only in frequency instead of in time and frequency.")
6025 (license license:expat)))
6026
6027 (define-public python-pywinrm
6028 (package
6029 (name "python-pywinrm")
6030 (version "0.4.1")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (pypi-uri "pywinrm" version))
6035 (sha256
6036 (base32
6037 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6038 (build-system python-build-system)
6039 (propagated-inputs
6040 `(("python-six" ,python-six)
6041 ("python-requests_ntlm" ,python-requests_ntlm)
6042 ("python-xmltodict" ,python-xmltodict)
6043 ("python-kerberos" ,python-kerberos)))
6044 (native-inputs
6045 `(("python-mock" ,python-mock)
6046 ("python-pytest" ,python-pytest)))
6047 (home-page "https://github.com/diyan/pywinrm/")
6048 (synopsis
6049 "Python library for Windows Remote Management (WinRM)")
6050 (description
6051 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6052 service. It allows you to invoke commands on target Windows machines from
6053 any machine that can run Python.")
6054 (license license:expat)))
6055
6056 (define-public python-xcffib
6057 (package
6058 (name "python-xcffib")
6059 (version "0.6.0")
6060 (source
6061 (origin
6062 (method url-fetch)
6063 (uri (pypi-uri "xcffib" version))
6064 (sha256
6065 (base32
6066 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6067 (build-system python-build-system)
6068 (inputs
6069 `(("libxcb" ,libxcb)))
6070 (propagated-inputs
6071 `(("python-cffi" ,python-cffi) ; used at run time
6072 ("python-six" ,python-six)))
6073 (arguments
6074 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6075 #:tests? #f
6076 #:phases
6077 (modify-phases %standard-phases
6078 (add-after 'unpack 'fix-libxcb-path
6079 (lambda* (#:key inputs #:allow-other-keys)
6080 (let ((libxcb (assoc-ref inputs "libxcb")))
6081 (substitute* '("xcffib/__init__.py")
6082 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6083 #t)))
6084 (add-after 'install 'install-doc
6085 (lambda* (#:key outputs #:allow-other-keys)
6086 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6087 "/doc/" ,name "-" ,version)))
6088 (mkdir-p doc)
6089 (copy-file "README.md"
6090 (string-append doc "/README.md"))
6091 #t))))))
6092 (home-page "https://github.com/tych0/xcffib")
6093 (synopsis "XCB Python bindings")
6094 (description
6095 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6096 support for Python 3 and PyPy. It is based on cffi.")
6097 (license license:expat)))
6098
6099 (define-public python2-xcffib
6100 (package-with-python2 python-xcffib))
6101
6102 (define-public python-cairocffi
6103 (package
6104 (name "python-cairocffi")
6105 (version "1.2.0")
6106 (source
6107 (origin
6108 ;; The PyPI archive does not include the documentation, so use Git.
6109 (method git-fetch)
6110 (uri (git-reference
6111 (url "https://github.com/Kozea/cairocffi")
6112 (commit (string-append "v" version))))
6113 (file-name (git-file-name name version))
6114 (sha256
6115 (base32
6116 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6117 (build-system python-build-system)
6118 (outputs '("out" "doc"))
6119 (inputs
6120 `(("glib" ,glib)
6121 ("gtk+" ,gtk+)
6122 ("gdk-pixbuf" ,gdk-pixbuf)
6123 ("cairo" ,cairo)))
6124 (native-inputs
6125 `(("python-numpy" ,python-numpy)
6126 ("python-pytest" ,python-pytest)
6127 ("python-pytest-cov" ,python-pytest-cov)
6128 ("python-pytest-runner" ,python-pytest-runner)
6129 ("python-sphinx" ,python-sphinx)
6130 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6131 (propagated-inputs
6132 `(("python-xcffib" ,python-xcffib))) ; used at run time
6133 (arguments
6134 `(#:phases
6135 (modify-phases %standard-phases
6136 (add-after 'unpack 'patch-paths
6137 (lambda* (#:key inputs #:allow-other-keys)
6138 (substitute* "cairocffi/__init__.py"
6139 ;; Hack the dynamic library loading mechanism.
6140 (("find_library\\(library_name\\)")
6141 "\"found\"")
6142 (("filenames = \\(library_filename,\\) \\+ filenames")
6143 "pass")
6144 (("libcairo.so.2")
6145 (string-append (assoc-ref inputs "cairo")
6146 "/lib/libcairo.so.2")))
6147 (substitute* "cairocffi/pixbuf.py"
6148 (("libgdk_pixbuf-2.0.so.0")
6149 (string-append (assoc-ref inputs "gdk-pixbuf")
6150 "/lib/libgdk_pixbuf-2.0.so.0"))
6151 (("libgobject-2.0.so.0")
6152 (string-append (assoc-ref inputs "glib")
6153 "/lib/libgobject-2.0.so.0"))
6154 (("libglib-2.0.so.0")
6155 (string-append (assoc-ref inputs "glib")
6156 "/lib/libglib-2.0.so.0"))
6157 (("libgdk-3.so.0")
6158 (string-append (assoc-ref inputs "gtk+")
6159 "/lib/libgdk-3.so.0")))
6160 #t))
6161 (add-after 'unpack 'disable-linters
6162 ;; Their check fails; none of our business.
6163 (lambda _
6164 (substitute* "setup.cfg"
6165 ((".*pytest-flake8.*") "")
6166 ((".*pytest-isort.*") "")
6167 (("--flake8") "")
6168 (("--isort") ""))
6169 #t))
6170 (add-after 'install 'install-doc
6171 (lambda* (#:key inputs outputs #:allow-other-keys)
6172 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6173 (doc (string-append data "/doc/" ,name "-" ,version))
6174 (html (string-append doc "/html")))
6175 (setenv "LD_LIBRARY_PATH"
6176 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6177 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6178 (setenv "LANG" "en_US.UTF-8")
6179 (mkdir-p html)
6180 (for-each (lambda (file)
6181 (copy-file (string-append "." file)
6182 (string-append doc file)))
6183 '("/README.rst" "/NEWS.rst"))
6184 (system* "python" "setup.py" "build_sphinx")
6185 (copy-recursively "docs/_build/html" html)
6186 #t))))))
6187 (home-page "https://github.com/Kozea/cairocffi")
6188 (synopsis "Python bindings and object-oriented API for Cairo")
6189 (description
6190 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6191 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6192 graphics library with support for multiple backends including image buffers,
6193 PNG, PostScript, PDF, and SVG file output.")
6194 (license license:bsd-3)))
6195
6196 (define-public python2-cairocffi
6197 (package-with-python2 python-cairocffi))
6198
6199 (define-public python-decorator
6200 (package
6201 (name "python-decorator")
6202 (version "4.3.0")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "decorator" version))
6207 (sha256
6208 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6209 (build-system python-build-system)
6210 (home-page "https://pypi.org/project/decorator/")
6211 (synopsis "Python module to simplify usage of decorators")
6212 (description
6213 "The aim of the decorator module is to simplify the usage of decorators
6214 for the average programmer, and to popularize decorators usage giving examples
6215 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6216 etc. The core of this module is a decorator factory.")
6217 (license license:expat)))
6218
6219 (define-public python2-decorator
6220 (package-with-python2 python-decorator))
6221
6222 (define-public python-drmaa
6223 (package
6224 (name "python-drmaa")
6225 (version "0.7.7")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "drmaa" version))
6230 (sha256
6231 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6232 (build-system python-build-system)
6233 ;; The test suite requires libdrmaa which is provided by the cluster
6234 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6235 ;; should be set to the path of the libdrmaa library.
6236 (arguments '(#:tests? #f))
6237 (native-inputs
6238 `(("python-nose" ,python-nose)))
6239 (home-page "https://pypi.org/project/drmaa/")
6240 (synopsis "Python bindings for the DRMAA library")
6241 (description
6242 "A Python package for Distributed Resource Management (DRM) job
6243 submission and control. This package is an implementation of the DRMAA 1.0
6244 Python language binding specification.")
6245 (license license:bsd-3)))
6246
6247 (define-public python2-drmaa
6248 (package-with-python2 python-drmaa))
6249
6250 (define-public python-grako
6251 (package
6252 (name "python-grako")
6253 (version "3.99.9")
6254 (source
6255 (origin
6256 (method url-fetch)
6257 (uri
6258 (pypi-uri "grako" version ".zip"))
6259 (sha256
6260 (base32
6261 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6262 (build-system python-build-system)
6263 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6264 (native-inputs
6265 `(("unzip" ,unzip)
6266 ("python-pytest" ,python-pytest)
6267 ("python-pytest-runner" ,python-pytest-runner)))
6268 (home-page "https://bitbucket.org/neogeny/grako")
6269 (synopsis "EBNF parser generator")
6270 (description
6271 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6272 memoizing PEG/Packrat parser in Python.")
6273 (license license:bsd-3)))
6274
6275 (define-public python2-grako
6276 (package-with-python2 python-grako))
6277
6278 (define-public python-grandalf
6279 (package
6280 (name "python-grandalf")
6281 (version "0.7")
6282 (source
6283 (origin
6284 ;; There's no source tarball on PyPI.
6285 (method git-fetch)
6286 (uri (git-reference
6287 (url "https://github.com/bdcht/grandalf")
6288 (commit (string-append "v" version))))
6289 (file-name (git-file-name name version))
6290 (sha256
6291 (base32
6292 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6293 (build-system python-build-system)
6294 (arguments
6295 '(#:phases
6296 (modify-phases %standard-phases
6297 (replace 'check
6298 (lambda _
6299 (invoke "python" "setup.py" "pytest"))))))
6300 (native-inputs
6301 `(("python-pytest" ,python-pytest)
6302 ("python-pytest-runner" ,python-pytest-runner)))
6303 (propagated-inputs
6304 `(("python-numpy" ,python-numpy)
6305 ("python-ply" ,python-ply)))
6306 (home-page "https://github.com/bdcht/grandalf")
6307 (synopsis "Graph and drawing algorithms framework")
6308 (description
6309 "Grandalf is a Python package made for experimentations with graphs
6310 drawing algorithms. It is written in pure Python, and currently implements
6311 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6312 minimization approach. While not as fast or featured as graphviz or other
6313 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6314 than thousands of nodes, while keeping the source code simple enough to tweak
6315 and hack any part of it for experimental purpose. With a total of about 1500
6316 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6317 in less than 600 lines. The energy minimization approach is comprised of only
6318 250 lines!
6319
6320 Grandalf does only 2 not-so-simple things:
6321 @itemize
6322 @item computing the nodes (x,y) coordinates (based on provided nodes
6323 dimensions, and a chosen layout)
6324 @item routing the edges with lines or nurbs
6325 @end itemize
6326
6327 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6328 will help you find where to draw things like nodes and edges, but it’s up to
6329 you to actually draw things with your favorite toolkit.")
6330 ;; The user can choose either license.
6331 (license (list license:gpl2 license:epl1.0))))
6332
6333 (define-public python-gridmap
6334 (package
6335 (name "python-gridmap")
6336 (version "0.14.0")
6337 (source
6338 (origin
6339 (method git-fetch)
6340 (uri (git-reference
6341 (url "https://github.com/pygridtools/gridmap")
6342 (commit (string-append "v" version))))
6343 (file-name (git-file-name name version))
6344 (sha256
6345 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6346 (build-system python-build-system)
6347 (arguments
6348 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6349 (propagated-inputs
6350 `(("python-psutil" ,python-psutil)
6351 ("python-drmaa" ,python-drmaa)
6352 ("python-pyzmq" ,python-pyzmq)))
6353 (home-page "https://github.com/pygridtools/gridmap")
6354 (synopsis "Create jobs on a cluster directly from Python")
6355 (description
6356 "Gridmap is a Python package to allow you to easily create jobs on the
6357 cluster directly from Python. You can directly map Python functions onto the
6358 cluster without needing to write any wrapper code yourself.")
6359 (license license:gpl3+)))
6360
6361 (define-public python2-gridmap
6362 (package-with-python2 python-gridmap))
6363
6364 (define-public python-honcho
6365 (package
6366 (name "python-honcho")
6367 (version "1.0.1")
6368 (source
6369 (origin
6370 (method git-fetch)
6371 (uri (git-reference
6372 (url "https://github.com/nickstenning/honcho")
6373 (commit (string-append "v" version))))
6374 (file-name (git-file-name name version))
6375 (sha256
6376 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6377 (build-system python-build-system)
6378 (native-inputs
6379 `(("python-pytest" ,python-pytest)
6380 ("python-mock" ,python-mock)
6381 ("python-tox" ,python-tox)
6382 ("which" ,which))) ;for tests
6383 (propagated-inputs
6384 `(("python-jinja2" ,python-jinja2)))
6385 (arguments
6386 `(#:phases
6387 (modify-phases %standard-phases
6388 (delete 'check)
6389 (add-after 'install 'check
6390 (lambda* (#:key outputs inputs #:allow-other-keys)
6391 ;; fix honcho path in testsuite
6392 (substitute* "tests/conftest.py"
6393 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6394 "/bin/honcho" "'")))
6395 ;; It's easier to run tests after install.
6396 ;; Make installed package available for running the tests
6397 (add-installed-pythonpath inputs outputs)
6398 (invoke "py.test" "-v"))))))
6399 (home-page "https://github.com/nickstenning/honcho")
6400 (synopsis "Manage Procfile-based applications")
6401 (description
6402 "A Procfile is a file which describes how to run an application
6403 consisting of several processes. honcho starts all listed processes.
6404 The output of all running processes is collected by honcho and
6405 displayed.")
6406 (license license:expat)))
6407
6408 (define-public python2-honcho
6409 (package-with-python2 python-honcho))
6410
6411 (define-public python-pexpect
6412 (package
6413 (name "python-pexpect")
6414 (version "4.8.0")
6415 (source
6416 (origin
6417 (method url-fetch)
6418 (uri (pypi-uri "pexpect" version))
6419 (sha256
6420 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6421 (build-system python-build-system)
6422 (arguments
6423 `(#:phases
6424 (modify-phases %standard-phases
6425 (add-before 'check 'prepare-tests
6426 (lambda _
6427 (substitute* (find-files "tests")
6428 (("/bin/ls") (which "ls"))
6429 (("/bin/echo") (which "echo"))
6430 (("/bin/which") (which "which"))
6431 ;; Many tests try to use the /bin directory which
6432 ;; is not present in the build environment.
6433 ;; Use one that's non-empty and unlikely to change.
6434 (("/bin'") "/dev'")
6435 ;; Disable failing test. See upstream bug report
6436 ;; https://github.com/pexpect/pexpect/issues/568
6437 (("def test_bash") "def _test_bash"))
6438 ;; XXX: Socket connection test gets "Connection reset by peer".
6439 ;; Why does it not work? Delete for now.
6440 (delete-file "tests/test_socket.py")
6441 #t))
6442 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6443 (native-inputs
6444 `(("python-nose" ,python-nose)
6445 ("python-pytest" ,python-pytest)
6446 ("man-db" ,man-db)
6447 ("which" ,which)
6448 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6449 (propagated-inputs
6450 `(("python-ptyprocess" ,python-ptyprocess)))
6451 (home-page "http://pexpect.readthedocs.org/")
6452 (synopsis "Controlling interactive console applications")
6453 (description
6454 "Pexpect is a pure Python module for spawning child applications;
6455 controlling them; and responding to expected patterns in their output.
6456 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6457 child application and control it as if a human were typing commands.")
6458 (license license:isc)))
6459
6460 (define-public python2-pexpect
6461 (package-with-python2 python-pexpect))
6462
6463 (define-public python-setuptools-scm
6464 (package
6465 (name "python-setuptools-scm")
6466 (version "3.4.3")
6467 (source (origin
6468 (method url-fetch)
6469 (uri (pypi-uri "setuptools_scm" version))
6470 (sha256
6471 (base32
6472 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6473 (build-system python-build-system)
6474 (home-page "https://github.com/pypa/setuptools_scm/")
6475 (synopsis "Manage Python package versions in SCM metadata")
6476 (description
6477 "Setuptools_scm handles managing your Python package versions in
6478 @dfn{software configuration management} (SCM) metadata instead of declaring
6479 them as the version argument or in a SCM managed file.")
6480 (license license:expat)))
6481
6482 (define-public python2-setuptools-scm
6483 (package-with-python2 python-setuptools-scm))
6484
6485 (define-public python-sexpdata
6486 (package
6487 (name "python-sexpdata")
6488 (version "0.0.3")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "sexpdata" version))
6493 (sha256
6494 (base32
6495 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6496 (build-system python-build-system)
6497 (home-page "https://github.com/jd-boyd/sexpdata")
6498 (synopsis "S-expression parser for Python")
6499 (description
6500 "Sexpdata is an S-expression parser/serializer. It has load and dump
6501 functions like pickle, json or PyYAML module.")
6502 (license license:bsd-3)))
6503
6504 (define-public python-pathlib2
6505 (package
6506 (name "python-pathlib2")
6507 (version "2.3.3")
6508 (source
6509 (origin
6510 (method url-fetch)
6511 (uri (pypi-uri "pathlib2" version))
6512 (sha256
6513 (base32
6514 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6515 (build-system python-build-system)
6516 (propagated-inputs
6517 `(("python-scandir" ,python-scandir)
6518 ("python-six" ,python-six)))
6519 (home-page "https://pypi.org/project/pathlib2/")
6520 (synopsis "Object-oriented file system paths")
6521 (description "The goal of pathlib2 is to provide a backport of the
6522 standard @code{pathlib} module which tracks the standard library module, so
6523 all the newest features of the standard @code{pathlib} can be used also on
6524 older Python versions.")
6525 (license license:expat)))
6526
6527 (define-public python-importlib-resources
6528 (package
6529 (name "python-importlib-resources")
6530 (version "3.0.0")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "importlib_resources" version))
6535 (sha256
6536 (base32
6537 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6538 (build-system python-build-system)
6539 (native-inputs
6540 `(("python-setuptools-scm" ,python-setuptools-scm)
6541 ("python-toml" ,python-toml)))
6542 (home-page "http://importlib-resources.readthedocs.io/")
6543 (synopsis "Read resources from Python packages")
6544 (description
6545 "@code{importlib_resources} is a backport of Python 3's standard library
6546 @code{importlib.resources} module for Python 2.7, and Python 3.")
6547 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6548 (license license:asl2.0)))
6549
6550 (define-public python2-importlib-resources
6551 (package
6552 (name "python2-importlib-resources")
6553 (version "1.0.2")
6554 (source (origin
6555 (method url-fetch)
6556 (uri (pypi-uri "importlib_resources" version))
6557 (sha256
6558 (base32
6559 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6560 (build-system python-build-system)
6561 (arguments
6562 `(#:python ,python-2
6563 #:phases (modify-phases %standard-phases
6564 ;; The build system tests for python-wheel, but it is
6565 ;; not required for Guix nor the test suite. Just drop
6566 ;; it to make bootstrapping pytest easier.
6567 (add-after 'unpack 'drop-wheel-dependency
6568 (lambda _
6569 (substitute* "setup.cfg"
6570 (("^[[:blank:]]+wheel")
6571 ""))
6572 #t)))))
6573 (propagated-inputs
6574 `(("python-pathlib2" ,python2-pathlib2)
6575 ("python-typing" ,python2-typing)))
6576 (home-page "https://gitlab.com/python-devs/importlib_resources")
6577 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6578 (description
6579 "This package provides an implementation of @code{importlib.resources}
6580 for older versions of Python.")
6581 (license license:asl2.0)))
6582
6583 ;; For importlib-metadata-bootstrap below.
6584 (define-public python2-importlib-resources-bootstrap
6585 (hidden-package
6586 (package/inherit
6587 python2-importlib-resources
6588 (name "python2-importlib-resources-bootstrap")
6589 (propagated-inputs
6590 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6591 ("python-typing" ,python2-typing))))))
6592
6593 (define-public python-importlib-metadata
6594 (package
6595 (name "python-importlib-metadata")
6596 (version "1.5.0")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "importlib_metadata" version))
6601 (sha256
6602 (base32
6603 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6604 (build-system python-build-system)
6605 (propagated-inputs
6606 `(("python-zipp" ,python-zipp)))
6607 (native-inputs
6608 `(("python-setuptools-scm" ,python-setuptools-scm)
6609 ("python-pyfakefs" ,python-pyfakefs)
6610 ("python-packaging" ,python-packaging)))
6611 (home-page "https://importlib-metadata.readthedocs.io/")
6612 (synopsis "Read metadata from Python packages")
6613 (description
6614 "@code{importlib_metadata} is a library which provides an API for
6615 accessing an installed Python package's metadata, such as its entry points or
6616 its top-level name. This functionality intends to replace most uses of
6617 @code{pkg_resources} entry point API and metadata API. Along with
6618 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6619 need to use the older and less efficient @code{pkg_resources} package.")
6620 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6621 (license license:asl2.0)))
6622
6623 (define-public python2-importlib-metadata
6624 (let ((base (package-with-python2 (strip-python2-variant
6625 python-importlib-metadata))))
6626 (package/inherit
6627 base
6628 (name "python2-importlib-metadata")
6629 (native-inputs
6630 `(("python-setuptools-scm" ,python2-setuptools-scm)
6631 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6632 ("python-packaging" ,python2-packaging-bootstrap)))
6633 (propagated-inputs
6634 `(("python-configparser" ,python2-configparser)
6635 ("python-contextlib2" ,python2-contextlib2)
6636 ("python-importlib-resources" ,python2-importlib-resources)
6637 ("python-pathlib2" ,python2-pathlib2)
6638 ,@(package-propagated-inputs base))))))
6639
6640 ;; This package is used by python2-pytest, and thus must not depend on it.
6641 (define-public python2-importlib-metadata-bootstrap
6642 (hidden-package
6643 (package/inherit
6644 python2-importlib-metadata
6645 (name "python2-importlib-metadata-bootstrap")
6646 (arguments
6647 `(#:tests? #f
6648 ,@(package-arguments python2-importlib-metadata)))
6649 (propagated-inputs
6650 `(("python-zipp" ,python2-zipp-bootstrap)
6651 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6652 ("python-configparser" ,python2-configparser)
6653 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6654 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6655
6656 (define-public python-importmagic
6657 (package
6658 (name "python-importmagic")
6659 (version "0.1.7")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "importmagic" version))
6664 (sha256
6665 (base32
6666 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/alecthomas/importmagic")
6669 (synopsis "Library for adding, removing and managing Python imports")
6670 (description
6671 "Importmagic is a Python library for automatically managing imports by
6672 finding unresolved symbols in Python code and their corresponding imports.")
6673 (license license:bsd-3)))
6674
6675 (define-public python-jaraco-packaging
6676 (package
6677 (name "python-jaraco-packaging")
6678 (version "6.1")
6679 (source
6680 (origin
6681 (method url-fetch)
6682 (uri (pypi-uri "jaraco.packaging" version))
6683 (sha256
6684 (base32
6685 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6686 (build-system python-build-system)
6687 (propagated-inputs
6688 `(("python-pytest" ,python-pytest)
6689 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6690 ("python-pytest-flake8" ,python-pytest-flake8)
6691 ("python-rst.linker" ,python-rst.linker)
6692 ("python-setuptools" ,python-setuptools)
6693 ("python-setuptools-scm" ,python-setuptools-scm)
6694 ("python-six" ,python-six)
6695 ("python-sphinx" ,python-sphinx)))
6696 (home-page "https://github.com/jaraco/jaraco.packaging")
6697 (synopsis "Tools to supplement packaging Python releases")
6698 (description
6699 "This package provides various tools to supplement packaging Python
6700 releases.")
6701 (license license:expat)))
6702
6703 (define-public python-pathpy
6704 (package
6705 (name "python-pathpy")
6706 (version "11.5.1")
6707 (source
6708 (origin
6709 (method url-fetch)
6710 (uri (pypi-uri "path.py" version))
6711 (sha256
6712 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6713 (outputs '("out" "doc"))
6714 (build-system python-build-system)
6715 (propagated-inputs
6716 `(("python-appdirs" ,python-appdirs)
6717 ("python-importlib-metadata" ,python-importlib-metadata)))
6718 (native-inputs
6719 `(("python-setuptools-scm" ,python-setuptools-scm)
6720 ("python-sphinx" ,python-sphinx)
6721 ("python-rst.linker" ,python-rst.linker)
6722 ("python-pytest" ,python-pytest)
6723 ("python-pytest-runner" ,python-pytest-runner)
6724 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6725 (arguments
6726 `(#:phases
6727 (modify-phases %standard-phases
6728 (add-after 'build 'build-doc
6729 (lambda _
6730 (setenv "LANG" "en_US.UTF-8")
6731 (invoke "python" "setup.py" "build_sphinx")))
6732 (add-after 'install 'install-doc
6733 (lambda* (#:key outputs #:allow-other-keys)
6734 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6735 (doc (string-append data "/doc/" ,name "-" ,version))
6736 (html (string-append doc "/html")))
6737 (mkdir-p html)
6738 (for-each (lambda (file)
6739 (copy-file file (string-append doc "/" file)))
6740 '("README.rst" "CHANGES.rst"))
6741 (copy-recursively "build/sphinx/html" html)
6742 #t)))
6743 (replace 'check
6744 (lambda _
6745 ;; The import time test aborts if an import takes longer than
6746 ;; 100ms. It may very well take a little longer than that.
6747 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6748 (home-page "https://github.com/jaraco/path.py")
6749 (synopsis "Python module wrapper for built-in os.path")
6750 (description
6751 "@code{path.py} implements path objects as first-class entities, allowing
6752 common operations on files to be invoked on those path objects directly.")
6753 (license license:expat)))
6754
6755 (define-public python2-pathpy
6756 (package-with-python2 python-pathpy))
6757
6758 (define-public python-simplegeneric
6759 (package
6760 (name "python-simplegeneric")
6761 (version "0.8.1")
6762 (source
6763 (origin
6764 (method url-fetch)
6765 (uri (pypi-uri "simplegeneric" version ".zip"))
6766 (sha256
6767 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6768 (build-system python-build-system)
6769 (native-inputs
6770 `(("unzip" ,unzip)))
6771 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6772 (synopsis "Python module for simple generic functions")
6773 (description
6774 "The simplegeneric module lets you define simple single-dispatch generic
6775 functions, akin to Python’s built-in generic functions like @code{len()},
6776 @code{iter()} and so on. However, instead of using specially-named methods,
6777 these generic functions use simple lookup tables, akin to those used by
6778 e.g. @code{pickle.dump()} and other generic functions found in the Python
6779 standard library.")
6780 (license license:zpl2.1)))
6781
6782 (define-public python2-simplegeneric
6783 (package-with-python2 python-simplegeneric))
6784
6785 (define-public python-ipython-genutils
6786 ;; TODO: This package is retired, check if can be removed, see description.
6787 (package
6788 (name "python-ipython-genutils")
6789 (version "0.1.0")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "ipython_genutils" version))
6794 (sha256
6795 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6796 (build-system python-build-system)
6797 (arguments `(#:tests? #f)) ; no tests
6798 (home-page "https://ipython.org")
6799 (synopsis "Vestigial utilities from IPython")
6800 (description
6801 "This package provides retired utilities from IPython. No packages
6802 outside IPython/Jupyter should depend on it.
6803
6804 This package shouldn't exist. It contains some common utilities shared by
6805 Jupyter and IPython projects during The Big Split. As soon as possible, those
6806 packages will remove their dependency on this, and this package will go
6807 away.")
6808 (license license:bsd-3)))
6809
6810 (define-public python2-ipython-genutils
6811 (package-with-python2 python-ipython-genutils))
6812
6813 (define-public python-ipyparallel
6814 (package
6815 (name "python-ipyparallel")
6816 (version "6.2.4")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "ipyparallel" version))
6821 (sha256
6822 (base32
6823 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6824 (build-system python-build-system)
6825 (arguments
6826 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6827 #:phases
6828 (modify-phases %standard-phases
6829 (add-before 'check 'prepare-for-tests
6830 (lambda _
6831 (setenv "HOME" (getcwd))
6832 #t)))))
6833 (propagated-inputs
6834 `(("python-dateutil" ,python-dateutil)
6835 ("python-decorator" ,python-decorator)
6836 ("python-ipykernel" ,python-ipykernel)
6837 ("python-ipython" ,python-ipython)
6838 ("python-ipython-genutils" ,python-ipython-genutils)
6839 ("python-jupyter-client" ,python-jupyter-client)
6840 ("python-pyzmq" ,python-pyzmq)
6841 ("python-tornado" ,python-tornado)
6842 ("python-traitlets" ,python-traitlets)))
6843 (native-inputs
6844 `(("python-ipython" ,python-ipython)
6845 ("python-mock" ,python-mock)
6846 ("python-nose" ,python-nose)
6847 ("python-pytest" ,python-pytest)
6848 ("python-pytest-cov" ,python-pytest-cov)
6849 ("python-testpath" ,python-testpath)))
6850 (home-page "https://ipython.org/")
6851 (synopsis "Interactive Parallel Computing with IPython")
6852 (description
6853 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6854 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6855 CLI scripts:
6856 @enumerate
6857 @item ipcluster - start/stop a cluster
6858 @item ipcontroller - start a scheduler
6859 @item ipengine - start an engine
6860 @end enumerate")
6861 (license license:bsd-3)))
6862
6863 (define-public python2-ipyparallel
6864 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6865 (package
6866 (inherit ipyparallel)
6867 (propagated-inputs
6868 `(("python2-futures" ,python2-futures)
6869 ,@(package-propagated-inputs ipyparallel))))))
6870
6871 (define-public python-ipython-cluster-helper
6872 (package
6873 (name "python-ipython-cluster-helper")
6874 (version "0.6.4")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "ipython-cluster-helper" version))
6879 (sha256
6880 (base32
6881 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6882 (modules '((guix build utils)))
6883 (snippet
6884 '(begin (substitute* "requirements.txt"
6885 (("ipython.*") "ipython\n"))
6886 #t))))
6887 (build-system python-build-system)
6888 (arguments
6889 `(#:tests? #f ; Test suite can't find IPython.
6890 #:phases
6891 (modify-phases %standard-phases
6892 (replace 'check
6893 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6894 (if tests?
6895 (begin
6896 (setenv "HOME" (getcwd))
6897 (add-installed-pythonpath inputs outputs)
6898 (invoke "python" "example/example.py" "--local"))
6899 #t))))))
6900 (propagated-inputs
6901 `(("python-ipyparallel" ,python-ipyparallel)
6902 ("python-ipython" ,python-ipython)
6903 ("python-netifaces" ,python-netifaces)
6904 ("python-pyzmq" ,python-pyzmq)
6905 ("python-setuptools" ,python-setuptools)
6906 ("python-six" ,python-six)))
6907 (home-page "https://github.com/roryk/ipython-cluster-helper")
6908 (synopsis
6909 "Simplify IPython cluster start up and use for multiple schedulers")
6910 (description
6911 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6912 profile, launches a cluster and returns a view. On program exit it shuts the
6913 cluster down and deletes the throwaway profile.")
6914 (license license:expat)))
6915
6916 (define-public python2-ipython-cluster-helper
6917 (package-with-python2 python-ipython-cluster-helper))
6918
6919 (define-public python-traitlets
6920 (package
6921 (name "python-traitlets")
6922 (version "4.3.3")
6923 (source
6924 (origin
6925 (method url-fetch)
6926 (uri (pypi-uri "traitlets" version))
6927 (sha256
6928 (base32
6929 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6930 (build-system python-build-system)
6931 (arguments
6932 `(#:phases
6933 (modify-phases %standard-phases
6934 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6935 (propagated-inputs
6936 `(("python-ipython-genutils" ,python-ipython-genutils)
6937 ("python-decorator" ,python-decorator)))
6938 (native-inputs
6939 `(("python-pytest" ,python-pytest)))
6940 (properties `((python2-variant . ,(delay python2-traitlets))))
6941 (home-page "https://ipython.org")
6942 (synopsis "Configuration system for Python applications")
6943 (description
6944 "Traitlets is a framework that lets Python classes have attributes with
6945 type checking, dynamically calculated default values, and ‘on change’
6946 callbacks. The package also includes a mechanism to use traitlets for
6947 configuration, loading values from files or from command line arguments. This
6948 is a distinct layer on top of traitlets, so you can use traitlets in your code
6949 without using the configuration machinery.")
6950 (license license:bsd-3)))
6951
6952 (define-public python2-traitlets
6953 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6954 (package
6955 (inherit traitlets)
6956 (propagated-inputs
6957 `(("python2-enum34" ,python2-enum34)
6958 ,@(package-propagated-inputs traitlets))))))
6959
6960 (define-public python-jupyter-core
6961 (package
6962 (name "python-jupyter-core")
6963 (version "4.4.0")
6964 (source
6965 (origin
6966 (method url-fetch)
6967 (uri (string-append (pypi-uri "jupyter_core" version)))
6968 (sha256
6969 (base32
6970 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6971 (build-system python-build-system)
6972 ;; FIXME: not sure how to run the tests
6973 (arguments `(#:tests? #f))
6974 (propagated-inputs
6975 `(("python-traitlets" ,python-traitlets)))
6976 (home-page "http://jupyter.org/")
6977 (synopsis "Jupyter base package")
6978 (description
6979 "Jupyter core is the base package on which Jupyter projects rely.")
6980 (license license:bsd-3)))
6981
6982 (define-public python2-jupyter-core
6983 (package-with-python2 python-jupyter-core))
6984
6985 (define-public python-jupyter-client
6986 (package
6987 (name "python-jupyter-client")
6988 (version "5.2.4")
6989 (source
6990 (origin
6991 (method url-fetch)
6992 (uri (pypi-uri "jupyter_client" version))
6993 (sha256
6994 (base32
6995 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6996 (build-system python-build-system)
6997 ;; Tests fail because of missing native python kernel which I assume is
6998 ;; provided by the ipython package, which we cannot use because it would
6999 ;; cause a dependency cycle.
7000 (arguments
7001 `(#:tests? #f
7002
7003 #:phases (modify-phases %standard-phases
7004 (add-after 'unpack 'set-tool-file-names
7005 (lambda* (#:key inputs #:allow-other-keys)
7006 (let ((iproute (assoc-ref inputs "iproute")))
7007 (substitute* "jupyter_client/localinterfaces.py"
7008 (("'ip'")
7009 (string-append "'" iproute "/sbin/ip'")))
7010 #t))))))
7011 (inputs
7012 `(("iproute" ,iproute)))
7013 (propagated-inputs
7014 `(("python-pyzmq" ,python-pyzmq)
7015 ("python-traitlets" ,python-traitlets)
7016 ("python-jupyter-core" ,python-jupyter-core)))
7017 (home-page "http://jupyter.org/")
7018 (synopsis "Jupyter protocol implementation and client libraries")
7019 (description
7020 "The @code{jupyter_client} package contains the reference implementation
7021 of the Jupyter protocol. It also provides client and kernel management APIs
7022 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7023 installing @code{kernelspec}s for use with Jupyter frontends.")
7024 (license license:bsd-3)))
7025
7026 (define-public python2-jupyter-client
7027 (package-with-python2 python-jupyter-client))
7028
7029 (define-public python-ipykernel
7030 (package
7031 (name "python-ipykernel")
7032 (version "5.1.3")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "ipykernel" version))
7037 (sha256
7038 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7039 (build-system python-build-system)
7040 (arguments
7041 `(#:phases
7042 (modify-phases %standard-phases
7043 (replace 'check
7044 (lambda _
7045 (setenv "HOME" "/tmp")
7046 (invoke "pytest" "-v")
7047 #t))
7048 (add-after 'install 'set-python-file-name
7049 (lambda* (#:key outputs #:allow-other-keys)
7050 ;; Record the absolute file name of the 'python' executable in
7051 ;; 'kernel.json'.
7052 (let ((out (assoc-ref outputs "out")))
7053 (substitute* (string-append out "/share/jupyter"
7054 "/kernels/python3/kernel.json")
7055 (("\"python\"")
7056 (string-append "\"" (which "python") "\"")))
7057 #t))))))
7058 (propagated-inputs
7059 `(("python-ipython" ,python-ipython)
7060 ;; imported at runtime during connect
7061 ("python-jupyter-client" ,python-jupyter-client)))
7062 (native-inputs
7063 `(("python-flaky" ,python-flaky)
7064 ("python-nose" ,python-nose)
7065 ("python-pytest" ,python-pytest)))
7066 (home-page "https://ipython.org")
7067 (synopsis "IPython Kernel for Jupyter")
7068 (description
7069 "This package provides the IPython kernel for Jupyter.")
7070 (properties `((python2-variant . ,(delay python2-ipykernel))))
7071 (license license:bsd-3)))
7072
7073 ;; Version 5.x and above no longer support Python 2.
7074 (define-public python2-ipykernel
7075 (package
7076 (name "python2-ipykernel")
7077 (version "4.10.1")
7078 (source
7079 (origin
7080 (method url-fetch)
7081 (uri (pypi-uri "ipykernel" version))
7082 (sha256
7083 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7084 (build-system python-build-system)
7085 (arguments
7086 `(#:python ,python-2))
7087 (propagated-inputs
7088 `(("python2-ipython" ,python2-ipython)
7089 ;; imported at runtime during connect
7090 ("python2-jupyter-client" ,python2-jupyter-client)
7091 ("python2-tornado" ,python2-tornado)
7092 ("python2-traitlets" ,python2-traitlets)))
7093 (native-inputs
7094 `(("python2-mock" ,python2-mock)
7095 ("python2-nose" ,python2-nose)
7096 ("python2-pytest" ,python2-pytest)
7097 ("python2-pytest-cov" ,python2-pytest-cov)))
7098 (home-page "https://ipython.org")
7099 (synopsis "IPython Kernel for Jupyter")
7100 (description
7101 "This package provides the IPython kernel for Jupyter.")
7102 (license license:bsd-3)))
7103
7104 (define-public python-pari-jupyter
7105 (package
7106 (name "python-pari-jupyter")
7107 (version "1.3.2")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "pari_jupyter" version))
7112 (sha256
7113 (base32
7114 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7115 (build-system python-build-system)
7116 (propagated-inputs
7117 `(("python-ipykernel" ,python-ipykernel)))
7118 (inputs
7119 `(("pari-gp" ,pari-gp)
7120 ("readline" ,readline)))
7121 (arguments
7122 `(#:tests? #f)) ; no test suite
7123 (home-page
7124 "https://github.com/jdemeyer/pari_jupyter")
7125 (synopsis "A Jupyter kernel for PARI/GP")
7126 (description "The package provides a PARI/GP kernel for Jupyter.")
7127 (license license:gpl3+)))
7128
7129 (define-public python-backcall
7130 (package
7131 (name "python-backcall")
7132 (version "0.1.0")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "backcall" version))
7137 (sha256
7138 (base32
7139 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7140 (build-system python-build-system)
7141 (home-page "https://github.com/takluyver/backcall/")
7142 (synopsis "Specifications for callback functions passed in to an API")
7143 (description
7144 "If your code lets other people supply callback functions, it's important
7145 to specify the function signature you expect, and check that functions support
7146 that. Adding extra parameters later would break other peoples code unless
7147 you're careful. The @code{backcall} package provides a way of specifying the
7148 callback signature using a prototype function.")
7149 (license license:bsd-3)))
7150
7151 (define-public python-ipython
7152 (package
7153 (name "python-ipython")
7154 (version "7.9.0")
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (pypi-uri "ipython" version ".tar.gz"))
7159 (sha256
7160 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7161 (build-system python-build-system)
7162 (propagated-inputs
7163 `(("python-backcall" ,python-backcall)
7164 ("python-pyzmq" ,python-pyzmq)
7165 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7166 ("python-terminado" ,python-terminado)
7167 ("python-matplotlib" ,python-matplotlib)
7168 ("python-numpy" ,python-numpy)
7169 ("python-numpydoc" ,python-numpydoc)
7170 ("python-jedi" ,python-jedi)
7171 ("python-jinja2" ,python-jinja2)
7172 ("python-mistune" ,python-mistune)
7173 ("python-pexpect" ,python-pexpect)
7174 ("python-pickleshare" ,python-pickleshare)
7175 ("python-simplegeneric" ,python-simplegeneric)
7176 ("python-jsonschema" ,python-jsonschema)
7177 ("python-traitlets" ,python-traitlets)
7178 ("python-nbformat" ,python-nbformat)
7179 ("python-pygments" ,python-pygments)))
7180 (inputs
7181 `(("readline" ,readline)
7182 ("which" ,which)))
7183 (native-inputs
7184 `(("graphviz" ,graphviz)
7185 ("pkg-config" ,pkg-config)
7186 ("python-requests" ,python-requests) ;; for tests
7187 ("python-testpath" ,python-testpath)
7188 ("python-nose" ,python-nose)))
7189 (arguments
7190 `(#:phases
7191 (modify-phases %standard-phases
7192 (add-after 'unpack 'make-docs-reproducible
7193 (lambda _
7194 (substitute* "IPython/sphinxext/ipython_directive.py"
7195 ((".*import datetime") "")
7196 ((".*datetime.datetime.now\\(\\)") "")
7197 (("%timeit") "# %timeit"))
7198 #t))
7199 ;; Tests can only be run after the library has been installed and not
7200 ;; within the source directory.
7201 (delete 'check)
7202 (add-after 'install 'check
7203 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7204 (if tests?
7205 (begin
7206 ;; Make installed package available for running the tests
7207 (add-installed-pythonpath inputs outputs)
7208 (setenv "HOME" "/tmp/") ;; required by a test
7209 ;; We only test the core because one of the other tests
7210 ;; tries to import ipykernel.
7211 (invoke "python" "IPython/testing/iptest.py"
7212 "-v" "IPython/core/tests"))
7213 #t)))
7214 (add-before 'check 'fix-tests
7215 (lambda* (#:key inputs #:allow-other-keys)
7216 (substitute* "./IPython/utils/_process_posix.py"
7217 (("/usr/bin/env', 'which") (which "which")))
7218 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7219 (("#!/usr/bin/env python")
7220 (string-append "#!" (which "python"))))
7221 ;; This test introduces a circular dependency on ipykernel
7222 ;; (which depends on ipython).
7223 (delete-file "IPython/core/tests/test_display.py")
7224 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7225 (delete-file "IPython/core/tests/test_interactiveshell.py")
7226 #t)))))
7227 (home-page "https://ipython.org")
7228 (synopsis "IPython is a tool for interactive computing in Python")
7229 (description
7230 "IPython provides a rich architecture for interactive computing with:
7231 Powerful interactive shells, a browser-based notebook, support for interactive
7232 data visualization, embeddable interpreters and tools for parallel
7233 computing.")
7234 (properties `((python2-variant . ,(delay python2-ipython))))
7235 (license license:bsd-3)))
7236
7237 ;; This is the latest release of the LTS version of ipython with support for
7238 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7239 ;; dropped support for Python 2.7.
7240 (define-public python2-ipython
7241 (package
7242 (name "python2-ipython")
7243 (version "5.8.0")
7244 (source
7245 (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "ipython" version ".tar.gz"))
7248 (sha256
7249 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7250 (build-system python-build-system)
7251 (propagated-inputs
7252 `(("python2-backports-shutil-get-terminal-size"
7253 ,python2-backports-shutil-get-terminal-size)
7254 ("python2-pathlib2" ,python2-pathlib2)
7255 ("python2-pyzmq" ,python2-pyzmq)
7256 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7257 ("python2-terminado" ,python2-terminado)
7258 ("python2-matplotlib" ,python2-matplotlib)
7259 ("python2-numpy" ,python2-numpy)
7260 ("python2-numpydoc" ,python2-numpydoc)
7261 ("python2-jinja2" ,python2-jinja2)
7262 ("python2-mistune" ,python2-mistune)
7263 ("python2-pexpect" ,python2-pexpect)
7264 ("python2-pickleshare" ,python2-pickleshare)
7265 ("python2-simplegeneric" ,python2-simplegeneric)
7266 ("python2-jsonschema" ,python2-jsonschema)
7267 ("python2-traitlets" ,python2-traitlets)
7268 ("python2-nbformat" ,python2-nbformat)
7269 ("python2-pygments" ,python2-pygments)))
7270 (inputs
7271 `(("readline" ,readline)
7272 ("which" ,which)))
7273 (native-inputs
7274 `(("graphviz" ,graphviz)
7275 ("pkg-config" ,pkg-config)
7276 ("python2-requests" ,python2-requests) ;; for tests
7277 ("python2-testpath" ,python2-testpath)
7278 ("python2-mock" ,python2-mock)
7279 ("python2-nose" ,python2-nose)))
7280 (arguments
7281 `(#:python ,python-2
7282 #:phases
7283 (modify-phases %standard-phases
7284 (add-before 'check 'delete-broken-tests
7285 (lambda* (#:key inputs #:allow-other-keys)
7286 ;; These tests throw errors for unknown reasons.
7287 (delete-file "IPython/core/tests/test_displayhook.py")
7288 (delete-file "IPython/core/tests/test_magic_terminal.py")
7289 (delete-file "IPython/core/tests/test_profile.py")
7290 #t)))))
7291 (home-page "https://ipython.org")
7292 (synopsis "IPython is a tool for interactive computing in Python")
7293 (description
7294 "IPython provides a rich architecture for interactive computing with:
7295 Powerful interactive shells, a browser-based notebook, support for interactive
7296 data visualization, embeddable interpreters and tools for parallel
7297 computing.")
7298 (license license:bsd-3)))
7299
7300 (define-public python-ipython-documentation
7301 (package
7302 (inherit python-ipython)
7303 (name "python-ipython-documentation")
7304 (version (package-version python-ipython))
7305 (arguments
7306 `(#:phases
7307 (modify-phases %standard-phases
7308 (delete 'build)
7309 (delete 'check)
7310 (replace 'install
7311 (lambda* (#:key outputs #:allow-other-keys)
7312 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7313 (doc (string-append data "/doc/" ,name "-" ,version))
7314 (html (string-append doc "/html"))
7315 (man1 (string-append data "/man/man1"))
7316 (info (string-append data "/info"))
7317 (examples (string-append doc "/examples"))
7318 (python-arg (string-append "PYTHON=" (which "python"))))
7319 (setenv "LANG" "en_US.utf8")
7320 (with-directory-excursion "docs"
7321 ;; FIXME: pdf fails to build
7322 ;;(system* "make" "pdf" "PAPER=a4")
7323 (system* "make" python-arg "html")
7324 ;; FIXME: the generated texi file contains ^@^@, which trips
7325 ;; up the parser.
7326 ;; (system* "make" python-arg "info")
7327 )
7328 (copy-recursively "docs/man" man1)
7329 (copy-recursively "examples" examples)
7330 (copy-recursively "docs/build/html" html)
7331 ;; (copy-file "docs/build/latex/ipython.pdf"
7332 ;; (string-append doc "/ipython.pdf"))
7333 (mkdir-p info)
7334 ;; (copy-file "docs/build/texinfo/ipython.info"
7335 ;; (string-append info "/ipython.info"))
7336 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7337 #t)))))
7338 (inputs
7339 `(("python-ipython" ,python-ipython)
7340 ("python-ipykernel" ,python-ipykernel)))
7341 (native-inputs
7342 `(("python-sphinx" ,python-sphinx)
7343 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7344 ;; FIXME: It's possible that a smaller union would work just as well.
7345 ("texlive" ,(texlive-union (list texlive-amsfonts
7346 texlive-fonts-ec
7347 texlive-generic-ifxetex
7348 texlive-generic-pdftex
7349 texlive-latex-capt-of
7350 texlive-latex-cmap
7351 texlive-latex-environ
7352 texlive-latex-eqparbox
7353 texlive-latex-etoolbox
7354 texlive-latex-expdlist
7355 texlive-latex-fancyhdr
7356 texlive-latex-fancyvrb
7357 texlive-latex-fncychap
7358 texlive-latex-float
7359 texlive-latex-framed
7360 texlive-latex-geometry
7361 texlive-latex-graphics
7362 texlive-latex-hyperref
7363 texlive-latex-mdwtools
7364 texlive-latex-multirow
7365 texlive-latex-needspace
7366 texlive-latex-oberdiek
7367 texlive-latex-parskip
7368 texlive-latex-preview
7369 texlive-latex-tabulary
7370 texlive-latex-threeparttable
7371 texlive-latex-titlesec
7372 texlive-latex-trimspaces
7373 texlive-latex-ucs
7374 texlive-latex-upquote
7375 texlive-latex-url
7376 texlive-latex-varwidth
7377 texlive-latex-wrapfig)))
7378 ("texinfo" ,texinfo)))))
7379
7380 (define-public python-urwid
7381 (package
7382 (name "python-urwid")
7383 (version "2.1.0")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "urwid" version))
7388 (sha256
7389 (base32
7390 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7391 (build-system python-build-system)
7392 (home-page "http://urwid.org")
7393 (synopsis "Console user interface library for Python")
7394 (description
7395 "Urwid is a curses-based UI/widget library for Python. It includes many
7396 features useful for text console applications.")
7397 (license license:lgpl2.1+)))
7398
7399 (define-public python2-urwid
7400 (package-with-python2 python-urwid))
7401
7402 (define-public python-urwidtrees
7403 (package
7404 (name "python-urwidtrees")
7405 (version "1.0.2")
7406 (source
7407 (origin
7408 (method git-fetch)
7409 ;; package author intends on distributing via github rather than pypi:
7410 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7411 (uri (git-reference
7412 (url "https://github.com/pazz/urwidtrees")
7413 (commit version)))
7414 (file-name (git-file-name name version))
7415 (sha256
7416 (base32
7417 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7418 (build-system python-build-system)
7419 (arguments
7420 '(#:use-setuptools? #f
7421 #:tests? #f)) ; no tests
7422 (propagated-inputs `(("python-urwid" ,python-urwid)))
7423 (home-page "https://github.com/pazz/urwidtrees")
7424 (synopsis "Tree widgets for urwid")
7425 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7426 toolkit. Use it to build trees of widgets.")
7427 (license license:gpl3+)))
7428
7429 (define-public python2-urwidtrees
7430 (package-with-python2 python-urwidtrees))
7431
7432 (define-public python-ua-parser
7433 (package
7434 (name "python-ua-parser")
7435 (version "0.8.0")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "ua-parser" version))
7440 (sha256
7441 (base32
7442 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7443 (build-system python-build-system)
7444 (arguments
7445 `(#:tests? #f)) ;no test suite in release
7446 (native-inputs
7447 `(("python-pyyaml" ,python-pyyaml)))
7448 (home-page "https://github.com/ua-parser/uap-python")
7449 (synopsis "User agent parser")
7450 (description
7451 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7452 (license license:asl2.0)))
7453
7454 (define-public python2-ua-parser
7455 (package-with-python2 python-ua-parser))
7456
7457 (define-public python-user-agents
7458 (package
7459 (name "python-user-agents")
7460 (version "1.1.0")
7461 (source
7462 (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "user-agents" version))
7465 (sha256
7466 (base32
7467 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7468 (build-system python-build-system)
7469 (arguments
7470 `(#:tests? #f)) ;missing devices.json test file in release
7471 (propagated-inputs
7472 `(("python-ua-parser" ,python-ua-parser)))
7473 (home-page "https://github.com/selwin/python-user-agents")
7474 (synopsis "User Agent strings parsing library")
7475 (description
7476 "A library to identify devices (phones, tablets) and their capabilities by
7477 parsing (browser/HTTP) user agent strings.")
7478 (license license:expat)))
7479
7480 (define-public python2-user-agents
7481 (package-with-python2 python-user-agents))
7482
7483 (define-public python-dbus
7484 (package
7485 (name "python-dbus")
7486 (version "1.2.16")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7491 "dbus-python-" version ".tar.gz"))
7492 (sha256
7493 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7494 (build-system gnu-build-system)
7495 (native-inputs
7496 `(("pkg-config" ,pkg-config)))
7497 (inputs
7498 `(("python" ,python-wrapper)
7499 ("dbus-glib" ,dbus-glib)))
7500 (synopsis "Python bindings for D-bus")
7501 (description "python-dbus provides bindings for libdbus, the reference
7502 implementation of D-Bus.")
7503 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7504 (license license:expat)))
7505
7506 (define-public python2-dbus
7507 (package (inherit python-dbus)
7508 (name "python2-dbus")
7509 (inputs `(("python" ,python-2)
7510 ,@(alist-delete "python"
7511 (package-inputs python-dbus)
7512 equal?)))))
7513
7514 (define-public python-notify2
7515 (package
7516 (name "python-notify2")
7517 (version "0.3.1")
7518 (source
7519 (origin
7520 (method url-fetch)
7521 (uri (pypi-uri "notify2" version))
7522 (sha256
7523 (base32
7524 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7525 (build-system python-build-system)
7526 (arguments `(#:tests? #f)) ; tests depend on system state
7527 (native-inputs
7528 `(("python-dbus" ,python-dbus)))
7529 (home-page "https://bitbucket.org/takluyver/pynotify2")
7530 (synopsis "Python interface to D-Bus notifications")
7531 (description
7532 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7533 It is a reimplementation of pynotify in pure Python, and an alternative to
7534 the GObject Introspection bindings to libnotify for non-GTK applications.")
7535 (license (list license:bsd-2
7536 license:lgpl2.1+))))
7537
7538 (define-public python2-notify2
7539 (package-with-python2 python-notify2))
7540
7541 ;; beautifulsoup4 has a totally different namespace than 3.x,
7542 ;; and pypi seems to put it under its own name, so I guess we should too
7543 (define-public python-beautifulsoup4
7544 (package
7545 (name "python-beautifulsoup4")
7546 (version "4.9.1")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "beautifulsoup4" version))
7551 (sha256
7552 (base32
7553 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7554 (build-system python-build-system)
7555 (arguments
7556 `(#:phases
7557 (modify-phases %standard-phases
7558 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7559 ;; must use this conversion script when building with Python 3. The
7560 ;; conversion script also runs the tests.
7561 ;; For more information, see the file 'convert-py3k' in the source
7562 ;; distribution.
7563 (replace 'check
7564 (lambda _ (invoke "./convert-py3k"))))))
7565 (propagated-inputs
7566 `(("python-soupsieve" ,python-soupsieve)))
7567 (home-page
7568 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7569 (synopsis
7570 "Python screen-scraping library")
7571 (description
7572 "Beautiful Soup is a Python library designed for rapidly setting up
7573 screen-scraping projects. It offers Pythonic idioms for navigating,
7574 searching, and modifying a parse tree, providing a toolkit for
7575 dissecting a document and extracting what you need. It automatically
7576 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7577 (license license:expat)
7578 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7579
7580 (define-public python2-beautifulsoup4
7581 (package
7582 (inherit (package-with-python2
7583 (strip-python2-variant python-beautifulsoup4)))
7584 (arguments `(#:python ,python-2))))
7585
7586 (define-public python-soupsieve
7587 (package
7588 (name "python-soupsieve")
7589 (version "2.0.1")
7590 (source
7591 (origin
7592 (method url-fetch)
7593 (uri (pypi-uri "soupsieve" version))
7594 (sha256
7595 (base32
7596 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7597 (build-system python-build-system)
7598 (arguments `(#:tests? #f))
7599 ;;XXX: 2 tests fail currently despite claming they were to be
7600 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7601 ;;don't want to create a circular dependency.
7602 (home-page "https://github.com/facelessuser/soupsieve")
7603 (synopsis "CSS selector library")
7604 (description
7605 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7606 Soup 4. It aims to provide selecting, matching, and filtering using modern
7607 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7608 specifications up through the latest CSS level 4 drafts and beyond (though
7609 some are not yet implemented).")
7610 (properties `((python2-variant . ,(delay python2-soupsieve))))
7611 (license license:expat)))
7612
7613 ;; This is the last version that supports python-2
7614 (define-public python2-soupsieve
7615 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7616 (package
7617 (inherit base)
7618 (version "1.9.6")
7619 (source
7620 (origin
7621 (method url-fetch)
7622 (uri (pypi-uri "soupsieve" version))
7623 (sha256
7624 (base32
7625 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7626 (propagated-inputs
7627 `(("python2-backports-functools-lru-cache"
7628 ,python2-backports-functools-lru-cache)
7629 ,@(package-propagated-inputs base))))))
7630
7631 (define-public python-netifaces
7632 (package
7633 (name "python-netifaces")
7634 (version "0.10.9")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "netifaces" version))
7639 (sha256
7640 (base32
7641 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7642 (build-system python-build-system)
7643 (home-page "https://github.com/al45tair/netifaces")
7644 (synopsis
7645 "Python module for portable network interface information")
7646 (description
7647 "Netifaces is a Python module providing information on network
7648 interfaces in an easy and portable manner.")
7649 (license license:expat)))
7650
7651 (define-public python2-netifaces
7652 (package-with-python2 python-netifaces))
7653
7654 (define-public python-networkx
7655 (package
7656 (name "python-networkx")
7657 (version "2.5")
7658 (source
7659 (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "networkx" version))
7662 (sha256
7663 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7664 (build-system python-build-system)
7665 (arguments
7666 '(#:phases (modify-phases %standard-phases
7667 (replace 'check
7668 (lambda* (#:key tests? #:allow-other-keys)
7669 (if tests?
7670 (invoke "pytest" "-vv" "--pyargs" "networkx")
7671 (format #t "test suite not run~%"))
7672 #t)))))
7673 ;; python-decorator is needed at runtime.
7674 (propagated-inputs
7675 `(("python-decorator" ,python-decorator)))
7676 (native-inputs
7677 `(("python-pytest" ,python-pytest)))
7678 (home-page "https://networkx.github.io/")
7679 (synopsis "Python module for creating and manipulating graphs and networks")
7680 (description
7681 "NetworkX is a Python package for the creation, manipulation, and study
7682 of the structure, dynamics, and functions of complex networks.")
7683 (properties `((python2-variant . ,(delay python2-networkx))))
7684 (license license:bsd-3)))
7685
7686 ;; NetworkX 2.2 is the last version with support for Python 2.
7687 (define-public python2-networkx
7688 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7689 (package
7690 (inherit base)
7691 (version "2.2")
7692 (source (origin
7693 (method url-fetch)
7694 (uri (pypi-uri "networkx" version ".zip"))
7695 (sha256
7696 (base32
7697 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7698 (arguments
7699 `(#:python ,python-2))
7700 (native-inputs
7701 `(("python-nose" ,python2-nose)
7702 ("unzip" ,unzip))))))
7703
7704 (define-public python-datrie
7705 (package
7706 (name "python-datrie")
7707 (version "0.8.2")
7708 (source
7709 (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "datrie" version))
7712 (sha256
7713 (base32
7714 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7715 (build-system python-build-system)
7716 (native-inputs
7717 `(("python-cython" ,python-cython)
7718 ("python-hypothesis" ,python-hypothesis)
7719 ("python-pytest" ,python-pytest)
7720 ("python-pytest-runner" ,python-pytest-runner)))
7721 (home-page "https://github.com/kmike/datrie")
7722 (synopsis "Fast, efficiently stored trie for Python")
7723 (description
7724 "This package provides a fast, efficiently stored trie implementation for
7725 Python.")
7726 (license license:lgpl2.1+)))
7727
7728 (define-public snakemake
7729 (package
7730 (name "snakemake")
7731 (version "5.7.1")
7732 (source
7733 (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "snakemake" version))
7736 (sha256
7737 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7738 (build-system python-build-system)
7739 (arguments
7740 ;; TODO: Package missing test dependencies.
7741 '(#:tests? #f
7742 #:phases
7743 (modify-phases %standard-phases
7744 ;; For cluster execution Snakemake will call Python. Since there is
7745 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7746 ;; this by calling the snakemake wrapper instead.
7747 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7748 (lambda* (#:key outputs #:allow-other-keys)
7749 (substitute* "snakemake/executors.py"
7750 (("\\{sys.executable\\} -m snakemake")
7751 (string-append (assoc-ref outputs "out")
7752 "/bin/snakemake")))
7753 #t)))))
7754 (propagated-inputs
7755 `(("python-appdirs" ,python-appdirs)
7756 ("python-configargparse" ,python-configargparse)
7757 ("python-datrie" ,python-datrie)
7758 ("python-docutils" ,python-docutils)
7759 ("python-gitpython" ,python-gitpython)
7760 ("python-jinja2" ,python-jinja2)
7761 ("python-jsonschema" ,python-jsonschema)
7762 ("python-networkx" ,python-networkx)
7763 ("python-psutil" ,python-psutil)
7764 ("python-pyyaml" ,python-pyyaml)
7765 ("python-ratelimiter" ,python-ratelimiter)
7766 ("python-requests" ,python-requests)
7767 ("python-wrapt" ,python-wrapt)))
7768 (home-page "https://snakemake.readthedocs.io")
7769 (synopsis "Python-based execution environment for make-like workflows")
7770 (description
7771 "Snakemake aims to reduce the complexity of creating workflows by
7772 providing a clean and modern domain specific specification language (DSL) in
7773 Python style, together with a fast and comfortable execution environment.")
7774 (license license:expat)))
7775
7776 (define-public python-pyqrcode
7777 (package
7778 (name "python-pyqrcode")
7779 (version "1.2.1")
7780 (source
7781 (origin
7782 (method url-fetch)
7783 (uri (pypi-uri "PyQRCode" version))
7784 (sha256
7785 (base32
7786 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7787 (build-system python-build-system)
7788 (home-page
7789 "https://github.com/mnooner256/pyqrcode")
7790 (synopsis "QR code generator")
7791 (description
7792 "Pyqrcode is a QR code generator written purely in Python with
7793 SVG, EPS, PNG and terminal output.")
7794 (license license:bsd-3)))
7795
7796 (define-public python-seaborn
7797 (package
7798 (name "python-seaborn")
7799 (version "0.10.0")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (pypi-uri "seaborn" version))
7804 (sha256
7805 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7806 (build-system python-build-system)
7807 (arguments
7808 `(#:phases
7809 (modify-phases %standard-phases
7810 (add-before 'check 'start-xserver
7811 (lambda* (#:key inputs #:allow-other-keys)
7812 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7813 ;; There must be a running X server and make check doesn't
7814 ;; start one. Therefore we must do it.
7815 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7816 (setenv "DISPLAY" ":1")
7817 #t)))
7818 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7819 (propagated-inputs
7820 `(("python-pandas" ,python-pandas)
7821 ("python-matplotlib" ,python-matplotlib)
7822 ("python-numpy" ,python-numpy)
7823 ("python-scipy" ,python-scipy)))
7824 (native-inputs
7825 `(("python-pytest" ,python-pytest)
7826 ("xorg-server" ,xorg-server-for-tests)))
7827 (home-page "https://seaborn.pydata.org/")
7828 (synopsis "Statistical data visualization")
7829 (description
7830 "Seaborn is a library for making attractive and informative statistical
7831 graphics in Python. It is built on top of matplotlib and tightly integrated
7832 with the PyData stack, including support for numpy and pandas data structures
7833 and statistical routines from scipy and statsmodels.")
7834 (properties `((python2-variant . ,(delay python2-seaborn))))
7835 (license license:bsd-3)))
7836
7837 ;; 0.9.1 is the last release with support for Python 2.
7838 (define-public python2-seaborn
7839 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7840 (package
7841 (inherit base)
7842 (version "0.9.1")
7843 (source (origin
7844 (method url-fetch)
7845 (uri (pypi-uri "seaborn" version))
7846 (sha256
7847 (base32
7848 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7849
7850 (define-public python-mpmath
7851 (package
7852 (name "python-mpmath")
7853 (version "1.1.0")
7854 (source (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "mpmath" version))
7857 (file-name (git-file-name name version))
7858 (sha256
7859 (base32
7860 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7861 (build-system python-build-system)
7862 (native-inputs
7863 `(("python-pytest" ,python-pytest)))
7864 (arguments
7865 '(#:phases
7866 (modify-phases %standard-phases
7867 (replace 'check
7868 (lambda _
7869 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7870 (home-page "http://mpmath.org")
7871 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7872 (description
7873 "@code{mpmath} can be used as an arbitrary-precision substitute for
7874 Python's float/complex types and math/cmath modules, but also does much
7875 more advanced mathematics.")
7876 (license license:bsd-3)))
7877
7878 (define-public python2-mpmath
7879 (package-with-python2 python-mpmath))
7880
7881 (define-public python-bigfloat
7882 (package
7883 (name "python-bigfloat")
7884 (version "0.3.0")
7885 (source
7886 (origin
7887 (method url-fetch)
7888 (uri (pypi-uri "bigfloat" version))
7889 (sha256
7890 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7891 (build-system python-build-system)
7892 (inputs
7893 `(("mpfr" ,mpfr)))
7894 (home-page "https://github.com/mdickinson/bigfloat")
7895 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7896 (description
7897 "This package provides a Python interface to the MPFR library for
7898 multiprecision arithmetic.")
7899 (license license:lgpl3+)))
7900
7901 (define-public python2-bigfloat
7902 (package-with-python2 python-bigfloat))
7903
7904 (define-public python-sympy
7905 (package
7906 (name "python-sympy")
7907 (version "1.6.2")
7908 (source
7909 (origin
7910 (method url-fetch)
7911 (uri (pypi-uri "sympy" version))
7912 (sha256
7913 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7914 (build-system python-build-system)
7915 (arguments
7916 `(#:phases
7917 (modify-phases %standard-phases
7918 (replace 'check
7919 (lambda* (#:key outputs #:allow-other-keys)
7920 (invoke
7921 (or (which "python3") (which "python"))
7922 "-c" "import sympy; sympy.test(\"/core\")"))))))
7923 (propagated-inputs
7924 `(("python-mpmath" ,python-mpmath)))
7925 (home-page "https://www.sympy.org/")
7926 (synopsis "Python library for symbolic mathematics")
7927 (description
7928 "SymPy is a Python library for symbolic mathematics. It aims to become a
7929 full-featured computer algebra system (CAS) while keeping the code as simple
7930 as possible in order to be comprehensible and easily extensible.")
7931 (license license:bsd-3)))
7932
7933 (define-public python2-sympy
7934 (package
7935 (inherit (package-with-python2 python-sympy))
7936 (version "1.5.1") ; last release for python2
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "sympy" version))
7941 (sha256
7942 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7943
7944 (define-public python-q
7945 (package
7946 (name "python-q")
7947 (version "2.6")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "q" version))
7952 (sha256
7953 (base32
7954 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7955 (build-system python-build-system)
7956 (home-page "https://github.com/zestyping/q")
7957 (synopsis "Quick-and-dirty debugging output for tired programmers")
7958 (description
7959 "q is a Python module for \"print\" style of debugging Python code. It
7960 provides convenient short API for print out of values, tracebacks, and
7961 falling into the Python interpreter.")
7962 (license license:asl2.0)))
7963
7964 (define-public python2-q
7965 (package-with-python2 python-q))
7966
7967 (define-public python-xlib
7968 (package
7969 (name "python-xlib")
7970 (version "0.27")
7971 (source
7972 (origin
7973 (method git-fetch)
7974 (uri (git-reference
7975 (url "https://github.com/python-xlib/python-xlib")
7976 (commit version)))
7977 (file-name (git-file-name name version))
7978 (sha256
7979 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7980 (build-system python-build-system)
7981 (arguments
7982 `(#:phases
7983 (modify-phases %standard-phases
7984 (add-before 'check 'start-xserver
7985 (lambda* (#:key inputs #:allow-other-keys)
7986 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7987 ;; There must be a running X server and make check doesn't
7988 ;; start one. Therefore we must do it.
7989 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7990 (setenv "DISPLAY" ":1")
7991 #t))))))
7992 (native-inputs
7993 `(("python-mock" ,python-mock)
7994 ("python-setuptools-scm" ,python-setuptools-scm)
7995 ("python-six" ,python-six)
7996 ("xorg-server" ,xorg-server)))
7997 (home-page "https://github.com/python-xlib/python-xlib")
7998 (synopsis "Python X11 client library")
7999 (description
8000 "The Python X Library is intended to be a fully functional
8001 X client library for Python programs. It is useful to implement
8002 low-level X clients. It is written entirely in Python.")
8003 (license license:gpl2+)))
8004
8005 (define-public python2-xlib
8006 (package-with-python2 python-xlib))
8007
8008 (define-public python-singledispatch
8009 (package
8010 (name "python-singledispatch")
8011 (version "3.4.0.3")
8012 (source
8013 (origin
8014 (method url-fetch)
8015 (uri (pypi-uri "singledispatch" version))
8016 (sha256
8017 (base32
8018 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8019 (build-system python-build-system)
8020 (native-inputs
8021 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8022 (home-page
8023 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8024 (synopsis "Backport of singledispatch feature from Python 3.4")
8025 (description
8026 "This library brings functools.singledispatch from Python 3.4 to Python
8027 2.6-3.3.")
8028 (license license:expat)))
8029
8030 (define-public python2-singledispatch
8031 (package-with-python2 python-singledispatch))
8032
8033 ;; the python- version can be removed with python-3.5
8034 (define-public python-backports-abc
8035 (package
8036 (name "python-backports-abc")
8037 (version "0.5")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "backports_abc" version))
8042 (sha256
8043 (base32
8044 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8045 (build-system python-build-system)
8046 (home-page "https://github.com/cython/backports_abc")
8047 (synopsis "Backport of additions to the 'collections.abc' module")
8048 (description
8049 "Python-backports-abc provides a backport of additions to the
8050 @code{collections.abc} module in Python-3.5.")
8051 (license license:psfl)))
8052
8053 (define-public python2-backports-abc
8054 (package-with-python2 python-backports-abc))
8055
8056 (define-public python-backports-csv
8057 (package
8058 (name "python-backports-csv")
8059 (version "1.0.7")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "backports.csv" version))
8064 (sha256
8065 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8066 (build-system python-build-system)
8067 (home-page "https://github.com/ryanhiebert/backports.csv")
8068 (synopsis "Backport of Python 3's csv module for Python 2")
8069 (description
8070 "Provides a backport of Python 3's @code{csv} module for parsing
8071 comma separated values. The API of the @code{csv} module in Python 2
8072 is drastically different from the @code{csv} module in Python 3.
8073 This is due, for the most part, to the difference between str in
8074 Python 2 and Python 3.")
8075 (license license:psfl)))
8076
8077 (define-public python2-backports-csv
8078 (package-with-python2 python-backports-csv))
8079
8080 (define-public python2-backports-shutil-get-terminal-size
8081 (package
8082 (name "python2-backports-shutil-get-terminal-size")
8083 (version "1.0.0")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8088 (sha256
8089 (base32
8090 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8091 (build-system python-build-system)
8092 (arguments
8093 `(#:python ,python-2
8094 #:phases
8095 (modify-phases %standard-phases
8096 (replace 'check
8097 (lambda _
8098 (setenv "PYTHONPATH" (string-append "./build/lib:"
8099 (getenv "PYTHONPATH")))
8100 (invoke "py.test" "-v"))))))
8101 (native-inputs
8102 `(("python2-pytest" ,python2-pytest)))
8103 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8104 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8105 (description
8106 "This package provides a backport of the @code{get_terminal_size
8107 function} from Python 3.3's @code{shutil}.
8108 Unlike the original version it is written in pure Python rather than C,
8109 so it might be a tiny bit slower.")
8110 (license license:expat)))
8111
8112 (define-public python-waf
8113 (package
8114 (name "python-waf")
8115 (version "2.0.19")
8116 (source (origin
8117 (method url-fetch)
8118 (uri (string-append "https://waf.io/"
8119 "waf-" version ".tar.bz2"))
8120 (sha256
8121 (base32
8122 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8123 (build-system python-build-system)
8124 (arguments
8125 '(#:phases
8126 (modify-phases %standard-phases
8127 (replace 'build
8128 (lambda _
8129 ;; XXX: Find a way to add all extra tools.
8130 (let ((tools '("gccdeps"
8131 "clang_compilation_database")))
8132 (invoke "python" "waf-light" "configure" "build"
8133 (string-append "--tools="
8134 (string-join tools ","))))))
8135 (replace 'check
8136 (lambda _
8137 (invoke "python" "waf" "--version")))
8138 (replace 'install
8139 (lambda* (#:key outputs #:allow-other-keys)
8140 (let ((out (assoc-ref outputs "out")))
8141 (install-file "waf" (string-append out "/bin")))
8142 #t))
8143 ;; waf breaks when it is wrapped.
8144 (delete 'wrap))))
8145 (home-page "https://waf.io/")
8146 (synopsis "Python-based build system")
8147 (description
8148 "Waf is a Python-based framework for configuring, compiling and installing
8149 applications.")
8150 (license license:bsd-3)))
8151
8152 (define-public python2-waf
8153 (package-with-python2 python-waf))
8154
8155 (define-public python-pyzmq
8156 (package
8157 (name "python-pyzmq")
8158 (version "17.1.2")
8159 (source
8160 (origin
8161 (method url-fetch)
8162 (uri (pypi-uri "pyzmq" version))
8163 (sha256
8164 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8165 (build-system python-build-system)
8166 (arguments
8167 `(#:configure-flags
8168 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8169 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8170 ;; --inplace' for 'python setup.py test' to work.
8171 #:tests? #f))
8172 (inputs
8173 `(("zeromq" ,zeromq)))
8174 (native-inputs
8175 `(("pkg-config" ,pkg-config)
8176 ("python-nose" ,python-nose)))
8177 (home-page "https://github.com/zeromq/pyzmq")
8178 (synopsis "Python bindings for 0MQ")
8179 (description
8180 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8181 (license license:bsd-4)))
8182
8183 (define-public python2-pyzmq
8184 (package-with-python2 python-pyzmq))
8185
8186 (define-public python-pep8
8187 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8188 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8189 ;; some dependents' test suites, and nothing more.
8190 (package
8191 (name "python-pep8")
8192 (version "1.7.0")
8193 (source
8194 (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "pep8" version))
8197 (sha256
8198 (base32
8199 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8200 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8201 (build-system python-build-system)
8202 (home-page "https://pep8.readthedocs.org/")
8203 (synopsis "Python style guide checker")
8204 (description
8205 "This tools checks Python code against some of the style conventions in
8206 PEP 8.")
8207 (license license:expat)))
8208
8209 (define-public python2-pep8
8210 (package-with-python2 python-pep8))
8211
8212 (define-public python-pep517
8213 (package
8214 (name "python-pep517")
8215 (version "0.8.2")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "pep517" version))
8220 (sha256
8221 (base32
8222 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8223 (build-system python-build-system)
8224 (arguments
8225 '(#:phases
8226 (modify-phases %standard-phases
8227 (replace 'check
8228 (lambda* (#:key tests? #:allow-other-keys)
8229 (delete-file "pytest.ini")
8230 ;; This test tries to connect to the internet
8231 (delete-file "tests/test_meta.py")
8232 (if tests?
8233 (invoke "pytest")
8234 #t))))))
8235 (native-inputs
8236 `(("python-mock" ,python-mock)
8237 ("python-pytest" ,python-pytest)
8238 ("python-testpath" ,python-testpath)))
8239 (propagated-inputs
8240 `(("python-toml" ,python-toml)
8241 ("python-wheel" ,python-wheel)))
8242 (home-page "https://github.com/pypa/pep517")
8243 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8244 (description
8245 "Wrappers to build Python packages using PEP 517 hooks.")
8246 (properties `((python2-variant . ,(delay python2-pep517))))
8247 (license license:expat)))
8248
8249 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8250 (define-public python2-pep517
8251 (let ((base (package-with-python2
8252 (strip-python2-variant python-pep517))))
8253 (package
8254 (inherit base)
8255 (name "python2-pep517")
8256 (arguments
8257 `(#:tests? #f
8258 ,@(package-arguments base)))
8259 (native-inputs `()))))
8260
8261 (define-public python-pyflakes
8262 (package
8263 (name "python-pyflakes")
8264 (version "2.2.0")
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "pyflakes" version))
8269 (sha256
8270 (base32
8271 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8272 (build-system python-build-system)
8273 (home-page
8274 "https://github.com/pyflakes/pyflakes")
8275 (synopsis "Passive checker of Python programs")
8276 (description
8277 "Pyflakes statically checks Python source code for common errors.")
8278 (license license:expat)))
8279
8280 (define-public python2-pyflakes
8281 (package-with-python2 python-pyflakes))
8282
8283 (define-public python-mccabe
8284 (package
8285 (name "python-mccabe")
8286 (version "0.6.1")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "mccabe" version))
8291 (sha256
8292 (base32
8293 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8294 (build-system python-build-system)
8295 (native-inputs
8296 `(("python-pytest" ,python-pytest-bootstrap)
8297 ("python-pytest-runner" ,python-pytest-runner)))
8298 (home-page "https://github.com/flintwork/mccabe")
8299 (synopsis "McCabe checker, plugin for flake8")
8300 (description
8301 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8302 complexity of Python source code.")
8303 (license license:expat)))
8304
8305 (define-public python2-mccabe
8306 (package-with-python2 python-mccabe))
8307
8308 (define-public python-flake8
8309 (package
8310 (name "python-flake8")
8311 (version "3.8.4")
8312 (source (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "flake8" version))
8315 (sha256
8316 (base32
8317 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8318 (build-system python-build-system)
8319 (arguments
8320 `(#:phases
8321 (modify-phases %standard-phases
8322 (delete 'check)
8323 (add-after 'install 'check
8324 (lambda* (#:key inputs outputs #:allow-other-keys)
8325 (add-installed-pythonpath inputs outputs)
8326 (invoke "pytest" "-v")
8327 #t)))))
8328 (propagated-inputs
8329 `(("python-pycodestyle" ,python-pycodestyle)
8330 ("python-entrypoints" ,python-entrypoints)
8331 ("python-pyflakes" ,python-pyflakes)
8332 ("python-mccabe" ,python-mccabe)))
8333 (native-inputs
8334 `(("python-mock" ,python-mock)
8335 ("python-pytest" ,python-pytest-bootstrap)))
8336 (home-page "https://gitlab.com/pycqa/flake8")
8337 (synopsis
8338 "The modular source code checker: pep8, pyflakes and co")
8339 (description
8340 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8341 (properties `((python2-variant . ,(delay python2-flake8))))
8342 (license license:expat)))
8343
8344 (define-public python2-flake8
8345 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8346 (package (inherit base)
8347 (propagated-inputs
8348 `(("python2-configparser" ,python2-configparser)
8349 ("python2-enum34" ,python2-enum34)
8350 ("python2-functools32" ,python2-functools32)
8351 ("python2-typing" ,python2-typing)
8352 ,@(package-propagated-inputs base))))))
8353
8354 (define-public python-flake8-bugbear
8355 (package
8356 (name "python-flake8-bugbear")
8357 (version "20.1.4")
8358 (source
8359 (origin
8360 (method url-fetch)
8361 (uri (pypi-uri "flake8-bugbear" version))
8362 (sha256
8363 (base32
8364 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8365 (build-system python-build-system)
8366 (arguments
8367 '(#:phases
8368 (modify-phases %standard-phases
8369 (add-before 'check 'disable-test
8370 (lambda _
8371 ;; This test fails on slow computers.
8372 (substitute* "tests/test_bugbear.py"
8373 (("def test_does_not_crash_on_any_valid_code")
8374 "def _test_does_not_crash_on_any_valid_code")))))))
8375 (native-inputs
8376 `(("python-hypothesis" ,python-hypothesis)
8377 ("python-hypothesmith" ,python-hypothesmith)))
8378 (propagated-inputs
8379 `(("python-attrs" ,python-attrs)
8380 ("python-flake8" ,python-flake8)))
8381 (home-page "https://github.com/PyCQA/flake8-bugbear")
8382 (synopsis
8383 "Flake8 plugin for finding likely bugs and design problems in your program")
8384 (description
8385 "This package contains a plugin for Flake8 finding likely bugs and
8386 design problems in your program. It contains warnings that don't belong
8387 in pyflakes and pycodestyle.")
8388 (license license:expat)))
8389
8390 (define-public python-flake8-polyfill
8391 (package
8392 (name "python-flake8-polyfill")
8393 (version "1.0.2")
8394 (source
8395 (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "flake8-polyfill" version))
8398 (sha256
8399 (base32
8400 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8401 (build-system python-build-system)
8402 (arguments
8403 '(#:phases
8404 (modify-phases %standard-phases
8405 (replace 'check
8406 (lambda _
8407 ;; Be compatible with Pytest 4:
8408 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8409 (substitute* "setup.cfg"
8410 (("\\[pytest\\]")
8411 "[tool:pytest]"))
8412
8413 (setenv "PYTHONPATH"
8414 (string-append (getcwd) "/build/lib:"
8415 (getenv "PYTHONPATH")))
8416 (invoke "py.test" "-v"))))))
8417 (native-inputs
8418 `(("python-flake8" ,python-flake8)
8419 ("python-mock" ,python-mock)
8420 ("python-pep8" ,python-pep8)
8421 ("python-pycodestyle" ,python-pycodestyle)
8422 ("python-pytest" ,python-pytest)))
8423 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8424 (synopsis "Polyfill package for Flake8 plugins")
8425 (description
8426 "This package that provides some compatibility helpers for Flake8
8427 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8428 (license license:expat)))
8429
8430 (define-public python2-flake8-polyfill
8431 (package-with-python2 python-flake8-polyfill))
8432
8433 (define-public python-flake8-pyi
8434 (package
8435 (name "python-flake8-pyi")
8436 (version "20.5.0")
8437 (source
8438 (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "flake8-pyi" version))
8441 (sha256
8442 (base32
8443 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8444 (build-system python-build-system)
8445 (propagated-inputs
8446 `(("python-attrs" ,python-attrs)
8447 ("python-flake8" ,python-flake8)
8448 ("python-pyflakes" ,python-pyflakes)))
8449 (home-page "https://github.com/ambv/flake8-pyi")
8450 (synopsis
8451 "Flake8 plugin that provides specializations for type hinting stub files")
8452 (description
8453 "This package contains a plugin that provides specializations for
8454 type hinting stub files, especially interesting for linting typeshed. It
8455 adds the @file{.pyi} extension to the default value of the @code{--filename}
8456 command-line argument to Flake8. This means stubs are linted by default with
8457 this plugin enabled, without needing to explicitly list every file. It
8458 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8459 expressions after the entire file has been read. This enables support for
8460 first-class forward references that stub files use.")
8461 (license license:expat)))
8462
8463 (define-public python-flake8-pie
8464 (package
8465 (name "python-flake8-pie")
8466 (version "0.5.0")
8467 (source
8468 (origin
8469 (method url-fetch)
8470 (uri (pypi-uri "flake8-pie" version))
8471 (sha256
8472 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8473 (build-system python-build-system)
8474 (home-page "https://github.com/sbdchd/flake8-pie")
8475 (synopsis "Flake8 extension that implements lints")
8476 (description
8477 "This package provides a flake8 extension that implements miscellaneous
8478 lints.")
8479 (license license:bsd-2)))
8480
8481 (define-public python-autoflake
8482 (package
8483 (name "python-autoflake")
8484 (version "1.3.1")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "autoflake" version))
8489 (sha256
8490 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8491 (build-system python-build-system)
8492 (propagated-inputs
8493 `(("python-pyflakes" ,python-pyflakes)))
8494 (home-page "https://github.com/myint/autoflake")
8495 (synopsis "Removes unused imports and unused variables")
8496 (description
8497 "@code{autoflake} removes unused imports and unused variables from Python
8498 code as reported by @code{pyflakes}.
8499
8500 By default, it only removes unused imports for modules that are part of the
8501 standard library. Removal of unused variables is also disabled by default.
8502 It also removes useless @code{pass} statements.")
8503 (license license:expat)))
8504
8505 (define-public python-mistune
8506 (package
8507 (name "python-mistune")
8508 (version "0.8.4")
8509 (source
8510 (origin
8511 (method url-fetch)
8512 (uri (pypi-uri "mistune" version))
8513 (sha256
8514 (base32
8515 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8516 (build-system python-build-system)
8517 (native-inputs
8518 `(("python-nose" ,python-nose)
8519 ("python-cython" ,python-cython)))
8520 (home-page "https://github.com/lepture/mistune")
8521 (synopsis "Markdown parser in pure Python")
8522 (description "This package provides a fast markdown parser in pure
8523 Python.")
8524 (license license:bsd-3)))
8525
8526 (define-public python2-mistune
8527 (package-with-python2 python-mistune))
8528
8529 (define-public python-markdown
8530 (package
8531 (name "python-markdown")
8532 (version "3.2.1")
8533 (source
8534 (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "Markdown" version))
8537 (sha256
8538 (base32
8539 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8540 (build-system python-build-system)
8541 (native-inputs
8542 `(("python-nose" ,python-nose)
8543 ("python-pyyaml" ,python-pyyaml)))
8544 (home-page "https://python-markdown.github.io/")
8545 (synopsis "Python implementation of Markdown")
8546 (description
8547 "This package provides a Python implementation of John Gruber's
8548 Markdown. The library features international input, various Markdown
8549 extensions, and several HTML output formats. A command line wrapper
8550 markdown_py is also provided to convert Markdown files to HTML.")
8551 (properties `((python2-variant . ,(delay python2-markdown))))
8552 (license license:bsd-3)))
8553
8554 ;; Markdown 3.2 dropped support for Python 2.
8555 (define-public python2-markdown
8556 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8557 (package/inherit
8558 base
8559 (version "3.1.1")
8560 (source (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "Markdown" version))
8563 (sha256
8564 (base32
8565 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8566
8567 (define-public python-ptyprocess
8568 (package
8569 (name "python-ptyprocess")
8570 (version "0.5.2")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "ptyprocess" version))
8575 (sha256
8576 (base32
8577 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8578 (build-system python-build-system)
8579 (native-inputs
8580 `(("python-nose" ,python-nose)))
8581 (arguments
8582 `(#:phases
8583 (modify-phases %standard-phases
8584 (replace 'check
8585 (lambda _ (invoke "nosetests"))))))
8586 (home-page "https://github.com/pexpect/ptyprocess")
8587 (synopsis "Run a subprocess in a pseudo terminal")
8588 (description
8589 "This package provides a Python library used to launch a subprocess in a
8590 pseudo terminal (pty), and interact with both the process and its pty.")
8591 (license license:isc)))
8592
8593 (define-public python2-ptyprocess
8594 (package-with-python2 python-ptyprocess))
8595
8596 (define-public python-cram
8597 (package
8598 (name "python-cram")
8599 (version "0.7")
8600 (home-page "https://bitheap.org/cram/")
8601 (source (origin
8602 (method url-fetch)
8603 (uri (list (string-append home-page "cram-"
8604 version ".tar.gz")
8605 (pypi-uri "cram" version)))
8606 (sha256
8607 (base32
8608 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8609 (arguments
8610 '(#:phases
8611 (modify-phases %standard-phases
8612 (add-after 'unpack 'patch-source
8613 (lambda _
8614 (substitute* (find-files "cram" ".*\\.py$")
8615 ;; Replace default shell path.
8616 (("/bin/sh") (which "sh")))
8617 (substitute* (find-files "tests" ".*\\.t$")
8618 (("md5") "md5sum")
8619 (("/bin/bash") (which "bash"))
8620 (("/bin/sh") (which "sh")))
8621 (substitute* "cram/_test.py"
8622 ;; This hack works around a bug triggered by substituting
8623 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8624 ;; "cram -h", which breaks the output at 80 characters. This
8625 ;; causes the line showing the default shell to break into two
8626 ;; lines, but the test expects a single line...
8627 (("env\\['COLUMNS'\\] = '80'")
8628 "env['COLUMNS'] = '160'"))
8629
8630 (substitute* "Makefile"
8631 ;; Recent versions of python-coverage have caused the test
8632 ;; coverage to decrease (as of version 0.7). Allow that.
8633 (("--fail-under=100")
8634 "--fail-under=90"))
8635
8636 #t))
8637 (replace 'check
8638 ;; The test phase uses the built library and executable.
8639 (lambda* (#:key inputs outputs #:allow-other-keys)
8640 (add-installed-pythonpath inputs outputs)
8641 (setenv "PATH" (string-append (getenv "PATH") ":"
8642 (assoc-ref outputs "out") "/bin"))
8643 (invoke "make" "test"))))))
8644 (build-system python-build-system)
8645 (native-inputs
8646 `(("python-coverage" ,python-coverage)
8647 ("which" ,which)))
8648 (synopsis "Simple testing framework for command line applications")
8649 (description
8650 "Cram is a functional testing framework for command line applications.
8651 Cram tests look like snippets of interactive shell sessions. Cram runs each
8652 command and compares the command output in the test with the command’s actual
8653 output.")
8654 (license license:gpl2+)))
8655
8656 (define-public python2-cram
8657 (package-with-python2 python-cram))
8658
8659 (define-public python-crashtest
8660 (package
8661 (name "python-crashtest")
8662 (version "0.3.1")
8663 (source
8664 (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "crashtest" version))
8667 (sha256
8668 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8669 (build-system python-build-system)
8670 (home-page "https://github.com/sdispater/crashtest")
8671 (synopsis "Manage Python errors with ease")
8672 (description
8673 "Python library that makes exceptions handling and inspection easier.")
8674 (license license:expat)))
8675
8676 (define-public python-straight-plugin
8677 (package
8678 (name "python-straight-plugin")
8679 (version "1.4.1")
8680 (source
8681 (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "straight.plugin" version))
8684 (sha256
8685 (base32
8686 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8687 (build-system python-build-system)
8688 (home-page "https://github.com/ironfroggy/straight.plugin")
8689 (synopsis "Simple namespaced plugin facility")
8690 (description "Straight Plugin provides a type of plugin you can create from
8691 almost any existing Python modules, and an easy way for outside developers to
8692 add functionality and customization to your projects with their own plugins.")
8693 (license license:expat)))
8694
8695 (define-public python2-straight-plugin
8696 (package-with-python2 python-straight-plugin))
8697
8698 (define-public python-fonttools
8699 (package
8700 (name "python-fonttools")
8701 (version "4.6.0")
8702 (source (origin
8703 (method url-fetch)
8704 (uri (pypi-uri "fonttools" version ".zip"))
8705 (sha256
8706 (base32
8707 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8708 (build-system python-build-system)
8709 (native-inputs
8710 `(("unzip" ,unzip)
8711 ("python-pytest" ,python-pytest)
8712 ("python-pytest-runner" ,python-pytest-runner)))
8713 (home-page "https://github.com/fonttools/fonttools")
8714 (synopsis "Tools to manipulate font files")
8715 (description
8716 "FontTools/TTX is a library to manipulate font files from Python. It
8717 supports reading and writing of TrueType/OpenType fonts, reading and writing
8718 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8719 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8720 from an XML-based format.")
8721 (license license:expat)))
8722
8723 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8724 (define-public python2-fonttools
8725 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8726 (package/inherit
8727 base
8728 (version "3.44.0")
8729 (source (origin
8730 (method url-fetch)
8731 (uri (pypi-uri "fonttools" version ".zip"))
8732 (sha256
8733 (base32
8734 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8735
8736 (define-public python-ly
8737 (package
8738 (name "python-ly")
8739 (version "0.9.5")
8740 (source
8741 (origin
8742 (method url-fetch)
8743 (uri (pypi-uri name version))
8744 (sha256
8745 (base32
8746 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8747 (build-system python-build-system)
8748 (arguments
8749 ;; FIXME: Some tests need network access.
8750 '(#:tests? #f))
8751 (synopsis "Tool and library for manipulating LilyPond files")
8752 (description "This package provides a Python library to parse, manipulate
8753 or create documents in LilyPond format. A command line program ly is also
8754 provided that can be used to do various manipulations with LilyPond files.")
8755 (home-page "https://pypi.org/project/python-ly/")
8756 (license license:gpl2+)))
8757
8758 (define-public python-appdirs
8759 (package
8760 (name "python-appdirs")
8761 (version "1.4.3")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "appdirs" version))
8766 (sha256
8767 (base32
8768 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8769 (build-system python-build-system)
8770 (home-page "https://github.com/ActiveState/appdirs")
8771 (synopsis
8772 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8773 (description
8774 "This module provides a portable way of finding out where user data
8775 should be stored on various operating systems.")
8776 (license license:expat)))
8777
8778 (define-public python2-appdirs
8779 (package-with-python2 python-appdirs))
8780
8781 (define-public python-gorilla
8782 (package
8783 (name "python-gorilla")
8784 (version "0.3.0")
8785 (source (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "gorilla" version))
8788 (sha256
8789 (base32
8790 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8791 (build-system python-build-system)
8792 (home-page "https://github.com/christophercrouzet/gorilla")
8793 (synopsis "Convenient monkey patching with Python")
8794 (description
8795 "Gorilla is a Python library that provides a convenient approach to
8796 monkey patching. Monkey patching is the process of modifying module and
8797 class attributes at runtime with the purpose of replacing or extending
8798 third-party code.")
8799 (license license:expat)))
8800
8801 (define-public python-llfuse
8802 (package
8803 (name "python-llfuse")
8804 (version "1.3.8")
8805 (source (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "llfuse" version))
8808 (sha256
8809 (base32
8810 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
8811 (build-system python-build-system)
8812 (inputs
8813 `(("fuse" ,fuse)
8814 ("attr" ,attr)))
8815 (native-inputs
8816 `(("pkg-config" ,pkg-config)))
8817 (synopsis "Python bindings for FUSE")
8818 (description
8819 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8820 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8821 (license license:lgpl2.0+)
8822 (properties `((python2-variant . ,(delay python2-llfuse))))))
8823
8824 (define-public python2-llfuse
8825 (package (inherit (package-with-python2
8826 (strip-python2-variant python-llfuse)))
8827 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8828
8829 (define-public python-msgpack
8830 (package
8831 (name "python-msgpack")
8832 (version "1.0.0")
8833 (source (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "msgpack" version))
8836 (sha256
8837 (base32
8838 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8839 (build-system python-build-system)
8840 (arguments
8841 `(#:modules ((guix build utils)
8842 (guix build python-build-system)
8843 (ice-9 ftw)
8844 (srfi srfi-1)
8845 (srfi srfi-26))
8846 #:phases
8847 (modify-phases %standard-phases
8848 (replace 'check
8849 (lambda _
8850 (let ((cwd (getcwd)))
8851 (setenv "PYTHONPATH"
8852 (string-append cwd "/build/"
8853 (find (cut string-prefix? "lib" <>)
8854 (scandir (string-append cwd "/build")))
8855 ":"
8856 (getenv "PYTHONPATH")))
8857 (invoke "pytest" "-v" "test")))))))
8858 (native-inputs
8859 `(("python-pytest" ,python-pytest)))
8860 (synopsis "MessagePack (de)serializer")
8861 (description "MessagePack is a fast, compact binary serialization format,
8862 suitable for similar data to JSON. This package provides CPython bindings for
8863 reading and writing MessagePack data.")
8864 (home-page "https://pypi.org/project/msgpack/")
8865 (license license:asl2.0)))
8866
8867 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8868 ;; release 0.5. Some packages like borg still call it by the old name for now.
8869 ;; <https://bugs.gnu.org/30662>
8870 (define-public python-msgpack-transitional
8871 (package
8872 (inherit python-msgpack)
8873 (name "python-msgpack-transitional")
8874 (version "0.5.6")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "msgpack" version))
8878 (sha256
8879 (base32
8880 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8881 (arguments
8882 (substitute-keyword-arguments (package-arguments python-msgpack)
8883 ((#:phases phases)
8884 `(modify-phases ,phases
8885 (add-after 'unpack 'configure-transitional
8886 (lambda _
8887 ;; Keep using the old name.
8888 (substitute* "setup.py"
8889 (("TRANSITIONAL = False")
8890 "TRANSITIONAL = 1"))
8891 #t))))))))
8892
8893 (define-public python2-msgpack
8894 (package-with-python2 python-msgpack))
8895
8896 (define-public python-netaddr
8897 (package
8898 (name "python-netaddr")
8899 (version "0.7.19")
8900 (source
8901 (origin
8902 (method url-fetch)
8903 (uri (pypi-uri "netaddr" version))
8904 (sha256
8905 (base32
8906 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8907 (build-system python-build-system)
8908 (arguments `(#:tests? #f)) ;; No tests.
8909 (home-page "https://github.com/drkjam/netaddr/")
8910 (synopsis "Pythonic manipulation of network addresses")
8911 (description
8912 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8913 and MAC network addresses.")
8914 (license license:bsd-3)))
8915
8916 (define-public python2-netaddr
8917 (package-with-python2 python-netaddr))
8918
8919 (define-public python2-pyroute2
8920 (package
8921 (name "python2-pyroute2")
8922 (version "0.5.6")
8923 (source
8924 (origin
8925 (method url-fetch)
8926 (uri (pypi-uri "pyroute2" version))
8927 (sha256
8928 (base32
8929 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8930 (build-system python-build-system)
8931 (arguments
8932 `(#:python ,python-2)) ;Python 3.x is not supported
8933 (home-page "https://github.com/svinota/pyroute2")
8934 (synopsis "Python netlink library")
8935 (description
8936 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8937 Supported netlink families and protocols include:
8938 @itemize
8939 @item rtnl, network settings - addresses, routes, traffic controls
8940 @item nfnetlink - netfilter API: ipset, nftables, ...
8941 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8942 @item devlink - manage and monitor devlink-enabled hardware
8943 @item generic - generic netlink families
8944 @itemize
8945 @item nl80211 - wireless functions API (basic support)
8946 @item taskstats - extended process statistics
8947 @item acpi_events - ACPI events monitoring
8948 @item thermal_events - thermal events monitoring
8949 @item VFS_DQUOT - disk quota events monitoring
8950 @end itemize
8951 @end itemize")
8952 (license license:gpl2+)))
8953
8954 (define-public python-wrapt
8955 (package
8956 (name "python-wrapt")
8957 (version "1.11.2")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "wrapt" version))
8962 (sha256
8963 (base32
8964 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8965 (build-system python-build-system)
8966 (arguments
8967 ;; Tests are not included in the tarball, they are only available in the
8968 ;; git repository.
8969 `(#:tests? #f))
8970 (home-page "https://github.com/GrahamDumpleton/wrapt")
8971 (synopsis "Module for decorators, wrappers and monkey patching")
8972 (description
8973 "The aim of the wrapt module is to provide a transparent object proxy for
8974 Python, which can be used as the basis for the construction of function
8975 wrappers and decorator functions.")
8976 (license license:bsd-2)))
8977
8978 (define-public python2-wrapt
8979 (package-with-python2 python-wrapt))
8980
8981 (define-public python-commonmark
8982 (package
8983 (name "python-commonmark")
8984 (version "0.9.1")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "commonmark" version))
8989 (sha256
8990 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
8991 (build-system python-build-system)
8992 (arguments
8993 `(#:phases
8994 (modify-phases %standard-phases
8995 (replace 'check
8996 (lambda* (#:key inputs outputs #:allow-other-keys)
8997 (add-installed-pythonpath inputs outputs)
8998 (invoke "python" "setup.py" "test"))))))
8999 (home-page "https://github.com/readthedocs/commonmark.py")
9000 (synopsis "Python parser for the CommonMark Markdown spec")
9001 (description
9002 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9003 Markdown parser and renderer for the CommonMark specification, using only
9004 native modules.")
9005 (license license:bsd-3)))
9006
9007 (define-public python-xlrd
9008 (package
9009 (name "python-xlrd")
9010 (version "1.2.0")
9011 (source (origin
9012 (method url-fetch)
9013 (uri (pypi-uri "xlrd" version))
9014 (sha256
9015 (base32
9016 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9017 (build-system python-build-system)
9018 (arguments
9019 `(#:phases
9020 (modify-phases %standard-phases
9021 ;; Some tests depend on writing a temporary file to the user's home
9022 ;; directory.
9023 (add-after 'unpack 'fix-tests
9024 (lambda _
9025 (delete-file "tests/test_open_workbook.py")
9026 #t)))))
9027 (home-page "http://www.python-excel.org/")
9028 (synopsis "Library for extracting data from Excel files")
9029 (description "This package provides a library to extract data from
9030 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9031 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9032 Unicode-aware. It is not intended as an end-user tool.")
9033 (license license:bsd-3)))
9034
9035 (define-public python2-xlrd
9036 (package-with-python2 python-xlrd))
9037
9038 (define-public python-immutables
9039 (package
9040 (name "python-immutables")
9041 (version "0.14")
9042 (source
9043 (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "immutables" version))
9046 (sha256
9047 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9048 (build-system python-build-system)
9049 (home-page "https://github.com/MagicStack/immutables")
9050 (synopsis "High-performance immutable mapping type for Python")
9051 (description
9052 "An immutable mapping type for Python. The underlying datastructure is a
9053 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9054 functional languages.")
9055 (license license:asl2.0)))
9056
9057 (define-public python-prettytable
9058 (package
9059 (name "python-prettytable")
9060 (version "0.7.2")
9061 (source
9062 (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9065 (sha256
9066 (base32
9067 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9068 (build-system python-build-system)
9069 (home-page "https://code.google.com/archive/p/prettytable/")
9070 (synopsis "Display tabular data in an ASCII table format")
9071 (description
9072 "A library designed to represent tabular data in visually appealing ASCII
9073 tables. PrettyTable allows for selection of which columns are to be printed,
9074 independent alignment of columns (left or right justified or centred) and
9075 printing of sub-tables by specifying a row range.")
9076 (license license:bsd-3)))
9077
9078 (define-public python2-prettytable
9079 (package-with-python2 python-prettytable))
9080
9081 (define-public python-curio
9082 (package
9083 (name "python-curio")
9084 (version "1.2")
9085 (source
9086 (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "curio" version))
9089 (sha256
9090 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9091 (build-system python-build-system)
9092 (arguments
9093 `(#:phases
9094 (modify-phases %standard-phases
9095 (replace 'check
9096 (lambda* (#:key inputs outputs #:allow-other-keys)
9097 (add-installed-pythonpath inputs outputs)
9098 (invoke "pytest" "-vv" "-k"
9099 ;; Tries to open an outgoing connection.
9100 "not test_ssl_outgoing"))))))
9101 (native-inputs
9102 `(("python-pytest" ,python-pytest)))
9103 (home-page "https://github.com/dabeaz/curio")
9104 (synopsis "Coroutine-based library for concurrent Python")
9105 (description
9106 "Curio is a coroutine-based library for concurrent Python systems
9107 programming. It provides standard programming abstractions such as as
9108 tasks, sockets, files, locks, and queues.")
9109 (license license:bsd-3)))
9110
9111 (define-public python-tables
9112 (package
9113 (name "python-tables")
9114 (version "3.6.1")
9115 (source
9116 (origin
9117 (method url-fetch)
9118 (uri (pypi-uri "tables" version))
9119 (sha256
9120 (base32
9121 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9122 (modules '((guix build utils)))
9123 (snippet
9124 '(begin
9125 ;; Remove pre-compiled .pyc files from source.
9126 (for-each delete-file-recursively
9127 (find-files "." "__pycache__" #:directories? #t))
9128 (for-each delete-file (find-files "." "\\.pyc$"))
9129 #t))))
9130 (build-system python-build-system)
9131 (arguments
9132 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9133 ;; or "check", so we must override the build and check phases.
9134 #:phases
9135 (modify-phases %standard-phases
9136 (add-after 'unpack 'use-gcc
9137 (lambda _
9138 (substitute* "setup.py"
9139 (("^( +)compiler = new_compiler\\(\\)" line indent)
9140 (string-append line
9141 "\n"
9142 indent
9143 "compiler.set_executables(compiler='gcc',"
9144 "compiler_so='gcc',"
9145 "linker_exe='gcc',"
9146 "linker_so='gcc -shared')")))
9147 #t))
9148 (add-after 'unpack 'disable-tuning
9149 (lambda _
9150 (substitute* "setup.py"
9151 (("cpu_flags = .*")
9152 "cpu_flags = ['sse2']\n"))
9153 #t))
9154 (replace 'build
9155 (lambda* (#:key inputs #:allow-other-keys)
9156 (invoke "python" "setup.py" "build"
9157 (string-append "--hdf5="
9158 (assoc-ref inputs "hdf5")))))
9159 (replace 'check
9160 (lambda* (#:key inputs #:allow-other-keys)
9161 (invoke "python" "setup.py" "check"
9162 (string-append "--hdf5="
9163 (assoc-ref inputs "hdf5"))))))))
9164 (propagated-inputs
9165 `(("python-numexpr" ,python-numexpr)
9166 ("python-numpy" ,python-numpy)))
9167 (native-inputs
9168 `(("python-cython" ,python-cython)
9169 ("pkg-config" ,pkg-config)))
9170 (inputs
9171 `(("hdf5" ,hdf5-1.10)
9172 ("bzip2" ,bzip2)
9173 ("zlib" ,zlib)))
9174 (home-page "https://www.pytables.org/")
9175 (synopsis "Hierarchical datasets for Python")
9176 (description "PyTables is a package for managing hierarchical datasets and
9177 designed to efficiently cope with extremely large amounts of data.")
9178 (license license:bsd-3)))
9179
9180 (define-public python2-tables
9181 (package-with-python2 python-tables))
9182
9183 (define-public python-sniffio
9184 (package
9185 (name "python-sniffio")
9186 (version "1.1.0")
9187 (source
9188 (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "sniffio" version))
9191 (sha256
9192 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9193 (build-system python-build-system)
9194 (arguments
9195 `(#:phases
9196 (modify-phases %standard-phases
9197 (replace 'check
9198 (lambda _
9199 (invoke "pytest" "-vv"))))))
9200 (native-inputs
9201 `(("python-curio" ,python-curio)
9202 ("python-pytest" ,python-pytest)
9203 ("python-pytest-cov" ,python-pytest-cov)))
9204 (home-page "https://github.com/python-trio/sniffio")
9205 (synopsis "Detect which async library a program is running under")
9206 (description "This package detects which async library a program is
9207 running under. It supports multiple async I/O packages, like Trio, and
9208 asyncio.")
9209 ;; Either license applies.
9210 (license (list license:expat license:asl2.0))))
9211
9212 (define-public python-pytest-black
9213 (package
9214 (name "python-pytest-black")
9215 (version "0.3.8")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "pytest-black" version))
9220 (sha256
9221 (base32
9222 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9223 (build-system python-build-system)
9224 (propagated-inputs
9225 `(("python-pytest" ,python-pytest)
9226 ("python-black" ,python-black)
9227 ("python-toml" ,python-toml)))
9228 (native-inputs
9229 `(("python-setuptools-scm" ,python-setuptools-scm)))
9230 (home-page "https://github.com/shopkeep/pytest-black")
9231 (synopsis "Pytest plugin to enable format checking with black")
9232 (description
9233 "This package provides a pytest plugin to enable format checking with the
9234 Python code formatter \"black\".")
9235 (license license:expat)))
9236
9237 (define-public python-get-version
9238 (package
9239 (name "python-get-version")
9240 (version "2.1")
9241 (source
9242 (origin
9243 (method url-fetch)
9244 (uri (pypi-uri "get_version" version))
9245 (sha256
9246 (base32
9247 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9248 (build-system python-build-system)
9249 (propagated-inputs
9250 `(("python-pygments" ,python-pygments)
9251 ("python-pytest" ,python-pytest)
9252 ("python-pytest-black" ,python-pytest-black)
9253 ("python-pytest-cov" ,python-pytest-cov)
9254 ("python-setuptools" ,python-setuptools)
9255 ("python-testpath" ,python-testpath)))
9256 (home-page "https://github.com/flying-sheep/get_version")
9257 (synopsis "Version helper in the spirit of versioneer")
9258 (description
9259 "This package provides a version helper that lets you automatically use
9260 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9261 also supports getting the version from Python source distributions or, once
9262 your package is installed, via @code{pkg_resources} (part of
9263 @code{setuptools}).")
9264 (license license:gpl3+)))
9265
9266 (define-public python-legacy-api-wrap
9267 (package
9268 (name "python-legacy-api-wrap")
9269 (version "1.2")
9270 (source
9271 (origin
9272 (method url-fetch)
9273 (uri (pypi-uri "legacy-api-wrap" version))
9274 (sha256
9275 (base32
9276 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9277 (build-system python-build-system)
9278 (propagated-inputs
9279 `(("python-get-version" ,python-get-version)
9280 ("python-pytest" ,python-pytest)
9281 ("python-pytest-black" ,python-pytest-black)
9282 ("python-pytest-cov" ,python-pytest-cov)
9283 ("python-setuptools" ,python-setuptools)))
9284 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9285 (synopsis "Legacy API wrapper")
9286 (description "This module defines a decorator to wrap legacy APIs. The
9287 primary use case is APIs defined before keyword-only parameters existed.")
9288 (license license:gpl3+)))
9289
9290 (define-public python-pyasn1
9291 (package
9292 (name "python-pyasn1")
9293 (version "0.4.8")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "pyasn1" version))
9298 (sha256
9299 (base32
9300 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9301 (build-system python-build-system)
9302 (home-page "http://pyasn1.sourceforge.net/")
9303 (synopsis "ASN.1 types and codecs")
9304 (description
9305 "This is an implementation of ASN.1 types and codecs in Python. It is
9306 suitable for a wide range of protocols based on the ASN.1 specification.")
9307 (license license:bsd-2)))
9308
9309 (define-public python2-pyasn1
9310 (package-with-python2 python-pyasn1))
9311
9312 (define-public python-pyasn1-modules
9313 (package
9314 (name "python-pyasn1-modules")
9315 (version "0.2.2")
9316 (source
9317 (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "pyasn1-modules" version))
9320 (sha256
9321 (base32
9322 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9323 (build-system python-build-system)
9324 (propagated-inputs
9325 `(("python-pyasn1" ,python-pyasn1)))
9326 (home-page "https://sourceforge.net/projects/pyasn1/")
9327 (synopsis "ASN.1 codec implementations")
9328 (description
9329 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9330 implementations of ASN.1-based codecs and protocols.")
9331 (license license:bsd-3)))
9332
9333 (define-public python2-pyasn1-modules
9334 (package-with-python2 python-pyasn1-modules))
9335
9336 (define-public python-ipaddress
9337 (package
9338 (name "python-ipaddress")
9339 (version "1.0.22")
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "ipaddress" version))
9343 (sha256
9344 (base32
9345 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9346 (build-system python-build-system)
9347 (home-page "https://github.com/phihag/ipaddress")
9348 (synopsis "IP address manipulation library")
9349 (description
9350 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9351 in Python. This library is used to create, poke at, and manipulate IPv4 and
9352 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9353 module to older versions of Python.")
9354 (license license:psfl)))
9355
9356 (define-public python2-ipaddress
9357 (package-with-python2 python-ipaddress))
9358
9359 (define-public python2-ipaddr
9360 (package
9361 (name "python2-ipaddr")
9362 (version "2.1.11")
9363 (source
9364 (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "ipaddr" version))
9367 (sha256
9368 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9369 (build-system python-build-system)
9370 (arguments
9371 `(#:python ,python-2 ;version 2 only
9372 #:phases
9373 (modify-phases %standard-phases
9374 (replace 'check
9375 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9376 (home-page "https://github.com/google/ipaddr-py")
9377 (synopsis "IP address manipulation library")
9378 (description
9379 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9380 IPv6 addresses and networks.
9381
9382 For new implementations you may prefer to use the standard module
9383 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9384 versions of Python.")
9385 (license license:asl2.0)))
9386
9387 (define-public python-idna
9388 (package
9389 (name "python-idna")
9390 (version "2.10")
9391 (source
9392 (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "idna" version))
9395 (sha256
9396 (base32
9397 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9398 (build-system python-build-system)
9399 (home-page "https://github.com/kjd/idna")
9400 (synopsis "Internationalized domain names in applications")
9401 (description
9402 "This is a library to support the Internationalised Domain Names in
9403 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9404 protocol is often referred to as “IDNA2008” and can produce different results
9405 from the earlier standard from 2003. The library is also intended to act as a
9406 suitable drop-in replacement for the “encodings.idna” module that comes with
9407 the Python standard library but currently only supports the older 2003
9408 specification.")
9409 (license license:bsd-4)))
9410
9411 (define-public python-idna-2.7
9412 (package (inherit python-idna)
9413 (version "2.7")
9414 (source (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "idna" version))
9417 (sha256
9418 (base32
9419 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9420
9421
9422 (define-public python2-idna
9423 (package-with-python2 python-idna))
9424
9425 (define-public python-libsass
9426 (package
9427 (name "python-libsass")
9428 (version "0.20.1")
9429 (source
9430 (origin
9431 ;; PyPI tarball is missing some test files.
9432 (method git-fetch)
9433 (uri (git-reference
9434 (url "https://github.com/sass/libsass-python")
9435 (commit version)))
9436 (file-name (git-file-name name version))
9437 (sha256
9438 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9439 (build-system python-build-system)
9440 (arguments
9441 `(#:phases
9442 (modify-phases %standard-phases
9443 ;; Use Guix package of libsass instead of compiling from a checkout.
9444 (add-before 'build 'set-libsass
9445 (lambda _
9446 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9447 #t))
9448 (replace 'check
9449 (lambda* (#:key inputs outputs #:allow-other-keys)
9450 (add-installed-pythonpath inputs outputs)
9451 (invoke "pytest" "sasstests.py"))))))
9452 (native-inputs
9453 `(("python-pytest" ,python-pytest)
9454 ("python-werkzeug" ,python-werkzeug)))
9455 (inputs
9456 `(("libsass" ,libsass)))
9457 (propagated-inputs
9458 `(("python-six" ,python-six)))
9459 (home-page "https://sass.github.io/libsass-python/")
9460 (synopsis "Straightforward binding of libsass for Python")
9461 (description
9462 "This package provides a simple Python extension module @code{sass} which
9463 is binding LibSass.")
9464 (license license:expat)))
9465
9466 (define-public python-idna-ssl
9467 (package
9468 (name "python-idna-ssl")
9469 (version "1.0.1")
9470 (source
9471 (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "idna-ssl" version))
9474 (sha256
9475 (base32
9476 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9477 (build-system python-build-system)
9478 (arguments
9479 `(#:tests? #f)) ;circular dependency with python-aiohttp
9480 (home-page "https://github.com/aio-libs/idna-ssl")
9481 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9482 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9483 domains support.")
9484 (license license:expat)))
9485
9486 (define-public python-pretend
9487 (package
9488 (name "python-pretend")
9489 (version "1.0.9")
9490 (source
9491 (origin
9492 (method url-fetch)
9493 (uri (pypi-uri "pretend" version))
9494 (sha256
9495 (base32
9496 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9497 (build-system python-build-system)
9498 (home-page "https://github.com/alex/pretend")
9499 (synopsis "Library for stubbing in Python")
9500 (description
9501 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9502 technique for writing tests. You may hear the term mixed up with mocks,
9503 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9504 responses, rather than doing any computation.")
9505 (license license:bsd-3)))
9506
9507 (define-public python2-pretend
9508 (package-with-python2 python-pretend))
9509
9510 (define-public python-pip
9511 (package
9512 (name "python-pip")
9513 (version "20.2.4")
9514 (source
9515 (origin
9516 (method url-fetch)
9517 (uri (pypi-uri "pip" version))
9518 (sha256
9519 (base32
9520 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9521 (build-system python-build-system)
9522 (arguments
9523 '(#:tests? #f)) ; there are no tests in the pypi archive.
9524 (home-page "https://pip.pypa.io/")
9525 (synopsis "Package manager for Python software")
9526 (description
9527 "Pip is a package manager for Python software, that finds packages on the
9528 Python Package Index (PyPI).")
9529 (license license:expat)))
9530
9531 (define-public python2-pip
9532 (package-with-python2 python-pip))
9533
9534 (define-public python-tlsh
9535 (package
9536 (name "python-tlsh")
9537 (version "3.4.5")
9538 (home-page "https://github.com/trendmicro/tlsh")
9539 (source
9540 (origin
9541 (method git-fetch)
9542 (uri (git-reference
9543 (url "https://github.com/trendmicro/tlsh")
9544 (commit (string-append "v" version))))
9545 (file-name (git-file-name name version))
9546 (sha256
9547 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9548 (build-system cmake-build-system)
9549 (arguments
9550 '(#:out-of-source? #f
9551 #:phases (modify-phases %standard-phases
9552 (replace
9553 'install
9554 (lambda* (#:key outputs #:allow-other-keys)
9555 ;; Build and install the Python bindings. The underlying
9556 ;; C++ library is apparently not meant to be installed.
9557 (let ((out (assoc-ref outputs "out")))
9558 (with-directory-excursion "py_ext"
9559 (and (system* "python" "setup.py" "build")
9560 (system* "python" "setup.py" "install"
9561 (string-append "--prefix=" out))))))))))
9562 (inputs `(("python" ,python-wrapper))) ;for the bindings
9563 (synopsis "Fuzzy matching library for Python")
9564 (description
9565 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9566 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9567 value which can be used for similarity comparisons. Similar objects have
9568 similar hash values, which allows for the detection of similar objects by
9569 comparing their hash values. The byte stream should have a sufficient amount
9570 of complexity; for example, a byte stream of identical bytes will not generate
9571 a hash value.")
9572 (license license:asl2.0)))
9573
9574 (define-public python2-tlsh
9575 (package
9576 (inherit python-tlsh)
9577 (name "python2-tlsh")
9578 (inputs `(("python" ,python-2)))))
9579
9580 (define-public python-termcolor
9581 (package
9582 (name "python-termcolor")
9583 (version "1.1.0")
9584 (source
9585 (origin
9586 (method url-fetch)
9587 (uri (pypi-uri "termcolor" version))
9588 (sha256
9589 (base32
9590 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9591 (build-system python-build-system)
9592 (arguments
9593 ;; There are no tests.
9594 `(#:tests? #f))
9595 (home-page "https://pypi.org/project/termcolor/")
9596 (synopsis "ANSII Color formatting for terminal output")
9597 (description
9598 "This package provides ANSII Color formatting for output in terminals.")
9599 (license license:expat)))
9600
9601 (define-public python2-termcolor
9602 (package-with-python2 python-termcolor))
9603
9604 (define-public python-terminaltables
9605 (package
9606 (name "python-terminaltables")
9607 (version "3.1.0")
9608 (source
9609 (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "terminaltables" version))
9612 (sha256
9613 (base32
9614 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9615 (build-system python-build-system)
9616 (home-page "https://github.com/Robpol86/terminaltables")
9617 (synopsis
9618 "Generate simple tables in terminals from a nested list of strings")
9619 (description
9620 "This package makes it easy to draw tables in terminal/console
9621 applications from a list of lists of strings. It supports multi-line rows.")
9622 (license license:expat)))
9623
9624 (define-public python-libarchive-c
9625 (package
9626 (name "python-libarchive-c")
9627 (version "2.9")
9628 (source (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "libarchive-c" version))
9631 (sha256
9632 (base32
9633 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9634 (build-system python-build-system)
9635 (arguments
9636 '(#:phases (modify-phases %standard-phases
9637 (add-before
9638 'build 'reference-libarchive
9639 (lambda* (#:key inputs #:allow-other-keys)
9640 ;; Retain the absolute file name of libarchive.so.
9641 (let ((libarchive (assoc-ref inputs "libarchive")))
9642 (substitute* "libarchive/ffi.py"
9643 (("find_library\\('archive'\\)")
9644 (string-append "'" libarchive
9645 "/lib/libarchive.so'"))))))
9646 (replace 'check
9647 (lambda _ (invoke "pytest" "-vv"))))))
9648 (native-inputs
9649 `(("python-mock" ,python-mock)
9650 ("python-pytest" ,python-pytest)))
9651 (inputs
9652 `(("libarchive" ,libarchive)))
9653 (home-page "https://github.com/Changaco/python-libarchive-c")
9654 (synopsis "Python interface to libarchive")
9655 (description
9656 "This package provides Python bindings to libarchive, a C library to
9657 access possibly compressed archives in many different formats. It uses
9658 Python's @code{ctypes} foreign function interface (FFI).")
9659 (license license:lgpl2.0+)))
9660
9661 (define-public python2-libarchive-c
9662 (package-with-python2 python-libarchive-c))
9663
9664 (define-public python-file
9665 (package
9666 (inherit file)
9667 (name "python-file")
9668 (build-system python-build-system)
9669 (arguments
9670 '(#:tests? #f ;no tests
9671 #:configure-flags '("--single-version-externally-managed" "--root=/")
9672 #:phases (modify-phases %standard-phases
9673 (add-before 'build 'change-directory
9674 (lambda _
9675 (chdir "python")
9676 #t))
9677 (add-before 'build 'set-library-file-name
9678 (lambda* (#:key inputs #:allow-other-keys)
9679 (let ((file (assoc-ref inputs "file")))
9680 (substitute* "magic.py"
9681 (("find_library\\('magic'\\)")
9682 (string-append "'" file "/lib/libmagic.so'")))
9683 #t))))))
9684 (inputs `(("file" ,file)))
9685 (native-inputs (if (%current-target-system)
9686 `(("self" ,this-package))
9687 '()))
9688 (synopsis "Python bindings to the libmagic file type guesser")
9689 (description "This package provides Python bindings to the libmagic file
9690 type guesser.
9691
9692 Note that this module and the @code{python-magic} module both provide a
9693 @file{magic.py} file; these two modules, which are different and were
9694 developed separately, both serve the same purpose: provide Python bindings for
9695 libmagic.")))
9696
9697 (define-public python2-file
9698 (package-with-python2 python-file))
9699
9700 (define-public python-debian
9701 (package
9702 (name "python-debian")
9703 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9704 (version "0.1.36")
9705 (source
9706 (origin
9707 ;; Use git-fetch, as pypi doesn't include test suite.
9708 (method git-fetch)
9709 (uri (git-reference
9710 (url home-page)
9711 (commit version)))
9712 (file-name (git-file-name name version))
9713 (sha256
9714 (base32
9715 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9716 (build-system python-build-system)
9717 (arguments
9718 `(#:phases (modify-phases %standard-phases
9719 (add-after 'unpack 'remove-debian-specific-tests
9720 ;; python-apt, apt and dpkg are not yet available in guix,
9721 ;; and these tests heavily depend on them.
9722 (lambda _
9723 (delete-file "lib/debian/tests/test_deb822.py")
9724 (delete-file "lib/debian/tests/test_debfile.py")
9725 #t)))))
9726 (propagated-inputs
9727 `(("python-six" ,python-six)
9728 ("python-chardet" ,python-chardet)))
9729 (synopsis "Debian package related modules")
9730 (description
9731 ;; XXX: Use @enumerate instead of @itemize to work around
9732 ;; <http://bugs.gnu.org/21772>.
9733 "This package provides Python modules that abstract many formats of
9734 Debian-related files, such as:
9735
9736 @enumerate
9737 @item Debtags information;
9738 @item @file{debian/changelog} files;
9739 @item packages files, pdiffs;
9740 @item control files of single or multiple RFC822-style paragraphs---e.g.
9741 @file{debian/control}, @file{.changes}, @file{.dsc};
9742 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9743 contained files and meta-information.
9744 @end enumerate\n")
9745
9746 ;; Modules are either GPLv2+ or GPLv3+.
9747 (license license:gpl3+)))
9748
9749 (define-public python-nbformat
9750 (package
9751 (name "python-nbformat")
9752 (version "4.4.0")
9753 (source
9754 (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "nbformat" version))
9757 (sha256
9758 (base32
9759 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9760 (build-system python-build-system)
9761 (arguments `(#:tests? #f)) ; no test target
9762 (propagated-inputs
9763 `(("python-ipython-genutils" ,python-ipython-genutils)
9764 ("python-jsonschema" ,python-jsonschema)
9765 ("python-jupyter-core" ,python-jupyter-core)
9766 ("python-traitlets" ,python-traitlets)))
9767 (home-page "http://jupyter.org")
9768 (synopsis "Jupyter Notebook format")
9769 (description "This package provides the reference implementation of the
9770 Jupyter Notebook format and Python APIs for working with notebooks.")
9771 (license license:bsd-3)))
9772
9773 (define-public python2-nbformat
9774 (package-with-python2 python-nbformat))
9775
9776 (define-public python-bleach
9777 (package
9778 (name "python-bleach")
9779 (version "3.1.5")
9780 (source
9781 (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "bleach" version))
9784 (sha256
9785 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9786 (build-system python-build-system)
9787 (propagated-inputs
9788 `(("python-webencodings" ,python-webencodings)
9789 ("python-six" ,python-six)))
9790 (native-inputs
9791 `(("python-datrie" ,python-datrie)
9792 ("python-genshi" ,python-genshi)
9793 ("python-lxml" ,python-lxml)
9794 ("python-pytest" ,python-pytest)))
9795 (home-page "https://github.com/mozilla/bleach")
9796 (synopsis "Whitelist-based HTML-sanitizing tool")
9797 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9798 (license license:asl2.0)))
9799
9800 (define-public python2-bleach
9801 (package-with-python2 python-bleach))
9802
9803 (define-public python-entrypoints
9804 (package
9805 (name "python-entrypoints")
9806 (version "0.3")
9807 (source
9808 (origin
9809 (method url-fetch)
9810 (uri (pypi-uri "entrypoints" version))
9811 (sha256
9812 (base32
9813 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9814 (build-system python-build-system)
9815 ;; The package does not come with a setup.py file, so we have to generate
9816 ;; one ourselves.
9817 (arguments
9818 `(#:tests? #f
9819 #:phases
9820 (modify-phases %standard-phases
9821 (add-after 'unpack 'create-setup.py
9822 (lambda _
9823 (call-with-output-file "setup.py"
9824 (lambda (port)
9825 (format port "\
9826 from setuptools import setup
9827 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9828 " ,version))))))))
9829 (home-page "https://github.com/takluyver/entrypoints")
9830 (synopsis "Discover and load entry points from installed Python packages")
9831 (description "Entry points are a way for Python packages to advertise
9832 objects with some common interface. The most common examples are
9833 @code{console_scripts} entry points, which define shell commands by
9834 identifying a Python function to run. The @code{entrypoints} module contains
9835 functions to find and load entry points.")
9836 (license license:expat)))
9837
9838 (define-public python2-entrypoints
9839 (package-with-python2 python-entrypoints))
9840
9841 (define-public python-epc
9842 (package
9843 (name "python-epc")
9844 (version "0.0.5")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "epc" version))
9849 (sha256
9850 (base32
9851 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9852 (build-system python-build-system)
9853 (propagated-inputs
9854 `(("python-sexpdata" ,python-sexpdata)))
9855 (native-inputs
9856 `(("python-nose" ,python-nose)))
9857 (home-page "https://github.com/tkf/python-epc")
9858 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9859 (description
9860 "Python-EPC can call elisp functions from Python and Python functions
9861 from elisp.")
9862 (license license:gpl3)))
9863
9864 (define-public python-forex-python
9865 (package
9866 (name "python-forex-python")
9867 (version "1.5")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "forex-python" version))
9872 (sha256
9873 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9874 (build-system python-build-system)
9875 (arguments
9876 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9877 ;; repository require online data.
9878 `(#:tests? #f))
9879 (propagated-inputs
9880 `(("python-requests" ,python-requests)
9881 ("python-simplejson" ,python-simplejson)))
9882 (home-page "https://github.com/MicroPyramid/forex-python")
9883 (synopsis "Foreign exchange rates and currency conversion")
9884 (description
9885 "@code{python-forex-python} can be used to manipulate foreign
9886 exchange rates and to operate currency conversions.
9887
9888 Features:
9889 @itemize
9890 @item List all currency rates.
9891 @item BitCoin price for all currencies.
9892 @item Converting amount to BitCoins.
9893 @item Get historical rates for any day since 1999.
9894 @item Conversion rate for one currency(ex; USD to INR).
9895 @item Convert amount from one currency to other.('USD 10$' to INR).
9896 @item Currency symbols.
9897 @item Currency names.
9898 @end itemize")
9899 (license license:expat)))
9900
9901 (define-public python-simpleeval
9902 (package
9903 (name "python-simpleeval")
9904 (version "0.9.10")
9905 (source
9906 (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "simpleeval" version))
9909 (sha256
9910 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9911 (build-system python-build-system)
9912 (home-page "https://github.com/danthedeckie/simpleeval")
9913 (synopsis "Simple, safe single expression evaluator library")
9914 (description
9915 "This package provides a quick single file library for easily adding
9916 evaluatable expressions into python projects. Say you want to allow a user
9917 to set an alarm volume, which could depend on the time of day, alarm level,
9918 how many previous alarms had gone off, and if there is music playing at the
9919 time.")
9920 (license license:expat)))
9921
9922 (define-public python-nbconvert
9923 (package
9924 (name "python-nbconvert")
9925 (version "5.0.0b1")
9926 (source
9927 (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "nbconvert" version))
9930 (sha256
9931 (base32
9932 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9933 (build-system python-build-system)
9934 (arguments
9935 `(;; The "bdist_egg" target is disabled by default, causing the installation
9936 ;; to fail.
9937 #:configure-flags (list "bdist_egg")
9938 ;; FIXME: 5 failures, 40 errors.
9939 #:tests? #f))
9940 ;; #:phases
9941 ;; (modify-phases %standard-phases
9942 ;; (replace 'check
9943 ;; (lambda _
9944 ;; (zero? (system* "py.test" "-v")))))
9945 (native-inputs
9946 `(("python-pytest" ,python-pytest)))
9947 (propagated-inputs
9948 `(("python-bleach" ,python-bleach)
9949 ("python-entrypoints" ,python-entrypoints)
9950 ("python-jinja2" ,python-jinja2)
9951 ("python-jupyter-core" ,python-jupyter-core)
9952 ("python-mistune" ,python-mistune)
9953 ("python-nbformat" ,python-nbformat)
9954 ("python-pygments" ,python-pygments)
9955 ("python-traitlets" ,python-traitlets)))
9956 (home-page "http://jupyter.org")
9957 (synopsis "Converting Jupyter Notebooks")
9958 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9959 notebooks to various other formats via Jinja templates. It allows you to
9960 convert an @code{.ipynb} notebook file into various static formats including:
9961
9962 @enumerate
9963 @item HTML
9964 @item LaTeX
9965 @item PDF
9966 @item Reveal JS
9967 @item Markdown (md)
9968 @item ReStructured Text (rst)
9969 @item executable script
9970 @end enumerate\n")
9971 (license license:bsd-3)))
9972
9973 (define-public python2-nbconvert
9974 (package-with-python2 python-nbconvert))
9975
9976 (define-public python-notebook
9977 (package
9978 (name "python-notebook")
9979 (version "5.7.4")
9980 (source (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "notebook" version))
9983 (sha256
9984 (base32
9985 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9986 (build-system python-build-system)
9987 (arguments
9988 `(#:phases
9989 (modify-phases %standard-phases
9990 (replace 'check
9991 (lambda _
9992 ;; These tests require a browser
9993 (delete-file-recursively "notebook/tests/selenium")
9994 ;; Some tests need HOME
9995 (setenv "HOME" "/tmp")
9996 ;; This file contains "warningfilters", which are not supported
9997 ;; by this version of nose.
9998 (delete-file "setup.cfg")
9999 (with-directory-excursion "/tmp"
10000 (invoke "nosetests" "-v"))
10001 #t)))))
10002 (propagated-inputs
10003 `(("python-jupyter-core" ,python-jupyter-core)
10004 ("python-nbformat" ,python-nbformat)
10005 ("python-nbconvert" ,python-nbconvert)
10006 ("python-prometheus-client" ,python-prometheus-client)
10007 ("python-send2trash" ,python-send2trash)
10008 ("python-terminado" ,python-terminado)))
10009 (native-inputs
10010 `(("python-nose" ,python-nose)
10011 ("python-sphinx" ,python-sphinx)
10012 ("python-requests" ,python-requests)))
10013 (home-page "http://jupyter.org/")
10014 (synopsis "Web-based notebook environment for interactive computing")
10015 (description
10016 "The Jupyter HTML notebook is a web-based notebook environment for
10017 interactive computing.")
10018 (properties `((python2-variant . ,(delay python2-notebook))))
10019 (license license:bsd-3)))
10020
10021 (define-public python2-notebook
10022 (let ((base (package-with-python2
10023 (strip-python2-variant python-notebook))))
10024 (package (inherit base)
10025 (native-inputs
10026 `(("python2-mock" ,python2-mock)
10027 ,@(package-native-inputs base)))
10028 (arguments
10029 (substitute-keyword-arguments (package-arguments base)
10030 ((#:phases phases)
10031 `(modify-phases ,phases
10032 (add-before 'check 'disable-test-case
10033 ;; The test requires network access to localhost. Curiously it
10034 ;; fails with Python 2 only. Simply make the test-case return
10035 ;; immediately.
10036 (lambda _
10037 (substitute*
10038 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10039 (("formats = self.nbconvert_api") "return #")))))))))))
10040
10041 (define-public python-widgetsnbextension
10042 (package
10043 (name "python-widgetsnbextension")
10044 (version "3.5.1")
10045 (source
10046 (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "widgetsnbextension" version))
10049 (sha256
10050 (base32
10051 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10052 (build-system python-build-system)
10053 (propagated-inputs
10054 `(("python-ipykernel" ,python-ipykernel)
10055 ("python-notebook" ,python-notebook)))
10056 (native-inputs
10057 `(("python-certifi" ,python-certifi)
10058 ("python-nose" ,python-nose)))
10059 (home-page "https://ipython.org")
10060 (synopsis "IPython HTML widgets for Jupyter")
10061 (description "This package provides interactive HTML widgets for Jupyter
10062 notebooks.")
10063 (license license:bsd-3)))
10064
10065 (define-public python2-widgetsnbextension
10066 (package-with-python2 python-widgetsnbextension))
10067
10068 (define-public python-ipywidgets
10069 (package
10070 (name "python-ipywidgets")
10071 (version "7.5.1")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "ipywidgets" version))
10076 (sha256
10077 (base32
10078 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10079 (build-system python-build-system)
10080 (propagated-inputs
10081 `(("python-ipython" ,python-ipython)
10082 ("python-traitlets" ,python-traitlets)
10083 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10084 (native-inputs
10085 `(("python-nose" ,python-nose)
10086 ("python-pytest" ,python-pytest)))
10087 (home-page "https://ipython.org")
10088 (synopsis "IPython HTML widgets for Jupyter")
10089 (description "Ipywidgets are interactive HTML widgets for Jupyter
10090 notebooks and the IPython kernel. Notebooks come alive when interactive
10091 widgets are used. Users gain control of their data and can visualize changes
10092 in the data.")
10093 (license license:bsd-3)))
10094
10095 (define-public python2-ipywidgets
10096 (package-with-python2 python-ipywidgets))
10097
10098 (define-public python-jupyter-console
10099 (package
10100 (name "python-jupyter-console")
10101 (version "6.1.0")
10102 (source
10103 (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "jupyter_console" version))
10106 (sha256
10107 (base32
10108 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10109 (build-system python-build-system)
10110 (propagated-inputs
10111 `(("python-ipykernel" ,python-ipykernel)
10112 ("python-jupyter-client" ,python-jupyter-client)
10113 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10114 ("python-pygments" ,python-pygments)))
10115 (native-inputs
10116 `(("python-nose" ,python-nose)))
10117 (home-page "https://jupyter.org")
10118 (synopsis "Jupyter terminal console")
10119 (description "This package provides a terminal-based console frontend for
10120 Jupyter kernels. It also allows for console-based interaction with non-Python
10121 Jupyter kernels such as IJulia and IRKernel.")
10122 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10123 (license license:bsd-3)))
10124
10125 (define-public python2-jupyter-console
10126 (package
10127 (name "python2-jupyter-console")
10128 (version "5.2.0")
10129 (source
10130 (origin
10131 (method url-fetch)
10132 (uri (pypi-uri "jupyter_console" version))
10133 (sha256
10134 (base32
10135 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10136 (build-system python-build-system)
10137 (arguments
10138 `(#:python ,python-2
10139 #:tests? #f)) ; Tests only run in a TTY.
10140 (propagated-inputs
10141 `(("python2-ipykernel" ,python2-ipykernel)
10142 ("python2-jupyter-client" ,python2-jupyter-client)
10143 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10144 ("python2-pygments" ,python2-pygments)))
10145 (native-inputs
10146 `(("python2-nose" ,python2-nose)))
10147 (home-page "https://jupyter.org")
10148 (synopsis "Jupyter terminal console")
10149 (description "This package provides a terminal-based console frontend for
10150 Jupyter kernels. It also allows for console-based interaction with non-Python
10151 Jupyter kernels such as IJulia and IRKernel.")
10152 (license license:bsd-3)))
10153
10154 ;; The python-ipython and python-jupyter-console require each other. To get
10155 ;; the functionality in both packages working, strip down the
10156 ;; python-jupyter-console package when using it as an input to python-ipython.
10157 (define python-jupyter-console-minimal
10158 (package
10159 (inherit python-jupyter-console)
10160 (name "python-jupyter-console-minimal")
10161 (arguments
10162 (substitute-keyword-arguments
10163 (package-arguments python-jupyter-console)
10164 ((#:phases phases)
10165 `(modify-phases ,phases
10166 (add-after 'install 'delete-bin
10167 (lambda* (#:key outputs #:allow-other-keys)
10168 ;; Delete the bin files, to avoid conflicts in profiles
10169 ;; where python-ipython and python-jupyter-console are
10170 ;; both present.
10171 (delete-file-recursively
10172 (string-append
10173 (assoc-ref outputs "out") "/bin"))))))))
10174 ;; Remove the python-ipython propagated input, to avoid the cycle
10175 (propagated-inputs
10176 (alist-delete
10177 "python-ipython"
10178 (package-propagated-inputs python-jupyter-console)))))
10179
10180 (define-public python-qtconsole
10181 (package
10182 (name "python-qtconsole")
10183 (version "4.4.3")
10184 (source
10185 (origin
10186 (method url-fetch)
10187 (uri (pypi-uri "qtconsole" version))
10188 (sha256
10189 (base32
10190 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10191 (build-system python-build-system)
10192 (arguments
10193 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10194 ;; but we only have the LTS version 5.x. This means that there might be
10195 ;; runtime errors, but since this is a dependency of the Jupyter package,
10196 ;; and Jupyter can be used without the qtconsole we can overlook this for
10197 ;; now.
10198 `(#:tests? #f
10199 #:phases
10200 (modify-phases %standard-phases
10201 (add-before 'check 'pre-check
10202 (lambda _
10203 (setenv "QT_QPA_PLATFORM" "offscreen")
10204 #t)))))
10205 (propagated-inputs
10206 `(("python-ipykernel" ,python-ipykernel)
10207 ("python-ipython" ,python-ipython)))
10208 (native-inputs
10209 `(("python-pytest" ,python-pytest)))
10210 (home-page "http://jupyter.org")
10211 (synopsis "Jupyter Qt console")
10212 (description "This package provides a Qt-based console for Jupyter with
10213 support for rich media output.")
10214 (license license:bsd-3)))
10215
10216 (define-public python-jsbeautifier
10217 (package
10218 (name "python-jsbeautifier")
10219 (version "1.10.2")
10220 (home-page "https://github.com/beautify-web/js-beautify")
10221 (source (origin
10222 (method git-fetch)
10223 (uri (git-reference
10224 (url home-page)
10225 (commit (string-append "v" version))))
10226 (file-name (git-file-name name version))
10227 (sha256
10228 (base32
10229 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10230 (build-system python-build-system)
10231 (arguments
10232 `(#:phases (modify-phases %standard-phases
10233 (add-after 'unpack 'chdir
10234 (lambda _
10235 ;; The upstream Git repository contains all the code,
10236 ;; but this package only builds the python code.
10237 (chdir "python")
10238 #t))
10239 (add-after 'unpack 'patch-python-six-requirements
10240 (lambda _
10241 (substitute* "python/setup.py"
10242 (("six>=1.12.0")
10243 "six>=1.11.0"))
10244 #t)))))
10245 (propagated-inputs
10246 `(("python-editorconfig" ,python-editorconfig)
10247 ("python-six" ,python-six)))
10248 (native-inputs
10249 `(("python-pytest" ,python-pytest)))
10250 (synopsis "JavaScript unobfuscator and beautifier")
10251 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10252 popular online obfuscators.")
10253 (license license:expat)))
10254
10255 (define-public jupyter
10256 (package
10257 (name "jupyter")
10258 (version "1.0.0")
10259 (source
10260 (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "jupyter" version))
10263 (sha256
10264 (base32
10265 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10266 (build-system python-build-system)
10267 (arguments '(#:tests? #f)) ; there are none.
10268 (propagated-inputs
10269 `(("python-ipykernel" ,python-ipykernel)
10270 ("python-ipywidgets" ,python-ipywidgets)
10271 ("python-jupyter-console" ,python-jupyter-console)
10272 ("python-nbconvert" ,python-nbconvert)
10273 ("python-notebook" ,python-notebook)
10274 ("python-qtconsole" ,python-qtconsole)))
10275 (native-search-paths
10276 (list (search-path-specification
10277 (variable "JUPYTER_PATH")
10278 (files '("share/jupyter")))))
10279 (home-page "https://jupyter.org")
10280 (synopsis "Web application for interactive documents")
10281 (description
10282 "The Jupyter Notebook is a web application that allows you to create and
10283 share documents that contain live code, equations, visualizations and
10284 explanatory text. Uses include: data cleaning and transformation, numerical
10285 simulation, statistical modeling, machine learning and much more.")
10286 (license license:bsd-3)))
10287
10288 (define-public python-chardet
10289 (package
10290 (name "python-chardet")
10291 (version "3.0.4")
10292 (source
10293 (origin
10294 (method url-fetch)
10295 (uri (pypi-uri "chardet" version))
10296 (sha256
10297 (base32
10298 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10299 (native-inputs
10300 `(("python-hypothesis" ,python-hypothesis)
10301 ("python-pytest" ,python-pytest)
10302 ("python-pytest-runner" ,python-pytest-runner)))
10303 (build-system python-build-system)
10304 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10305 (arguments `(#:tests? #f))
10306 (home-page "https://github.com/chardet/chardet")
10307 (synopsis "Universal encoding detector for Python 2 and 3")
10308 (description
10309 "This package provides @code{chardet}, a Python module that can
10310 automatically detect a wide range of file encodings.")
10311 (license license:lgpl2.1+)))
10312
10313 (define-public python2-chardet
10314 (package-with-python2 python-chardet))
10315
10316 (define-public python-docopt
10317 (package
10318 (name "python-docopt")
10319 (version "0.6.2")
10320 (source
10321 (origin
10322 (method git-fetch)
10323 ;; The release on PyPI does not include tests.
10324 (uri (git-reference
10325 (url "https://github.com/docopt/docopt")
10326 (commit version)))
10327 (file-name (git-file-name name version))
10328 (sha256
10329 (base32
10330 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10331 (build-system python-build-system)
10332 (native-inputs
10333 `(("python-pytest" ,python-pytest)))
10334 (arguments
10335 `(#:phases
10336 (modify-phases %standard-phases
10337 (replace 'check
10338 (lambda _ (invoke "py.test"))))))
10339 (home-page "http://docopt.org")
10340 (synopsis "Command-line interface description language for Python")
10341 (description "This library allows the user to define a command-line
10342 interface from a program's help message rather than specifying it
10343 programmatically with command-line parsers like @code{getopt} and
10344 @code{argparse}.")
10345 (license license:expat)))
10346
10347 (define-public python2-docopt
10348 (package-with-python2 python-docopt))
10349
10350 (define-public python-pythondialog
10351 (package
10352 (name "python-pythondialog")
10353 (version "3.4.0")
10354 (source
10355 (origin
10356 (method url-fetch)
10357 (uri (pypi-uri "pythondialog" version))
10358 (sha256
10359 (base32
10360 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10361 (build-system python-build-system)
10362 (arguments
10363 `(#:phases
10364 (modify-phases %standard-phases
10365 (add-after 'unpack 'patch-path
10366 (lambda* (#:key inputs #:allow-other-keys)
10367 (let* ((dialog (assoc-ref inputs "dialog")))
10368 ;; Since this library really wants to grovel the search path, we
10369 ;; must hardcode dialog's store path into it.
10370 (substitute* "dialog.py"
10371 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10372 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10373 #t))))
10374 #:tests? #f)) ; no test suite
10375 (propagated-inputs
10376 `(("dialog" ,dialog)))
10377 (home-page "http://pythondialog.sourceforge.net/")
10378 (synopsis "Python interface to the UNIX dialog utility")
10379 (description "A Python wrapper for the dialog utility. Its purpose is to
10380 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10381 This allows one to make simple text-mode user interfaces on Unix-like systems")
10382 (license license:lgpl2.1)
10383 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10384
10385 (define-public python2-pythondialog
10386 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10387 (package
10388 (inherit base)
10389 (version (package-version python-pythondialog))
10390 (source (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "python2-pythondialog" version))
10393 (sha256
10394 (base32
10395 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10396
10397 (define-public python-configobj
10398 (package
10399 (name "python-configobj")
10400 (version "5.0.6")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "configobj" version))
10404 (sha256
10405 (base32
10406 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10407 ;; Patch setup.py so it looks for python-setuptools, which is
10408 ;; required to parse the keyword 'install_requires' in setup.py.
10409 (patches (search-patches "python-configobj-setuptools.patch"))))
10410 (build-system python-build-system)
10411 (propagated-inputs
10412 `(("python-six" ,python-six)))
10413 (synopsis "Config file reading, writing and validation")
10414 (description "ConfigObj is a simple but powerful config file reader and
10415 writer: an ini file round tripper. Its main feature is that it is very easy to
10416 use, with a straightforward programmer’s interface and a simple syntax for
10417 config files.")
10418 (home-page "https://github.com/DiffSK/configobj")
10419 (license license:bsd-3)))
10420
10421 (define-public python2-configobj
10422 (package-with-python2 python-configobj))
10423
10424 (define-public python-configargparse
10425 (package
10426 (name "python-configargparse")
10427 (version "0.14.0")
10428 (source (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "ConfigArgParse" version))
10431 (sha256
10432 (base32
10433 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10434 (build-system python-build-system)
10435 (native-inputs
10436 `(("python-pyyaml" ,python-pyyaml)))
10437 (arguments
10438 `(#:phases
10439 (modify-phases %standard-phases
10440 (replace 'check
10441 (lambda _
10442 ;; Bypass setuptools-shim because one test relies on "setup.py"
10443 ;; being the first argument passed to the python call.
10444 ;;
10445 ;; NOTE: Many tests do not run because they rely on Python's
10446 ;; built-in test.test_argparse, but we remove the unit tests from
10447 ;; our Python installation.
10448 (invoke "python" "setup.py" "test"))))))
10449 (synopsis "Replacement for argparse")
10450 (description "A drop-in replacement for argparse that allows options to also
10451 be set via config files and/or environment variables.")
10452 (home-page "https://github.com/bw2/ConfigArgParse")
10453 (license license:expat)))
10454
10455 (define-public python2-configargparse
10456 (package-with-python2 python-configargparse))
10457
10458 (define-public python-argparse-manpage
10459 (package
10460 (name "python-argparse-manpage")
10461 (version "1.1")
10462 (source
10463 (origin
10464 (method url-fetch)
10465 (uri (pypi-uri "argparse-manpage" version))
10466 (sha256
10467 (base32
10468 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10469 (build-system python-build-system)
10470 (home-page "https://github.com/praiskup/argparse-manpage")
10471 (synopsis "Build manual page from Python's ArgumentParser object")
10472 (description
10473 "This package provides tools to build manual pages from Python's
10474 @code{ArgumentParser} object.")
10475 (license license:asl2.0)))
10476
10477 (define-public python-contextlib2
10478 (package
10479 (name "python-contextlib2")
10480 (version "0.6.0.post1")
10481 (source
10482 (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "contextlib2" version))
10485 (sha256
10486 (base32
10487 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10488 (build-system python-build-system)
10489 (home-page "https://contextlib2.readthedocs.org/")
10490 (synopsis "Tools for decorators and context managers")
10491 (description "This module is primarily a backport of the Python
10492 3.2 contextlib to earlier Python versions. Like contextlib, it
10493 provides utilities for common tasks involving decorators and context
10494 managers. It also contains additional features that are not part of
10495 the standard library.")
10496 (properties `((python2-variant . ,(delay python2-contextlib2))))
10497 (license license:psfl)))
10498
10499 (define-public python2-contextlib2
10500 (let ((base (package-with-python2
10501 (strip-python2-variant python-contextlib2))))
10502 (package
10503 (inherit base)
10504 (arguments
10505 (substitute-keyword-arguments (package-arguments base)
10506 ((#:phases phases)
10507 `(modify-phases ,phases
10508 (replace 'check
10509 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10510 (native-inputs
10511 `(("python2-unittest2" ,python2-unittest2))))))
10512
10513 ;; This package is used by python2-pytest via python2-importlib-metadata,
10514 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10515 (define-public python2-contextlib2-bootstrap
10516 (hidden-package
10517 (package/inherit
10518 python2-contextlib2
10519 (name "python2-contextlib2-bootstrap")
10520 (arguments
10521 `(#:tests? #f
10522 ,@(package-arguments python2-contextlib2)))
10523 (native-inputs '()))))
10524
10525 (define-public python-texttable
10526 (package
10527 (name "python-texttable")
10528 (version "1.6.2")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "texttable" version))
10533 (sha256
10534 (base32
10535 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10536 (build-system python-build-system)
10537 (arguments
10538 `(#:phases
10539 (modify-phases %standard-phases
10540 (replace 'check
10541 (lambda _ (invoke "pytest" "tests.py"))))))
10542 (native-inputs
10543 `(("python-pytest" ,python-pytest)))
10544 (home-page "https://github.com/foutaise/texttable/")
10545 (synopsis "Python module for creating simple ASCII tables")
10546 (description "Texttable is a Python module for creating simple ASCII
10547 tables.")
10548 (license license:expat)))
10549
10550 (define-public python2-texttable
10551 (package-with-python2 python-texttable))
10552
10553 (define-public python-atomicwrites
10554 (package
10555 (name "python-atomicwrites")
10556 (version "1.3.0")
10557 (source (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "atomicwrites" version))
10560 (sha256
10561 (base32
10562 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10563 (build-system python-build-system)
10564 (synopsis "Atomic file writes in Python")
10565 (description "Library for atomic file writes using platform dependent tools
10566 for atomic file system operations.")
10567 (home-page "https://github.com/untitaker/python-atomicwrites")
10568 (license license:expat)))
10569
10570 (define-public python2-atomicwrites
10571 (package-with-python2 python-atomicwrites))
10572
10573 (define-public python-click-threading
10574 (package
10575 (name "python-click-threading")
10576 (version "0.4.4")
10577 (source (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "click-threading" version))
10580 (sha256
10581 (base32
10582 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10583 (build-system python-build-system)
10584 (propagated-inputs
10585 `(("python-click" ,python-click)))
10586 (synopsis "Utilities for multithreading in Click")
10587 (description "This package provides utilities for multithreading in Click
10588 applications.")
10589 (home-page "https://github.com/click-contrib/click-threading")
10590 (license license:expat)))
10591
10592 (define-public python-click-log
10593 (package
10594 (name "python-click-log")
10595 (version "0.3.2")
10596 (source (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "click-log" version))
10599 (sha256
10600 (base32
10601 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10602 (build-system python-build-system)
10603 (propagated-inputs
10604 `(("python-click" ,python-click)))
10605 (synopsis "Logging for click applications")
10606 (description "This package provides a Python library for logging Click
10607 applications.")
10608 (home-page "https://github.com/click-contrib/click-log")
10609 (license license:expat)))
10610
10611 (define-public python-apipkg
10612 (package
10613 (name "python-apipkg")
10614 (version "1.5")
10615 (source (origin
10616 (method url-fetch)
10617 (uri (pypi-uri "apipkg" version))
10618 (sha256
10619 (base32
10620 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10621 (build-system python-build-system)
10622 (native-inputs
10623 `(("python-pytest" ,python-pytest)
10624 ("python-setuptools-scm" ,python-setuptools-scm)))
10625 (synopsis "Namespace control and lazy-import mechanism")
10626 (description "With apipkg you can control the exported namespace of a Python
10627 package and greatly reduce the number of imports for your users. It is a small
10628 pure Python module that works on virtually all Python versions.")
10629 (home-page "https://github.com/pytest-dev/apipkg")
10630 (license license:expat)))
10631
10632 (define-public python-execnet
10633 (package
10634 (name "python-execnet")
10635 (version "1.4.1")
10636 (source (origin
10637 (method url-fetch)
10638 (uri (pypi-uri "execnet" version))
10639 (sha256
10640 (base32
10641 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10642 (build-system python-build-system)
10643 (arguments
10644 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10645 ;; The two test failures are caused by the lack of an `ssh` executable.
10646 ;; The test suite can be run with pytest after the 'install' phase.
10647 #:tests? #f))
10648 (native-inputs
10649 `(("python-pytest" ,python-pytest)
10650 ("python-setuptools-scm" ,python-setuptools-scm)))
10651 (propagated-inputs
10652 `(("python-apipkg" ,python-apipkg)))
10653 (synopsis "Rapid multi-Python deployment")
10654 (description "Execnet provides a share-nothing model with
10655 channel-send/receive communication for distributing execution across many
10656 Python interpreters across version, platform and network barriers. It has a
10657 minimal and fast API targeting the following uses:
10658 @enumerate
10659 @item distribute tasks to (many) local or remote CPUs
10660 @item write and deploy hybrid multi-process applications
10661 @item write scripts to administer multiple environments
10662 @end enumerate")
10663 (home-page "https://codespeak.net/execnet/")
10664 (license license:expat)))
10665
10666 (define-public python2-execnet
10667 (package-with-python2 python-execnet))
10668
10669 (define-public python-icalendar
10670 (package
10671 (name "python-icalendar")
10672 (version "4.0.5")
10673 (source (origin
10674 (method url-fetch)
10675 (uri (pypi-uri "icalendar" version))
10676 (sha256
10677 (base32
10678 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10679 (build-system python-build-system)
10680 (propagated-inputs
10681 `(("python-dateutil" ,python-dateutil)
10682 ("python-pytz" ,python-pytz)))
10683 (synopsis "Python library for parsing iCalendar files")
10684 (description "The icalendar package is a parser/generator of iCalendar
10685 files for use with Python.")
10686 (home-page "https://github.com/collective/icalendar")
10687 (license license:bsd-2)))
10688
10689 (define-public python-args
10690 (package
10691 (name "python-args")
10692 (version "0.1.0")
10693 (source (origin
10694 (method url-fetch)
10695 (uri (pypi-uri "args" version))
10696 (sha256
10697 (base32
10698 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10699 (build-system python-build-system)
10700 (home-page "https://github.com/kennethreitz/args")
10701 (synopsis "Command-line argument parser")
10702 (description
10703 "This library provides a Python module to parse command-line arguments.")
10704 (license license:bsd-3)))
10705
10706 (define-public python2-args
10707 (package-with-python2 python-args))
10708
10709 (define-public python-clint
10710 (package
10711 (name "python-clint")
10712 (version "0.5.1")
10713 (source (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "clint" version))
10716 (sha256
10717 (base32
10718 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10719 (build-system python-build-system)
10720 (arguments
10721 '(#:phases
10722 (modify-phases %standard-phases
10723 (replace 'check
10724 (lambda _ (invoke "py.test" "-v"))))))
10725 (native-inputs
10726 `(("python-pytest" ,python-pytest)))
10727 (propagated-inputs
10728 `(("python-args" ,python-args)))
10729 (home-page "https://github.com/kennethreitz/clint")
10730 (synopsis "Command-line interface tools")
10731 (description
10732 "Clint is a Python module filled with a set of tools for developing
10733 command-line applications, including tools for colored and indented
10734 output, progress bar display, and pipes.")
10735 (license license:isc)))
10736
10737 (define-public python2-clint
10738 (package-with-python2 python-clint))
10739
10740 (define-public python-rply
10741 (package
10742 (name "python-rply")
10743 (version "0.7.5")
10744 (source (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "rply" version))
10747 (sha256
10748 (base32
10749 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10750 (build-system python-build-system)
10751 (propagated-inputs
10752 `(("python-appdirs" ,python-appdirs)))
10753 (home-page "https://github.com/alex/rply")
10754 (synopsis "Parser generator for Python")
10755 (description
10756 "This package provides a pure Python based parser generator, that also
10757 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10758 with a new public API, and RPython support.")
10759 (license license:bsd-3)))
10760
10761 (define-public python2-rply
10762 (package-with-python2 python-rply))
10763
10764 (define-public python-hy
10765 (package
10766 (name "python-hy")
10767 (version "0.18.0")
10768 (source (origin
10769 (method url-fetch)
10770 (uri (pypi-uri "hy" version))
10771 (sha256
10772 (base32
10773 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10774 (build-system python-build-system)
10775 (arguments
10776 '(#:phases
10777 (modify-phases %standard-phases
10778 (add-before 'install 'set-HOME
10779 (lambda _
10780 (setenv "HOME" "/tmp") #t))
10781 (replace 'check
10782 (lambda _
10783 ;; Tests require write access to HOME.
10784 (setenv "HOME" "/tmp")
10785 (invoke "nosetests"))))))
10786 (native-inputs
10787 `(("python-coverage" ,python-coverage)
10788 ("python-nose" ,python-nose)))
10789 (propagated-inputs
10790 `(("python-astor" ,python-astor)
10791 ("python-colorama" ,python-colorama)
10792 ("python-rply" ,python-rply)
10793 ("python-funcparserlib"
10794 ,python-funcparserlib)))
10795 (home-page "http://hylang.org/")
10796 (synopsis "Lisp frontend to Python")
10797 (description
10798 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10799 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10800 Python at your fingertips, in Lisp form.")
10801 (license license:expat)))
10802
10803 (define-public python2-functools32
10804 (package
10805 (name "python2-functools32")
10806 (version "3.2.3-2")
10807 (source
10808 (origin
10809 (method url-fetch)
10810 (uri (pypi-uri "functools32" version))
10811 (sha256
10812 (base32
10813 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10814 (build-system python-build-system)
10815 (arguments
10816 `(#:python ,python-2
10817 #:tests? #f)) ; no test target
10818 (home-page "https://github.com/MiCHiLU/python-functools32")
10819 (synopsis
10820 "Backport of the functools module from Python 3.2.3")
10821 (description
10822 "This package is a backport of the @code{functools} module from Python
10823 3.2.3 for use with older versions of Python and PyPy.")
10824 (license license:expat)))
10825
10826 (define-public python2-subprocess32
10827 (package
10828 (name "python2-subprocess32")
10829 (version "3.2.7")
10830 (source (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "subprocess32" version))
10833 (sha256
10834 (base32
10835 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10836 (patches
10837 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10838 (build-system python-build-system)
10839 (arguments
10840 `(#:python ,python-2
10841 ;; The test suite fails with Python > 2.7.13:
10842 ;; import test.support
10843 ;; ImportError: No module named support
10844 #:tests? #f
10845 #:phases
10846 (modify-phases %standard-phases
10847 (add-after 'unpack 'patch-/bin/sh
10848 (lambda _
10849 (substitute* '("subprocess32.py"
10850 "test_subprocess32.py")
10851 (("/bin/sh") (which "sh")))
10852 #t)))))
10853 (home-page "https://github.com/google/python-subprocess32")
10854 (synopsis "Backport of the subprocess module from Python 3.2")
10855 (description
10856 "This is a backport of the @code{subprocess} standard library module
10857 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10858 new features. On POSIX systems it is guaranteed to be reliable when used
10859 in threaded applications. It includes timeout support from Python 3.3 but
10860 otherwise matches 3.2’s API.")
10861 (license license:psfl)))
10862
10863 (define-public python2-futures
10864 (package
10865 (name "python2-futures")
10866 (version "3.2.0")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "futures" version))
10871 (sha256
10872 (base32
10873 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10874 (build-system python-build-system)
10875 (arguments
10876 `(#:python ,python-2
10877 #:phases
10878 (modify-phases %standard-phases
10879 (replace 'check
10880 (lambda _
10881 (invoke "python" "test_futures.py")
10882 #t)))))
10883 (home-page "https://github.com/agronholm/pythonfutures")
10884 (synopsis
10885 "Backport of the concurrent.futures package from Python 3.2")
10886 (description
10887 "The concurrent.futures module provides a high-level interface for
10888 asynchronously executing callables. This package backports the
10889 concurrent.futures package from Python 3.2")
10890 (license license:bsd-3)))
10891
10892 (define-public python-promise
10893 (package
10894 (name "python-promise")
10895 (version "0.4.2")
10896 (source
10897 (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "promise" version))
10900 (sha256
10901 (base32
10902 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10903 (build-system python-build-system)
10904 ;; Tests wants python-futures, which is a python2 only program, and
10905 ;; can't be found by python-promise at test time.
10906 (arguments `(#:tests? #f))
10907 (home-page "https://github.com/syrusakbary/promise")
10908 (synopsis "Promises/A+ implementation for Python")
10909 (description
10910 "Promises/A+ implementation for Python")
10911 (properties `((python2-variant . ,(delay python2-promise))))
10912 (license license:expat)))
10913
10914 (define-public python2-promise
10915 (let ((promise (package-with-python2
10916 (strip-python2-variant python-promise))))
10917 (package (inherit promise)
10918 (arguments (substitute-keyword-arguments (package-arguments promise)
10919 ((#:tests? _) #t)))
10920 (native-inputs
10921 `(("python2-futures" ,python2-futures)
10922 ("python2-pytest" ,python2-pytest)
10923 ,@(package-native-inputs promise))))))
10924
10925 (define-public python-progressbar2
10926 (package
10927 (name "python-progressbar2")
10928 (version "3.51.3")
10929 (source
10930 (origin
10931 (method url-fetch)
10932 (uri (pypi-uri "progressbar2" version))
10933 (sha256
10934 (base32
10935 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10936 (build-system python-build-system)
10937 (propagated-inputs
10938 `(("python-six" ,python-six)
10939 ("python-utils" ,python-utils)))
10940 (native-inputs
10941 `(("python-flake8" ,python-flake8)
10942 ("python-freezegun" ,python-freezegun)
10943 ("python-pycodestyle" ,python-pycodestyle)
10944 ("python-pytest" ,python-pytest)
10945 ("python-pytest-cache" ,python-pytest-cache)
10946 ("python-pytest-cov" ,python-pytest-cov)
10947 ("python-pytest-flakes" ,python-pytest-flakes)
10948 ("python-pytest-pep8" ,python-pytest-pep8)
10949 ("python-sphinx" ,python-sphinx)))
10950 (home-page "https://github.com/WoLpH/python-progressbar")
10951 (synopsis "Text progress bar library for Python")
10952 (description
10953 "This package provides a Python progressbar library to provide
10954 visual (yet text based) progress to long running operations.")
10955 (license license:bsd-3)))
10956
10957 (define-public python-progressbar33
10958 (package
10959 (name "python-progressbar33")
10960 (version "2.4")
10961 (source
10962 (origin
10963 (method url-fetch)
10964 (uri (pypi-uri "progressbar33" version))
10965 (sha256
10966 (base32
10967 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10968 (build-system python-build-system)
10969 (home-page "https://github.com/germangh/python-progressbar")
10970 (synopsis "Text progress bar library for Python")
10971 (description
10972 "This package provides a text progress bar library for Python. This
10973 version only differs from the original @code{progressbar} package in that it
10974 uses relative package imports instead of absolute imports, which is necessary
10975 for the module to work under Python 3.3.")
10976 ;; Either or both of these licenses may be selected.
10977 (license (list license:lgpl2.1+ license:bsd-3))))
10978
10979 (define-public python-colorama
10980 (package
10981 (name "python-colorama")
10982 (version "0.4.4")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "colorama" version))
10987 (sha256
10988 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10989 (build-system python-build-system)
10990 (synopsis "Colored terminal text rendering for Python")
10991 (description "Colorama is a Python library for rendering colored terminal
10992 text.")
10993 (home-page "https://pypi.org/project/colorama/")
10994 (license license:bsd-3)))
10995
10996 (define-public python2-colorama
10997 (package-with-python2 python-colorama))
10998
10999 (define-public python-moto
11000 (package
11001 (name "python-moto")
11002 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11003 (version "1.3.16.dev134")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "moto" version))
11007 (sha256
11008 (base32
11009 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11010 (build-system python-build-system)
11011 (arguments
11012 `(#:phases (modify-phases %standard-phases
11013 (add-after 'unpack 'patch-hardcoded-executable-names
11014 (lambda _
11015 (substitute* "moto/batch/models.py"
11016 (("/bin/sh")
11017 (which "sh")))
11018 (substitute* (find-files "tests" "\\.py$")
11019 (("#!/bin/bash")
11020 (string-append "#!" (which "bash"))))
11021 #t))
11022 (replace 'check
11023 (lambda _
11024 (setenv "PYTHONPATH" (string-append "./build/lib:"
11025 (getenv "PYTHONPATH")))
11026 (invoke "pytest" "-vv" "-m" "not network"
11027 ;; These tests require Docker.
11028 "-k" "not test_terminate_job \
11029 and not test_invoke_function_from_sqs_exception"))))))
11030 (native-inputs
11031 `(("python-flask" ,python-flask)
11032 ("python-flask-cors" ,python-flask-cors)
11033 ("python-freezegun" ,python-freezegun)
11034 ("python-parameterized" ,python-parameterized)
11035 ("python-pytest" ,python-pytest)
11036 ("python-sure" ,python-sure)))
11037 (propagated-inputs
11038 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11039 ("python-boto" ,python-boto)
11040 ("python-boto3" ,python-boto3)
11041 ("python-botocore" ,python-botocore)
11042 ("python-cfn-lint" ,python-cfn-lint)
11043 ("python-cryptography" ,python-cryptography)
11044 ("python-dateutil" ,python-dateutil)
11045 ("python-docker" ,python-docker)
11046 ("python-idna" ,python-idna)
11047 ("python-jinja2" ,python-jinja2)
11048 ("python-jose" ,python-jose)
11049 ("python-jsondiff" ,python-jsondiff)
11050 ("python-mock" ,python-mock)
11051 ("python-pytz" ,python-pytz)
11052 ("python-pyyaml" ,python-pyyaml)
11053 ("python-requests" ,python-requests)
11054 ("python-responses" ,python-responses)
11055 ("python-six" ,python-six)
11056 ("python-sshpubkeys" ,python-sshpubkeys)
11057 ("python-werkzeug" ,python-werkzeug)
11058 ("python-xmltodict" ,python-xmltodict)))
11059 (home-page "https://github.com/spulec/moto")
11060 (synopsis "Mock out the boto library")
11061 (description
11062 "@code{moto} is a library designed to easily mock out the
11063 @code{boto} library.")
11064 (license license:asl2.0)))
11065
11066 (define-public python-rsa
11067 (package
11068 (name "python-rsa")
11069 (version "3.4.2")
11070 (source
11071 (origin
11072 (method url-fetch)
11073 (uri (pypi-uri "rsa" version))
11074 (sha256
11075 (base32
11076 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11077 (build-system python-build-system)
11078 (propagated-inputs
11079 `(("python-pyasn1" ,python-pyasn1)))
11080 (synopsis "Pure-Python RSA implementation")
11081 (description "Python-RSA is a pure-Python RSA implementation. It supports
11082 encryption and decryption, signing and verifying signatures, and key
11083 generation according to PKCS#1 version 1.5. It can be used as a Python
11084 library as well as on the command line.")
11085 (home-page "https://stuvel.eu/rsa")
11086 (license license:asl2.0)))
11087
11088 (define-public python2-rsa
11089 (package-with-python2 python-rsa))
11090
11091 (define-public python-pluggy
11092 (package
11093 (name "python-pluggy")
11094 (version "0.13.1")
11095 (source
11096 (origin
11097 (method url-fetch)
11098 (uri (pypi-uri "pluggy" version))
11099 (sha256
11100 (base32
11101 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11102 (build-system python-build-system)
11103 (native-inputs
11104 `(("python-setuptools-scm" ,python-setuptools-scm)))
11105 (synopsis "Plugin and hook calling mechanism for Python")
11106 (description "Pluggy is an extraction of the plugin manager as used by
11107 Pytest but stripped of Pytest specific details.")
11108 (home-page "https://pypi.org/project/pluggy/")
11109 (properties `((python2-variant . ,(delay python2-pluggy))))
11110 (license license:expat)))
11111
11112 (define-public python2-pluggy
11113 (let ((base (package-with-python2 (strip-python2-variant
11114 python-pluggy))))
11115 (package/inherit
11116 base
11117 (propagated-inputs
11118 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11119
11120 ;; This package requires python2-importlib-metadata, but that package
11121 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11122 ;; variant to solve the circular dependency.
11123 (define-public python2-pluggy-bootstrap
11124 (hidden-package
11125 (package/inherit
11126 python2-pluggy
11127 (name "python2-pluggy-bootstrap")
11128 (arguments
11129 `(#:tests? #f
11130 ,@(package-arguments python2-pluggy)))
11131 (propagated-inputs
11132 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11133
11134 (define-public python-tox
11135 (package
11136 (name "python-tox")
11137 (version "3.20.0")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "tox" version))
11142 (sha256
11143 (base32
11144 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11145 (build-system python-build-system)
11146 (arguments
11147 ;; FIXME: Tests require pytest-timeout, which itself requires
11148 ;; pytest>=2.8.0 for installation.
11149 '(#:tests? #f))
11150 (propagated-inputs
11151 `(("python-filelock" ,python-filelock)
11152 ("python-packaging" ,python-packaging)
11153 ("python-pluggy" ,python-pluggy)
11154 ("python-py" ,python-py)
11155 ("python-six" ,python-six)
11156 ("python-toml" ,python-toml)
11157 ("python-virtualenv" ,python-virtualenv)))
11158 (native-inputs
11159 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11160 ("python-pytest" ,python-pytest) ; >= 2.3.5
11161 ("python-setuptools-scm" ,python-setuptools-scm)))
11162 (home-page "https://tox.readthedocs.io")
11163 (synopsis "Virtualenv-based automation of test activities")
11164 (description "Tox is a generic virtualenv management and test command line
11165 tool. It can be used to check that a package installs correctly with
11166 different Python versions and interpreters, or run tests in each type of
11167 supported environment, or act as a frontend to continuous integration
11168 servers.")
11169 (license license:expat)))
11170
11171 (define-public python2-tox
11172 (package-with-python2 python-tox))
11173
11174 (define-public python-jmespath
11175 (package
11176 (name "python-jmespath")
11177 (version "0.9.4")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (pypi-uri "jmespath" version))
11182 (sha256
11183 (base32
11184 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11185 (build-system python-build-system)
11186 (native-inputs
11187 `(("python-nose" ,python-nose)))
11188 (synopsis "JSON Matching Expressions")
11189 (description "JMESPath (pronounced “james path”) is a Python library that
11190 allows one to declaratively specify how to extract elements from a JSON
11191 document.")
11192 (home-page "https://github.com/jmespath/jmespath.py")
11193 (license license:expat)))
11194
11195 (define-public python2-jmespath
11196 (package-with-python2 python-jmespath))
11197
11198 (define-public python-symengine
11199 (package
11200 (name "python-symengine")
11201 (version "0.6.1")
11202 (source
11203 (origin
11204 (method url-fetch)
11205 (uri (pypi-uri "symengine" version))
11206 (sha256
11207 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11208 (build-system python-build-system)
11209 (native-inputs
11210 `(("cmake" ,cmake)
11211 ("python-cython" ,python-cython)))
11212 (inputs
11213 `(("symengine" ,symengine)))
11214 (home-page "https://github.com/symengine/symengine.py")
11215 (synopsis "Python library providing wrappers to SymEngine")
11216 (description
11217 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11218 manipulation library.")
11219 (license license:expat)))
11220
11221 (define-public python-boto
11222 (package
11223 (name "python-boto")
11224 (version "2.49.0")
11225 (source (origin
11226 (method url-fetch)
11227 (uri (pypi-uri "boto" version))
11228 (sha256
11229 (base32
11230 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11231 (build-system python-build-system)
11232 (arguments
11233 ;; XXX: This package is unmaintained and has problems with newer versions
11234 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11235 ;; subset of this library, so keep it around for now, but disable tests.
11236 '(#:tests? #f))
11237 (propagated-inputs
11238 `(("python-paramiko" ,python-paramiko)
11239 ("python-requests" ,python-requests)))
11240 (home-page "https://github.com/boto/boto")
11241 (synopsis "Python interfaces for Amazon Web Services")
11242 (description
11243 "This package provides various facilities for interacting with Amazon
11244 Web Services through Python.
11245
11246 This software is unmaintained, and new projects should use @code{boto3} instead.")
11247 (license license:expat)))
11248
11249 (define-public python-botocore
11250 ;; Note: When updating botocore, also make sure that boto3 and awscli
11251 ;; are compatible.
11252 (package
11253 (name "python-botocore")
11254 (version "1.19.22")
11255 (source
11256 (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "botocore" version))
11259 (sha256
11260 (base32
11261 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11262 (build-system python-build-system)
11263 (arguments
11264 ;; FIXME: Many tests are failing.
11265 '(#:tests? #f))
11266 (propagated-inputs
11267 `(("python-dateutil" ,python-dateutil)
11268 ("python-jmespath" ,python-jmespath)
11269 ("python-urllib3" ,python-urllib3)))
11270 (home-page "https://github.com/boto/botocore")
11271 (synopsis "Low-level interface to AWS")
11272 (description "Botocore is a Python library that provides a low-level
11273 interface to the Amazon Web Services (AWS) API.")
11274 (license license:asl2.0)))
11275
11276 (define-public python2-botocore
11277 (package-with-python2 python-botocore))
11278
11279 (define-public python-boto3
11280 (package
11281 (name "python-boto3")
11282 (version "1.16.22")
11283 (home-page "https://github.com/boto/boto3")
11284 (source (origin
11285 (method git-fetch)
11286 (uri (git-reference (url home-page) (commit version)))
11287 (file-name (git-file-name name version))
11288 (sha256
11289 (base32
11290 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11291 (arguments
11292 `(#:phases
11293 (modify-phases %standard-phases
11294 (add-after 'unpack 'delete-network-tests
11295 ;; Deleting integration tests because they are trying to connect to AWS.
11296 (lambda _
11297 (delete-file-recursively "tests/integration")
11298 #t)))))
11299 (build-system python-build-system)
11300 (native-inputs
11301 `(("python-nose" ,python-nose)
11302 ("python-mock" ,python-mock)))
11303 (propagated-inputs
11304 `(("python-botocore" ,python-botocore)
11305 ("python-jmespath" ,python-jmespath)
11306 ("python-s3transfer" ,python-s3transfer)))
11307 (synopsis "AWS SDK for Python")
11308 (description
11309 "Boto3 is a Python library for writing programs that interact with
11310 @acronym{AWS,Amazon Web Services}.")
11311 (license license:asl2.0)))
11312
11313 (define-public python-pyfiglet
11314 (package
11315 (name "python-pyfiglet")
11316 (version "0.8.post1")
11317 (source
11318 (origin
11319 (method url-fetch)
11320 (uri (pypi-uri "pyfiglet" version))
11321 (sha256
11322 (base32
11323 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11324 (build-system python-build-system)
11325 (home-page "https://github.com/pwaller/pyfiglet")
11326 (synopsis "Draw ASCII art big letters in Python")
11327 (description "This module lets you draw large letter from ordinary characters
11328 in pure Python.")
11329 (license license:expat)))
11330
11331 (define-public python-xdo
11332 (package
11333 (name "python-xdo")
11334 (version "0.3")
11335 (source (origin
11336 (method url-fetch)
11337 (uri (string-append
11338 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11339 "python-xdo_" version ".orig.tar.gz"))
11340 (sha256
11341 (base32
11342 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11343 (build-system python-build-system)
11344 (arguments
11345 '(#:phases
11346 (modify-phases %standard-phases
11347 (add-before 'install 'patch-libxdo-path
11348 ;; Hardcode the path of dynamically loaded libxdo library.
11349 (lambda* (#:key inputs #:allow-other-keys)
11350 (let ((libxdo (string-append
11351 (assoc-ref inputs "xdotool")
11352 "/lib/libxdo.so")))
11353 (substitute* "xdo/_xdo.py"
11354 (("find_library\\(\"xdo\"\\)")
11355 (simple-format #f "\"~a\"" libxdo)))
11356 #t))))
11357 #:tests? #f)) ; no tests provided
11358 (propagated-inputs
11359 `(("python-six" ,python-six)))
11360 (inputs
11361 `(("xdotool" ,xdotool)
11362 ("libX11" ,libx11)))
11363 (home-page "https://tracker.debian.org/pkg/python-xdo")
11364 (synopsis "Python library for simulating X11 keyboard/mouse input")
11365 (description "Provides bindings to libxdo for manipulating X11 via simulated
11366 input. (Note that this is mostly a legacy library; you may wish to look at
11367 python-xdo for newer bindings.)")
11368 (license license:bsd-3)))
11369
11370 (define-public python2-xdo
11371 (package-with-python2 python-xdo))
11372
11373 (define-public python-mako
11374 (package
11375 (name "python-mako")
11376 (version "1.1.3")
11377 (source
11378 (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "Mako" version))
11381 (sha256
11382 (base32
11383 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11384 (build-system python-build-system)
11385 (arguments
11386 `(#:phases (modify-phases %standard-phases
11387 (replace 'check
11388 (lambda* (#:key tests? #:allow-other-keys)
11389 (if tests?
11390 (invoke "nosetests" "-v")
11391 (format #t "test suite not run~%"))
11392 #t)))))
11393 (propagated-inputs
11394 `(("python-markupsafe" ,python-markupsafe)))
11395 (native-inputs
11396 `(("python-mock" ,python-mock)
11397 ("python-nose" ,python-nose)))
11398 (home-page "https://www.makotemplates.org/")
11399 (synopsis "Templating language for Python")
11400 (description "Mako is a templating language for Python that compiles
11401 templates into Python modules.")
11402 (license license:expat)))
11403
11404 (define-public python2-mako
11405 (package-with-python2 python-mako))
11406
11407 (define-public python-waitress
11408 (package
11409 (name "python-waitress")
11410 (version "1.1.0")
11411 (source
11412 (origin
11413 (method url-fetch)
11414 (uri (pypi-uri "waitress" version))
11415 (patches (search-patches "python-waitress-fix-tests.patch"))
11416 (sha256
11417 (base32
11418 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11419 (build-system python-build-system)
11420 (home-page "https://github.com/Pylons/waitress")
11421 (synopsis "Waitress WSGI server")
11422 (description "Waitress is meant to be a production-quality pure-Python WSGI
11423 server with very acceptable performance.")
11424 (license license:zpl2.1)))
11425
11426 (define-public python2-waitress
11427 (package-with-python2 python-waitress))
11428
11429 (define-public python-whichcraft
11430 (package
11431 (name "python-whichcraft")
11432 (version "0.6.1")
11433 (source
11434 (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "whichcraft" version))
11437 (sha256
11438 (base32
11439 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11440 (build-system python-build-system)
11441 (native-inputs
11442 `(("python-pytest" ,python-pytest)))
11443 (home-page "https://github.com/pydanny/whichcraft")
11444 (synopsis "Cross-platform cross-python shutil.which functionality")
11445 (description
11446 "This package provides a shim of the shutil.which function that's
11447 designed to work across multiple versions of Python.")
11448 (license license:bsd-3)))
11449
11450 (define-public python-cookiecutter
11451 (package
11452 (name "python-cookiecutter")
11453 (version "1.7.2")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (pypi-uri "cookiecutter" version))
11458 (sha256
11459 (base32
11460 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11461 (build-system python-build-system)
11462 (native-inputs
11463 `(("python-freezegun" ,python-freezegun)
11464 ("python-pytest" ,python-pytest)
11465 ("python-pytest-catchlog" ,python-pytest-catchlog)
11466 ("python-pytest-cov" ,python-pytest-cov)
11467 ("python-pytest-mock" ,python-pytest-mock)))
11468 (propagated-inputs
11469 `(("python-binaryornot" ,python-binaryornot)
11470 ("python-click" ,python-click)
11471 ("python-future" ,python-future)
11472 ("python-jinja2" ,python-jinja2)
11473 ("python-jinja2-time" ,python-jinja2-time)
11474 ("python-poyo" ,python-poyo)
11475 ("python-requests" ,python-requests)
11476 ("python-slugify" ,python-slugify)
11477 ("python-text-unidecode" ,python-text-unidecode)
11478 ("python-whichcraft" ,python-whichcraft)))
11479 (home-page "https://github.com/cookiecutter/cookiecutter")
11480 (synopsis
11481 "Command-line utility that creates projects from project templates")
11482 (description
11483 "This package provides a command-line utility that creates projects from
11484 project templates, e.g. creating a Python package project from a Python package
11485 project template.")
11486 (license license:bsd-3)))
11487
11488 (define-public python-pyquery
11489 (package
11490 (name "python-pyquery")
11491 (version "1.2.17")
11492 (source
11493 (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "pyquery" version))
11496 (sha256
11497 (base32
11498 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11499 (build-system python-build-system)
11500 (native-inputs
11501 `(("python-webob" ,python-webob)
11502 ("python-webtest" ,python-webtest)))
11503 (propagated-inputs
11504 `(("python-lxml" ,python-lxml)
11505 ("python-cssselect" ,python-cssselect)))
11506 (home-page "https://github.com/gawel/pyquery")
11507 (synopsis "Make jQuery-like queries on xml documents")
11508 (description "pyquery allows you to make jQuery queries on xml documents.
11509 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11510 fast xml and html manipulation.")
11511 (license license:bsd-3)))
11512
11513 (define-public python-anyjson
11514 (package
11515 (name "python-anyjson")
11516 (version "0.3.3")
11517 (source
11518 (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "anyjson" version))
11521 (sha256
11522 (base32
11523 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11524 (build-system python-build-system)
11525 (arguments
11526 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11527 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11528 ;; whatever) so this transformation needs to be done before the tests
11529 ;; can be run. Maybe we could add a build step to transform beforehand
11530 ;; but it could be annoying/difficult.
11531 ;; We can enable tests for the Python 2 version, though, and do below.
11532 #:tests? #f))
11533 (home-page "https://bitbucket.org/runeh/anyjson/")
11534 (synopsis
11535 "Wraps best available JSON implementation in a common interface")
11536 (description
11537 "Anyjson loads whichever is the fastest JSON module installed
11538 and provides a uniform API regardless of which JSON implementation is used.")
11539 (license license:bsd-3)
11540 (properties `((python2-variant . ,(delay python2-anyjson))))))
11541
11542 (define-public python2-anyjson
11543 (let ((anyjson (package-with-python2
11544 (strip-python2-variant python-anyjson))))
11545 (package
11546 (inherit anyjson)
11547 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11548 #:tests? #t
11549 ,@(package-arguments anyjson)))
11550 (native-inputs `(("python2-nose" ,python2-nose))))))
11551
11552 (define-public python-amqp
11553 (package
11554 (name "python-amqp")
11555 (version "2.3.2")
11556 (source
11557 (origin
11558 (method url-fetch)
11559 (uri (pypi-uri "amqp" version))
11560 (sha256
11561 (base32
11562 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11563 (build-system python-build-system)
11564 (native-inputs
11565 `(("python-case" ,python-case)
11566 ("python-pytest-sugar" ,python-pytest-sugar)
11567 ("python-mock" ,python-mock)))
11568 (propagated-inputs
11569 `(("python-vine" ,python-vine)))
11570 (home-page "https://github.com/celery/py-amqp")
11571 (synopsis
11572 "Low-level AMQP client for Python (fork of amqplib)")
11573 (description
11574 "This is a fork of amqplib which was originally written by Barry Pederson.
11575 It is maintained by the Celery project, and used by kombu as a pure python
11576 alternative when librabbitmq is not available.")
11577 (license license:lgpl2.1+)
11578 (properties `((python2-variant . ,(delay python2-amqp))))))
11579
11580 (define-public python2-amqp
11581 (let ((amqp (package-with-python2
11582 (strip-python2-variant python-amqp))))
11583 (package
11584 (inherit amqp)
11585 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11586 ;; unmaintained. Weirdly, does not do this on the python 3
11587 ;; version?
11588 #:tests? #f
11589 ,@(package-arguments amqp))))))
11590
11591 (define-public python-txamqp
11592 (package
11593 (name "python-txamqp")
11594 (version "0.8.2")
11595 (source
11596 (origin
11597 (method url-fetch)
11598 (uri (pypi-uri "txAMQP" version))
11599 (sha256
11600 (base32
11601 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11602 (build-system python-build-system)
11603 (propagated-inputs
11604 `(("python-six" ,python-six)
11605 ("python-twisted" ,python-twisted)))
11606 (home-page "https://github.com/txamqp/txamqp")
11607 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11608 (description
11609 "This package provides a Python library for communicating with AMQP peers
11610 and brokers using the asynchronous networking framework Twisted. It contains
11611 all the necessary code to connect, send and receive messages to/from an
11612 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11613 also includes support for using Thrift RPC over AMQP in Twisted
11614 applications.")
11615 (license license:asl2.0)))
11616
11617 (define-public python2-txamqp
11618 (package-with-python2 python-txamqp))
11619
11620 (define-public python-kombu
11621 (package
11622 (name "python-kombu")
11623 (version "4.2.2")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "kombu" version))
11628 (sha256
11629 (base32
11630 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11631 (build-system python-build-system)
11632 (native-inputs
11633 `(("python-mock" ,python-mock)
11634 ("python-case" ,python-case)
11635 ("python-pyro4" ,python-pyro4)
11636 ("python-pytest-sugar" ,python-pytest-sugar)
11637 ("python-pytz" ,python-pytz)))
11638 (propagated-inputs
11639 `(("python-anyjson" ,python-anyjson)
11640 ("python-amqp" ,python-amqp)
11641 ("python-redis" ,python-redis)))
11642 (home-page "https://kombu.readthedocs.io")
11643 (synopsis "Message passing library for Python")
11644 (description "The aim of Kombu is to make messaging in Python as easy as
11645 possible by providing an idiomatic high-level interface for the AMQ protocol,
11646 and also provide proven and tested solutions to common messaging problems.
11647 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11648 message orientation, queuing, routing, reliability and security, for which the
11649 RabbitMQ messaging server is the most popular implementation.")
11650 (license license:bsd-3)
11651 (properties `((python2-variant . ,(delay python2-kombu))))))
11652
11653 (define-public python2-kombu
11654 (let ((kombu (package-with-python2
11655 (strip-python2-variant python-kombu))))
11656 (package
11657 (inherit kombu)
11658 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11659 ;; It works fine on the python3 variant.
11660 #:tests? #f
11661 ,@(package-arguments kombu)))
11662 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11663 ,@(package-native-inputs kombu))))))
11664
11665 (define-public python-billiard
11666 (package
11667 (name "python-billiard")
11668 (version "3.5.0.5")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "billiard" version))
11673 (sha256
11674 (base32
11675 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11676 (build-system python-build-system)
11677 (native-inputs
11678 `(("python-case" ,python-case)
11679 ("python-pytest" ,python-pytest)))
11680 (home-page "https://github.com/celery/billiard")
11681 (synopsis
11682 "Python multiprocessing fork with improvements and bugfixes")
11683 (description
11684 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11685 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11686 pyprocessing package. This standalone variant is intended to be compatible with
11687 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11688 (license license:bsd-3)
11689 (properties `((python2-variant . ,(delay python2-billiard))))))
11690
11691 (define-public python2-billiard
11692 (let ((billiard (package-with-python2
11693 (strip-python2-variant python-billiard))))
11694 (package
11695 (inherit billiard)
11696 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11697 ("python2-mock" ,python2-mock)
11698 ,@(package-native-inputs billiard))))))
11699
11700 (define-public python-celery
11701 (package
11702 (name "python-celery")
11703 (version "4.2.1")
11704 (source
11705 (origin
11706 (method url-fetch)
11707 (uri (pypi-uri "celery" version))
11708 (sha256
11709 (base32
11710 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11711 (build-system python-build-system)
11712 (arguments
11713 '(;; TODO The tests fail with Python 3.7
11714 ;; https://github.com/celery/celery/issues/4849
11715 #:tests? #f
11716 #:phases
11717 (modify-phases %standard-phases
11718 (add-after 'unpack 'patch-requirements
11719 (lambda _
11720 (substitute* "requirements/test.txt"
11721 (("pytest>=3\\.0,<3\\.3")
11722 "pytest>=3.0"))
11723 #t)))))
11724 (native-inputs
11725 `(("python-case" ,python-case)
11726 ("python-pytest" ,python-pytest)))
11727 (propagated-inputs
11728 `(("python-pytz" ,python-pytz)
11729 ("python-billiard" ,python-billiard)
11730 ("python-kombu" ,python-kombu)))
11731 (home-page "https://celeryproject.org")
11732 (synopsis "Distributed Task Queue")
11733 (description "Celery is an asynchronous task queue/job queue based on
11734 distributed message passing. It is focused on real-time operation, but
11735 supports scheduling as well. The execution units, called tasks, are executed
11736 concurrently on a single or more worker servers using multiprocessing,
11737 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11738 synchronously (wait until ready).")
11739 (license license:bsd-3)
11740 (properties `((python2-variant . ,(delay python2-celery))))))
11741
11742 (define-public python2-celery
11743 (let ((celery (package-with-python2
11744 (strip-python2-variant python-celery))))
11745 (package
11746 (inherit celery)
11747 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11748 ("python2-mock" ,python2-mock)
11749 ,@(package-native-inputs celery))))))
11750
11751 (define-public python-translitcodec
11752 (package
11753 (name "python-translitcodec")
11754 (version "0.4.0")
11755 (source
11756 (origin
11757 (method url-fetch)
11758 (uri (pypi-uri "translitcodec" version))
11759 (sha256
11760 (base32
11761 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11762 (build-system python-build-system)
11763 (arguments
11764 `(#:tests? #f)) ; no tests provided
11765 (home-page
11766 "https://github.com/claudep/translitcodec")
11767 (synopsis
11768 "Unicode to 8-bit charset transliteration codec")
11769 (description
11770 "This package contains codecs for transliterating ISO 10646 texts into
11771 best-effort representations using smaller coded character sets (ASCII,
11772 ISO 8859, etc.).")
11773 (license license:expat)))
11774
11775 (define-public python2-translitcodec
11776 (package-with-python2 python-translitcodec))
11777
11778 (define-public python-editor
11779 (package
11780 (name "python-editor")
11781 (version "1.0.4")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "python-editor" version))
11786 (sha256
11787 (base32
11788 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11789 (build-system python-build-system)
11790 (arguments
11791 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11792 (home-page "https://github.com/fmoo/python-editor")
11793 (synopsis "Programmatically open an editor, capture the result")
11794 (description
11795 "python-editor is a library that provides the editor module for
11796 programmatically interfacing with your system's $EDITOR.")
11797 (license license:asl2.0)))
11798
11799 (define-public python2-editor
11800 (package-with-python2 python-editor))
11801
11802 (define-public python-vobject
11803 (package
11804 (name "python-vobject")
11805 (version "0.9.6.1")
11806 (source (origin
11807 (method url-fetch)
11808 (uri (pypi-uri "vobject" version))
11809 (sha256
11810 (base32
11811 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11812 (build-system python-build-system)
11813 (arguments
11814 '(;; The test suite relies on some non-portable Windows interfaces.
11815 #:tests? #f))
11816 (propagated-inputs
11817 `(("python-dateutil" ,python-dateutil)
11818 ("python-pyicu" ,python-pyicu)))
11819 (synopsis "Parse and generate vCard and vCalendar files")
11820 (description "Vobject is intended to be a full featured Python package for
11821 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11822 are supported and well tested. vCard 3.0 files are supported, and all data
11823 should be imported, but only a few components are understood in a sophisticated
11824 way.")
11825 (home-page "https://eventable.github.io/vobject/")
11826 (license license:asl2.0)))
11827
11828 (define-public python2-vobject
11829 (package-with-python2 python-vobject))
11830
11831 (define-public python-munkres
11832 (package
11833 (name "python-munkres")
11834 (version "1.0.8")
11835 (source (origin
11836 (method url-fetch)
11837 (uri (pypi-uri "munkres" version))
11838 (sha256
11839 (base32
11840 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11841 (build-system python-build-system)
11842 (arguments
11843 '(#:tests? #f)) ; no test suite
11844 (home-page "https://software.clapper.org/munkres/")
11845 (synopsis "Implementation of the Munkres algorithm")
11846 (description "The Munkres module provides an implementation of the Munkres
11847 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11848 useful for solving the Assignment Problem.")
11849 (license license:bsd-3)))
11850
11851 (define-public python2-munkres
11852 (package-with-python2 python-munkres))
11853
11854 (define-public python-whoosh
11855 (package
11856 (name "python-whoosh")
11857 (version "2.7.4")
11858 (source
11859 (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "Whoosh" version))
11862 (sha256
11863 (base32
11864 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11865 (build-system python-build-system)
11866 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11867 (native-inputs
11868 `(("python-pytest" ,python-pytest)))
11869 (home-page "https://bitbucket.org/mchaput/whoosh")
11870 (synopsis "Full text indexing, search, and spell checking library")
11871 (description
11872 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11873 checking library.")
11874 (license license:bsd-2)))
11875
11876 (define-public python2-whoosh
11877 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11878 (package (inherit whoosh)
11879 (propagated-inputs
11880 `(("python2-backport-ssl-match-hostname"
11881 ,python2-backport-ssl-match-hostname)
11882 ,@(package-propagated-inputs whoosh))))))
11883
11884 (define-public python-pathlib
11885 (package
11886 (name "python-pathlib")
11887 (version "1.0.1")
11888 (source (origin
11889 (method url-fetch)
11890 (uri (pypi-uri "pathlib" version))
11891 (sha256
11892 (base32
11893 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11894 (build-system python-build-system)
11895 ;; The tests depend on the internal "test" module, which does not provide
11896 ;; a stable interface.
11897 (arguments `(#:tests? #f))
11898 (home-page "https://pathlib.readthedocs.org/")
11899 (synopsis "Object-oriented file system paths")
11900 (description "Pathlib offers a set of classes to handle file system paths.
11901 It offers the following advantages over using string objects:
11902
11903 @enumerate
11904 @item No more cumbersome use of os and os.path functions. Everything can
11905 be done easily through operators, attribute accesses, and method calls.
11906 @item Embodies the semantics of different path types. For example,
11907 comparing Windows paths ignores casing.
11908 @item Well-defined semantics, eliminating any inconsistencies or
11909 ambiguities (forward vs. backward slashes, etc.).
11910 @end enumerate
11911
11912 Note: In Python 3.4, pathlib is now part of the standard library. For other
11913 Python versions please consider python-pathlib2 instead, which tracks the
11914 standard library module. This module (python-pathlib) isn't maintained
11915 anymore.")
11916 (license license:expat)))
11917
11918 (define-public python2-pathlib
11919 (package-with-python2 python-pathlib))
11920
11921 (define-public python2-pathlib2
11922 (package
11923 (name "python2-pathlib2")
11924 (version "2.3.5")
11925 (source (origin
11926 (method url-fetch)
11927 (uri (pypi-uri "pathlib2" version))
11928 (sha256
11929 (base32
11930 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11931 (build-system python-build-system)
11932 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11933 ;; version is 3.4 which already includes this package as part of the
11934 ;; standard library.
11935 (arguments
11936 `(#:python ,python-2))
11937 (propagated-inputs
11938 `(("python2-scandir" ,python2-scandir)
11939 ("python2-six" ,python2-six)))
11940 (home-page "https://pypi.org/project/pathlib2/")
11941 (synopsis "Object-oriented file system paths - backport of standard
11942 pathlib module")
11943 (description "The goal of pathlib2 is to provide a backport of standard
11944 pathlib module which tracks the standard library module, so all the newest
11945 features of the standard pathlib can be used also on older Python versions.
11946
11947 Pathlib offers a set of classes to handle file system paths. It offers the
11948 following advantages over using string objects:
11949
11950 @enumerate
11951 @item No more cumbersome use of os and os.path functions. Everything can
11952 be done easily through operators, attribute accesses, and method calls.
11953 @item Embodies the semantics of different path types. For example,
11954 comparing Windows paths ignores casing.
11955 @item Well-defined semantics, eliminating any inconsistencies or
11956 ambiguities (forward vs. backward slashes, etc.).
11957 @end enumerate")
11958 (license license:expat)))
11959
11960 (define-public python2-pathlib2-bootstrap
11961 (hidden-package
11962 (package
11963 (inherit python2-pathlib2)
11964 (name "python2-pathlib2-bootstrap")
11965 (propagated-inputs
11966 `(("python2-scandir" ,python2-scandir)
11967 ("python2-six" ,python2-six-bootstrap))))))
11968
11969 (define-public python-jellyfish
11970 (package
11971 (name "python-jellyfish")
11972 (version "0.5.6")
11973 (source (origin
11974 (method url-fetch)
11975 (uri (pypi-uri "jellyfish" version))
11976 (sha256
11977 (base32
11978 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11979 (build-system python-build-system)
11980 (native-inputs
11981 `(("python-pytest" ,python-pytest)))
11982 (home-page "https://github.com/jamesturk/jellyfish")
11983 (synopsis "Approximate and phonetic matching of strings")
11984 (description "Jellyfish uses a variety of string comparison and phonetic
11985 encoding algorithms to do fuzzy string matching.")
11986 (license license:bsd-2)
11987 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11988
11989 (define-public python2-jellyfish
11990 (let ((jellyfish (package-with-python2
11991 (strip-python2-variant python-jellyfish))))
11992 (package (inherit jellyfish)
11993 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11994 ,@(package-native-inputs jellyfish))))))
11995
11996 (define-public python2-unicodecsv
11997 (package
11998 (name "python2-unicodecsv")
11999 (version "0.14.1")
12000 (source (origin
12001 (method git-fetch)
12002 ;; The test suite is not included in the PyPi release.
12003 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12004 (uri (git-reference
12005 (url "https://github.com/jdunck/python-unicodecsv")
12006 (commit version)))
12007 (file-name (git-file-name name version))
12008 (sha256
12009 (base32
12010 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12011 (build-system python-build-system)
12012 (arguments
12013 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12014 #:python ,python-2))
12015 (native-inputs
12016 `(("python2-unittest2" ,python2-unittest2)))
12017 (home-page "https://github.com/jdunck/python-unicodecsv")
12018 (synopsis "Unicode CSV module for Python 2")
12019 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12020 module, adding support for Unicode strings.")
12021 (license license:bsd-2)))
12022
12023 (define-public python-rarfile
12024 (package
12025 (name "python-rarfile")
12026 (version "2.8")
12027 (source (origin
12028 (method url-fetch)
12029 (uri (pypi-uri "rarfile" version))
12030 (sha256
12031 (base32
12032 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12033 (build-system python-build-system)
12034 (arguments
12035 '(#:phases
12036 (modify-phases %standard-phases
12037 (replace 'check
12038 ;; Many tests fail, but the installation proceeds.
12039 (lambda _ (invoke "make" "-C" "test" "test"))))))
12040 (native-inputs
12041 `(("which" ,which))) ; required for tests
12042 (propagated-inputs
12043 `(("libarchive" ,libarchive)))
12044 (home-page "https://github.com/markokr/rarfile")
12045 (synopsis "RAR archive reader for Python")
12046 (description "This is Python module for RAR archive reading. The interface
12047 is made as zipfile like as possible.")
12048 (license license:isc)))
12049
12050 (define-public python2-rarfile
12051 (package-with-python2 python-rarfile))
12052
12053 (define-public python-magic
12054 (package
12055 (name "python-magic")
12056 (version "0.4.15")
12057 (source
12058 (origin
12059 (method url-fetch)
12060 (uri (pypi-uri "python-magic" version))
12061 (sha256
12062 (base32
12063 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12064 (file-name (string-append name "-" version "-checkout"))))
12065 (build-system python-build-system)
12066 (arguments
12067 ;; The tests are unreliable, so don't run them. The tests fail
12068 ;; under Python3 because they were written for Python2 and
12069 ;; contain import statements that do not work in Python3. One of
12070 ;; the tests fails under Python2 because its assertions are
12071 ;; overly stringent; it relies on comparing output strings which
12072 ;; are brittle and can change depending on the version of
12073 ;; libmagic being used and the system on which the test is
12074 ;; running. In my case, under GuixSD 0.10.0, only one test
12075 ;; failed, and it seems to have failed only because the version
12076 ;; of libmagic that is packaged in Guix outputs a slightly
12077 ;; different (but not wrong) string than the one that the test
12078 ;; expected.
12079 '(#:tests? #f
12080 #:phases (modify-phases %standard-phases
12081 ;; Replace a specific method call with a hard-coded
12082 ;; path to the necessary libmagic.so file in the
12083 ;; store. If we don't do this, then the method call
12084 ;; will fail to find the libmagic.so file, which in
12085 ;; turn will cause any application using
12086 ;; python-magic to fail.
12087 (add-before 'build 'hard-code-path-to-libmagic
12088 (lambda* (#:key inputs #:allow-other-keys)
12089 (let ((file (assoc-ref inputs "file")))
12090 (substitute* "magic.py"
12091 (("ctypes.util.find_library\\('magic'\\)")
12092 (string-append "'" file "/lib/libmagic.so'")))
12093 #t)))
12094 (add-before 'install 'disable-egg-compression
12095 (lambda _
12096 (let ((port (open-file "setup.cfg" "a")))
12097 (display "\n[easy_install]\nzip_ok = 0\n"
12098 port)
12099 (close-port port)
12100 #t))))))
12101 (inputs
12102 ;; python-magic needs to be able to find libmagic.so.
12103 `(("file" ,file)))
12104 (home-page
12105 "https://github.com/ahupp/python-magic")
12106 (synopsis
12107 "File type identification using libmagic")
12108 (description
12109 "This module uses ctypes to access the libmagic file type
12110 identification library. It makes use of the local magic database and
12111 supports both textual and MIME-type output. Note that this module and
12112 the python-file module both provide a \"magic.py\" file; these two
12113 modules, which are different and were developed separately, both serve
12114 the same purpose: to provide Python bindings for libmagic.")
12115 (license license:expat)))
12116
12117 (define-public python2-magic
12118 (package-with-python2 python-magic))
12119
12120 (define-public python2-s3cmd
12121 (package
12122 (name "python2-s3cmd")
12123 (version "1.6.1")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12128 "s3cmd-" version ".tar.gz"))
12129 (sha256
12130 (base32
12131 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12132 (build-system python-build-system)
12133 (arguments
12134 ;; s3cmd is written for python2 only and contains no tests.
12135 `(#:python ,python-2
12136 #:tests? #f))
12137 (propagated-inputs
12138 `(("python2-dateutil" ,python2-dateutil)
12139 ;; The python-file package also provides a magic.py module.
12140 ;; This is an unfortunate state of affairs; however, s3cmd
12141 ;; fails to install if it cannot find specifically the
12142 ;; python-magic package. Thus we include it, instead of using
12143 ;; python-file. Ironically, s3cmd sometimes works better
12144 ;; without libmagic bindings at all:
12145 ;; https://github.com/s3tools/s3cmd/issues/198
12146 ("python2-magic" ,python2-magic)))
12147 (home-page "https://s3tools.org/s3cmd")
12148 (synopsis "Command line tool for S3-compatible storage services")
12149 (description
12150 "S3cmd is a command line tool for uploading, retrieving and managing data
12151 in storage services that are compatible with the Amazon Simple Storage
12152 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12153 GnuPG encryption, and more. It also supports management of Amazon's
12154 CloudFront content delivery network.")
12155 (license license:gpl2+)))
12156
12157 (define-public python-pkgconfig
12158 (package
12159 (name "python-pkgconfig")
12160 (version "1.3.1")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "pkgconfig" version))
12165 (sha256
12166 (base32
12167 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12168 (build-system python-build-system)
12169 (native-inputs
12170 `(("python-nose" ,python-nose)))
12171 (inputs
12172 `(("pkg-config" ,pkg-config)))
12173 (arguments
12174 `(#:phases
12175 (modify-phases %standard-phases
12176 (add-before 'build 'patch
12177 ;; Hard-code the path to pkg-config.
12178 (lambda _
12179 (substitute* "pkgconfig/pkgconfig.py"
12180 (("cmd = 'pkg-config")
12181 (string-append "cmd = '" (which "pkg-config"))))
12182 #t))
12183 (replace 'check
12184 (lambda _
12185 (invoke "nosetests" "test.py"))))))
12186 (home-page "https://github.com/matze/pkgconfig")
12187 (synopsis "Python interface for pkg-config")
12188 (description "This module provides a Python interface to pkg-config. It
12189 can be used to find all pkg-config packages, check if a package exists,
12190 check if a package meets certain version requirements, query CFLAGS and
12191 LDFLAGS and parse the output to build extensions with setup.py.")
12192 (license license:expat)))
12193
12194 (define-public python2-pkgconfig
12195 (package-with-python2 python-pkgconfig))
12196
12197 (define-public python-bz2file
12198 (package
12199 (name "python-bz2file")
12200 (version "0.98")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "bz2file" version))
12205 (sha256
12206 (base32
12207 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12208 (build-system python-build-system)
12209 (arguments
12210 `(#:tests? #f)) ; Tests use deprecated python modules.
12211 (home-page "https://github.com/nvawda/bz2file")
12212 (synopsis "Read and write bzip2-compressed files")
12213 (description
12214 "Bz2file is a Python library for reading and writing bzip2-compressed
12215 files. It contains a drop-in replacement for the I/O interface in the
12216 standard library's @code{bz2} module, including features from the latest
12217 development version of CPython that are not available in older releases.")
12218 (license license:asl2.0)))
12219
12220 (define-public python2-bz2file
12221 (package-with-python2 python-bz2file))
12222
12223 (define-public python-future
12224 (package
12225 (name "python-future")
12226 (version "0.17.1")
12227 (source
12228 (origin
12229 (method url-fetch)
12230 (uri (pypi-uri "future" version))
12231 (sha256
12232 (base32
12233 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12234 (build-system python-build-system)
12235 ;; Many tests connect to the network or are otherwise flawed.
12236 ;; https://github.com/PythonCharmers/python-future/issues/210
12237 (arguments
12238 `(#:tests? #f))
12239 (home-page "https://python-future.org")
12240 (synopsis "Single-source support for Python 3 and 2")
12241 (description
12242 "@code{python-future} is the missing compatibility layer between Python 2 and
12243 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12244 to support both Python 2 and Python 3 with minimal overhead.")
12245 (license license:expat)))
12246
12247 (define-public python2-future
12248 (package-with-python2 python-future))
12249
12250 (define-public python-cysignals
12251 (package
12252 (name "python-cysignals")
12253 (version "1.9.0")
12254 (source
12255 (origin
12256 (method url-fetch)
12257 (uri (pypi-uri "cysignals" version))
12258 (sha256
12259 (base32
12260 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12261 (build-system python-build-system)
12262 (native-inputs
12263 `(("python-cython" ,python-cython)
12264 ("python-sphinx" ,python-sphinx)))
12265 (inputs
12266 `(("pari-gp" ,pari-gp)))
12267 (arguments
12268 `(#:modules ((guix build python-build-system)
12269 ((guix build gnu-build-system) #:prefix gnu:)
12270 (guix build utils))
12271 ;; FIXME: Tests are executed after installation and currently fail
12272 ;; when not installing into standard locations; the author is working
12273 ;; on a fix.
12274 #:tests? #f
12275 #:phases
12276 (modify-phases %standard-phases
12277 (add-before
12278 'build 'configure
12279 (assoc-ref gnu:%standard-phases 'configure)))))
12280 (home-page
12281 "https://github.com/sagemath/cysignals")
12282 (synopsis
12283 "Handling of interrupts and signals for Cython")
12284 (description
12285 "The cysignals package provides mechanisms to handle interrupts (and
12286 other signals and errors) in Cython code, using two related approaches,
12287 for mixed Cython/Python code or external C libraries and pure Cython code,
12288 respectively.")
12289 (license license:lgpl3+)))
12290
12291 (define-public python2-cysignals
12292 (package-with-python2 python-cysignals))
12293
12294 (define-public python2-shedskin
12295 (package
12296 (name "python2-shedskin")
12297 (version "0.9.4")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 (uri (string-append "https://github.com/shedskin/shedskin/"
12302 "releases/download/v" version
12303 "/shedskin-" version ".tgz"))
12304 (sha256
12305 (base32
12306 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12307 (build-system python-build-system)
12308 (arguments
12309 `(#:python ,python-2
12310 #:phases (modify-phases %standard-phases
12311 (add-after 'unpack 'fix-resulting-include-libs
12312 (lambda* (#:key inputs #:allow-other-keys)
12313 (let ((libgc (assoc-ref inputs "libgc"))
12314 (pcre (assoc-ref inputs "pcre")))
12315 (substitute* "shedskin/makefile.py"
12316 (("variable == 'CCFLAGS':[ ]*")
12317 (string-append "variable == 'CCFLAGS':\n"
12318 " line += ' -I " pcre "/include"
12319 " -I " libgc "/include'"))
12320 (("variable == 'LFLAGS':[ ]*")
12321 (string-append "variable == 'LFLAGS':\n"
12322 " line += ' -L" pcre "/lib"
12323 " -L " libgc "/lib'")))
12324 #t))))))
12325 (inputs `(("pcre" ,pcre)
12326 ("libgc" ,libgc)))
12327 (home-page "https://shedskin.github.io/")
12328 (synopsis "Experimental Python-2 to C++ Compiler")
12329 (description (string-append "This is an experimental compiler for a subset of
12330 Python. It generates C++ code and a Makefile."))
12331 (license (list license:gpl3 license:bsd-3 license:expat))))
12332
12333 (define-public python2-rope
12334 (package
12335 (name "python2-rope")
12336 (version "0.11.0")
12337 (source
12338 (origin
12339 (method url-fetch)
12340 (uri (pypi-uri "rope" version))
12341 (sha256
12342 (base32
12343 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12344 (arguments
12345 ;; Rope has only partial python3 support, see `python-rope'
12346 `(#:python ,python-2))
12347 (build-system python-build-system)
12348 (native-inputs
12349 `(("python2-unittest2" ,python2-unittest2)))
12350 (home-page "https://github.com/python-rope/rope")
12351 (synopsis "Refactoring library for Python")
12352 (description "Rope is a refactoring library for Python. It facilitates
12353 the renaming, moving and extracting of attributes, functions, modules, fields
12354 and parameters in Python 2 source code. These refactorings can also be applied
12355 to occurrences in strings and comments.")
12356 (license license:gpl2)))
12357
12358 (define-public python-rope
12359 (package
12360 (inherit python2-rope)
12361 (name "python-rope")
12362 (arguments `(#:python ,python-wrapper
12363 ;; XXX: Only partial python3 support, results in some failing
12364 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12365 #:tests? #f))
12366 (properties `((python2-variant . ,(delay python2-rope))))))
12367
12368 (define-public python-py3status
12369 (package
12370 (name "python-py3status")
12371 (version "3.21")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "py3status" version))
12376 (sha256
12377 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12378 (build-system python-build-system)
12379 (inputs
12380 `(("file" ,file)))
12381 (arguments
12382 '(#:phases
12383 (modify-phases %standard-phases
12384 ;; 'file' is used for detection of configuration file encoding
12385 ;; let's make link the dependency to particular input
12386 (add-before 'build 'patch-file-path
12387 (lambda* (#:key inputs #:allow-other-keys)
12388 (let ((file-path (assoc-ref inputs "file")))
12389 (substitute* "py3status/parse_config.py"
12390 (("\\[\"file\", \"-b\"")
12391 (string-append "['" file-path "/bin/file', '-b'")))
12392 #t))))
12393 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12394 (home-page "https://github.com/ultrabug/py3status")
12395 (synopsis "Extensible i3status wrapper written in Python")
12396 (description "py3status is an i3status wrapper which extends i3status
12397 functionality in a modular way, allowing you to extend your panel with your
12398 own code, responding to click events and updating clock every second.")
12399 (license license:bsd-3)))
12400
12401 (define-public python2-selectors2
12402 (package
12403 (name "python2-selectors2")
12404 (version "2.0.1")
12405 (source (origin
12406 (method url-fetch)
12407 (uri (pypi-uri "selectors2" version))
12408 (sha256
12409 (base32
12410 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12411 (build-system python-build-system)
12412 (arguments
12413 `(#:python ,python-2))
12414 (native-inputs
12415 `(("python2-mock" ,python2-mock)
12416 ("python2-psutil" ,python2-psutil)))
12417 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12418 (synopsis "Backport of the selectors module from Python 3.5+")
12419 (description
12420 "This package provides a drop-in replacement for the @code{selectors}
12421 module in Python 3.5 and later.")
12422 (license license:expat)))
12423
12424 (define-public python-tblib
12425 (package
12426 (name "python-tblib")
12427 (version "1.6.0")
12428 (source (origin
12429 (method url-fetch)
12430 (uri (pypi-uri "tblib" version))
12431 (sha256
12432 (base32
12433 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12434 (build-system python-build-system)
12435 (arguments
12436 `(#:phases
12437 (modify-phases %standard-phases
12438 (replace 'check
12439 (lambda _
12440 ;; Upstream runs tests after installation and the package itself
12441 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12442 ;; found.
12443 (setenv "PYTHONPATH"
12444 (string-append (getcwd) "/build/lib:"
12445 (getenv "PYTHONPATH")))
12446 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12447 (native-inputs
12448 `(("python-pytest" ,python-pytest)
12449 ("python-six" ,python-six)))
12450 (home-page "https://github.com/ionelmc/python-tblib")
12451 (synopsis "Traceback serialization library")
12452 (description
12453 "Traceback serialization allows you to:
12454
12455 @enumerate
12456 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12457 different processes. This allows better error handling when running code over
12458 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12459
12460 @item Parse traceback strings and raise with the parsed tracebacks.
12461 @end enumerate\n")
12462 (license license:bsd-3)))
12463
12464 (define-public python2-tblib
12465 (package-with-python2 python-tblib))
12466
12467 (define-public python-greenlet
12468 (package
12469 (name "python-greenlet")
12470 (version "0.4.16")
12471 (source (origin
12472 (method url-fetch)
12473 (uri (pypi-uri "greenlet" version))
12474 (sha256
12475 (base32
12476 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12477 (build-system python-build-system)
12478 (home-page "https://greenlet.readthedocs.io/")
12479 (synopsis "Lightweight in-process concurrent programming")
12480 (description
12481 "Greenlet package is a spin-off of Stackless, a version of CPython
12482 that supports micro-threads called \"tasklets\". Tasklets run
12483 pseudo-concurrently (typically in a single or a few OS-level threads) and
12484 are synchronized with data exchanges on \"channels\".")
12485 (license (list license:psfl license:expat))))
12486
12487 (define-public python2-greenlet
12488 (package-with-python2 python-greenlet))
12489
12490 (define-public python-objgraph
12491 (package
12492 (name "python-objgraph")
12493 (version "3.4.1")
12494 (source
12495 (origin
12496 (method url-fetch)
12497 (uri (pypi-uri "objgraph" version))
12498 (sha256
12499 (base32
12500 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12501 (build-system python-build-system)
12502 (propagated-inputs
12503 `(("python-graphviz" ,python-graphviz)))
12504 (native-inputs
12505 `(("python-mock" ,python-mock)
12506 ("graphviz" ,graphviz)))
12507 (home-page "https://mg.pov.lt/objgraph/")
12508 (synopsis "Draw Python object reference graphs with graphviz")
12509 (description
12510 "This package provides tools to draw Python object reference graphs with
12511 graphviz.")
12512 (license license:expat)))
12513
12514 (define-public python2-objgraph
12515 (package-with-python2 python-objgraph))
12516
12517 (define-public python-gevent
12518 (package
12519 (name "python-gevent")
12520 (version "20.6.2")
12521 (source (origin
12522 (method url-fetch)
12523 (uri (pypi-uri "gevent" version))
12524 (sha256
12525 (base32
12526 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12527 (modules '((guix build utils)))
12528 (snippet
12529 '(begin
12530 ;; unbunding libev and c-ares
12531 (delete-file-recursively "deps")
12532 #t))))
12533 (build-system python-build-system)
12534 (arguments
12535 `(#:modules ((ice-9 ftw)
12536 (ice-9 match)
12537 (srfi srfi-26)
12538 (guix build utils)
12539 (guix build python-build-system))
12540 #:phases (modify-phases %standard-phases
12541 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12542 (lambda _
12543 (substitute* "src/gevent/subprocess.py"
12544 (("/bin/sh") (which "sh")))
12545 (for-each (lambda (file)
12546 (substitute* file
12547 (("/bin/sh") (which "sh"))
12548 (("/bin/true") (which "true"))))
12549 (find-files "src/greentest" "\\.py$"))
12550 #t))
12551 (add-before 'build 'do-not-use-bundled-sources
12552 (lambda _
12553 (setenv "GEVENTSETUP_EMBED" "0")
12554
12555 ;; Prevent building bundled libev.
12556 (substitute* "setup.py"
12557 (("run_make=_BUILDING")
12558 "run_make=False"))
12559 #t))
12560 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12561 (lambda* (#:key inputs #:allow-other-keys)
12562 (let ((greenlet (string-append
12563 (assoc-ref inputs "python-greenlet")
12564 "/include")))
12565 (match (scandir greenlet
12566 (lambda (item)
12567 (string-prefix? "python" item)))
12568 ((python)
12569 (setenv "C_INCLUDE_PATH"
12570 (string-append greenlet "/" python ":"
12571 (or (getenv "C_INCLUDE_PATH")
12572 ""))))))
12573 #t))
12574 (add-before 'check 'pretend-to-be-CI
12575 (lambda _
12576 ;; A few tests are skipped due to network constraints or
12577 ;; get longer timeouts when running in a CI environment.
12578 ;; Piggy-back on that, as we need the same adjustments.
12579 (setenv "TRAVIS" "1")
12580 (setenv "APPVEYOR" "1")
12581 #t))
12582 (add-before 'check 'adjust-tests
12583 (lambda _
12584 (let ((disabled-tests
12585 '(;; These tests rely on networking which is not
12586 ;; available in the build container.
12587 "test_urllib2net.py"
12588 "test__server.py"
12589 "test__server_pywsgi.py"
12590 "test_socket.py"
12591 "test__socket.py"
12592 "test__socket_ssl.py"
12593 "test__socket_dns.py"
12594 "test__socket_dns6.py"
12595 "test___example_servers.py"
12596 "test__getaddrinfo_import.py"
12597 "test__examples.py"
12598 "test_httplib.py"
12599 "test_https.py"
12600 "test_urllib2_localnet.py"
12601 "test_ssl.py"
12602 "test__ssl.py"
12603 ;; XXX: These tests borrow functionality from the
12604 ;; Python builtin 'test' module, but it is not
12605 ;; installed with the Guix Python distribution.
12606 "test_smtpd.py"
12607 "test_wsgiref.py"
12608 "test_urllib2.py"
12609 "test_thread.py"
12610 "test_threading.py"
12611 "test__threading_2.py"
12612 ;; These tests rely on KeyboardInterrupts which do not
12613 ;; work inside the build container for some reason
12614 ;; (lack of controlling terminal?).
12615 "test_subprocess.py"
12616 "test__issues461_471.py"
12617 ;; TODO: Patch out the tests that use getprotobyname, etc
12618 ;; instead of disabling all the tests from these files.
12619 "test__resolver_dnspython.py"
12620 "test__doctests.py"
12621 "test__all__.py"
12622 "test___config.py"
12623 "test__execmodules.py")))
12624 (call-with-output-file "skipped_tests.txt"
12625 (lambda (port)
12626 (format port "~a~%"
12627 (string-join disabled-tests "\n"))))
12628 #t)))
12629 (replace 'check
12630 (lambda _
12631 ;; Make sure the build directory is on PYTHONPATH.
12632 (setenv "PYTHONPATH"
12633 (string-append
12634 (getenv "PYTHONPATH") ":"
12635 (getcwd) "/build/"
12636 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12637
12638 ;; Use the build daemons configured number of workers.
12639 (setenv "NWORKERS" (number->string (parallel-job-count)))
12640
12641 (invoke "python" "-m" "gevent.tests" "--config"
12642 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12643 (propagated-inputs
12644 `(("python-greenlet" ,python-greenlet)
12645 ("python-objgraph" ,python-objgraph)
12646 ("python-zope.event" ,python-zope-event)
12647 ("python-zope.interface" ,python-zope-interface)))
12648 (native-inputs
12649 `(("python-six" ,python-six)
12650
12651 ;; For tests.
12652 ("python-dnspython" ,python-dnspython)
12653 ("python-psutil" ,python-psutil)))
12654 (inputs
12655 `(("c-ares" ,c-ares)
12656 ("libev" ,libev)))
12657 (home-page "http://www.gevent.org/")
12658 (synopsis "Coroutine-based network library")
12659 (description
12660 "gevent is a coroutine-based Python networking library that uses greenlet
12661 to provide a high-level synchronous API on top of the libev event loop.")
12662 (license license:expat)
12663 (properties `((python2-variant . ,(delay python2-gevent))))))
12664
12665 (define-public python2-gevent
12666 (let ((base (package-with-python2
12667 (strip-python2-variant python-gevent))))
12668 (package
12669 (inherit base)
12670 (native-inputs `(,@(package-native-inputs base)
12671 ("python-mock" ,python2-mock)
12672 ("python2-selectors2" ,python2-selectors2))))))
12673
12674 (define-public python-fastimport
12675 (package
12676 (name "python-fastimport")
12677 (version "0.9.8")
12678 (source
12679 (origin
12680 (method url-fetch)
12681 (uri (pypi-uri "fastimport" version))
12682 (sha256
12683 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12684 (build-system python-build-system)
12685 (home-page "https://github.com/jelmer/python-fastimport")
12686 (synopsis "VCS fastimport parser and generator in Python")
12687 (description "This package provides a parser for and generator of the Git
12688 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12689 format.")
12690 (license license:gpl2+)))
12691
12692 (define-public python2-fastimport
12693 (package-with-python2 python-fastimport))
12694
12695 (define-public python-twisted
12696 (package
12697 (name "python-twisted")
12698 (version "19.7.0")
12699 (source (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12702 (sha256
12703 (base32
12704 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12705 (build-system python-build-system)
12706 (arguments
12707 '(#:tests? #f)) ; FIXME: some tests fail
12708 (propagated-inputs
12709 `(("python-zope-interface" ,python-zope-interface)
12710 ("python-pyhamcrest" ,python-pyhamcrest)
12711 ("python-incremental" ,python-incremental)
12712 ("python-hyperlink" ,python-hyperlink)
12713 ("python-constantly" ,python-constantly)
12714 ("python-automat" ,python-automat)))
12715 (home-page "https://twistedmatrix.com/")
12716 (synopsis "Asynchronous networking framework written in Python")
12717 (description
12718 "Twisted is an extensible framework for Python programming, with special
12719 focus on event-based network programming and multiprotocol integration.")
12720 (license license:expat)))
12721
12722 (define-public python2-twisted
12723 (package-with-python2 python-twisted))
12724
12725 (define-public python-pika
12726 (package
12727 (name "python-pika")
12728 (version "0.12.0")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "pika" version))
12733 (sha256
12734 (base32
12735 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12736 (build-system python-build-system)
12737 (native-inputs
12738 `(("python-pyev" ,python-pyev)
12739 ("python-tornado" ,python-tornado)
12740 ("python-twisted" ,python-twisted)))
12741 (home-page "https://pika.readthedocs.org")
12742 (synopsis "Pure Python AMQP Client Library")
12743 (description
12744 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12745 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12746 network support library.")
12747 (license license:bsd-3)))
12748
12749 (define-public python2-pika
12750 (package-with-python2 python-pika))
12751
12752 (define-public python-ply
12753 (package
12754 (name "python-ply")
12755 (version "3.11")
12756 (source
12757 (origin
12758 (method url-fetch)
12759 (uri (pypi-uri "ply" version))
12760 (sha256
12761 (base32
12762 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12763 (build-system python-build-system)
12764 (home-page "http://www.dabeaz.com/ply/")
12765 (synopsis "Python Lex & Yacc")
12766 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12767 It uses LR parsing and does extensive error checking.")
12768 (license license:bsd-3)))
12769
12770 (define-public python-tabulate
12771 (package
12772 (name "python-tabulate")
12773 (version "0.8.7")
12774 (source (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "tabulate" version))
12777 (sha256
12778 (base32
12779 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12780 (build-system python-build-system)
12781 (arguments
12782 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12783 ;; and the latest release is not tagged in the upstream repository.
12784 '(#:tests? #f))
12785 (home-page "https://bitbucket.org/astanin/python-tabulate")
12786 (synopsis "Pretty-print tabular data")
12787 (description
12788 "Tabulate is a library and command-line utility to pretty-print tabular
12789 data in Python.")
12790 (license license:expat)))
12791
12792 (define-public python2-tabulate
12793 (package-with-python2 python-tabulate))
12794
12795 (define-public python-kazoo
12796 (package
12797 (name "python-kazoo")
12798 (version "2.4.0")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "kazoo" version))
12803 (sha256
12804 (base32
12805 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12806 (build-system python-build-system)
12807 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12808 (propagated-inputs
12809 `(("python-six" ,python-six)))
12810 (home-page "https://kazoo.readthedocs.org")
12811 (synopsis "High-level Zookeeper client library")
12812 (description
12813 "Kazoo is a Python client library for the Apache Zookeeper distributed
12814 application service. It is designed to be easy to use and to avoid common
12815 programming errors.")
12816 (license license:asl2.0)))
12817
12818 (define-public python2-kazoo
12819 (package-with-python2 python-kazoo))
12820
12821 (define-public python-pykafka
12822 (package
12823 (name "python-pykafka")
12824 (version "2.4.0")
12825 (source (origin
12826 (method url-fetch)
12827 (uri (pypi-uri "pykafka" version))
12828 (sha256
12829 (base32
12830 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12831 (build-system python-build-system)
12832 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12833 (propagated-inputs
12834 `(("python-gevent" ,python-gevent)
12835 ("python-kazoo" ,python-kazoo)
12836 ("python-tabulate" ,python-tabulate)))
12837 (inputs
12838 `(("librdkafka" ,librdkafka)))
12839 (home-page "https://pykafka.readthedocs.io/")
12840 (synopsis "Apache Kafka client for Python")
12841 (description
12842 "PyKafka is a client for the Apache Kafka distributed messaging system.
12843 It includes Python implementations of Kafka producers and consumers, which
12844 are optionally backed by a C extension built on librdkafka.")
12845 (license license:asl2.0)))
12846
12847 (define-public python2-pykafka
12848 (package-with-python2 python-pykafka))
12849
12850 (define-public python-wcwidth
12851 (package
12852 (name "python-wcwidth")
12853 (version "0.1.8")
12854 (source (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "wcwidth" version))
12857 (sha256
12858 (base32
12859 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12860 (build-system python-build-system)
12861 (home-page "https://github.com/jquast/wcwidth")
12862 (synopsis "Measure number of terminal column cells of wide-character codes")
12863 (description "Wcwidth measures the number of terminal column cells of
12864 wide-character codes. It is useful for those implementing a terminal emulator,
12865 or programs that carefully produce output to be interpreted by one. It is a
12866 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12867 specified in POSIX.1-2001 and POSIX.1-2008.")
12868 (license license:expat)))
12869
12870 (define-public python2-wcwidth
12871 (package-with-python2 python-wcwidth))
12872
12873 (define-public python2-jsonrpclib
12874 (package
12875 (name "python2-jsonrpclib")
12876 (version "0.1.7")
12877 (source (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "jsonrpclib" version))
12880 (sha256
12881 (base32
12882 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12883 (build-system python-build-system)
12884 (arguments
12885 `(#:tests? #f
12886 #:python ,python-2))
12887 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12888 (synopsis "Implementation of JSON-RPC specification for Python")
12889 (description
12890 "This library is an implementation of the JSON-RPC specification.
12891 It supports both the original 1.0 specification, as well as the
12892 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12893 etc.")
12894 (license license:asl2.0)))
12895
12896 (define-public python-chai
12897 (package
12898 (name "python-chai")
12899 (version "1.1.2")
12900 (source (origin
12901 (method url-fetch)
12902 (uri (pypi-uri "chai" version))
12903 (sha256
12904 (base32
12905 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12906 (build-system python-build-system)
12907 (home-page "https://github.com/agoragames/chai")
12908 (synopsis "Mocking framework for Python")
12909 (description
12910 "Chai provides an api for mocking, stubbing and spying your python
12911 objects, patterned after the Mocha library for Ruby.")
12912 (license license:bsd-3)))
12913
12914 (define-public python2-chai
12915 (package-with-python2 python-chai))
12916
12917 (define-public python-inflection
12918 (package
12919 (name "python-inflection")
12920 (version "0.3.1")
12921 (source
12922 (origin (method url-fetch)
12923 (uri (pypi-uri "inflection" version))
12924 (sha256
12925 (base32
12926 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12927 (build-system python-build-system)
12928 (native-inputs
12929 `(("python-pytest" ,python-pytest)))
12930 (home-page "https://github.com/jpvanhal/inflection")
12931 (synopsis "Python string transformation library")
12932 (description
12933 "Inflection is a string transformation library. It singularizes
12934 and pluralizes English words, and transforms strings from CamelCase to
12935 underscored string.")
12936 (license license:expat)))
12937
12938 (define-public python2-inflection
12939 (package-with-python2 python-inflection))
12940
12941 (define-public python-pylev
12942 (package
12943 (name "python-pylev")
12944 (version "1.3.0")
12945 (source (origin
12946 (method url-fetch)
12947 (uri (pypi-uri "pylev" version))
12948 (sha256
12949 (base32
12950 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12951 (build-system python-build-system)
12952 (home-page "https://github.com/toastdriven/pylev")
12953 (synopsis "Levenshtein distance implementation in Python")
12954 (description "Pure Python Levenshtein implementation, based off the
12955 Wikipedia code samples at
12956 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12957 (license license:bsd-3)))
12958
12959 (define-public python2-pylev
12960 (package-with-python2 python-pylev))
12961
12962 (define-public python-cleo
12963 (package
12964 (name "python-cleo")
12965 (version "0.8.1")
12966 (source (origin
12967 (method url-fetch)
12968 (uri (pypi-uri "cleo" version))
12969 (sha256
12970 (base32
12971 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12972 (build-system python-build-system)
12973 (native-inputs
12974 `( ;; For testing
12975 ("python-mock" ,python-mock)
12976 ("python-pytest-mock" ,python-pytest-mock)
12977 ("python-pytest" ,python-pytest)))
12978 (propagated-inputs
12979 `(("python-backpack" ,python-backpack)
12980 ("python-clikit" ,python-clikit)
12981 ("python-pastel" ,python-pastel)
12982 ("python-pylev" ,python-pylev)))
12983 (home-page "https://github.com/sdispater/cleo")
12984 (synopsis "Command-line arguments library for Python")
12985 (description
12986 "Cleo allows you to create command-line commands with signature in
12987 docstring and colored output.")
12988 (license license:expat)))
12989
12990 (define-public python2-cleo
12991 (package-with-python2 python-cleo))
12992
12993 (define-public python-tomlkit
12994 (package
12995 (name "python-tomlkit")
12996 (version "0.7.0")
12997 (source
12998 (origin
12999 (method url-fetch)
13000 (uri (pypi-uri "tomlkit" version))
13001 (sha256
13002 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13003 (build-system python-build-system)
13004 (native-inputs
13005 `(("python-pytest" ,python-pytest)
13006 ("python-pyyaml" ,python-pyyaml)))
13007 (home-page "https://github.com/sdispater/tomlkit")
13008 (synopsis "Style-preserving TOML library")
13009 (description
13010 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13011 preserves all comments, indentations, whitespace and internal element ordering,
13012 and makes them accessible and editable via an intuitive API. It can also
13013 create new TOML documents from scratch using the provided helpers. Part of the
13014 implementation has been adapted, improved, and fixed from Molten.")
13015 (license license:expat)))
13016
13017 (define-public python-shellingham
13018 (package
13019 (name "python-shellingham")
13020 (version "1.3.2")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "shellingham" version))
13025 (sha256
13026 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13027 (build-system python-build-system)
13028 (arguments
13029 `(#:phases
13030 (modify-phases %standard-phases
13031 (add-after 'unpack 'restore-setup.py
13032 ;; setup.py will return in the next release.
13033 ;; <https://github.com/sarugaku/shellingham/issues/33>
13034 (lambda _
13035 (with-output-to-file "setup.py"
13036 (lambda _
13037 (display "from setuptools import setup\nsetup()\n")))
13038 #t)))))
13039 (home-page "https://github.com/sarugaku/shellingham")
13040 (synopsis "Tool to detect surrounding shell")
13041 (description
13042 "Shellingham detects what shell the current Python executable is
13043 running in.")
13044 (license license:isc)))
13045
13046 (define-public python-memcached
13047 (package
13048 (name "python-memcached")
13049 (version "1.59")
13050 (source
13051 (origin
13052 (method url-fetch)
13053 (uri (pypi-uri "python-memcached" version))
13054 (sha256
13055 (base32
13056 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13057 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13058 (build-system python-build-system)
13059 (propagated-inputs `(("python-six" ,python-six)))
13060 (home-page
13061 "https://github.com/linsomniac/python-memcached")
13062 (synopsis "Pure python memcached client")
13063 (description
13064 "This software is a pure Python interface to the memcached memory cache
13065 daemon. It is the client side software which allows storing values in one or
13066 more, possibly remote, memcached servers.")
13067 (license license:psfl)))
13068
13069 (define-public python-clikit
13070 (package
13071 (name "python-clikit")
13072 (version "0.6.2")
13073 (source
13074 (origin
13075 (method url-fetch)
13076 (uri (pypi-uri "clikit" version))
13077 (sha256
13078 (base32
13079 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13080 (build-system python-build-system)
13081 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13082 (propagated-inputs
13083 `(("python-crashtest" ,python-crashtest)
13084 ("python-pastel" ,python-pastel)
13085 ("python-pylev" ,python-pylev)))
13086 (home-page "https://github.com/sdispater/clikit")
13087 (synopsis "Group of utilities to build command line interfaces")
13088 (description
13089 "CliKit is a group of utilities to build testable command line
13090 interfaces.")
13091 (properties `((python2-variant . ,(delay python2-clikit))))
13092 (license license:expat)))
13093
13094 (define-public python2-clikit
13095 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13096 (package/inherit
13097 base
13098 (propagated-inputs
13099 `(("python-enum34" ,python2-enum34)
13100 ("python-typing" ,python2-typing)
13101 ,@(package-propagated-inputs base))))))
13102
13103 (define-public python-msgpack-python
13104 (package
13105 (name "python-msgpack-python")
13106 (version "0.5.6")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "msgpack-python" version))
13111 (sha256
13112 (base32
13113 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13114 (build-system python-build-system)
13115 (home-page "http://msgpack.org/")
13116 (synopsis "Package to deserialize messages in MessagePack binary format")
13117 (description
13118 "MessagePack is an efficient binary serialization format. It lets you
13119 exchange data among multiple languages like JSON. But it's faster and
13120 smaller. Small integers are encoded into a single byte, and typical short
13121 strings require only one extra byte in addition to the strings themselves.")
13122 (license license:asl2.0)))
13123
13124 (define-public python-cachy
13125 (package
13126 (name "python-cachy")
13127 (version "0.3.0")
13128 (source
13129 (origin
13130 (method url-fetch)
13131 (uri (pypi-uri "cachy" version))
13132 (sha256
13133 (base32
13134 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13135 (build-system python-build-system)
13136 (arguments
13137 '(#:phases
13138 (modify-phases %standard-phases
13139 (replace 'check
13140 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13141 "pytest"))))))
13142 (native-inputs
13143 `(("memcached" ,memcached)
13144 ("python-fakeredis" ,python-fakeredis)
13145 ("python-flexmock" ,python-flexmock)
13146 ("python-pifpaf" ,python-pifpaf)
13147 ("python-pytest" ,python-pytest)))
13148 (propagated-inputs
13149 `(("python-memcached" ,python-memcached)
13150 ("python-msgpack-python" ,python-msgpack-python)
13151 ("python-redis" ,python-redis)))
13152 (home-page "https://github.com/sdispater/cachy")
13153 (synopsis "Simple yet effective caching library")
13154 (description
13155 "Cachy provides a simple yet effective caching library. A simple but
13156 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13157 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13158 (license license:expat)))
13159
13160 (define-public python-poetry-core
13161 (package
13162 (name "python-poetry-core")
13163 (version "1.0.0")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "poetry-core" version))
13168 (sha256
13169 (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka"))))
13170 (build-system python-build-system)
13171 (home-page "https://github.com/python-poetry/poetry-core")
13172 (synopsis "Poetry PEP 517 build back-end")
13173 (description
13174 "The @code{poetry-core} module provides a PEP 517 build back-end
13175 implementation developed for Poetry. This project is intended to be
13176 a light weight, fully compliant, self-contained package allowing PEP 517
13177 compatible build front-ends to build Poetry managed projects.")
13178 (license license:expat)))
13179
13180 (define-public poetry
13181 (package
13182 (name "poetry")
13183 (version "1.1.4")
13184 ;; Poetry can only be built from source with Poetry.
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "poetry" version))
13189 (sha256
13190 (base32
13191 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13192 (build-system python-build-system)
13193 (arguments
13194 `(#:tests? #f ;; Pypi does not have tests.
13195 #:phases
13196 (modify-phases %standard-phases
13197 (add-before 'build 'patch-setup-py
13198 (lambda _
13199 (substitute* "setup.py"
13200 ;; Newer versions of keyring produce a package with version "0.0.0"
13201 ;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
13202 (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
13203 ;; TODO: remove after the next release cycle,
13204 ;; when packaging has been updated.
13205 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13206 #t)))))
13207 (propagated-inputs
13208 `(("python-cachecontrol" ,python-cachecontrol)
13209 ("python-cachy" ,python-cachy)
13210 ("python-cleo" ,python-cleo)
13211 ("python-clikit" ,python-clikit)
13212 ("python-html5lib" ,python-html5lib)
13213 ("python-keyring" ,python-keyring)
13214 ("python-msgpack-transitional" ,python-msgpack-transitional)
13215 ("python-packaging" ,python-packaging)
13216 ("python-pexpect" ,python-pexpect)
13217 ("python-pip" ,python-pip)
13218 ("python-pkginfo" ,python-pkginfo)
13219 ("python-poetry-core" ,python-poetry-core)
13220 ("python-requests" ,python-requests)
13221 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13222 ("python-shellingham" ,python-shellingham)
13223 ("python-tomlkit" ,python-tomlkit)
13224 ("python-virtualenv" ,python-virtualenv)))
13225 (home-page "https://python-poetry.org")
13226 (synopsis "Python dependency management and packaging made easy")
13227 (description "Poetry is a tool for dependency management and packaging
13228 in Python. It allows you to declare the libraries your project depends on and
13229 it will manage (install/update) them for you.")
13230 (license license:expat)))
13231
13232 (define-public python-lark-parser
13233 (package
13234 (name "python-lark-parser")
13235 (version "0.9.0")
13236 (source (origin
13237 (method url-fetch)
13238 (uri (pypi-uri "lark-parser" version))
13239 (sha256
13240 (base32
13241 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13242 (build-system python-build-system)
13243 (home-page "https://github.com/lark-parser/lark")
13244 (synopsis "Multi-language parser for Python")
13245 (description
13246 "Lark is a parser built with a focus on ergonomics, performance and
13247 resilience. Lark can parse all context-free languages. That means it is
13248 capable of parsing almost any programming language out there, and to
13249 some degree most natural languages too.")
13250 (license license:expat)))
13251
13252 (define-public python-libcst
13253 (package
13254 (name "python-libcst")
13255 (version "0.3.8")
13256 (source (origin
13257 (method url-fetch)
13258 (uri (pypi-uri "libcst" version))
13259 (sha256
13260 (base32
13261 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13262 (build-system python-build-system)
13263 (arguments
13264 `(#:phases
13265 (modify-phases %standard-phases
13266 (add-after 'unpack 'remove-failing-tests
13267 (lambda _
13268 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13269 (delete-file "libcst/tests/test_fuzz.py")
13270 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13271 (delete-file "libcst/tests/test_pyre_integration.py")
13272 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13273 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13274 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13275 #t))
13276 (add-before 'check 'generate-test-data
13277 (lambda _
13278 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13279 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13280 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13281 (replace 'check
13282 (lambda _
13283 (invoke "python" "-m" "unittest")
13284 #t)))))
13285 (native-inputs
13286 `(("python-black" ,python-black)
13287 ("python-isort" ,python-isort)))
13288 (propagated-inputs
13289 `(("python-typing-extensions" ,python-typing-extensions)
13290 ("python-typing-inspect" ,python-typing-inspect)
13291 ("python-pyyaml" ,python-pyyaml)))
13292 (home-page "https://github.com/Instagram/LibCST")
13293 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13294 (description
13295 "LibCST parses Python source code as a CST tree that keeps all
13296 formatting details (comments, whitespaces, parentheses, etc). It's useful
13297 for building automated refactoring (codemod) applications and linters.
13298 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13299 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13300 naming node types and fields, LibCST creates a lossless CST that looks and
13301 feels like an AST.")
13302 (license (list license:expat
13303 ;; Some files unde libcst/_parser/ are under Python Software
13304 ;; Foundation license (see LICENSE file for details)
13305 license:psfl
13306 ;; libcst/_add_slots.py
13307 license:asl2.0))))
13308
13309 (define-public python-typing-inspect
13310 (package
13311 (name "python-typing-inspect")
13312 (version "0.6.0")
13313 (source (origin
13314 (method url-fetch)
13315 (uri (pypi-uri "typing_inspect" version))
13316 (sha256
13317 (base32
13318 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13319 (build-system python-build-system)
13320 (propagated-inputs
13321 `(("python-mypy-extensions" ,python-mypy-extensions)
13322 ("python-typing-extensions" ,python-typing-extensions)))
13323 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13324 (synopsis "API for inspection of types in the Python @code{typing} module")
13325 (description
13326 "The @code{typing_inspect} module defines experimental API for runtime
13327 inspection of types defined in the Python standard typing module.")
13328 (license license:expat)))
13329
13330 (define-public python-lazy-object-proxy
13331 (package
13332 (name "python-lazy-object-proxy")
13333 (version "1.5.1")
13334 (source (origin
13335 (method url-fetch)
13336 (uri (pypi-uri "lazy-object-proxy" version))
13337 (sha256
13338 (base32
13339 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13340 (native-inputs
13341 `(("python-setuptools-scm" ,python-setuptools-scm)))
13342 (build-system python-build-system)
13343 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13344 (synopsis "Lazy object proxy for python")
13345 (description
13346 "Lazy object proxy is an object that wraps a callable but defers the call
13347 until the object is actually required, and caches the result of said call.")
13348 (license license:bsd-2)))
13349
13350 (define-public python2-lazy-object-proxy
13351 (package-with-python2 python-lazy-object-proxy))
13352
13353 (define-public python-dnspython
13354 (package
13355 (name "python-dnspython")
13356 (version "1.16.0")
13357 (source (origin
13358 (method url-fetch)
13359 (uri (string-append "http://www.dnspython.org/kits/"
13360 version "/dnspython-" version ".tar.gz"))
13361 (sha256
13362 (base32
13363 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13364 (build-system python-build-system)
13365 (arguments '(#:tests? #f)) ; XXX: requires internet access
13366 (home-page "http://www.dnspython.org")
13367 (synopsis "DNS toolkit for Python")
13368 (description
13369 "dnspython is a DNS toolkit for Python. It supports almost all record
13370 types. It can be used for queries, zone transfers, and dynamic updates.
13371 It supports TSIG authenticated messages and EDNS0.")
13372 (license license:expat)))
13373
13374 (define-public python2-dnspython
13375 (package-with-python2 python-dnspython))
13376
13377 (define-public python-py3dns
13378 (package
13379 (name "python-py3dns")
13380 (version "3.2.1")
13381 (source
13382 (origin
13383 (method url-fetch)
13384 (uri (pypi-uri "py3dns" version))
13385 (sha256
13386 (base32
13387 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13388 (build-system python-build-system)
13389 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13390 ;; removing functionality so we copy from Nix and "just don't build it".
13391 (arguments
13392 `(#:phases
13393 (modify-phases %standard-phases
13394 (add-after 'unpack 'patch-source
13395 (lambda _
13396 (substitute* "setup.py"
13397 (("import DNS") "")
13398 (("DNS.__version__") (string-append "\"" ,version "\"")))
13399 #t)))
13400 #:tests? #f)) ; Also skip the tests.
13401 (home-page "https://launchpad.net/py3dns")
13402 (synopsis "Python 3 DNS library")
13403 (description "This Python 3 module provides a DNS API for looking up DNS
13404 entries from within Python 3 modules and applications. This module is a
13405 simple, lightweight implementation.")
13406 (license license:psfl)))
13407
13408 (define-public python-email-validator
13409 (package
13410 (name "python-email-validator")
13411 (version "1.0.2")
13412 (source
13413 (origin (method url-fetch)
13414 (uri (pypi-uri "email_validator" version))
13415 (sha256
13416 (base32
13417 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13418 (build-system python-build-system)
13419 (arguments
13420 '(#:phases
13421 (modify-phases %standard-phases
13422 (add-before 'build 'use-dnspython
13423 (lambda _
13424 (substitute* "setup.py"
13425 (("dnspython3") "dnspython"))
13426 #t)))))
13427 (propagated-inputs
13428 `(("python-dnspython" ,python-dnspython)
13429 ("python-idna" ,python-idna)))
13430 (home-page "https://github.com/JoshData/python-email-validator")
13431 (synopsis "Email address validation library for Python")
13432 (description
13433 "This library validates email address syntax and deliverability.")
13434 (license license:cc0)))
13435
13436 (define-public python2-email-validator
13437 (package-with-python2 python-email-validator))
13438
13439 (define-public python-ukpostcodeparser
13440 (package
13441 (name "python-ukpostcodeparser")
13442 (version "1.0.3")
13443 (source (origin
13444 (method url-fetch)
13445 (uri (pypi-uri "UkPostcodeParser" version))
13446 (sha256
13447 (base32
13448 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13449 (build-system python-build-system)
13450 (home-page "https://github.com/hamstah/ukpostcodeparser")
13451 (synopsis "UK Postcode parser for Python")
13452 (description
13453 "This library provides the @code{parse_uk_postcode} function for
13454 parsing UK postcodes.")
13455 (license license:expat)))
13456
13457 (define-public python2-ukpostcodeparser
13458 (package-with-python2 python-ukpostcodeparser))
13459
13460 (define-public python-faker
13461 (package
13462 (name "python-faker")
13463 (version "4.0.2")
13464 (source (origin
13465 (method url-fetch)
13466 (uri (pypi-uri "Faker" version))
13467 (sha256
13468 (base32
13469 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13470 (build-system python-build-system)
13471 (arguments
13472 '(#:phases
13473 (modify-phases %standard-phases
13474 (replace 'check
13475 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13476 (native-inputs
13477 `(;; For testing
13478 ("python-freezegun" ,python-freezegun)
13479 ("python-pytest" ,python-pytest)
13480 ("python-random2" ,python-random2)
13481 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13482 ("python-validators" ,python-validators)))
13483 (propagated-inputs
13484 `(("python-dateutil" ,python-dateutil)
13485 ("python-text-unidecode" ,python-text-unidecode)))
13486 (home-page "https://github.com/joke2k/faker")
13487 (synopsis "Python package that generates fake data")
13488 (description
13489 "Faker is a Python package that generates fake data such as names,
13490 addresses, and phone numbers.")
13491 (license license:expat)
13492 (properties `((python2-variant . ,(delay python2-faker))))))
13493
13494 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13495 (define-public python2-faker
13496 (let ((base (package-with-python2 (strip-python2-variant
13497 python-faker))))
13498 (package
13499 (inherit base)
13500 (version "3.0.1")
13501 (source (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "Faker" version))
13504 (sha256
13505 (base32
13506 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13507 (native-inputs
13508 `(("python-mock" ,python2-mock)
13509 ,@(package-native-inputs base)))
13510 (propagated-inputs
13511 `(("python2-ipaddress" ,python2-ipaddress)
13512 ("python2-six" ,python2-six)
13513 ,@(package-propagated-inputs base))))))
13514
13515 (define-public python-pyaml
13516 (package
13517 (name "python-pyaml")
13518 (version "18.11.0")
13519 (source (origin
13520 (method url-fetch)
13521 (uri (pypi-uri "pyaml" version))
13522 (sha256
13523 (base32
13524 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13525 (build-system python-build-system)
13526 (native-inputs
13527 `(("python-unidecode" ,python-unidecode)))
13528 (propagated-inputs
13529 `(("python-pyyaml" ,python-pyyaml)))
13530 (home-page "https://github.com/mk-fg/pretty-yaml")
13531 (synopsis "YAML pretty-print library for Python")
13532 (description
13533 "pyaml is a PyYAML based python module to produce pretty and readable
13534 YAML-serialized data.")
13535 (license license:wtfpl2)))
13536
13537 (define-public python2-pyaml
13538 (package-with-python2 python-pyaml))
13539
13540 (define-public python-backpack
13541 (package
13542 (name "python-backpack")
13543 (version "0.1")
13544 (source
13545 (origin
13546 (method url-fetch)
13547 (uri (pypi-uri "backpack" version))
13548 (sha256
13549 (base32
13550 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13551 (build-system python-build-system)
13552 (native-inputs
13553 `(("python-pytest" ,python-pytest)
13554 ("python-nose" ,python-nose)))
13555 (propagated-inputs
13556 `(("python-simplejson" ,python-simplejson)))
13557 (home-page "https://github.com/sdispater/backpack")
13558 (synopsis "Utilities for working with Python collections")
13559 (description "Backpack provides some useful utilities for working with
13560 collections of data.")
13561 (license license:expat)))
13562
13563 (define-public python2-backpack
13564 (package-with-python2 python-backpack))
13565
13566 (define-public python-prompt-toolkit
13567 (package
13568 (name "python-prompt-toolkit")
13569 (version "3.0.7")
13570 (source
13571 (origin
13572 (method url-fetch)
13573 (uri (pypi-uri "prompt_toolkit" version))
13574 (sha256
13575 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13576 (build-system python-build-system)
13577 (arguments
13578 `(#:phases
13579 (modify-phases %standard-phases
13580 (delete 'check)
13581 (add-after 'install 'post-install-check
13582 (lambda* (#:key inputs outputs #:allow-other-keys)
13583 ;; HOME is needed for the test
13584 ;; "test_pathcompleter_can_expanduser".
13585 (setenv "HOME" "/tmp")
13586 (add-installed-pythonpath inputs outputs)
13587 (invoke "py.test"))))))
13588 (propagated-inputs
13589 `(("python-wcwidth" ,python-wcwidth)))
13590 (native-inputs
13591 `(("python-pytest" ,python-pytest)))
13592 (home-page
13593 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13594 (synopsis "Library for building command line interfaces in Python")
13595 (description
13596 "Prompt-Toolkit is a library for building interactive command line
13597 interfaces in Python. It's like GNU Readline but it also features syntax
13598 highlighting while typing, out-of-the-box multi-line input editing, advanced
13599 code completion, incremental search, support for Chinese double-width
13600 characters, mouse support, and auto suggestions.")
13601 (license license:bsd-3)
13602 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13603
13604 (define-public python-prompt-toolkit-2
13605 (package (inherit python-prompt-toolkit)
13606 (name "python-prompt-toolkit")
13607 (version "2.0.7")
13608 (source
13609 (origin
13610 (method url-fetch)
13611 (uri (pypi-uri "prompt_toolkit" version))
13612 (sha256
13613 (base32
13614 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13615 (propagated-inputs
13616 `(("python-wcwidth" ,python-wcwidth)
13617 ("python-six" ,python-six)
13618 ("python-pygments" ,python-pygments)))
13619 (properties '())))
13620
13621 (define-public python2-prompt-toolkit
13622 (package-with-python2 python-prompt-toolkit-2))
13623
13624 (define-public python-prompt-toolkit-1
13625 (package (inherit python-prompt-toolkit-2)
13626 (version "1.0.15")
13627 (source
13628 (origin
13629 (method url-fetch)
13630 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13631 (sha256
13632 (base32
13633 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13634
13635 (define-public python2-prompt-toolkit-1
13636 (package-with-python2 python-prompt-toolkit-1))
13637
13638 (define-public python-jedi
13639 (package
13640 (name "python-jedi")
13641 (version "0.17.2")
13642 (source
13643 (origin
13644 (method url-fetch)
13645 (uri (pypi-uri "jedi" version))
13646 (sha256
13647 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13648 (build-system python-build-system)
13649 (arguments
13650 `(#:phases
13651 (modify-phases %standard-phases
13652 (replace 'check
13653 (lambda _
13654 (setenv "HOME" "/tmp")
13655 (invoke "python" "-m" "pytest" "-vv"))))))
13656 (native-inputs
13657 `(("python-pytest" ,python-pytest)
13658 ("python-docopt" ,python-docopt)))
13659 (propagated-inputs
13660 `(("python-parso" ,python-parso)))
13661 (home-page "https://github.com/davidhalter/jedi")
13662 (synopsis "Autocompletion and static analysis library for Python")
13663 (description
13664 "Jedi is a static analysis tool for Python that can be used in Integrated
13665 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13666 on a deeper level than many other static analysis frameworks for Python.
13667
13668 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13669 well.")
13670 (license license:expat)))
13671
13672 (define-public python2-jedi
13673 (package-with-python2 python-jedi))
13674
13675 (define-public ptpython
13676 (package
13677 (name "ptpython")
13678 (version "3.0.5")
13679 (source (origin
13680 (method url-fetch)
13681 (uri (pypi-uri "ptpython" version))
13682 (sha256
13683 (base32
13684 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13685 (build-system python-build-system)
13686 (arguments
13687 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13688 (propagated-inputs
13689 `(("python-appdirs" ,python-appdirs)
13690 ("python-jedi" ,python-jedi)
13691 ("python-prompt-toolkit" ,python-prompt-toolkit)
13692 ("python-pygments" ,python-pygments)))
13693 (home-page "https://github.com/jonathanslenders/ptpython")
13694 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13695 (description
13696 "ptpython is a Python read-eval-print loop with IDE-like features.
13697 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13698 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13699 etc.")
13700 (license license:bsd-3)
13701 (properties `((python2-variant . ,(delay ptpython-2))))))
13702
13703 (define-public ptpython-2
13704 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13705 (package
13706 (inherit base)
13707 (name "ptpython2"))))
13708
13709 (define-public python-stem
13710 (package
13711 (name "python-stem")
13712 (version "1.8.0")
13713 (source
13714 (origin
13715 (method url-fetch)
13716 (uri (pypi-uri "stem" version))
13717 (sha256
13718 (base32
13719 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13720 (build-system python-build-system)
13721 (arguments
13722 `(#:phases
13723 (modify-phases %standard-phases
13724 (replace 'check
13725 (lambda _
13726 (invoke "./run_tests.py" "--unit")
13727 #t)))))
13728 (native-inputs
13729 `(("python-mock" ,python-mock)
13730 ("python-pycodestyle" ,python-pycodestyle)
13731 ("python-pyflakes" ,python-pyflakes)))
13732 (home-page "https://stem.torproject.org/")
13733 (synopsis
13734 "Python controller library that allows applications to interact with Tor")
13735 (description
13736 "Stem is a Python controller library for Tor. With it you can use Tor's
13737 control protocol to script against the Tor process and read descriptor data
13738 relays publish about themselves.")
13739 (license license:lgpl3)))
13740
13741 (define-public python2-stem
13742 (package-with-python2 python-stem))
13743
13744 (define-public python-pyserial
13745 (package
13746 (name "python-pyserial")
13747 (version "3.4")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "pyserial" version))
13752 (sha256
13753 (base32
13754 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13755 (build-system python-build-system)
13756 (arguments
13757 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13758 ;; #:phases
13759 ;; (modify-phases %standard-phases
13760 ;; (replace 'check
13761 ;; (lambda _
13762 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13763 (home-page
13764 "https://github.com/pyserial/pyserial")
13765 (synopsis "Python Serial Port Bindings")
13766 (description "@code{pyserial} provide serial port bindings for Python. It
13767 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13768 and/or Xon/Xoff. The port is accessed in RAW mode.")
13769 (license license:bsd-3)))
13770
13771 (define-public python2-pyserial
13772 (package-with-python2 python-pyserial))
13773
13774 (define-public python-kivy
13775 (package
13776 (name "python-kivy")
13777 (version "1.10.1")
13778 (source
13779 (origin
13780 (method url-fetch)
13781 (uri (pypi-uri "Kivy" version))
13782 (file-name (string-append name "-" version ".tar.gz"))
13783 (sha256
13784 (base32
13785 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13786 (build-system python-build-system)
13787 (arguments
13788 `(#:tests? #f ; Tests require many optional packages
13789 #:phases
13790 (modify-phases %standard-phases
13791 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13792 (lambda* (#:key inputs #:allow-other-keys)
13793 (setenv "KIVY_SDL2_PATH"
13794 (string-append (assoc-ref inputs "sdl-union")
13795 "/include/SDL2"))
13796 #t)))))
13797 (native-inputs
13798 `(("pkg-config" ,pkg-config)
13799 ("python-cython" ,python-cython)))
13800 (inputs
13801 `(("gstreamer" ,gstreamer)
13802 ("mesa" ,mesa)
13803 ("sdl-union"
13804 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13805 (home-page "https://kivy.org")
13806 (synopsis
13807 "Multitouch application framework")
13808 (description
13809 "A software library for rapid development of
13810 hardware-accelerated multitouch applications.")
13811 (license license:expat)))
13812
13813 (define-public python2-kivy
13814 (package-with-python2 python-kivy))
13815
13816 (define-public python-binaryornot
13817 (package
13818 (name "python-binaryornot")
13819 (version "0.4.4")
13820 (source (origin
13821 (method url-fetch)
13822 (uri (pypi-uri "binaryornot" version))
13823 (sha256
13824 (base32
13825 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13826 (build-system python-build-system)
13827 (arguments
13828 `(#:phases
13829 (modify-phases %standard-phases
13830 (add-after 'unpack 'patch-tests
13831 (lambda _
13832 ;; TypeError: binary() got an unexpected keyword argument
13833 ;; 'average_size'.
13834 (substitute* "tests/test_check.py"
13835 (("average_size=512") ""))
13836 #t)))))
13837 (propagated-inputs
13838 `(("python-chardet" ,python-chardet)
13839 ("python-hypothesis" ,python-hypothesis)))
13840 (home-page "https://github.com/audreyr/binaryornot")
13841 (synopsis "Package to check if a file is binary or text")
13842 (description "Ultra-lightweight pure Python package to check if a file is
13843 binary or text.")
13844 (license license:bsd-3)
13845 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13846
13847 (define-public python2-binaryornot
13848 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13849 (package (inherit base)
13850 (propagated-inputs
13851 `(("python2-enum34" ,python2-enum34)
13852 ,@(package-propagated-inputs base))))))
13853
13854 (define-public python-binwalk
13855 (package
13856 (name "python-binwalk")
13857 (version "2.2.0")
13858 (source
13859 (origin
13860 (method git-fetch)
13861 (uri (git-reference
13862 (url "https://github.com/ReFirmLabs/binwalk")
13863 (commit (string-append "v" version))))
13864 (file-name (git-file-name name version))
13865 (sha256
13866 (base32
13867 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13868 (build-system python-build-system)
13869 (arguments
13870 `(#:phases
13871 (modify-phases %standard-phases
13872 (add-before 'check 'set-pythonpath
13873 (lambda _
13874 (setenv "PYTHONPATH"
13875 (string-append
13876 (getcwd) "/src/"
13877 ":" (getenv "PYTHONPATH")))
13878 (setenv "HOME" "")
13879 #t)))))
13880 (native-inputs
13881 `(("python-coverage" ,python-coverage)
13882 ("python-nose" ,python-nose)))
13883 (home-page "https://github.com/ReFirmLabs/binwalk")
13884 (synopsis "Firmware analysis tool")
13885 (description "Binwalk is a tool for analyzing, reverse engineering, and
13886 extracting firmware images")
13887 (license license:expat)))
13888
13889 (define-public python-nltk
13890 (package
13891 (name "python-nltk")
13892 (version "3.2.1")
13893 (source (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "nltk" version))
13896 (sha256
13897 (base32
13898 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13899 (build-system python-build-system)
13900 (arguments
13901 '(;; The tests require some extra resources to be downloaded.
13902 ;; TODO Try packaging these resources.
13903 #:tests? #f))
13904 (home-page "http://nltk.org/")
13905 (synopsis "Natural Language Toolkit")
13906 (description "It provides interfaces to over 50 corpora and lexical
13907 resources such as WordNet, along with a suite of text processing libraries
13908 for classification, tokenization, stemming, tagging, parsing, and semantic
13909 reasoning, wrappers for natural language processing libraries.")
13910 (license license:asl2.0)))
13911
13912 (define-public python2-nltk
13913 (package-with-python2 python-nltk))
13914
13915 (define-public python-pymongo
13916 (package
13917 (name "python-pymongo")
13918 (version "3.7.2")
13919 (source (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "pymongo" version))
13922 (sha256
13923 (base32
13924 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13925 (build-system python-build-system)
13926 (propagated-inputs
13927 `(("python-certifi" ,python-certifi)))
13928 (home-page "https://github.com/mongodb/mongo-python-driver")
13929 (synopsis "Python driver for MongoDB")
13930 (description "Python driver for MongoDB.")
13931 (license license:asl2.0)))
13932
13933 (define-public python2-pymongo
13934 (package-with-python2 python-pymongo))
13935
13936 (define-public python-consul
13937 (package
13938 (name "python-consul")
13939 (version "0.6.1")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (pypi-uri "python-consul" version))
13944 (sha256
13945 (base32
13946 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13947 (build-system python-build-system)
13948 (arguments
13949 '(#:tests? #f)) ; The tests are not distributed
13950 (propagated-inputs
13951 `(("python-requests" ,python-requests)
13952 ("python-six" ,python-six)))
13953 (home-page "https://github.com/cablehead/python-consul")
13954 (synopsis "Python client for Consul")
13955 (description
13956 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13957 discovery, monitoring and configuration.")
13958 (license license:expat)))
13959
13960 (define-public python2-consul
13961 (package-with-python2 python-consul))
13962
13963 (define-public python-schematics
13964 (package
13965 (name "python-schematics")
13966 (version "1.1.1")
13967 (source
13968 (origin
13969 (method git-fetch)
13970 (uri (git-reference
13971 (url "https://github.com/schematics/schematics")
13972 (commit (string-append "v" version))))
13973 (file-name (git-file-name name version))
13974 (sha256
13975 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13976 (build-system python-build-system)
13977 (propagated-inputs
13978 `(("python-six" ,python-six)))
13979 (arguments
13980 ;; The tests require a bunch of not very nice packages with fixed
13981 ;; version requirements (e.g. python-coveralls).
13982 `(#:tests? #f))
13983 (home-page "https://github.com/schematics/schematics")
13984 (synopsis "Python Data Structures for Humans")
13985 (description "Python Data Structures for Humans.")
13986 (license license:bsd-3)))
13987
13988 (define-public python2-schematics
13989 (package-with-python2 python-schematics))
13990
13991 (define-public python-odfpy
13992 (package
13993 (name "python-odfpy")
13994 (version "1.4.1")
13995 (source (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "odfpy" version))
13998 (sha256
13999 (base32
14000 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14001 (arguments
14002 `(#:phases
14003 (modify-phases %standard-phases
14004 (replace 'check
14005 (lambda _
14006 (setenv "PYTHONPATH" (string-append "./build/lib:"
14007 (getenv "PYTHONPATH")))
14008 (invoke "pytest" "-vv"))))))
14009 (build-system python-build-system)
14010 (native-inputs
14011 `(("python-pytest" ,python-pytest)))
14012 (propagated-inputs
14013 `(("python-defusedxml" ,python-defusedxml)))
14014 (home-page "https://github.com/eea/odfpy")
14015 (synopsis "Python API and tools to manipulate OpenDocument files")
14016 (description "Collection of libraries and utility programs written in
14017 Python to manipulate OpenDocument 1.2 files.")
14018 (license
14019 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14020 ;; number of files with other licenses.
14021 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14022
14023 (define-public python2-odfpy
14024 (package-with-python2 python-odfpy))
14025
14026 (define-public python-natsort
14027 (package
14028 (name "python-natsort")
14029 (version "7.0.1")
14030 (source (origin
14031 (method url-fetch)
14032 (uri (pypi-uri "natsort" version))
14033 (sha256
14034 (base32
14035 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14036 (build-system python-build-system)
14037 (arguments
14038 `(#:modules ((guix build utils)
14039 (guix build python-build-system)
14040 (srfi srfi-1)
14041 (srfi srfi-26)
14042 (ice-9 ftw))
14043 #:phases
14044 (modify-phases %standard-phases
14045 (add-before 'check 'set-cachedir
14046 ;; Tests require write access to $HOME by default
14047 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14048 (replace 'check
14049 (lambda _
14050 (let ((cwd (getcwd)))
14051 (setenv "PYTHONPATH"
14052 (string-append
14053 cwd "/build/"
14054 (find (cut string-prefix? "lib" <>)
14055 (scandir (string-append cwd "/build")))
14056 ":"
14057 (getenv "PYTHONPATH")))
14058 (invoke "pytest" "-v")))))))
14059 (native-inputs
14060 `(("python-hypothesis" ,python-hypothesis)
14061 ("python-pytest-cov" ,python-pytest-cov)
14062 ("python-pytest-mock" ,python-pytest-mock)
14063 ("python-pytest" ,python-pytest)))
14064 (propagated-inputs ; TODO: Add python-fastnumbers.
14065 `(("python-pyicu" ,python-pyicu)))
14066 (home-page "https://github.com/SethMMorton/natsort")
14067 (synopsis "Natural sorting for python and shell")
14068 (description
14069 "Natsort lets you apply natural sorting on lists instead of
14070 lexicographical. If you use the built-in @code{sorted} method in python
14071 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14072 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14073 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14074 identifies numbers and sorts them separately from strings. It can also sort
14075 version numbers, real numbers, mixed types and more, and comes with a shell
14076 command @command{natsort} that exposes this functionality in the command line.")
14077 (license license:expat)
14078 (properties `((python2-variant . ,(delay python2-natsort))))))
14079
14080 ;; Natsort 6.x are the last versions with support for Python 2.
14081 (define-public python2-natsort
14082 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14083 (package (inherit base)
14084 (version "6.2.1")
14085 (source (origin
14086 (method url-fetch)
14087 (uri (pypi-uri "natsort" version))
14088 (sha256
14089 (base32
14090 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14091 (native-inputs
14092 `(("python2-pathlib" ,python2-pathlib)
14093 ,@(package-native-inputs base))))))
14094
14095 (define-public glances
14096 (package
14097 (name "glances")
14098 (version "3.1.4")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (pypi-uri "Glances" version))
14103 (sha256
14104 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14105 (modules '((guix build utils)))
14106 (snippet
14107 '(begin
14108 ;; Glances phones PyPI for weekly update checks by default.
14109 ;; Disable these. The user can re-enable them if desired.
14110 (substitute* "glances/outdated.py"
14111 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14112 (string-append indentation
14113 "self.args.disable_check_update = True\n"
14114 line)))
14115 #t))))
14116 (build-system python-build-system)
14117 (propagated-inputs
14118 `(("python-future" ,python-future)
14119 ("python-psutil" ,python-psutil)))
14120 (home-page "https://github.com/nicolargo/glances")
14121 (synopsis "Cross-platform curses-based monitoring tool")
14122 (description
14123 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14124 Glances uses the PsUtil library to get information from your system. It
14125 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14126 (license license:lgpl3+)))
14127
14128 (define-public python-glances
14129 (deprecated-package "python-glances" glances))
14130
14131 (define-public python-graphql-core
14132 (package
14133 (name "python-graphql-core")
14134 (version "0.5.3")
14135 (source
14136 (origin
14137 (method url-fetch)
14138 (uri (pypi-uri "graphql-core" version))
14139 (sha256
14140 (base32
14141 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14142 (build-system python-build-system)
14143 (arguments
14144 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14145 #:phases
14146 (modify-phases %standard-phases
14147 (add-after 'unpack 'patch-hardcoded-version
14148 (lambda _ (substitute*
14149 "setup.py"
14150 (("'gevent==1.1rc1'") "'gevent'"))
14151 #t)))))
14152 (native-inputs
14153 `(("python-gevent" ,python-gevent)
14154 ("python-mock" ,python-mock)
14155 ("python-pytest-mock" ,python-pytest-mock)))
14156 (propagated-inputs
14157 `(("python-promise" ,python-promise)
14158 ("python-six" ,python-six)))
14159 (home-page "https://github.com/graphql-python/graphql-core")
14160 (synopsis "GraphQL implementation for Python")
14161 (description
14162 "GraphQL implementation for Python. GraphQL is a data query language and
14163 runtime designed and used to request and deliver data to mobile and web apps.
14164 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14165 to Python.")
14166 (license license:expat)))
14167
14168 (define-public python2-graphql-core
14169 (package-with-python2 python-graphql-core))
14170
14171 (define-public python-graphql-relay
14172 (package
14173 (name "python-graphql-relay")
14174 (version "0.4.5")
14175 (source
14176 (origin
14177 (method url-fetch)
14178 (uri (pypi-uri "graphql-relay" version))
14179 (sha256
14180 (base32
14181 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14182 (build-system python-build-system)
14183 (arguments
14184 '(#:tests? #f)) ; The tests are not distributed
14185 (propagated-inputs
14186 `(("python-graphql-core" ,python-graphql-core)
14187 ("python-promise" ,python-promise)
14188 ("python-six" ,python-six)))
14189 (home-page "https://github.com/graphql-python/graphql-relay-py")
14190 (synopsis "Relay implementation for Python")
14191 (description
14192 "This is a library to allow the easy creation of Relay-compliant servers
14193 using the GraphQL Python reference implementation of a GraphQL server. It
14194 should be noted that the code is a exact port of the original
14195 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14196 from Facebook.")
14197 (license license:expat)))
14198
14199 (define-public python2-graphql-relay
14200 (package-with-python2 python-graphql-relay))
14201
14202 (define-public python-graphene
14203 (package
14204 (name "python-graphene")
14205 (version "0.10.2")
14206 (source
14207 (origin
14208 (method url-fetch)
14209 (uri (pypi-uri "graphene" version))
14210 (sha256
14211 (base32
14212 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14213 (build-system python-build-system)
14214 (propagated-inputs
14215 `(("python-graphql-core" ,python-graphql-core)
14216 ("python-graphql-relay" ,python-graphql-relay)
14217 ("python-iso8601" ,python-iso8601)
14218 ("python-promise" ,python-promise)
14219 ("python-six" ,python-six)))
14220 (arguments
14221 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14222 (home-page "https://graphene-python.org/")
14223 (synopsis "GraphQL Framework for Python")
14224 (description
14225 "Graphene is a Python library for building GraphQL schemas/types.
14226 A GraphQL schema describes your data model, and provides a GraphQL server
14227 with an associated set of resolve methods that know how to fetch data.")
14228 (properties `((python2-variant . ,(delay python2-graphene))))
14229 (license license:expat)))
14230
14231 (define-public python2-graphene
14232 (let ((base (package-with-python2
14233 (strip-python2-variant python-graphene))))
14234 (package (inherit base)
14235 (native-inputs
14236 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14237 ,@(package-native-inputs base))))))
14238
14239 (define-public python-nautilus
14240 (package
14241 (name "python-nautilus")
14242 (version "0.4.9")
14243 (source
14244 (origin
14245 (method url-fetch)
14246 (uri (pypi-uri "nautilus" version))
14247 (sha256
14248 (base32
14249 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14250 (build-system python-build-system)
14251 (arguments `(#:tests? #f)) ; fails to import test modules
14252 (propagated-inputs
14253 `(("python-bcrypt" ,python-bcrypt)
14254 ("python-click" ,python-click)
14255 ("python-consul" ,python-consul)
14256 ("python-graphene" ,python-graphene)
14257 ("python-jinja2" ,python-jinja2)
14258 ("python-peewee" ,python-peewee)
14259 ("python-pika" ,python-pika)
14260 ("python-tornado" ,python-tornado)
14261 ("python-wtforms" ,python-wtforms)))
14262 (native-inputs
14263 `(("python-nose2" ,python-nose2)))
14264 (home-page "https://github.com/AlecAivazis/nautilus")
14265 (synopsis "Library for creating microservice applications")
14266 (description
14267 "Nautilus is a framework for flux based microservices that looks to
14268 provide extendible implementations of common aspects of a cloud so that you can
14269 focus on building massively scalable web applications.")
14270 (license license:expat)))
14271
14272 (define-public python-random2
14273 (package
14274 (name "python-random2")
14275 (version "1.0.1")
14276 (source (origin
14277 (method url-fetch)
14278 (uri (pypi-uri "random2" version ".zip"))
14279 (sha256
14280 (base32
14281 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14282 (build-system python-build-system)
14283 (native-inputs `(("unzip" ,unzip)))
14284 (home-page "http://pypi.python.org/pypi/random2")
14285 (synopsis "Python 3 version of the Python 2 @code{random} module")
14286 (description
14287 "This package provides a Python 3 ported version of Python 2.7’s
14288 @code{random} module. It has also been back-ported to work in Python 2.6.
14289
14290 In Python 3, the implementation of @code{randrange()} was changed, so that
14291 even with the same seed you get different sequences in Python 2 and 3.
14292
14293 This package closes that gap, allowing stable random number generation
14294 between the different Python versions.")
14295 (license license:psfl)))
14296
14297 (define-public python2-random2
14298 (package-with-python2 python-random2))
14299
14300 (define-public python-snowballstemmer
14301 (package
14302 (name "python-snowballstemmer")
14303 (version "2.0.0")
14304 (source (origin
14305 (method url-fetch)
14306 (uri (pypi-uri "snowballstemmer" version))
14307 (sha256
14308 (base32
14309 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14310 (build-system python-build-system)
14311 (arguments
14312 `(;; No tests exist
14313 #:tests? #f))
14314 (home-page "https://github.com/shibukawa/snowball_py")
14315 (synopsis "Snowball stemming library collection for Python")
14316 (description "This package provides 16 word stemmer algorithms generated
14317 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14318 English stemmer.")
14319 (license license:bsd-3)))
14320
14321 (define-public python2-snowballstemmer
14322 (package-with-python2 python-snowballstemmer))
14323
14324 (define-public python-setproctitle
14325 (package
14326 (name "python-setproctitle")
14327 (version "1.1.10")
14328 (source
14329 (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "setproctitle" version))
14332 (sha256
14333 (base32
14334 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14335 (build-system python-build-system)
14336 (arguments
14337 '(#:phases
14338 (modify-phases %standard-phases
14339 (add-before 'check 'patch-Makefile
14340 ;; Stricly this is only required for the python2 variant.
14341 ;; But adding a phase in an inherited package seems to be
14342 ;; cumbersum. So we patch even for python3.
14343 (lambda _
14344 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14345 (when nose
14346 (substitute* "Makefile"
14347 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14348 (string-append nose "/bin/nosetests "))))
14349 #t)))
14350 (replace 'check
14351 (lambda _
14352 (setenv "PYTHON" (or (which "python3") (which "python")))
14353 (setenv "PYCONFIG" (if (which "python3-config")
14354 "python3-config --embed"
14355 "python-config"))
14356 (setenv "CC" "gcc")
14357 ;; No need to extend PYTHONPATH to find the built package, since
14358 ;; the Makefile will build anyway
14359 (invoke "make" "check"))))))
14360 (native-inputs
14361 `(("procps" ,procps))) ; required for tests
14362 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14363 (synopsis
14364 "Setproctitle implementation for Python to customize the process title")
14365 (description "The library allows a process to change its title (as displayed
14366 by system tools such as ps and top).
14367
14368 Changing the title is mostly useful in multi-process systems, for
14369 example when a master process is forked: changing the children's title
14370 allows identifying the task each process is busy with. The technique
14371 is used by PostgreSQL and the OpenSSH Server for example.")
14372 (license license:bsd-3)
14373 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14374
14375 (define-public python2-setproctitle
14376 (let ((base (package-with-python2
14377 (strip-python2-variant python-setproctitle))))
14378 (package
14379 (inherit base)
14380 (native-inputs `(("python2-nose" ,python2-nose)
14381 ,@(package-native-inputs base))))))
14382
14383 (define-public python-validictory
14384 (package
14385 (name "python-validictory")
14386 (version "1.0.1")
14387 (source
14388 (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "validictory" version))
14391 (sha256
14392 (base32
14393 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14394 (build-system python-build-system)
14395 (arguments
14396 '(#:phases
14397 (modify-phases %standard-phases
14398 (add-after 'unpack 'bootstrap
14399 ;; Move the tests out of the package directory to avoid
14400 ;; packaging them.
14401 (lambda* _
14402 (rename-file "validictory/tests" "tests")
14403 (delete-file "tests/__init__.py")))
14404 (replace 'check
14405 (lambda _
14406 ;; Extend PYTHONPATH so the built package will be found.
14407 (setenv "PYTHONPATH"
14408 (string-append (getcwd) "/build/lib:"
14409 (getenv "PYTHONPATH")))
14410 (invoke "py.test" "-vv" ))))))
14411 (native-inputs
14412 `(("python-pytest" ,python-pytest)))
14413 (home-page
14414 "https://github.com/jamesturk/validictory")
14415 (synopsis "General purpose Python data validator")
14416 (description "It allows validation of arbitrary Python data structures.
14417
14418 The schema format is based on the JSON Schema
14419 proposal (http://json-schema.org), so combined with json the library is also
14420 useful as a validator for JSON data.")
14421 (license license:expat)))
14422
14423 (define-public python2-validictory
14424 (package-with-python2 python-validictory))
14425
14426 (define-public python-pyelftools
14427 (package
14428 (name "python-pyelftools")
14429 (version "0.25")
14430 (source
14431 (origin
14432 (method url-fetch)
14433 (uri (pypi-uri "pyelftools" version))
14434 (sha256
14435 (base32
14436 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14437 (build-system python-build-system)
14438 (arguments
14439 `(#:phases
14440 (modify-phases %standard-phases
14441 (add-before 'check 'set-pythonpath
14442 (lambda _
14443 (setenv "PYTHONPATH"
14444 (string-append
14445 (getcwd) "/test/"
14446 ":" (getenv "PYTHONPATH")))
14447 #t)))))
14448 (home-page
14449 "https://github.com/eliben/pyelftools")
14450 (synopsis
14451 "Analyze binary and library file information")
14452 (description "This Python library provides interfaces for parsing and
14453 analyzing two binary and library file formats; the Executable and Linking
14454 Format (ELF), and debugging information in the Debugging With Attributed
14455 Record Format (DWARF).")
14456 (license license:public-domain)))
14457
14458 (define-public python-pyev
14459 (package
14460 (name "python-pyev")
14461 (version "0.9.0")
14462 (source
14463 (origin
14464 (method url-fetch)
14465 (uri (pypi-uri "pyev" version))
14466 (sha256
14467 (base32
14468 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14469 (build-system python-build-system)
14470 (arguments
14471 `(#:tests? #f ; no test suite
14472 #:phases
14473 (modify-phases %standard-phases
14474 (add-after 'unpack 'patch
14475 (lambda* (#:key inputs #:allow-other-keys)
14476 (let ((libev (string-append (assoc-ref inputs "libev")
14477 "/lib/libev.so.4")))
14478 (substitute* "setup.py"
14479 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14480 (string-append "libev_dll_name = \"" libev "\"")))))))))
14481 (inputs
14482 `(("libev" ,libev)))
14483 (home-page "http://pythonhosted.org/pyev/")
14484 (synopsis "Python libev interface")
14485 (description "Pyev provides a Python interface to libev.")
14486 (license license:gpl3)))
14487
14488 (define-public python2-pyev
14489 (package-with-python2 python-pyev))
14490
14491 (define-public python-imagesize
14492 (package
14493 (name "python-imagesize")
14494 (version "1.2.0")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "imagesize" version))
14499 (sha256
14500 (base32
14501 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14502 (build-system python-build-system)
14503 (home-page "https://github.com/shibukawa/imagesize_py")
14504 (synopsis "Gets image size of files in various formats in Python")
14505 (description
14506 "This package allows determination of image size from
14507 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14508 (license license:expat)))
14509
14510 (define-public python2-imagesize
14511 (package-with-python2 python-imagesize))
14512
14513 (define-public python-termstyle
14514 (package
14515 (name "python-termstyle")
14516 (version "0.1.11")
14517 (source
14518 (origin
14519 (method url-fetch)
14520 (uri (pypi-uri "termstyle" version))
14521 (sha256
14522 (base32
14523 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14524 (build-system python-build-system)
14525 (arguments
14526 '(#:phases
14527 (modify-phases %standard-phases
14528 (replace 'check
14529 (lambda _
14530 (invoke "python" "test3.py"))))))
14531 (home-page "https://github.com/gfxmonk/termstyle")
14532 (synopsis "Console text coloring for Python")
14533 (description "This package provides console text coloring for Python.")
14534 (license license:bsd-3)))
14535
14536 (define-public python-argcomplete
14537 (package
14538 (name "python-argcomplete")
14539 (version "1.11.1")
14540 (source
14541 (origin
14542 (method url-fetch)
14543 (uri (pypi-uri "argcomplete" version))
14544 (sha256
14545 (base32
14546 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14547 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14548 (build-system python-build-system)
14549 (native-inputs
14550 `(("python-coverage" ,python-coverage)
14551 ("python-flake8" ,python-flake8)
14552 ("python-pexpect" ,python-pexpect)
14553 ("python-wheel" ,python-wheel)
14554 ("tcsh" ,tcsh)
14555 ("fish" ,fish)
14556 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14557 (home-page "https://github.com/kislyuk/argcomplete")
14558 (synopsis "Shell tab completion for Python argparse")
14559 (description "argcomplete provides extensible command line tab completion
14560 of arguments and options for Python scripts using @code{argparse}. It's
14561 particularly useful for programs with many options or sub-parsers that can
14562 dynamically suggest completions; for example, when browsing resources over the
14563 network.")
14564 (license license:asl2.0)))
14565
14566 (define-public python2-argcomplete
14567 (package-with-python2 python-argcomplete))
14568
14569 (define-public python-csscompressor
14570 (package
14571 (name "python-csscompressor")
14572 (version "0.9.5")
14573 (source
14574 (origin
14575 (method url-fetch)
14576 (uri (pypi-uri "csscompressor" version))
14577 (sha256
14578 (base32
14579 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14580 (build-system python-build-system)
14581 (arguments
14582 '(#:phases
14583 (modify-phases %standard-phases
14584 (replace 'check
14585 (lambda _
14586 (invoke "py.test"))))))
14587 (native-inputs
14588 `(("python-pytest" ,python-pytest)))
14589 (home-page "https://github.com/sprymix/csscompressor")
14590 (synopsis "Python port of YUI CSS Compressor")
14591 (description
14592 "This package provides a python port of YUI CSS Compressor.")
14593 (license license:bsd-3)))
14594
14595 (define-public python-rcssmin
14596 (package
14597 (name "python-rcssmin")
14598 (version "1.0.6")
14599 (source
14600 (origin
14601 (method url-fetch)
14602 (uri (pypi-uri "rcssmin" version))
14603 (sha256
14604 (base32
14605 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14606 (build-system python-build-system)
14607 (arguments
14608 '(#:phases
14609 (modify-phases %standard-phases
14610 (replace 'check
14611 (lambda _
14612 (invoke "python" "run_tests.py" "tests"))))))
14613 (home-page "http://opensource.perlig.de/rcssmin/")
14614 (synopsis "CSS Minifier")
14615 (description "The minifier is based on the semantics of the YUI compressor,
14616 which itself is based on the rule list by Isaac Schlueter.")
14617 (license license:asl2.0)))
14618
14619 (define-public python-rjsmin
14620 (package
14621 (name "python-rjsmin")
14622 (version "1.1.0")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "rjsmin" version))
14627 (sha256
14628 (base32
14629 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14630 (modules '((guix build utils)))
14631 (snippet
14632 '(begin
14633 (for-each delete-file (find-files "bench" "\\.js$"))
14634 #t))))
14635 (build-system python-build-system)
14636 (arguments
14637 '(#:tests? #f ; Not all test files included.
14638 #:phases
14639 (modify-phases %standard-phases
14640 (replace 'check
14641 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14642 (add-installed-pythonpath inputs outputs)
14643 (if tests?
14644 (invoke "py.test" "-vv" "tests")
14645 #t))))))
14646 (native-inputs
14647 `(("python-pytest" ,python-pytest)))
14648 (home-page "http://opensource.perlig.de/rjsmin/")
14649 (synopsis "Javascript Minifier")
14650 (description "@code{rJSmin} is a javascript minifier written in Python. The
14651 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14652 is a re-implementation aiming for speed, so it can be used at runtime (rather
14653 than during a preprocessing step).")
14654 (license license:asl2.0)))
14655
14656 (define-public python-xopen
14657 (package
14658 (name "python-xopen")
14659 (version "0.5.0")
14660 (source
14661 (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "xopen" version))
14664 (sha256
14665 (base32
14666 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14667 (build-system python-build-system)
14668 (propagated-inputs
14669 `(("python-setuptools-scm" ,python-setuptools-scm)))
14670 (home-page "https://github.com/marcelm/xopen/")
14671 (synopsis "Open compressed files transparently")
14672 (description "This module provides an @code{xopen} function that works like
14673 Python's built-in @code{open} function, but can also deal with compressed files.
14674 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14675 recognized by their file extensions. The focus is on being as efficient as
14676 possible on all supported Python versions.")
14677 (license license:expat)))
14678
14679 (define-public python2-xopen
14680 (let ((base (package-with-python2
14681 (strip-python2-variant python-xopen))))
14682 (package
14683 (inherit base)
14684 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14685 ,@(package-propagated-inputs base))))))
14686
14687 (define-public python-cheetah
14688 (package
14689 (name "python-cheetah")
14690 (version "3.2.4")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "Cheetah3" version))
14695 (sha256
14696 (base32
14697 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14698 (build-system python-build-system)
14699 (arguments
14700 `(#:modules ((guix build utils)
14701 (guix build python-build-system)
14702 (ice-9 ftw)
14703 (srfi srfi-1)
14704 (srfi srfi-26))
14705 #:phases (modify-phases %standard-phases
14706 (add-after 'unpack 'use-absolute-python
14707 (lambda _
14708 (substitute* "Cheetah/CheetahWrapper.py"
14709 (("#!/usr/bin/env python")
14710 (string-append "#!" (which "python"))))
14711 #t))
14712 (add-after 'unpack 'fix-tests
14713 (lambda _
14714 (substitute* "Cheetah/Tests/ImportHooks.py"
14715 (("os.path.dirname\\(__file__\\)")
14716 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14717 #t))
14718 (replace 'check
14719 (lambda _
14720 (let ((cwd (getcwd)))
14721 (setenv "PYTHONPATH"
14722 (string-append
14723 cwd "/build/"
14724 (find (cut string-prefix? "lib" <>)
14725 (scandir (string-append cwd "/build")))
14726 ":" (getenv "PYTHONPATH")))
14727 (setenv "PATH"
14728 (string-append (getenv "PATH")
14729 ":" cwd "/bin"))
14730 (setenv "TMPDIR" "/tmp")
14731
14732 (substitute* "Cheetah/Tests/Test.py"
14733 (("unittest.TextTestRunner\\(\\)")
14734 "unittest.TextTestRunner(verbosity=2)"))
14735
14736 (invoke "python" "Cheetah/Tests/Test.py")))))))
14737 (propagated-inputs
14738 `(("python-markdown" ,python-markdown))) ;optional
14739 (home-page "https://cheetahtemplate.org/")
14740 (synopsis "Template engine")
14741 (description "Cheetah is a text-based template engine and Python code
14742 generator.
14743
14744 Cheetah can be used as a standalone templating utility or referenced as
14745 a library from other Python applications. It has many potential uses,
14746 but web developers looking for a viable alternative to ASP, JSP, PHP and
14747 PSP are expected to be its principle user group.
14748
14749 Features:
14750 @enumerate
14751 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14752 text-based format.
14753 @item Cleanly separates content, graphic design, and program code.
14754 @item Blends the power and flexibility of Python with a simple template language
14755 that non-programmers can understand.
14756 @item Gives template writers full access to any Python data structure, module,
14757 function, object, or method in their templates.
14758 @item Makes code reuse easy by providing an object-orientated interface to
14759 templates that is accessible from Python code or other Cheetah templates.
14760 One template can subclass another and selectively reimplement sections of it.
14761 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14762 improve the performance of a dynamic website.
14763 @item Compiles templates into optimized, yet readable, Python code.
14764 @end enumerate")
14765 (license (license:x11-style "file://LICENSE"))))
14766
14767 (define-public python2-cheetah
14768 (package-with-python2 python-cheetah))
14769
14770 (define-public python-dulwich
14771 (package
14772 (name "python-dulwich")
14773 (version "0.19.16")
14774 (source
14775 (origin
14776 (method url-fetch)
14777 (uri (list (string-append "https://www.dulwich.io/releases/"
14778 "dulwich-" version ".tar.gz")
14779 (pypi-uri "dulwich" version)))
14780 (sha256
14781 (base32
14782 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14783 (build-system python-build-system)
14784 (arguments
14785 `(#:phases
14786 (modify-phases %standard-phases
14787 (add-before 'check 'fix-tests
14788 (lambda* (#:key inputs #:allow-other-keys)
14789 ;; The tests use Popen with a custom environment which doesn't
14790 ;; include PATH.
14791 (substitute* "dulwich/tests/compat/utils.py"
14792 (("'git'") (string-append "'"
14793 (which "git")
14794 "'")))
14795 (substitute* '("dulwich/tests/test_repository.py"
14796 "dulwich/tests/test_hooks.py")
14797 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14798 (setenv "TEST_RUNNER" "unittest")
14799 (setenv "PYTHONHASHSEED" "random")
14800 #t)))))
14801 (propagated-inputs
14802 `(("python-fastimport" ,python-fastimport)
14803 ("python-urllib3" ,python-urllib3)))
14804 (native-inputs
14805 `(("python-mock" ,python-mock)
14806 ("python-geventhttpclient" ,python-geventhttpclient)
14807 ("git" ,git)))
14808 (home-page "https://www.dulwich.io/")
14809 (synopsis "Git implementation in Python")
14810 (description "Dulwich is an implementation of the Git file formats and
14811 protocols written in pure Python.")
14812 ;; Can be used with either license.
14813 (license (list license:asl2.0 license:gpl2+))))
14814
14815 (define-public python2-dulwich
14816 (package-with-python2 python-dulwich))
14817
14818 (define-public python-pbkdf2
14819 (package
14820 (name "python-pbkdf2")
14821 (version "1.3")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "pbkdf2" version))
14826 (sha256
14827 (base32
14828 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14829 (build-system python-build-system)
14830 (arguments
14831 '(#:phases
14832 (modify-phases %standard-phases
14833 (replace 'check
14834 (lambda _
14835 (setenv "PYTHONPATH"
14836 (string-append (getcwd) "/build/lib:"
14837 (getenv "PYTHONPATH")))
14838 (invoke "python" "test/test_pbkdf2.py"))))))
14839 (propagated-inputs
14840 `(("python-pycrypto" ,python-pycrypto))) ; optional
14841 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14842 (synopsis "Password-based key derivation")
14843 (description "This module implements the password-based key derivation
14844 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14845
14846 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14847 is part of the RSA Public Key Cryptography Standards series. The provided
14848 implementation takes a password or a passphrase and a salt value (and
14849 optionally a iteration count, a digest module, and a MAC module) and provides
14850 a file-like object from which an arbitrarily-sized key can be read.")
14851 (license license:expat)))
14852
14853 (define-public python2-pbkdf2
14854 (package-with-python2 python-pbkdf2))
14855
14856 (define-public python-qrcode
14857 (package
14858 (name "python-qrcode")
14859 (version "6.1")
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "qrcode" version))
14864 (sha256
14865 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14866 (build-system python-build-system)
14867 (arguments
14868 ;; FIXME: Tests require packaging 'pymaging'.
14869 '(#:tests? #f))
14870 (propagated-inputs
14871 `(("python-lxml" ,python-lxml) ; for SVG output
14872 ("python-pillow" ,python-pillow) ; for PNG output
14873 ("python-six" ,python-six)))
14874 (home-page "https://github.com/lincolnloop/python-qrcode")
14875 (synopsis "QR Code image generator")
14876 (description "This package provides a pure Python QR Code generator
14877 module. It uses the Python Imaging Library (PIL) to allow for the generation
14878 of QR Codes.
14879
14880 In addition this package provides a command line tool to generate QR codes and
14881 either write these QR codes to a file or do the output as ascii art at the
14882 console.")
14883 (license license:bsd-3)))
14884
14885 (define-public python2-qrcode
14886 (package-with-python2 python-qrcode))
14887
14888 (define-public python-rst2ansi
14889 (package
14890 (name "python-rst2ansi")
14891 (version "0.1.5")
14892 (source
14893 (origin
14894 (method url-fetch)
14895 (uri (pypi-uri "rst2ansi" version))
14896 (sha256
14897 (base32
14898 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14899 (build-system python-build-system)
14900 (propagated-inputs
14901 `(("python-docutils" ,python-docutils)))
14902 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14903 (synopsis "Convert RST to ANSI-decorated console output")
14904 (description
14905 "Python module dedicated to rendering RST (reStructuredText) documents
14906 to ansi-escaped strings suitable for display in a terminal.")
14907 (license license:expat)))
14908
14909 (define-public python-ansi2html
14910 (package
14911 (name "python-ansi2html")
14912 (version "1.2.0")
14913 (source
14914 (origin
14915 (method url-fetch)
14916 (uri (pypi-uri "ansi2html" version))
14917 (sha256
14918 (base32
14919 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14920 (build-system python-build-system)
14921 (native-inputs
14922 `(("python-mock" ,python-mock)
14923 ("python-nose" ,python-nose)))
14924 (propagated-inputs
14925 `(("python-six" ,python-six)))
14926 (home-page "https://github.com/ralphbean/ansi2html")
14927 (synopsis "Convert ANSI-decorated console output to HTML")
14928 (description
14929 "@command{ansi2html} is a Python library and command line utility for
14930 converting text with ANSI color codes to HTML or LaTeX.")
14931 (license license:gpl3+)))
14932
14933 (define-public python2-ansi2html
14934 (package-with-python2 python-ansi2html))
14935
14936 (define-public python-ddt
14937 (package
14938 (name "python-ddt")
14939 (version "1.4.1")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "ddt" version))
14944 (sha256
14945 (base32
14946 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14947 (build-system python-build-system)
14948 (native-inputs
14949 `(("python-pytest" ,python-pytest)))
14950 (propagated-inputs
14951 `(("python-pyyaml" ,python-pyyaml)))
14952 (home-page "https://github.com/datadriventests/ddt")
14953 (synopsis "Data-Driven Tests")
14954 (description
14955 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14956 running it with different test data, and make it appear as multiple test
14957 cases.")
14958 (license license:expat)))
14959
14960 (define-public python-pycountry
14961 (package
14962 (name "python-pycountry")
14963 (version "18.5.26")
14964 (source
14965 (origin
14966 (method url-fetch)
14967 (uri (pypi-uri "pycountry" version))
14968 (sha256
14969 (base32
14970 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14971 (build-system python-build-system)
14972 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14973 (synopsis "ISO databases for languages, countries, currencies, etc.")
14974 (description
14975 "@code{pycountry} provides the ISO databases for the standards:
14976 @enumerate
14977 @item 639-3 (Languages)
14978 @item 3166 (Countries)
14979 @item 3166-3 (Deleted Countries)
14980 @item 3166-2 (Subdivisions of countries)
14981 @item 4217 (Currencies)
14982 @item 15924 (Scripts)
14983 @end enumerate
14984 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14985 through a Python API.")
14986 (license license:lgpl2.1+)))
14987
14988 (define-public python2-pycountry
14989 (package-with-python2 python-pycountry))
14990
14991 (define-public python-pycosat
14992 (package
14993 (name "python-pycosat")
14994 (version "0.6.3")
14995 (source
14996 (origin
14997 (method url-fetch)
14998 (uri (pypi-uri "pycosat" version ".zip"))
14999 (sha256
15000 (base32
15001 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15002 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15003 (build-system python-build-system)
15004 (native-inputs
15005 `(("unzip" ,unzip)))
15006 (home-page "https://github.com/ContinuumIO/pycosat")
15007 (synopsis "Bindings to picosat (a SAT solver)")
15008 (description
15009 "This package provides efficient Python bindings to @code{picosat} on
15010 the C level. When importing pycosat, the @code{picosat} solver becomes part
15011 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15012 Problem} (SAT) solver.")
15013 (license license:expat)))
15014
15015 (define-public python2-pycosat
15016 (package-with-python2 python-pycosat))
15017
15018 (define-public python2-ruamel.ordereddict
15019 (package
15020 (name "python2-ruamel.ordereddict")
15021 (version "0.4.9")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "ruamel.ordereddict" version))
15026 (sha256
15027 (base32
15028 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15029 (build-system python-build-system)
15030 (arguments
15031 `(#:python ,python-2
15032 #:phases
15033 (modify-phases %standard-phases
15034 (delete 'check)
15035 (add-after 'install 'check
15036 (lambda* (#:key inputs outputs #:allow-other-keys)
15037 (add-installed-pythonpath inputs outputs)
15038 (invoke "python" "test/testordereddict.py"))))))
15039 (home-page "https://bitbucket.org/ruamel/ordereddict")
15040 (synopsis "Version of dict that keeps keys in insertion order")
15041 (description
15042 "This is an implementation of an ordered dictionary with @dfn{Key
15043 Insertion Order} (KIO: updates of values do not affect the position of the
15044 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15045 removed and put at the back). The standard library module @code{OrderedDict},
15046 implemented later, implements a subset of @code{ordereddict} functionality.
15047 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15048 Order} (KSO, no sorting function can be specified, but a transform can be
15049 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15050 (license license:expat)))
15051
15052 (define-public python-pypeg2
15053 (package
15054 (name "python-pypeg2")
15055 (version "2.15.2")
15056 (source
15057 (origin
15058 (method url-fetch)
15059 (uri (pypi-uri "pyPEG2" version))
15060 (sha256
15061 (base32
15062 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15063 (build-system python-build-system)
15064 (propagated-inputs `(("python-lxml" ,python-lxml)))
15065 (arguments
15066 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15067 '(#:tests? #f))
15068 (home-page "https://fdik.org/pyPEG/")
15069 (synopsis "Parsering Expression Grammars in Python")
15070 (description "PyPEG is an intrinsic parser interpreter framework for
15071 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15072 parse many formal languages.")
15073 (license license:gpl2)))
15074
15075 (define-public python-incremental
15076 (package
15077 (name "python-incremental")
15078 (version "17.5.0")
15079 (source
15080 (origin
15081 (method url-fetch)
15082 (uri (pypi-uri "incremental" version))
15083 (sha256
15084 (base32
15085 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15086 (build-system python-build-system)
15087 (home-page "https://github.com/hawkowl/incremental")
15088 (synopsis "Library for versioning Python projects")
15089 (description "Incremental is a small library that versions your Python
15090 projects.")
15091 (license license:expat)))
15092
15093 (define-public python2-incremental
15094 (package-with-python2 python-incremental))
15095
15096 (define-public python-invoke
15097 (package
15098 (name "python-invoke")
15099 (home-page "https://www.pyinvoke.org/")
15100 (version "1.4.1")
15101 (source (origin
15102 (method url-fetch)
15103 (uri (pypi-uri "invoke" version))
15104 (sha256
15105 (base32
15106 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15107 (build-system python-build-system)
15108 (arguments
15109 ;; XXX: Requires many dependencies that are not yet in Guix.
15110 `(#:tests? #f))
15111 (synopsis "Pythonic task execution")
15112 (description
15113 "Invoke is a Python task execution tool and library, drawing inspiration
15114 from various sources to arrive at a powerful and clean feature set. It is
15115 evolved from the Fabric project, but focuses on local and abstract concerns
15116 instead of servers and network commands.")
15117 (license license:bsd-3)))
15118
15119 (define-public python2-invoke
15120 (package-with-python2 python-invoke))
15121
15122 (define-public python-automat
15123 (package
15124 (name "python-automat")
15125 (version "20.2.0")
15126 (source (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "Automat" version))
15129 (sha256
15130 (base32
15131 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15132 (build-system python-build-system)
15133 ;; We disable the tests because they require python-twisted, while
15134 ;; python-twisted depends on python-automat. Twisted is optional, but the
15135 ;; tests fail if it is not available. Also see
15136 ;; <https://github.com/glyph/automat/issues/71>.
15137 (arguments '(#:tests? #f))
15138 (native-inputs
15139 `(("python-m2r" ,python-m2r)
15140 ("python-setuptools-scm" ,python-setuptools-scm)
15141 ("python-graphviz" ,python-graphviz)))
15142 (propagated-inputs
15143 `(("python-six" ,python-six)
15144 ("python-attrs" ,python-attrs)))
15145 (home-page "https://github.com/glyph/Automat")
15146 (synopsis "Self-service finite-state machines")
15147 (description "Automat is a library for concise, idiomatic Python
15148 expression of finite-state automata (particularly deterministic finite-state
15149 transducers).")
15150 (license license:expat)))
15151
15152 (define-public python2-automat
15153 (package-with-python2 python-automat))
15154
15155 (define-public python-m2r
15156 (package
15157 (name "python-m2r")
15158 (version "0.2.1")
15159 (source (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "m2r" version))
15162 (sha256
15163 (base32
15164 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15165 (build-system python-build-system)
15166 (propagated-inputs
15167 `(("python-docutils" ,python-docutils)
15168 ("python-mistune" ,python-mistune)))
15169 (native-inputs
15170 `(("python-pygments" ,python-pygments)
15171 ("python-mock" ,python-mock)))
15172 (home-page "https://github.com/miyakogi/m2r")
15173 (synopsis "Markdown to reStructuredText converter")
15174 (description "M2R converts a markdown file including reST markups to valid
15175 reST format.")
15176 (license license:expat)))
15177
15178 (define-public python2-m2r
15179 (package-with-python2 python-m2r))
15180
15181 (define-public python-constantly
15182 (package
15183 (name "python-constantly")
15184 (version "15.1.0")
15185 (source (origin
15186 (method url-fetch)
15187 (uri (pypi-uri "constantly" version))
15188 (sha256
15189 (base32
15190 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15191 (build-system python-build-system)
15192 (home-page "https://github.com/twisted/constantly")
15193 (synopsis "Symbolic constants in Python")
15194 (description "Constantly is a Python library that provides symbolic
15195 constant support. It includes collections and constants with text, numeric,
15196 and bit flag values.")
15197 (license license:expat)))
15198
15199 (define-public python2-constantly
15200 (package-with-python2 python-constantly))
15201
15202 (define-public python-attrs
15203 (package
15204 (name "python-attrs")
15205 (version "19.3.0")
15206 (source (origin
15207 (method url-fetch)
15208 (uri (pypi-uri "attrs" version))
15209 (sha256
15210 (base32
15211 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15212 (build-system python-build-system)
15213 (arguments
15214 `(#:modules ((guix build utils)
15215 (guix build python-build-system)
15216 (ice-9 ftw)
15217 (srfi srfi-1)
15218 (srfi srfi-26))
15219 #:phases (modify-phases %standard-phases
15220 (replace 'check
15221 (lambda _
15222 (let ((cwd (getcwd)))
15223 (setenv "PYTHONPATH"
15224 (string-append
15225 cwd "/build/"
15226 (find (cut string-prefix? "lib" <>)
15227 (scandir (string-append cwd "/build")))
15228 ":"
15229 (getenv "PYTHONPATH")))
15230 (invoke "python" "-m" "pytest")))))))
15231 (native-inputs
15232 `(("python-coverage" ,python-coverage)
15233 ("python-hypothesis" ,python-hypothesis)
15234 ("python-pympler" ,python-pympler)
15235 ("python-pytest" ,python-pytest)
15236 ("python-six" ,python-six)
15237 ("python-sphinx" ,python-sphinx)
15238 ("python-zope-interface" ,python-zope-interface)))
15239 (home-page "https://github.com/python-attrs/attrs/")
15240 (synopsis "Attributes without boilerplate")
15241 (description "@code{attrs} is a Python package with class decorators that
15242 ease the chores of implementing the most common attribute-related object
15243 protocols.")
15244 (license license:expat)))
15245
15246 (define-public python2-attrs
15247 (package-with-python2 python-attrs))
15248
15249 (define-public python-attrs-bootstrap
15250 (package
15251 (inherit python-attrs)
15252 (name "python-attrs-bootstrap")
15253 (native-inputs `())
15254 (arguments `(#:tests? #f))))
15255
15256 (define-public python2-attrs-bootstrap
15257 (package-with-python2 python-attrs-bootstrap))
15258
15259 (define-public python2-cliapp
15260 (package
15261 (name "python2-cliapp")
15262 (version "1.20180812.1")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (string-append
15267 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15268 version ".tar.gz"))
15269 (sha256
15270 (base32
15271 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15272 (build-system python-build-system)
15273 (arguments
15274 `(#:python ,python-2
15275 #:phases
15276 (modify-phases %standard-phases
15277 ;; check phase needs to be run before the build phase. If not,
15278 ;; coverage-test-runner looks for tests for the built source files,
15279 ;; and fails.
15280 (delete 'check)
15281 (add-before 'build 'check
15282 (lambda _
15283 ;; Disable python3 tests
15284 (substitute* "check"
15285 (("python3") "# python3"))
15286 (invoke "./check"))))))
15287 (native-inputs
15288 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15289 ("python2-pep8" ,python2-pep8)))
15290 (propagated-inputs
15291 `(("python2-pyaml" ,python2-pyaml)))
15292 (home-page "https://liw.fi/cliapp/")
15293 (synopsis "Python framework for command line programs")
15294 (description "@code{python2-cliapp} is a python framework for
15295 command line programs. It contains the typical stuff such programs
15296 need to do, such as parsing the command line for options, and
15297 iterating over input files.")
15298 (license license:gpl2+)))
15299
15300 (define-public python2-ttystatus
15301 (package
15302 (name "python2-ttystatus")
15303 (version "0.38")
15304 (source
15305 (origin
15306 (method git-fetch)
15307 (uri (git-reference
15308 (url "http://git.liw.fi/ttystatus")
15309 ;; There are no tags after ttystatus-0.36.
15310 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15311 (sha256
15312 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15313 (file-name (git-file-name name version))))
15314 (build-system python-build-system)
15315 (native-inputs
15316 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15317 ("python2-pep8" ,python2-pep8)))
15318 (arguments
15319 `(#:python ,python-2
15320 #:phases
15321 (modify-phases %standard-phases
15322 ;; check phase needs to be run before the build phase. If not,
15323 ;; coverage-test-runner looks for tests for the built source files,
15324 ;; and fails.
15325 (delete 'check)
15326 (add-before 'build 'check
15327 (lambda _ (invoke "make" "check"))))))
15328 (home-page "https://liw.fi/ttystatus/")
15329 (synopsis "Python library for showing progress reporting and
15330 status updates on terminals")
15331 (description "@code{python2-ttystatus} is a python library for
15332 showing progress reporting and status updates on terminals, for
15333 command line programs. Output is automatically adapted to the width
15334 of the terminal: truncated if it does not fit, and resized if the
15335 terminal size changes.")
15336 (license license:gpl3+)))
15337
15338 (define-public python2-tracing
15339 (package
15340 (name "python2-tracing")
15341 (version "0.10")
15342 (source
15343 (origin
15344 (method url-fetch)
15345 (uri (string-append
15346 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15347 version ".tar.gz"))
15348 (sha256
15349 (base32
15350 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15351 (build-system python-build-system)
15352 (arguments
15353 `(#:python ,python-2))
15354 (home-page "https://liw.fi/tracing/")
15355 (synopsis "Python debug logging helper")
15356 (description "@code{python2-tracing} is a python library for
15357 logging debug messages. It provides a way to turn debugging messages
15358 on and off, based on the filename they occur in. It is much faster
15359 than using @code{logging.Filter} to accomplish the same thing, which
15360 matters when code is run in production mode. The actual logging still
15361 happens using the @code{logging} library.")
15362 (license license:gpl3+)))
15363
15364 (define-public python2-larch
15365 (package
15366 (name "python2-larch")
15367 (version "1.20151025")
15368 (source
15369 (origin
15370 (method url-fetch)
15371 (uri (string-append
15372 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15373 version ".tar.gz"))
15374 (patches (search-patches
15375 "python2-larch-coverage-4.0a6-compatibility.patch"))
15376 (sha256
15377 (base32
15378 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15379 (build-system python-build-system)
15380 (arguments
15381 `(#:python ,python-2
15382 #:phases
15383 (modify-phases %standard-phases
15384 ;; check phase needs to be run before the build phase. If not,
15385 ;; coverage-test-runner looks for tests for the built source files,
15386 ;; and fails.
15387 (delete 'check)
15388 (add-before 'build 'check
15389 (lambda _ (invoke "make" "check"))))))
15390 (native-inputs
15391 `(("cmdtest" ,cmdtest)
15392 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15393 (propagated-inputs
15394 `(("python2-tracing" ,python2-tracing)))
15395 (home-page "https://liw.fi/larch/")
15396 (synopsis "Python copy-on-write B-tree library")
15397 (description "@code{python2-larch} is an implementation of
15398 particular kind of B-tree, based on research by Ohad Rodeh. See
15399 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15400 on the data structure.
15401
15402 The distinctive feature of this B-tree is that a node is never
15403 (conceptually) modified. Instead, all updates are done by
15404 copy-on-write. This makes it easy to clone a tree, and modify only the
15405 clone, while other processes access the original tree.")
15406 (license license:gpl3+)))
15407
15408 (define-public python-astroid
15409 (package
15410 (name "python-astroid")
15411 (version "2.4.2")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "astroid" version))
15416 (sha256
15417 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15418 (modules '((guix build utils)))
15419 (snippet
15420 '(begin
15421 ;; Check to see if the version pinning has been removed.
15422 (substitute* "astroid/__pkginfo__.py"
15423 (("==1\\.4\\.\\*") ">=1.4.0"))
15424 #t))))
15425 (build-system python-build-system)
15426 (propagated-inputs
15427 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15428 ("python-six" ,python-six)
15429 ("python-wrapt" ,python-wrapt)))
15430 (native-inputs
15431 `(("python-dateutil" ,python-dateutil)
15432 ("python-pytest" ,python-pytest)
15433 ("python-pytest-runner" ,python-pytest-runner)))
15434 (home-page "https://github.com/PyCQA/astroid")
15435 (synopsis "Common base representation of python source code for pylint and
15436 other projects")
15437 (description "@code{python-astroid} provides a common base representation
15438 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15439
15440 It provides a compatible representation which comes from the _ast module. It
15441 rebuilds the tree generated by the builtin _ast module by recursively walking
15442 down the AST and building an extended ast. The new node classes have
15443 additional methods and attributes for different usages. They include some
15444 support for static inference and local name scopes. Furthermore, astroid
15445 builds partial trees by inspecting living objects.")
15446 (license license:lgpl2.1+)
15447 (properties `((python2-variant . ,(delay python2-astroid))))))
15448
15449 (define-public python2-astroid
15450 (let ((base (package-with-python2
15451 (strip-python2-variant python-astroid))))
15452 (package (inherit base)
15453 ;; Version 2.x removes python2 support.
15454 (version "1.6.5")
15455 (source
15456 (origin
15457 (method url-fetch)
15458 (uri (pypi-uri "astroid" version))
15459 (sha256
15460 (base32
15461 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15462 (arguments
15463 (substitute-keyword-arguments (package-arguments base)
15464 ((#:phases phases)
15465 `(modify-phases ,phases
15466 (add-after 'unpack 'remove-spurious-test
15467 (lambda _
15468 ;; https://github.com/PyCQA/astroid/issues/276
15469 (delete-file "astroid/tests/unittest_brain.py")
15470 #t))
15471 (replace 'check
15472 (lambda _
15473 (invoke"python" "-m" "unittest" "discover"
15474 "-p" "unittest*.py")))))))
15475 (native-inputs `())
15476 (propagated-inputs
15477 `(("python2-backports-functools-lru-cache"
15478 ,python2-backports-functools-lru-cache)
15479 ("python2-enum34" ,python2-enum34)
15480 ("python2-singledispatch" ,python2-singledispatch)
15481 ,@(alist-delete "python-typed-ast"
15482 (package-propagated-inputs base)))))))
15483
15484 (define-public python-isbnlib
15485 (package
15486 (name "python-isbnlib")
15487 (version "3.10.4")
15488 (source
15489 (origin
15490 (method url-fetch)
15491 (uri (pypi-uri "isbnlib" version))
15492 (sha256
15493 (base32
15494 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15495 (build-system python-build-system)
15496 (arguments '(#:tests? #f)) ; No test
15497 (home-page "https://github.com/xlcnd/isbnlib")
15498 (synopsis "Python library to work with ISBN strings")
15499 (description "@code{python-isbnlib} is a (pure) python library that provides
15500 several useful methods and functions to validate, clean, transform, hyphenate and
15501 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15502 version, is suitable to be include as a dependency in other projects.")
15503 (license license:lgpl3+)))
15504
15505 (define-public python-isort
15506 (package
15507 (name "python-isort")
15508 (version "4.3.4")
15509 (source
15510 (origin
15511 (method git-fetch)
15512 (uri (git-reference
15513 ;; Tests pass only from the Github sources
15514 (url "https://github.com/timothycrosley/isort")
15515 (commit version)))
15516 (file-name (git-file-name name version))
15517 (sha256
15518 (base32
15519 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15520 (build-system python-build-system)
15521 (native-inputs
15522 `(("python-mock" ,python-mock)
15523 ("python-pytest" ,python-pytest)))
15524 (home-page "https://github.com/timothycrosley/isort")
15525 (synopsis "Python utility/library to sort python imports")
15526 (description "@code{python-isort} is a python utility/library to sort
15527 imports alphabetically, and automatically separated into sections. It
15528 provides a command line utility, a python library and plugins for various
15529 editors.")
15530 (license license:expat)
15531 (properties `((python2-variant . ,(delay python2-isort))))))
15532
15533 (define-public python2-isort
15534 (let ((base (package-with-python2
15535 (strip-python2-variant python-isort))))
15536 (package (inherit base)
15537 (native-inputs
15538 `(("python2-futures" ,python2-futures)
15539 ,@(package-native-inputs base))))))
15540
15541 (define-public python2-backports-functools-lru-cache
15542 (package
15543 (name "python2-backports-functools-lru-cache")
15544 (version "1.6.1")
15545 (source
15546 (origin
15547 (method url-fetch)
15548 ;; only the pypi tarballs contain the necessary metadata
15549 (uri (pypi-uri "backports.functools_lru_cache" version))
15550 (sha256
15551 (base32
15552 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15553 (build-system python-build-system)
15554 (native-inputs
15555 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15556 (arguments
15557 `(#:python ,python-2))
15558 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15559 (synopsis "Backport of functools.lru_cache from Python 3.3")
15560 (description "@code{python2-backports-functools-lru-cache} is a backport
15561 of @code{functools.lru_cache} from python 3.3.")
15562 (license license:expat)))
15563
15564 (define-public python-configparser
15565 (package
15566 (name "python-configparser")
15567 (version "4.0.2")
15568 (source
15569 (origin
15570 (method url-fetch)
15571 (uri (pypi-uri "configparser" version))
15572 (sha256
15573 (base32
15574 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15575 (native-inputs
15576 `(("python-setuptools_scm" ,python-setuptools-scm)))
15577 (build-system python-build-system)
15578 (home-page "https://github.com/jaraco/configparser/")
15579 (synopsis "Backport of configparser from python 3.5")
15580 (description "@code{python-configparser} is a backport of
15581 @code{configparser} from Python 3.5 so that it can be used directly
15582 in other versions.")
15583 (license license:expat)))
15584
15585 (define-public python2-configparser
15586 (package-with-python2 python-configparser))
15587
15588 (define-public python-iniconfig
15589 (package
15590 (name "python-iniconfig")
15591 (version "1.1.1")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "iniconfig" version))
15596 (sha256
15597 (base32
15598 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15599 (build-system python-build-system)
15600 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15601 (synopsis "Simple INI-file parser")
15602 (description "The @code{iniconfig} package provides a small and simple
15603 INI-file parser module having a unique set of features; @code{iniconfig}
15604 @itemize
15605 @item maintains the order of sections and entries;
15606 @item supports multi-line values with or without line-continuations;
15607 @item supports \"#\" comments everywhere;
15608 @item raises errors with proper line-numbers;
15609 @item raises an error when two sections have the same name.
15610 @end itemize")
15611 (license license:expat)))
15612
15613 (define-public python-mamba
15614 (package
15615 (name "python-mamba")
15616 (version "0.11.2")
15617 (source (origin
15618 (method url-fetch)
15619 (uri (pypi-uri "mamba" version))
15620 (sha256
15621 (base32
15622 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15623 (build-system python-build-system)
15624 (arguments `(#:tests? #f)) ; No test
15625 (propagated-inputs
15626 `(("python-clint" ,python-clint)
15627 ("python-coverage" ,python-coverage)))
15628 (home-page "https://nestorsalceda.com/mamba/")
15629 (synopsis "Test runner for Python")
15630 (description
15631 "Mamba is a Behaviour-Driven Development tool for Python developers.
15632 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15633 (license license:expat)))
15634
15635 (define-public python-mando
15636 (package
15637 (name "python-mando")
15638 (version "0.6.4")
15639 (source (origin
15640 (method url-fetch)
15641 (uri (pypi-uri "mando" version))
15642 (sha256
15643 (base32
15644 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15645 (build-system python-build-system)
15646 (propagated-inputs
15647 `(("python-rst2ansi" ,python-rst2ansi)
15648 ("python-six" ,python-six)))
15649 (native-inputs
15650 `(("python-pytest" ,python-pytest)))
15651 (home-page "https://mando.readthedocs.org/")
15652 (synopsis
15653 "Wrapper around argparse, allowing creation of complete CLI applications")
15654 (description
15655 "This package is a wrapper around argparse, allowing you to write complete CLI
15656 applications in seconds while maintaining all the flexibility.")
15657 (license license:expat)))
15658
15659 (define-public python2-mando
15660 (package-with-python2 python-mando))
15661
15662 (define-public python2-argparse
15663 (package
15664 (name "python2-argparse")
15665 (version "1.4.0")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "argparse" version))
15670 (sha256
15671 (base32
15672 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15673 (build-system python-build-system)
15674 (arguments
15675 `(#:python ,python-2))
15676 (home-page "https://github.com/ThomasWaldmann/argparse/")
15677 (synopsis "Python command-line parsing library")
15678 (description
15679 "This package is mostly for people who want to have @code{argparse} on
15680 older Pythons because it was not part of the standard library back then.")
15681 (license license:psfl)))
15682
15683 (define-public python-fudge
15684 (package
15685 (name "python-fudge")
15686 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15687 ;; package, which is currently the only use of this package.
15688 (version "0.9.6")
15689 (source
15690 (origin
15691 (method url-fetch)
15692 (uri (pypi-uri "fudge" version))
15693 (sha256
15694 (base32
15695 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15696 (build-system python-build-system)
15697 (arguments
15698 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15699 (home-page "https://github.com/fudge-py/fudge")
15700 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15701 (description
15702 "Fudge is a Python module for using fake objects (mocks and stubs) to
15703 test real ones.
15704
15705 In readable Python code, you declare the methods available on your fake object
15706 and how they should be called. Then you inject that into your application and
15707 start testing. This declarative approach means you don’t have to record and
15708 playback actions and you don’t have to inspect your fakes after running code.
15709 If the fake object was used incorrectly then you’ll see an informative
15710 exception message with a traceback that points to the culprit.")
15711 (license license:expat)))
15712
15713 (define-public python2-fudge
15714 (package-with-python2 python-fudge))
15715
15716 (define-public python-mwclient
15717 (package
15718 (name "python-mwclient")
15719 (version "0.10.1")
15720 (source
15721 (origin
15722 (method git-fetch)
15723 ;; The PyPI version wouldn't contain tests.
15724 (uri (git-reference
15725 (url "https://github.com/mwclient/mwclient")
15726 (commit (string-append "v" version))))
15727 (file-name (git-file-name name version))
15728 (sha256
15729 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15730 (build-system python-build-system)
15731 (propagated-inputs
15732 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15733 ("python-six" ,python-six)))
15734 (native-inputs
15735 `(("python-mock" ,python-mock)
15736 ("python-pytest" ,python-pytest)
15737 ("python-pytest-cov" ,python-pytest-cov)
15738 ("python-pytest-runner" ,python-pytest-runner)
15739 ("python-responses" ,python-responses)))
15740 (home-page "https://github.com/btongminh/mwclient")
15741 (synopsis "MediaWiki API client")
15742 (description "This package provides a MediaWiki API client.")
15743 (license license:expat)))
15744
15745 (define-public python2-mwclient
15746 (package-with-python2 python-mwclient))
15747
15748 (define-public python-utils
15749 (package
15750 (name "python-utils")
15751 (version "2.4.0")
15752 (source (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "python-utils" version))
15755 (sha256
15756 (base32
15757 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15758 (build-system python-build-system)
15759 (arguments
15760 `(#:phases
15761 (modify-phases %standard-phases
15762 (replace 'check
15763 (lambda* (#:key inputs outputs #:allow-other-keys)
15764 (add-installed-pythonpath inputs outputs)
15765 (delete-file "pytest.ini")
15766 (invoke "pytest" "-vv"))))))
15767 (native-inputs
15768 `(("pytest-runner" ,python-pytest-runner)
15769 ("pytest" ,python-pytest)
15770 ("six" ,python-six)))
15771 (home-page "https://github.com/WoLpH/python-utils")
15772 (synopsis "Convenient utilities not included with the standard Python install")
15773 (description
15774 "Python Utils is a collection of small Python functions and classes which
15775 make common patterns shorter and easier.")
15776 (license license:bsd-2)))
15777
15778 (define-public python2-utils
15779 (package-with-python2 python-utils))
15780
15781 (define-public python-diff-match-patch
15782 (package
15783 (name "python-diff-match-patch")
15784 (version "20121119")
15785 (source
15786 (origin
15787 (method url-fetch)
15788 (uri (pypi-uri "diff-match-patch" version))
15789 (sha256
15790 (base32
15791 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15792 (build-system python-build-system)
15793 (home-page "https://code.google.com/p/google-diff-match-patch")
15794 (synopsis "Synchronize plain text")
15795 (description "Diff Match and Patch libraries offer robust algorithms to
15796 perform the operations required for synchronizing plain text.")
15797 (license license:asl2.0)))
15798
15799 (define-public python2-diff-match-patch
15800 (package-with-python2 python-diff-match-patch))
15801
15802 (define-public python-dirsync
15803 (package
15804 (name "python-dirsync")
15805 (version "2.2.5")
15806 (source
15807 (origin
15808 (method url-fetch)
15809 (uri (pypi-uri "dirsync" version))
15810 (sha256
15811 (base32
15812 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15813 (build-system python-build-system)
15814 (propagated-inputs
15815 `(("six" ,python-six)))
15816 (home-page "https://github.com/tkhyn/dirsync")
15817 (synopsis "Advanced directory tree synchronisation tool")
15818 (description "Advanced directory tree synchronisation tool.")
15819 (license license:expat)))
15820
15821 (define-public python2-dirsync
15822 (package-with-python2 python-dirsync))
15823
15824 (define-public python-levenshtein
15825 (package
15826 (name "python-levenshtein")
15827 (version "0.12.0")
15828 (source
15829 (origin
15830 (method url-fetch)
15831 (uri (pypi-uri "python-Levenshtein" version))
15832 (sha256
15833 (base32
15834 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15835 (build-system python-build-system)
15836 (home-page "https://github.com/ztane/python-Levenshtein")
15837 (synopsis "Fast computation of Levenshtein distance and string similarity")
15838 (description
15839 "The Levenshtein Python C extension module contains functions for fast computation of
15840 @enumerate
15841 @item Levenshtein (edit) distance, and edit operations
15842 @item string similarity
15843 @item approximate median strings, and generally string averaging
15844 @item string sequence and set similarity
15845 @end enumerate
15846 It supports both normal and Unicode strings.")
15847 (license license:gpl2+)))
15848
15849 (define-public python2-levenshtein
15850 (package-with-python2 python-levenshtein))
15851
15852 (define-public python-scandir
15853 (package
15854 (name "python-scandir")
15855 (version "1.10.0")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "scandir" version))
15860 (sha256
15861 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15862 (build-system python-build-system)
15863 (arguments
15864 `(#:phases (modify-phases %standard-phases
15865 (replace 'check
15866 (lambda _
15867 (invoke "python" "test/run_tests.py"))))))
15868 (home-page "https://github.com/benhoyt/scandir")
15869 (synopsis "Directory iteration function")
15870 (description
15871 "Directory iteration function like os.listdir(), except that instead of
15872 returning a list of bare filenames, it yields DirEntry objects that include
15873 file type and stat information along with the name. Using scandir() increases
15874 the speed of os.walk() by 2-20 times (depending on the platform and file
15875 system) by avoiding unnecessary calls to os.stat() in most cases.
15876
15877 This package is part of the Python standard library since version 3.5.")
15878 (license license:bsd-3)))
15879
15880 (define-public python2-scandir
15881 (package-with-python2 python-scandir))
15882
15883 (define-public python2-stemming
15884 (package
15885 (name "python2-stemming")
15886 (version "1.0.1")
15887 (source
15888 (origin
15889 (method url-fetch)
15890 (uri (pypi-uri "stemming" version))
15891 (sha256
15892 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15893 (build-system python-build-system)
15894 (arguments
15895 `(#:python ,python-2))
15896 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15897 (synopsis "Python implementations of various stemming algorithms")
15898 (description
15899 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15900 stemming algorithms for English. These implementations are straightforward and
15901 efficient, unlike some Python versions of the same algorithms available on the
15902 Web. This package is an extraction of the stemming code included in the Whoosh
15903 search engine.")
15904 (license license:public-domain)))
15905
15906 (define-public python-factory-boy
15907 (package
15908 (name "python-factory-boy")
15909 (version "2.8.1")
15910 (source
15911 (origin
15912 (method url-fetch)
15913 (uri (pypi-uri "factory_boy" version))
15914 (sha256
15915 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15916 (build-system python-build-system)
15917 (arguments
15918 ;; Tests are not included in the tarball.
15919 `(#:tests? #f))
15920 (propagated-inputs
15921 `(("faker" ,python-faker)))
15922 (home-page "https://github.com/benhoyt/scandir")
15923 (synopsis "Versatile test fixtures replacement")
15924 (description
15925 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15926
15927 As a fixtures replacement tool, it aims to replace static, hard to maintain
15928 fixtures with easy-to-use factories for complex object.
15929
15930 Instead of building an exhaustive test setup with every possible combination
15931 of corner cases, factory_boy allows you to use objects customized for the
15932 current test, while only declaring the test-specific fields")
15933 (license license:expat)))
15934
15935 (define-public python2-factory-boy
15936 (package-with-python2 python-factory-boy))
15937
15938 (define-public python-translate-toolkit
15939 (package
15940 (name "python-translate-toolkit")
15941 (version "2.1.0")
15942 (source
15943 (origin
15944 (method url-fetch)
15945 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15946 (sha256
15947 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15948 (build-system python-build-system)
15949 (native-inputs
15950 `(("python-pytest" ,python-pytest)
15951 ("python-sphinx" ,python-sphinx)))
15952 (propagated-inputs
15953 `(("python-babel" ,python-babel)
15954 ("python-beautifulsoup4" ,python-beautifulsoup4)
15955 ("python-chardet" ,python-chardet)
15956 ("python-diff-match-patch" ,python-diff-match-patch)
15957 ("python-levenshtein" ,python-levenshtein)
15958 ("python-lxml" ,python-lxml)
15959 ("python-six" ,python-six)
15960 ("python-vobject" ,python-vobject)
15961 ("python-pyyaml" ,python-pyyaml)))
15962 (arguments
15963 ;; TODO: tests are not run, because they end with
15964 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15965 ;; 'parse_funcs'
15966 ;; during test setup.
15967 `(#:tests? #f))
15968 (home-page "https://toolkit.translatehouse.org")
15969 (synopsis "Tools and API for translation and localization engineering")
15970 (description
15971 "Tools and API for translation and localization engineering. It contains
15972 several utilities, as well as an API for building localization tools.")
15973 (license license:gpl2+)))
15974
15975 (define-public python2-translate-toolkit
15976 (package-with-python2 python-translate-toolkit))
15977
15978 (define-public python-packaging
15979 (package
15980 (name "python-packaging")
15981 (version "20.0")
15982 (source
15983 (origin
15984 (method url-fetch)
15985 (uri (pypi-uri "packaging" version))
15986 ;; XXX: The URL in the patch file is wrong, it should be
15987 ;; <https://github.com/pypa/packaging/pull/256>.
15988 (patches (search-patches "python-packaging-test-arch.patch"))
15989 (sha256
15990 (base32
15991 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15992 (build-system python-build-system)
15993 (arguments
15994 `(#:phases (modify-phases %standard-phases
15995 (replace 'check
15996 (lambda* (#:key tests? #:allow-other-keys)
15997 (if tests?
15998 (invoke "py.test" "-vv")
15999 (format #t "test suite not run~%"))
16000 #t)))))
16001 (native-inputs
16002 `(("python-pretend" ,python-pretend)
16003 ("python-pytest" ,python-pytest)))
16004 (propagated-inputs
16005 `(("python-pyparsing" ,python-pyparsing)
16006 ("python-six" ,python-six)))
16007 (home-page "https://github.com/pypa/packaging")
16008 (synopsis "Core utilities for Python packages")
16009 (description "Packaging is a Python module for dealing with Python packages.
16010 It offers an interface for working with package versions, names, and dependency
16011 information.")
16012 ;; From 'LICENSE': This software is made available under the terms of
16013 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16014 ;; Contributions to this software is made under the terms of *both* these
16015 ;; licenses.
16016 (license (list license:asl2.0 license:bsd-2))))
16017
16018 (define-public python2-packaging
16019 (package-with-python2 python-packaging))
16020
16021 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16022 (define-public python-packaging-bootstrap
16023 (hidden-package
16024 (package/inherit
16025 python-packaging
16026 (name "python-packaging-bootstrap")
16027 (native-inputs '())
16028 (propagated-inputs
16029 `(("python-pyparsing" ,python-pyparsing)))
16030 (arguments '(#:tests? #f)))))
16031
16032 (define-public python2-packaging-bootstrap
16033 (hidden-package
16034 (package/inherit
16035 python2-packaging
16036 (name "python2-packaging-bootstrap")
16037 (native-inputs '())
16038 (propagated-inputs
16039 `(("python-pyparsing" ,python2-pyparsing)))
16040 (arguments
16041 `(#:tests? #f
16042 ,@(package-arguments python2-packaging))))))
16043
16044 (define-public python-relatorio
16045 (package
16046 (name "python-relatorio")
16047 (version "0.8.0")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "relatorio" version))
16052 (sha256
16053 (base32
16054 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16055 (build-system python-build-system)
16056 (propagated-inputs
16057 `(("python-lxml" ,python-lxml)
16058 ("python-genshi" ,python-genshi)))
16059 (native-inputs
16060 `(("python-magic" ,python-magic)))
16061 (home-page "https://relatorio.tryton.org/")
16062 (synopsis "Templating library able to output ODT and PDF files")
16063 (description "Relatorio is a templating library which provides a way to
16064 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16065 for more filetypes can be easily added by creating plugins for them.")
16066 (license license:gpl3+)))
16067
16068 (define-public python2-relatorio
16069 (package-with-python2 python-relatorio))
16070
16071 (define-public python-radon
16072 (package
16073 (name "python-radon")
16074 (version "4.1.0")
16075 (source
16076 (origin
16077 (method url-fetch)
16078 (uri (pypi-uri "radon" version))
16079 (sha256
16080 (base32
16081 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16082 (build-system python-build-system)
16083 (arguments
16084 `(#:phases (modify-phases %standard-phases
16085 (replace 'check
16086 (lambda _
16087 (invoke "python" "radon/tests/run.py"))))))
16088 (propagated-inputs
16089 `(("python-colorama" ,python-colorama)
16090 ("python-flake8-polyfill" ,python-flake8-polyfill)
16091 ("python-mando" ,python-mando)))
16092 (native-inputs
16093 `(("python-pytest" ,python-pytest)
16094 ("python-pytest-mock" ,python-pytest-mock)))
16095 (home-page "https://radon.readthedocs.org/")
16096 (synopsis "Code Metrics in Python")
16097 (description "Radon is a Python tool which computes various code metrics.
16098 Supported metrics are:
16099 @itemize @bullet
16100 @item raw metrics: SLOC, comment lines, blank lines, &c.
16101 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16102 @item Halstead metrics (all of them)
16103 @item the Maintainability Index (a Visual Studio metric)
16104 @end itemize")
16105 (properties `((python2-variant . ,(delay python2-radon))))
16106 (license license:expat)))
16107
16108 (define-public python2-radon
16109 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16110 (package
16111 (inherit base)
16112 (propagated-inputs
16113 `(("python-configparser" ,python2-configparser)
16114 ("python-future" ,python2-future)
16115 ,@(package-propagated-inputs base))))))
16116
16117 (define-public python-sure
16118 (package
16119 (name "python-sure")
16120 (version "1.4.11")
16121 (source
16122 (origin
16123 (method url-fetch)
16124 (uri (pypi-uri "sure" version))
16125 (sha256
16126 (base32
16127 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16128 (build-system python-build-system)
16129 (propagated-inputs
16130 `(("python-mock" ,python-mock)
16131 ("python-six" ,python-six)))
16132 (native-inputs
16133 `(("python-nose" ,python-nose)))
16134 (home-page "https://github.com/gabrielfalcao/sure")
16135 (synopsis "Automated testing library in python for python")
16136 (description
16137 "Sure is a python library that leverages a DSL for writing assertions.
16138 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16139 (license license:gpl3+)))
16140
16141 (define-public python2-sure
16142 (package-with-python2 python-sure))
16143
16144 (define-public python2-couleur
16145 ;; This package does not seem to support python3 at all, hence,
16146 ;; only the python2 variant definition is provided.
16147 (package
16148 (name "python2-couleur")
16149 (version "0.6.2")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 (uri (pypi-uri "couleur" version))
16154 (sha256
16155 (base32
16156 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16157 (build-system python-build-system)
16158 (arguments
16159 `(#:python ,python-2))
16160 (home-page "https://github.com/gabrielfalcao/couleur")
16161 (synopsis
16162 "ANSI terminal tool for python, colored shell and other handy fancy features")
16163 (description
16164 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16165 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16166 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16167 ;; https://github.com/gabrielfalcao/couleur/issues/11
16168 (license license:lgpl3+)))
16169
16170 (define-public python-misaka
16171 (package
16172 (name "python-misaka")
16173 (version "2.1.1")
16174 (source
16175 (origin
16176 (method url-fetch)
16177 (uri (pypi-uri "misaka" version))
16178 (sha256
16179 (base32
16180 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16181 (build-system python-build-system)
16182 (arguments
16183 `(;; Line 37 of setup.py calls self.run_command('develop')
16184 ;; in the 'check' phase. This command seems to be trying
16185 ;; to write to
16186 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16187 ;; for which it does not have the permission to write.
16188 #:tests? #f))
16189 (propagated-inputs
16190 `(("python-cffi" ,python-cffi)))
16191 (home-page "https://github.com/FSX/misaka")
16192 (synopsis "Python binding for Hoedown")
16193 (description
16194 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16195 library written in C. It features a fast HTML renderer and functionality to make custom
16196 renderers (e.g. man pages or LaTeX).")
16197 (license license:expat)))
16198
16199 (define-public python2-misaka
16200 (package-with-python2 python-misaka))
16201
16202 (define-public python2-steadymark
16203 ;; This is forced into being a python2 only variant
16204 ;; due to its dependence on couleur that has no support
16205 ;; for python3
16206 (package
16207 (name "python2-steadymark")
16208 (version "0.7.3")
16209 (source
16210 (origin
16211 (method url-fetch)
16212 (uri (pypi-uri "steadymark" version))
16213 (sha256
16214 (base32
16215 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16216 (build-system python-build-system)
16217 (native-inputs
16218 `(("python-couleur" ,python2-couleur)
16219 ("python-sure" ,python2-sure)
16220 ("python-misaka" ,python2-misaka)))
16221 (arguments
16222 `(#:python ,python-2
16223 #:phases
16224 (modify-phases %standard-phases
16225 (add-before 'build 'patch-setup-py
16226 (lambda _
16227 ;; Update requirements from dependency==version
16228 ;; to dependency>=version
16229 (substitute* "setup.py"
16230 (("==") ">="))
16231 #t)))))
16232 (home-page "https://github.com/gabrielfalcao/steadymark")
16233 (synopsis "Markdown-based test runner for python")
16234 (description
16235 "@code{Steadymark} allows documentation to be written in github-flavoured
16236 markdown. The documentation may contain snippets of code surrounded by python
16237 code blocks and @code{Steadymark} will find these snippets and run them, making
16238 sure that there are no old malfunctional examples in the documentation examples.")
16239 (license license:expat)))
16240
16241 (define-public python-jsonpointer
16242 (package
16243 (name "python-jsonpointer")
16244 (version "1.10")
16245 (source
16246 (origin
16247 (method url-fetch)
16248 (uri (pypi-uri "jsonpointer" version))
16249 (sha256
16250 (base32
16251 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16252 (build-system python-build-system)
16253 (home-page "https://github.com/stefankoegl/python-json-pointer")
16254 (synopsis "Identify specific nodes in a JSON document")
16255 (description "@code{jsonpointer} allows you to access specific nodes
16256 by path in a JSON document (see RFC 6901).")
16257 (license license:bsd-3)))
16258
16259 (define-public python2-jsonpointer
16260 (package-with-python2 python-jsonpointer))
16261
16262 (define-public python-jsonpatch
16263 (package
16264 (name "python-jsonpatch")
16265 (version "1.16")
16266 (source
16267 (origin
16268 (method git-fetch)
16269 ;; pypi version lacks tests.js
16270 (uri (git-reference
16271 (url "https://github.com/stefankoegl/python-json-patch")
16272 (commit (string-append "v" version))))
16273 (file-name (git-file-name name version))
16274 (sha256
16275 (base32
16276 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16277 (build-system python-build-system)
16278 (propagated-inputs
16279 `(("python-jsonpointer" ,python-jsonpointer)))
16280 (home-page "https://github.com/stefankoegl/python-json-patch")
16281 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16282 (description "@code{jsonpatch} is a library and program that allows
16283 applying JSON Patches according to RFC 6902.")
16284 (license license:bsd-3)))
16285
16286 (define-public python2-jsonpatch
16287 (package-with-python2 python-jsonpatch))
16288
16289 (define-public python-jsonpatch-0.4
16290 (package (inherit python-jsonpatch)
16291 (name "python-jsonpatch")
16292 (version "0.4")
16293 (source
16294 (origin
16295 (method git-fetch)
16296 (uri (git-reference
16297 (url "https://github.com/stefankoegl/python-json-patch")
16298 (commit (string-append "v" version))))
16299 (file-name (git-file-name name version))
16300 (sha256
16301 (base32
16302 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16303
16304 (define-public python2-jsonpatch-0.4
16305 (package-with-python2 python-jsonpatch-0.4))
16306
16307 (define-public python-rfc3986
16308 (package
16309 (name "python-rfc3986")
16310 (version "1.4.0")
16311 (source (origin
16312 (method url-fetch)
16313 (uri (pypi-uri "rfc3986" version))
16314 (sha256
16315 (base32
16316 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16317 (build-system python-build-system)
16318 (arguments
16319 `(#:modules ((guix build utils)
16320 (guix build python-build-system)
16321 (ice-9 ftw)
16322 (srfi srfi-1)
16323 (srfi srfi-26))
16324 #:phases
16325 (modify-phases %standard-phases
16326 (replace 'check
16327 (lambda _
16328 (let ((cwd (getcwd)))
16329 (setenv "PYTHONPATH"
16330 (string-append cwd "/build/"
16331 (find (cut string-prefix? "lib" <>)
16332 (scandir (string-append cwd "/build")))
16333 ":"
16334 (getenv "PYTHONPATH")))
16335 (invoke "pytest" "-v")))))))
16336 (native-inputs
16337 `(("python-pytest" ,python-pytest)))
16338 (home-page "https://rfc3986.readthedocs.io/")
16339 (synopsis "Parse and validate URI references")
16340 (description
16341 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16342 validation and authority parsing. This module also supports RFC@tie{}6874
16343 which adds support for zone identifiers to IPv6 addresses.")
16344 (license license:asl2.0)))
16345
16346 (define-public python2-rfc3986
16347 (package-with-python2 python-rfc3986))
16348
16349 (define-public python-rfc3987
16350 (package
16351 (name "python-rfc3987")
16352 (version "1.3.7")
16353 (source
16354 (origin
16355 (method url-fetch)
16356 (uri (pypi-uri "rfc3987" version))
16357 (sha256
16358 (base32
16359 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16360 (build-system python-build-system)
16361 (home-page "https://pypi.org/project/rfc3987/")
16362 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16363 (description "@code{rfc3987} provides routines for parsing and
16364 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16365 (license license:gpl3+)))
16366
16367 (define-public python2-rfc3987
16368 (package-with-python2 python-rfc3987))
16369
16370 ;; The latest commit contains fixes for building with both python3 and python2.
16371 (define-public python-rfc6555
16372 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16373 (revision "1"))
16374 (package
16375 (name "python-rfc6555")
16376 (version (git-version "0.0.0" revision commit))
16377 (source (origin
16378 (method git-fetch)
16379 (uri (git-reference
16380 (url "https://github.com/sethmlarson/rfc6555")
16381 (commit commit)))
16382 (file-name (git-file-name name version))
16383 (sha256
16384 (base32
16385 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16386 (build-system python-build-system)
16387 (arguments
16388 '(#:phases
16389 (modify-phases %standard-phases
16390 (replace 'check
16391 (lambda* (#:key tests? #:allow-other-keys)
16392 (if tests?
16393 ;; Other tests require network access.
16394 (invoke "pytest" "tests/test_ipv6.py")
16395 #t))))))
16396 (native-inputs
16397 `(("python-pytest" ,python-pytest)))
16398 (home-page "https://pypi.org/project/rfc6555/")
16399 (synopsis "Python implementation of RFC 6555")
16400 (description
16401 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16402 6555. Provided with a single file and dead-simple API to allow easy vendoring
16403 and integration into other projects.")
16404 (properties `((python2-variant . ,(delay python2-rfc6555))))
16405 (license license:asl2.0))))
16406
16407 (define-public python2-rfc6555
16408 (let ((base (package-with-python2
16409 (strip-python2-variant python-rfc6555))))
16410 (package
16411 (inherit base)
16412 (propagated-inputs
16413 `(("python2-selectors2" ,python2-selectors2))))))
16414
16415 (define-public python-bagit
16416 (package
16417 (name "python-bagit")
16418 (version "1.7.0")
16419 (source
16420 (origin
16421 (method url-fetch)
16422 (uri (pypi-uri "bagit" version))
16423 (sha256
16424 (base32
16425 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16426 (build-system python-build-system)
16427 (native-inputs
16428 `(("python-setuptools-scm" ,python-setuptools-scm)
16429 ("python-coverage" ,python-coverage)
16430 ("python-mock" ,python-mock)))
16431 (home-page "https://libraryofcongress.github.io/bagit-python/")
16432 (synopsis "Create and validate BagIt packages")
16433 (description "Bagit is a Python library and command line utility for working
16434 with BagIt style packages. BagIt is a minimalist packaging format for digital
16435 preservation.")
16436 (license license:cc0)))
16437
16438 (define-public python-prov
16439 (package
16440 (name "python-prov")
16441 (version "2.0.0")
16442 (source
16443 (origin
16444 (method url-fetch)
16445 (uri (pypi-uri "prov" version))
16446 (sha256
16447 (base32
16448 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16449 (build-system python-build-system)
16450 (propagated-inputs
16451 `(("python-dateutil" ,python-dateutil)
16452 ("python-lxml" ,python-lxml)
16453 ("python-networkx" ,python-networkx)
16454 ("python-rdflib" ,python-rdflib)))
16455 (native-inputs
16456 `(("graphviz" ,graphviz)
16457 ("python-pydot" ,python-pydot)))
16458 (home-page "https://github.com/trungdong/prov")
16459 (synopsis
16460 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16461 (description
16462 "This package provides a library for W3C Provenance Data Model supporting
16463 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16464 (license license:expat)))
16465
16466 (define-public python-arcp
16467 (package
16468 (name "python-arcp")
16469 (version "0.2.1")
16470 (source
16471 (origin
16472 (method url-fetch)
16473 (uri (pypi-uri "arcp" version))
16474 (sha256
16475 (base32
16476 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16477 (build-system python-build-system)
16478 (native-inputs
16479 `(("python-pytest" ,python-pytest)))
16480 (home-page "http://arcp.readthedocs.io/")
16481 (synopsis
16482 "Archive and Package URI parser and generator")
16483 (description
16484 "@acronym{arcp, Archive and Package} provides functions for creating
16485 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16486 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16487 consume or reference hypermedia resources bundled inside a file archive or an
16488 application package, as well as to resolve URIs for archive resources within a
16489 programmatic framework. This URI scheme provides mechanisms to generate a
16490 unique base URI to represent the root of the archive, so that relative URI
16491 references in a bundled resource can be resolved within the archive without
16492 having to extract the archive content on the local file system. An arcp URI can
16493 be used for purposes of isolation (e.g. when consuming multiple archives),
16494 security constraints (avoiding \"climb out\" from the archive), or for
16495 externally identiyfing sub-resources referenced by hypermedia formats.")
16496 (license license:asl2.0)))
16497
16498 (define-public python-shellescape
16499 (package
16500 (name "python-shellescape")
16501 (version "3.8.1")
16502 (source
16503 (origin
16504 (method git-fetch)
16505 (uri (git-reference
16506 (url "https://github.com/chrissimpkins/shellescape")
16507 (commit (string-append "v" version))))
16508 (file-name (git-file-name name version))
16509 (sha256
16510 (base32
16511 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16512 (build-system python-build-system)
16513 (arguments
16514 '(#:phases
16515 (modify-phases %standard-phases
16516 (replace 'check
16517 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16518 (when tests?
16519 (add-installed-pythonpath inputs outputs)
16520 (invoke "python" "tests/test_shellescape.py"))
16521 #t)))))
16522 (native-inputs
16523 `(("python-pytest" ,python-pytest)))
16524 (home-page "https://github.com/chrissimpkins/shellescape")
16525 (synopsis
16526 "Shell escape a string to safely use it as a token in a shell command")
16527 (description
16528 "The shellescape Python module defines the @code{shellescape.quote()}
16529 function that returns a shell-escaped version of a Python string. This is a
16530 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16531 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16532 (license license:expat)))
16533
16534 (define-public python-validators
16535 (package
16536 (name "python-validators")
16537 (version "0.14.2")
16538 (source (origin
16539 (method url-fetch)
16540 (uri (pypi-uri "validators" version))
16541 (sha256
16542 (base32
16543 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16544 (build-system python-build-system)
16545 (arguments
16546 '(#:phases (modify-phases %standard-phases
16547 (replace 'check
16548 (lambda _
16549 (invoke "pytest" "-vv"))))))
16550 (propagated-inputs
16551 `(("python-decorator" ,python-decorator)
16552 ("python-six" ,python-six)))
16553 (native-inputs
16554 `(("python-flake8" ,python-flake8)
16555 ("python-isort" ,python-isort)
16556 ("python-pytest" ,python-pytest)))
16557 (home-page "https://github.com/kvesteri/validators")
16558 (synopsis "Data validation library")
16559 (description
16560 "This package contains validators for different things such as email
16561 addresses, IP addresses, URLs, hashes and more. It has been designed to
16562 be easy to use and not require defining a schema or form just to validate
16563 some input.")
16564 (license license:expat)))
16565
16566 (define-public python2-validators
16567 (package-with-python2 python-validators))
16568
16569 (define-public python-validate-email
16570 (package
16571 (name "python-validate-email")
16572 (version "1.3")
16573 (source
16574 (origin
16575 (method url-fetch)
16576 (uri (pypi-uri "validate_email" version))
16577 (sha256
16578 (base32
16579 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16580 (build-system python-build-system)
16581 (home-page "https://github.com/syrusakbary/validate_email")
16582 (synopsis "Verifies if an email address is valid and really exists")
16583 (description "@code{validate_email} can be used to verify if an email
16584 address is valid and really exists.")
16585 (license license:lgpl3+)))
16586
16587 (define-public python2-validate-email
16588 (package-with-python2 python-validate-email))
16589
16590 (define-public python-flex
16591 (package
16592 (name "python-flex")
16593 (version "6.10.0")
16594 (source
16595 (origin
16596 (method url-fetch)
16597 (uri (pypi-uri "flex" version))
16598 (sha256
16599 (base32
16600 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16601 (build-system python-build-system)
16602 (propagated-inputs
16603 `(("python-click" ,python-click)
16604 ("python-iso8601" ,python-iso8601)
16605 ("python-jsonpointer" ,python-jsonpointer)
16606 ("python-pyyaml" ,python-pyyaml)
16607 ("python-requests" ,python-requests)
16608 ("python-rfc3987" ,python-rfc3987)
16609 ("python-six" ,python-six)
16610 ("python-validate-email" ,python-validate-email)))
16611 (home-page "https://github.com/pipermerriam/flex")
16612 (synopsis "Validates Swagger schemata")
16613 (description "@code{flex} can be used to validate Swagger schemata.")
16614 (license license:bsd-3)))
16615
16616 (define-public python2-flex
16617 (package-with-python2 python-flex))
16618
16619 (define-public python-marshmallow
16620 (package
16621 (name "python-marshmallow")
16622 (version "3.9.1")
16623 (source
16624 (origin
16625 (method url-fetch)
16626 (uri (pypi-uri "marshmallow" version))
16627 (sha256
16628 (base32
16629 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16630 (build-system python-build-system)
16631 (propagated-inputs
16632 `(("python-dateutil" ,python-dateutil)
16633 ("python-simplejson" ,python-simplejson)))
16634 (native-inputs
16635 `(("python-pytest" ,python-pytest)
16636 ("python-pytz" ,python-pytz)))
16637 (home-page "https://github.com/marshmallow-code/marshmallow")
16638 (synopsis "Convert complex datatypes to and from native
16639 Python datatypes.")
16640 (description "@code{marshmallow} provides a library for converting
16641 complex datatypes to and from native Python datatypes.")
16642 (license license:expat)))
16643
16644 (define-public python-apispec
16645 (package
16646 (name "python-apispec")
16647 (version "4.0.0")
16648 (source
16649 (origin
16650 (method url-fetch)
16651 (uri (pypi-uri "apispec" version))
16652 (sha256
16653 (base32
16654 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16655 (build-system python-build-system)
16656 (arguments
16657 '(#:phases (modify-phases %standard-phases
16658 (add-after 'unpack 'disable-prance-tests
16659 (lambda _
16660 ;; Disable validation tests since they require the
16661 ;; optional 'prance' library which is not yet in Guix.
16662 (substitute* "tests/test_ext_marshmallow_openapi.py"
16663 (("def test_openapi_tools_validate.*" all)
16664 (string-append "@pytest.mark.xfail\n" all)))))
16665 (replace 'check
16666 (lambda _
16667 (setenv "PYTHONPATH"
16668 (string-append "./build/lib:"
16669 (getenv "PYTHONPATH")))
16670 (invoke "pytest" "-vv"))))))
16671 (propagated-inputs
16672 `(("python-pyyaml" ,python-pyyaml)))
16673 (native-inputs
16674 `(("python-pytest" ,python-pytest)
16675 ("python-marshmallow" ,python-marshmallow)))
16676 (home-page "https://github.com/marshmallow-code/apispec")
16677 (synopsis "Swagger/OpenAPI specification generator")
16678 (description "@code{python-apispec} is a pluggable API specification
16679 generator. It currently supports the OpenAPI specification, formerly known
16680 as Swagger.")
16681 (license license:expat)))
16682
16683 (define-public python-flasgger
16684 (package
16685 (name "python-flasgger")
16686 (version "0.6.3")
16687 (source
16688 (origin
16689 (method git-fetch)
16690 (uri (git-reference
16691 (url "https://github.com/rochacbruno/flasgger")
16692 (commit version)))
16693 (file-name (git-file-name name version))
16694 (sha256
16695 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16696 (build-system python-build-system)
16697 (arguments
16698 `(#:phases
16699 (modify-phases %standard-phases
16700 (replace 'check
16701 (lambda* (#:key inputs outputs #:allow-other-keys)
16702 (substitute* "Makefile"
16703 (("flake8 flasgger --ignore=F403")
16704 "flake8 flasgger --ignore=E731,F403"))
16705 (setenv "PYTHONPATH" (string-append (getcwd)
16706 ":"
16707 (getenv "PYTHONPATH")))
16708 (invoke "py.test"))))))
16709 (propagated-inputs
16710 `(("python-flask" ,python-flask)
16711 ("python-pyyaml" ,python-pyyaml)
16712 ("python-jsonschema" ,python-jsonschema)
16713 ("python-mistune" ,python-mistune)
16714 ("python-six" ,python-six)))
16715 (native-inputs
16716 `(("python-decorator" ,python-decorator)
16717 ("python-flake8" ,python-flake8)
16718 ("python-flask-restful" ,python-flask-restful)
16719 ("python-flex" ,python-flex)
16720 ("python-pytest" ,python-pytest)
16721 ("python-pytest-cov" ,python-pytest-cov)
16722 ("python-marshmallow" ,python-marshmallow)
16723 ("python-apispec" ,python-apispec)))
16724 (home-page "https://github.com/rochacbruno/flasgger/")
16725 (synopsis "Extract Swagger specs from your Flask project")
16726 (description "@code{python-flasgger} allows extracting Swagger specs
16727 from your Flask project. It is a fork of Flask-Swagger.")
16728 (license license:expat)))
16729
16730 (define-public python-swagger-spec-validator
16731 (package
16732 (name "python-swagger-spec-validator")
16733 (version "2.4.3")
16734 (source
16735 (origin
16736 (method url-fetch)
16737 (uri (pypi-uri "swagger-spec-validator" version))
16738 (sha256
16739 (base32
16740 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16741 (build-system python-build-system)
16742 (propagated-inputs
16743 `(("python-jsonschema" ,python-jsonschema)
16744 ("python-pyyaml" ,python-pyyaml)
16745 ("python-six" ,python-six)))
16746 (home-page
16747 "https://github.com/Yelp/swagger_spec_validator")
16748 (synopsis "Validation of Swagger specifications")
16749 (description "@code{swagger_spec_validator} provides a library for
16750 validating Swagger API specifications.")
16751 (license license:asl2.0)))
16752
16753 (define-public python2-swagger-spec-validator
16754 (package-with-python2 python-swagger-spec-validator))
16755
16756 (define-public python-apache-libcloud
16757 (package
16758 (name "python-apache-libcloud")
16759 (version "3.1.0")
16760 (source
16761 (origin
16762 (method url-fetch)
16763 (uri (pypi-uri "apache-libcloud" version))
16764 (sha256
16765 (base32
16766 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16767 (build-system python-build-system)
16768 (arguments
16769 `(#:phases
16770 (modify-phases %standard-phases
16771 (add-after 'unpack 'patch-ssh
16772 (lambda* (#:key inputs #:allow-other-keys)
16773 (substitute* "libcloud/compute/ssh.py"
16774 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16775 "/bin/ssh" "'")))
16776 #t))
16777 (add-after 'unpack 'patch-tests
16778 (lambda _
16779 (substitute* "libcloud/test/compute/test_ssh_client.py"
16780 (("class ShellOutSSHClientTests")
16781 "@unittest.skip(\"Guix container doesn't have ssh service\")
16782 class ShellOutSSHClientTests"))
16783 #t))
16784 (add-before 'check 'copy-secret
16785 (lambda _
16786 (copy-file "libcloud/test/secrets.py-dist"
16787 "libcloud/test/secrets.py")
16788 #t)))))
16789 (inputs
16790 `(("openssh" ,openssh)))
16791 (propagated-inputs
16792 `(("python-paramiko" ,python-paramiko)
16793 ("python-requests" ,python-requests)))
16794 (native-inputs
16795 `(("python-lockfile" ,python-lockfile)
16796 ("python-mock" ,python-mock)
16797 ("python-pytest" ,python-pytest)
16798 ("python-pytest-runner" ,python-pytest-runner)
16799 ("python-requests-mock" ,python-requests-mock)))
16800 (home-page "https://libcloud.apache.org/")
16801 (synopsis "Unified Cloud API")
16802 (description "@code{libcloud} is a Python library for interacting with
16803 many of the popular cloud service providers using a unified API.")
16804 (license license:asl2.0)))
16805
16806 (define-public python2-apache-libcloud
16807 (package-with-python2 python-apache-libcloud))
16808
16809 (define-public python-smmap
16810 (package
16811 (name "python-smmap")
16812 (version "3.0.1")
16813 (source
16814 (origin
16815 (method url-fetch)
16816 (uri (pypi-uri "smmap" version))
16817 (sha256
16818 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16819 (build-system python-build-system)
16820 (native-inputs
16821 `(("python-nosexcover" ,python-nosexcover)))
16822 (home-page "https://github.com/Byron/smmap")
16823 (synopsis "Python sliding window memory map manager")
16824 (description "@code{smmap} is a pure Python implementation of a sliding
16825 window memory map manager.")
16826 (license license:bsd-3)))
16827
16828 (define-public python-smmap2
16829 (deprecated-package "python-smmap2" python-smmap))
16830
16831 (define-public python2-smmap
16832 (package-with-python2 python-smmap))
16833
16834 (define-public python2-smmap2
16835 (deprecated-package "python2-smmap2" python2-smmap))
16836
16837 (define-public python-regex
16838 (package
16839 (name "python-regex")
16840 (version "2020.6.8")
16841 (source (origin
16842 (method url-fetch)
16843 (uri (pypi-uri "regex" version))
16844 (sha256
16845 (base32
16846 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16847 (build-system python-build-system)
16848 (arguments
16849 '(#:phases
16850 (modify-phases %standard-phases
16851 (replace 'check
16852 (lambda* (#:key inputs outputs #:allow-other-keys)
16853 (add-installed-pythonpath inputs outputs)
16854 (invoke "python" "-c"
16855 "from regex.test_regex import test_main; test_main()"))))))
16856 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16857 (synopsis "Alternative regular expression module")
16858 (description "This regular expression implementation is backwards-
16859 compatible with the standard @code{re} module, but offers additional
16860 functionality like full case-folding for case-insensitive matches in Unicode.")
16861 (license license:psfl)))
16862
16863 (define-public python2-regex
16864 (package-with-python2 python-regex))
16865
16866 (define-public python-pyopengl
16867 (package
16868 (name "python-pyopengl")
16869 (version "3.1.5")
16870 (source
16871 (origin
16872 (method url-fetch)
16873 (uri (pypi-uri "PyOpenGL" version))
16874 (sha256
16875 (base32
16876 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16877 (build-system python-build-system)
16878 (inputs
16879 `(("mesa" ,mesa)
16880 ("freeglut" ,freeglut)
16881 ("glu" ,glu)))
16882 (arguments
16883 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16884 ;attribute 'OSMesa'
16885 #:phases
16886 (modify-phases %standard-phases
16887 (add-before 'build 'fix-paths
16888 (lambda* (#:key inputs outputs #:allow-other-keys)
16889 (substitute* '("OpenGL/platform/ctypesloader.py")
16890 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16891 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16892 (("'GL'")
16893 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16894 (("'GLU'")
16895 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16896 (("'glut',")
16897 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16898 (("'GLESv1_CM'")
16899 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16900 (("'GLESv2'")
16901 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16902 ;; Not providing libgle. It seems to be very old.
16903 #t)))))
16904 (home-page "http://pyopengl.sourceforge.net")
16905 (synopsis "Standard OpenGL bindings for Python")
16906 (description
16907 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16908 related APIs. The binding is created using the standard @code{ctypes}
16909 library.")
16910 (license license:bsd-3)))
16911
16912 (define-public python-pyopengl-accelerate
16913 (package
16914 (inherit python-pyopengl)
16915 (name "python-pyopengl-accelerate")
16916 (version "3.1.5")
16917 (source
16918 (origin
16919 (method url-fetch)
16920 (uri (pypi-uri "PyOpenGL-accelerate" version))
16921 (sha256
16922 (base32
16923 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16924 (inputs
16925 `(("mesa" ,mesa)
16926 ("python-numpy" ,python-numpy))) ; for cython module
16927 ; numpy_formathandler, thus not propagated
16928 (arguments
16929 `(#:tests? #f
16930 #:phases
16931 (modify-phases %standard-phases
16932 (delete 'fix-paths))))
16933 (synopsis "Acceleration code for PyOpenGL")
16934 (description
16935 "This is the Cython-coded accelerator module for PyOpenGL.")))
16936
16937 (define-public python-rencode
16938 (package
16939 (name "python-rencode")
16940 (version "1.0.5")
16941 (source
16942 (origin
16943 (method url-fetch)
16944 (uri (pypi-uri "rencode" version))
16945 (sha256
16946 (base32
16947 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16948 (build-system python-build-system)
16949 (arguments
16950 `(#:phases
16951 (modify-phases %standard-phases
16952 (add-before 'check 'delete-bogus-test
16953 ;; This test requires /home/aresch/Downloads, which is not provided by
16954 ;; the build environment.
16955 (lambda _
16956 (delete-file "rencode/t.py")
16957 #t)))))
16958 (native-inputs `(("pkg-config" ,pkg-config)
16959 ("python-cython" ,python-cython)))
16960 (home-page "https://github.com/aresch/rencode")
16961 (synopsis "Serialization of heterogeneous data structures")
16962 (description
16963 "The @code{rencode} module is a data structure serialization library,
16964 similar to @code{bencode} from the BitTorrent project. For complex,
16965 heterogeneous data structures with many small elements, r-encoding stake up
16966 significantly less space than b-encodings. This version of rencode is a
16967 complete rewrite in Cython to attempt to increase the performance over the
16968 pure Python module.")
16969 (license license:bsd-3)))
16970
16971 (define-public python2-rencode
16972 (package-with-python2 python-rencode))
16973
16974 (define-public python-xenon
16975 (package
16976 (name "python-xenon")
16977 (version "0.7.0")
16978 (source
16979 (origin
16980 (method url-fetch)
16981 (uri (pypi-uri "xenon" version))
16982 (sha256
16983 (base32
16984 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16985 (build-system python-build-system)
16986 (native-inputs
16987 `(("python-pyyaml" ,python-pyyaml)
16988 ("python-radon" ,python-radon)
16989 ("python-requests" ,python-requests)
16990 ("python-flake8" ,python-flake8)
16991 ("python-tox" ,python-tox)))
16992 (arguments
16993 `(#:tests? #f ;test suite not shipped with the PyPI archive
16994 #:phases
16995 (modify-phases %standard-phases
16996 (add-before 'build 'patch-test-requirements
16997 (lambda _
16998 ;; Remove httpretty dependency for tests.
16999 (substitute* "setup.py"
17000 (("httpretty") ""))
17001 #t)))))
17002 (home-page "https://xenon.readthedocs.org/")
17003 (synopsis "Monitor code metrics for Python on your CI server")
17004 (description
17005 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17006 Ideally, @code{xenon} is run every time code is committed. Through command
17007 line options, various thresholds can be set for the complexity of code. It
17008 will fail (i.e. it will exit with a non-zero exit code) when any of these
17009 requirements is not met.")
17010 (license license:expat)))
17011
17012 (define-public python2-xenon
17013 (package-with-python2 python-xenon))
17014
17015 (define-public python-pysocks
17016 (package
17017 (name "python-pysocks")
17018 (version "1.7.1")
17019 (source
17020 (origin
17021 (method url-fetch)
17022 (uri (pypi-uri "PySocks" version))
17023 (sha256
17024 (base32
17025 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17026 (build-system python-build-system)
17027 (arguments `(#:tests? #f))
17028 (home-page "https://github.com/Anorov/PySocks")
17029 (synopsis "SOCKS client module")
17030 (description "@code{pysocks} is an updated and semi-actively maintained
17031 version of @code{SocksiPy} with bug fixes and extra features.")
17032 (license license:bsd-3)))
17033
17034 (define-public python2-pysocks
17035 (package-with-python2 python-pysocks))
17036
17037 (define-public python-pydiff
17038 (package
17039 (name "python-pydiff")
17040 (version "0.2")
17041 (source
17042 (origin
17043 (method url-fetch)
17044 (uri (pypi-uri "pydiff" version))
17045 (sha256
17046 (base32
17047 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17048 (build-system python-build-system)
17049 (home-page "https://github.com/myint/pydiff")
17050 (synopsis "Library to diff two Python files at the bytecode level")
17051 (description
17052 "@code{pydiff} makes it easy to look for actual code changes while
17053 ignoring formatting changes.")
17054 (license license:expat)))
17055
17056 (define-public python2-pydiff
17057 (package-with-python2 python-pydiff))
17058
17059 (define-public python-pydub
17060 (package
17061 (name "python-pydub")
17062 (version "0.24.1")
17063 (source
17064 (origin
17065 (method url-fetch)
17066 (uri (pypi-uri "pydub" version))
17067 (sha256
17068 (base32
17069 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17070 (build-system python-build-system)
17071 (arguments
17072 `(#:phases
17073 (modify-phases %standard-phases
17074 (add-after 'unpack 'fix-ffmpeg-path
17075 (lambda* (#:key inputs #:allow-other-keys)
17076 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17077 (substitute* '("pydub/utils.py")
17078 (("return \"ffmpeg\"")
17079 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17080 (("return \"ffplay\"")
17081 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17082 (("return \"ffprobe\"")
17083 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17084 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17085 #t))))))
17086 (home-page "https://pydub.com")
17087 (inputs
17088 `(("ffmpeg" ,ffmpeg)))
17089 (propagated-inputs
17090 `(("python-scipy" ,python-scipy)))
17091 (synopsis "Manipulate audio with a high level interface in Python")
17092 (description
17093 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17094 @code{ffmpeg} to open various audio formats.")
17095 (license license:expat))) ; MIT license
17096
17097 (define-public python-tqdm
17098 (package
17099 (name "python-tqdm")
17100 (version "4.43.0")
17101 (source
17102 (origin
17103 (method url-fetch)
17104 (uri (pypi-uri "tqdm" version))
17105 (sha256
17106 (base32
17107 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17108 (build-system python-build-system)
17109 (arguments
17110 '(#:phases (modify-phases %standard-phases
17111 (replace 'check
17112 (lambda* (#:key inputs outputs #:allow-other-keys)
17113 (add-installed-pythonpath inputs outputs)
17114 ;; This invokation is taken from tox.ini.
17115 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17116 "-d" "-v" "tqdm/"))))))
17117 (native-inputs
17118 `(("python-nose" ,python-nose)))
17119 (home-page "https://github.com/tqdm/tqdm")
17120 (synopsis "Fast, extensible progress meter")
17121 (description
17122 "Make loops show a progress bar on the console by just wrapping any
17123 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17124 design and layout.")
17125 (license (list license:mpl2.0 license:expat))))
17126
17127 (define-public python2-tqdm
17128 (package-with-python2 python-tqdm))
17129
17130 (define-public python-pkginfo
17131 (package
17132 (name "python-pkginfo")
17133 (version "1.4.2")
17134 (source
17135 (origin
17136 (method url-fetch)
17137 (uri (pypi-uri "pkginfo" version))
17138 (sha256
17139 (base32
17140 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17141 (build-system python-build-system)
17142 (arguments
17143 ;; The tests are broken upstream.
17144 '(#:tests? #f))
17145 (home-page
17146 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17147 (synopsis
17148 "Query metadatdata from sdists, bdists, and installed packages")
17149 (description
17150 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17151 source distriubtion (an sdist) or a binary distribution (e.g., created by
17152 running bdist_egg). It can also query the EGG-INFO directory of an installed
17153 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17154 created by running @code{python setup.py develop}).")
17155 (license license:expat)))
17156
17157 (define-public python2-pkginfo
17158 (package-with-python2 python-pkginfo))
17159
17160 (define-public python-twine
17161 (package
17162 (name "python-twine")
17163 (version "1.15.0")
17164 (source
17165 (origin
17166 (method url-fetch)
17167 (uri (pypi-uri "twine" version))
17168 (sha256
17169 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17170 (build-system python-build-system)
17171 (propagated-inputs
17172 `(("python-tqdm" ,python-tqdm)
17173 ("python-packaging" ,python-packaging)
17174 ("python-pkginfo" ,python-pkginfo)
17175 ("python-readme-renderer" ,python-readme-renderer)
17176 ("python-requests" ,python-requests)
17177 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17178 (home-page "https://github.com/pypa/twine")
17179 (synopsis "Collection of utilities for interacting with PyPI")
17180 (description
17181 "@code{twine} currently supports registering projects and uploading
17182 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17183 their files and supports any packaging format (including wheels).")
17184 (license license:asl2.0)))
17185
17186 (define-public python2-twine
17187 (package-with-python2 python-twine))
17188
17189 (define-public python-linecache2
17190 (package
17191 (name "python-linecache2")
17192 (version "1.0.0")
17193 (source
17194 (origin
17195 (method url-fetch)
17196 (uri (pypi-uri "linecache2" version))
17197 (sha256
17198 (base32
17199 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17200 (build-system python-build-system)
17201 (arguments
17202 `(;; The tests depend on unittest2, and our version is a bit too old.
17203 #:tests? #f))
17204 (native-inputs
17205 `(("python-pbr" ,python-pbr-minimal)))
17206 (home-page
17207 "https://github.com/testing-cabal/linecache2")
17208 (synopsis "Backports of the linecache module")
17209 (description
17210 "The linecache module allows one to get any line from any file, while
17211 attempting to optimize internally, using a cache, the common case where many
17212 lines are read from a single file.")
17213 (license license:psfl)))
17214
17215 (define-public python2-linecache2
17216 (package-with-python2 python-linecache2))
17217
17218 (define-public python-traceback2
17219 (package
17220 (name "python-traceback2")
17221 (version "1.4.0")
17222 (source
17223 (origin
17224 (method url-fetch)
17225 (uri (pypi-uri "traceback2" version))
17226 (sha256
17227 (base32
17228 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17229 (build-system python-build-system)
17230 (arguments
17231 `(;; python-traceback2 and python-unittest2 depend on one another.
17232 #:tests? #f))
17233 (native-inputs
17234 `(("python-pbr" ,python-pbr-minimal)))
17235 (propagated-inputs
17236 `(("python-linecache2" ,python-linecache2)))
17237 (home-page
17238 "https://github.com/testing-cabal/traceback2")
17239 (synopsis "Backports of the traceback module")
17240 (description
17241 "This module provides a standard interface to extract, format and print
17242 stack traces of Python programs. It exactly mimics the behavior of the Python
17243 interpreter when it prints a stack trace.")
17244 (license license:psfl)))
17245
17246 (define-public python2-traceback2
17247 (package-with-python2 python-traceback2))
17248
17249 (define-public python-ratelimiter
17250 (package
17251 (name "python-ratelimiter")
17252 (version "1.2.0")
17253 (source
17254 (origin
17255 (method url-fetch)
17256 (uri (pypi-uri "ratelimiter" version))
17257 (sha256
17258 (base32
17259 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17260 (build-system python-build-system)
17261 (arguments
17262 '(#:tests? #f)) ; There are no tests in the pypi archive.
17263 (home-page "https://github.com/RazerM/ratelimiter")
17264 (synopsis "Simple rate limiting object")
17265 (description
17266 "The @code{ratelimiter} module ensures that an operation will not be
17267 executed more than a given number of times during a given period.")
17268 (license license:asl2.0)))
17269
17270 (define-public python2-ratelimiter
17271 (package-with-python2 python-ratelimiter))
17272
17273 (define-public python-dukpy
17274 (package
17275 (name "python-dukpy")
17276 (version "0.3")
17277 (source
17278 (origin
17279 (method git-fetch)
17280 (uri (git-reference
17281 (url "https://github.com/kovidgoyal/dukpy")
17282 (commit (string-append "v" version))))
17283 (file-name (git-file-name name version))
17284 (sha256
17285 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17286 (build-system python-build-system)
17287 (home-page "https://github.com/kovidgoyal/dukpy")
17288 (synopsis "Run JavaScript in python")
17289 (description
17290 "dukpy is a JavaScript runtime environment for Python using the duktape
17291 embeddable JavaScript engine.")
17292 ;; Dukpy is licensed under MIT like the embedded duktape library,
17293 ;; with 'errors.c' as GPL3.
17294 (license (list license:expat license:gpl3))))
17295
17296 (define-public python2-dukpy
17297 (package-with-python2 python-dukpy))
17298
17299 (define-public python-jsonrpclib-pelix
17300 (package
17301 (name "python-jsonrpclib-pelix")
17302 (version "0.3.2")
17303 (source
17304 (origin
17305 (method url-fetch)
17306 (uri (pypi-uri "jsonrpclib-pelix" version))
17307 (sha256
17308 (base32
17309 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17310 (build-system python-build-system)
17311 (arguments
17312 `(#:tests? #f)) ; no tests in PyPI tarball
17313 (home-page "https://github.com/tcalmant/jsonrpclib/")
17314 (synopsis "JSON-RPC 2.0 client library for Python")
17315 (description
17316 "This library implements the JSON-RPC v2.0
17317 specification (backwards-compatible) as a client library for Python. This
17318 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17319 services.")
17320 (license license:asl2.0)))
17321
17322 (define-public python2-jsonrpclib-pelix
17323 (package-with-python2 python-jsonrpclib-pelix))
17324
17325 (define-public python-setuptools-scm-git-archive
17326 (package
17327 (name "python-setuptools-scm-git-archive")
17328 (version "1.0")
17329 (source
17330 (origin
17331 (method url-fetch)
17332 (uri (pypi-uri "setuptools_scm_git_archive" version))
17333 (sha256
17334 (base32
17335 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17336 (build-system python-build-system)
17337 (native-inputs
17338 `(("python-pytest" ,python-pytest)))
17339 (propagated-inputs
17340 `(("python-setuptools-scm" ,python-setuptools-scm)))
17341 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17342 (synopsis "Setuptools_scm plugin for git archives")
17343 (description
17344 "The setuptools_scm_git_archive package is a plugin to
17345 setuptools_scm, which supports obtaining versions from git archives that
17346 belong to tagged versions.")
17347 (license license:expat)))
17348
17349 (define-public python2-setuptools-scm-git-archive
17350 (package-with-python2 python-setuptools-scm-git-archive))
17351
17352 (define-public python-setuptools-git
17353 (package
17354 (name "python-setuptools-git")
17355 (version "1.2")
17356 (source
17357 (origin
17358 (method url-fetch)
17359 (uri (pypi-uri "setuptools-git" version))
17360 (sha256
17361 (base32
17362 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17363 (build-system python-build-system)
17364 (arguments
17365 `(#:phases
17366 (modify-phases %standard-phases
17367 ;; This is needed for tests.
17368 (add-after 'unpack 'configure-git
17369 (lambda _
17370 (setenv "HOME" "/tmp")
17371 (invoke "git" "config" "--global" "user.email" "guix")
17372 (invoke "git" "config" "--global" "user.name" "guix")
17373 #t)))))
17374 (native-inputs
17375 `(("git" ,git-minimal)))
17376 (home-page "https://github.com/msabramo/setuptools-git")
17377 (synopsis "Setuptools revision control system plugin for Git")
17378 (description
17379 "This package provides a plugin for Setuptools for revision control with
17380 Git.")
17381 (license license:bsd-3)))
17382
17383 (define-public python-pyclipper
17384 (package
17385 (name "python-pyclipper")
17386 (version "1.1.0.post3")
17387 (source
17388 (origin
17389 (method url-fetch)
17390 (uri (pypi-uri "pyclipper" version ".zip"))
17391 (sha256
17392 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17393 (modules '((guix build utils)))
17394 (snippet
17395 '(begin
17396 ;; This file is generated by Cython.
17397 (delete-file "pyclipper/pyclipper.cpp") #t))))
17398 (build-system python-build-system)
17399 (arguments
17400 `(#:phases
17401 (modify-phases %standard-phases
17402 (add-before 'build 'cythonize-sources
17403 (lambda _
17404 (with-directory-excursion "pyclipper"
17405 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17406 (propagated-inputs
17407 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17408 (native-inputs
17409 `(("python-cython" ,python-cython)
17410 ("python-pytest" ,python-pytest)
17411 ("python-pytest-runner" ,python-pytest-runner)
17412 ("python-unittest2" ,python-unittest2)
17413 ("unzip" ,unzip)))
17414 (home-page "https://github.com/greginvm/pyclipper")
17415 (synopsis "Wrapper for Angus Johnson's Clipper library")
17416 (description
17417 "Pyclipper is a Cython wrapper for the C++ translation of the
17418 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17419 (license license:expat)))
17420
17421 (define-public python2-pyclipper
17422 (package-with-python2 python-pyclipper))
17423
17424 (define-public python2-booleanoperations
17425 (package
17426 (name "python2-booleanoperations")
17427 (version "0.7.1")
17428 (source
17429 (origin
17430 (method url-fetch)
17431 (uri (pypi-uri "booleanOperations" version ".zip"))
17432 (sha256
17433 (base32
17434 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17435 (build-system python-build-system)
17436 (arguments
17437 `(#:python ,python-2))
17438 (native-inputs
17439 `(("unzip" ,unzip)
17440 ("python2-pytest" ,python2-pytest)
17441 ("python2-pytest-runner" ,python2-pytest-runner)))
17442 (propagated-inputs
17443 `(("python-fonttools" ,python2-fonttools)
17444 ("python-pyclipper" ,python2-pyclipper)
17445 ("python-ufolib" ,python2-ufolib)))
17446 (home-page "https://github.com/typemytype/booleanOperations")
17447 (synopsis "Boolean operations on paths")
17448 (description
17449 "BooleanOperations provides a Python library that enables
17450 boolean operations on paths.")
17451 (license license:expat)))
17452
17453 (define-public python-tempdir
17454 (package
17455 (name "python-tempdir")
17456 (version "0.7.1")
17457 (source
17458 (origin
17459 (method url-fetch)
17460 (uri (pypi-uri "tempdir" version))
17461 (sha256
17462 (base32
17463 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17464 (build-system python-build-system)
17465 (home-page "https://pypi.org/project/tempdir/")
17466 (arguments
17467 ;; the package has no tests
17468 '(#:tests? #f))
17469 (synopsis "Python library for managing temporary directories")
17470 (description
17471 "This library manages temporary directories that are automatically
17472 deleted with all their contents when they are no longer needed. It is
17473 particularly convenient for use in tests.")
17474 (license license:expat)))
17475
17476 (define-public python2-tempdir
17477 (package-with-python2 python-tempdir))
17478
17479 (define-public python-activepapers
17480 (package
17481 (name "python-activepapers")
17482 (version "0.2.2")
17483 (source
17484 (origin
17485 (method url-fetch)
17486 (uri (pypi-uri "ActivePapers.Py" version))
17487 (sha256
17488 (base32
17489 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17490 (build-system python-build-system)
17491 (arguments
17492 `(#:modules ((ice-9 ftw)
17493 (srfi srfi-1)
17494 (guix build utils)
17495 (guix build python-build-system))
17496
17497 #:phases
17498 (modify-phases %standard-phases
17499 (add-after 'unpack 'delete-python2-code
17500 (lambda _
17501 (for-each delete-file
17502 '("lib/activepapers/builtins2.py"
17503 "lib/activepapers/standardlib2.py"
17504 "lib/activepapers/utility2.py"))))
17505 (replace 'check
17506 (lambda _
17507 ;; Deactivate the test cases that download files
17508 (setenv "NO_NETWORK_ACCESS" "1")
17509 ;; For some strange reason, some tests fail if nosetests runs all
17510 ;; test modules in a single execution. They pass if each test
17511 ;; module is run individually.
17512 (for-each (lambda (filename)
17513 (invoke "nosetests"
17514 (string-append "tests/" filename)))
17515 (scandir "tests"
17516 (lambda (filename)
17517 (string-suffix? ".py" filename)))))))))
17518 (native-inputs
17519 `(("python-tempdir" ,python-tempdir)
17520 ("python-nose" ,python-nose)))
17521 (propagated-inputs
17522 `(("python-h5py" ,python-h5py)))
17523 (home-page "https://www.activepapers.org/")
17524 (synopsis "Executable papers for scientific computing")
17525 (description
17526 "ActivePapers is a tool for working with executable papers, which
17527 combine data, code, and documentation in single-file packages,
17528 suitable for publication as supplementary material or on repositories
17529 such as figshare or Zenodo.")
17530 (properties `((python2-variant . ,(delay python2-activepapers))))
17531 (license license:bsd-3)))
17532
17533 (define-public python2-activepapers
17534 (let ((base (package-with-python2
17535 (strip-python2-variant python-activepapers))))
17536 (package
17537 (inherit base)
17538 (arguments
17539 (substitute-keyword-arguments (package-arguments base)
17540 ((#:phases phases)
17541 `(modify-phases ,phases
17542 (delete 'delete-python2-code)
17543 (add-after 'unpack 'delete-python3-code
17544 (lambda _
17545 (for-each delete-file
17546 '("lib/activepapers/builtins3.py"
17547 "lib/activepapers/standardlib3.py"
17548 "lib/activepapers/utility3.py")))))))))))
17549
17550 (define-public python-semver
17551 (package
17552 (name "python-semver")
17553 (version "2.9.0")
17554 (source
17555 (origin
17556 (method url-fetch)
17557 (uri (pypi-uri "semver" version))
17558 (sha256
17559 (base32
17560 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17561 (build-system python-build-system)
17562 (arguments
17563 `(#:phases (modify-phases %standard-phases
17564 (replace 'check
17565 (lambda _
17566 (delete-file "setup.cfg")
17567 (invoke "py.test"))))))
17568 (native-inputs
17569 `(("python-pytest" ,python-pytest)))
17570 (home-page "https://github.com/k-bx/python-semver")
17571 (synopsis "Python helper for Semantic Versioning")
17572 (description "This package provides a Python library for
17573 @url{Semantic Versioning, http://semver.org/}.")
17574 (license license:bsd-3)))
17575
17576 (define-public python2-semver
17577 (package-with-python2 python-semver))
17578
17579 (define-public python-pyro4
17580 (package
17581 (name "python-pyro4")
17582 (version "4.77")
17583 (source
17584 (origin
17585 (method url-fetch)
17586 (uri (pypi-uri "Pyro4" version))
17587 (sha256
17588 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17589 (build-system python-build-system)
17590 (arguments
17591 '(#:tests? #f)) ;FIXME: Some tests require network access.
17592 (native-inputs
17593 `(("python-cloudpickle" ,python-cloudpickle)
17594 ("python-dill" ,python-dill)
17595 ("python-msgpack" ,python-msgpack)))
17596 (propagated-inputs
17597 `(("python-serpent" ,python-serpent)))
17598 (home-page "https://pyro4.readthedocs.io")
17599 (synopsis "Distributed object middleware for Python")
17600 (description
17601 "Pyro enables you to build applications in which objects can talk to each
17602 other over the network. You can just use normal Python method calls to call
17603 objects on other machines, also known as remote procedure calls (RPC).")
17604 (license license:expat)))
17605
17606 (define-public python2-pyro
17607 (package
17608 (name "python2-pyro")
17609 (version "3.16")
17610 (source
17611 (origin
17612 (method url-fetch)
17613 (uri (pypi-uri "Pyro" version))
17614 (file-name (string-append "Pyro-" version ".tar.gz"))
17615 (sha256
17616 (base32
17617 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17618 (build-system python-build-system)
17619 (arguments
17620 ;; Pyro is not compatible with Python 3
17621 `(#:python ,python-2
17622 ;; Pyro has no test cases for automatic execution
17623 #:tests? #f))
17624 (home-page "https://pythonhosted.org/Pyro/")
17625 (synopsis "Distributed object manager for Python")
17626 (description "Pyro is a Distributed Object Technology system
17627 written in Python that is designed to be easy to use. It resembles
17628 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17629 which is a system and language independent Distributed Object Technology
17630 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17631 longer maintained. New projects should use Pyro4 instead, which
17632 is the new Pyro version that is actively developed.")
17633 (license license:expat)))
17634
17635 (define-public python2-scientific
17636 (package
17637 (name "python2-scientific")
17638 (version "2.9.4")
17639 (source
17640 (origin
17641 (method git-fetch)
17642 (uri (git-reference
17643 (url "https://github.com/khinsen/ScientificPython")
17644 (commit (string-append "rel" version))))
17645 (file-name (git-file-name name version))
17646 (sha256
17647 (base32
17648 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17649 (build-system python-build-system)
17650 (inputs
17651 `(("netcdf" ,netcdf)))
17652 (propagated-inputs
17653 `(("python-numpy" ,python2-numpy-1.8)
17654 ("python-pyro" ,python2-pyro)))
17655 (arguments
17656 ;; ScientificPython is not compatible with Python 3
17657 `(#:python ,python-2
17658 #:tests? #f ; No test suite
17659 #:phases
17660 (modify-phases %standard-phases
17661 (replace 'build
17662 (lambda* (#:key inputs #:allow-other-keys)
17663 (invoke "python" "setup.py" "build"
17664 (string-append "--netcdf_prefix="
17665 (assoc-ref inputs "netcdf"))))))))
17666 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17667 (synopsis "Python modules for scientific computing")
17668 (description "ScientificPython is a collection of Python modules that are
17669 useful for scientific computing. Most modules are rather general (Geometry,
17670 physical units, automatic derivatives, ...) whereas others are more
17671 domain-specific (e.g. netCDF and PDB support). The library is currently
17672 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17673 (license license:cecill-c)))
17674
17675 (define-public python2-mmtk
17676 (package
17677 (name "python2-mmtk")
17678 (version "2.7.12")
17679 (source
17680 (origin
17681 (method git-fetch)
17682 (uri (git-reference
17683 (url "https://github.com/khinsen/MMTK")
17684 (commit (string-append "rel" version))))
17685 (file-name (git-file-name name version))
17686 (sha256
17687 (base32
17688 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17689 (build-system python-build-system)
17690 (native-inputs
17691 `(("netcdf" ,netcdf)))
17692 (propagated-inputs
17693 `(("python-scientific" ,python2-scientific)
17694 ("python-tkinter" ,python-2 "tk")))
17695 (arguments
17696 `(#:python ,python-2
17697 #:tests? #f
17698 #:phases
17699 (modify-phases %standard-phases
17700 (add-before 'build 'includes-from-scientific
17701 (lambda* (#:key inputs #:allow-other-keys)
17702 (mkdir-p "Include/Scientific")
17703 (copy-recursively
17704 (string-append
17705 (assoc-ref inputs "python-scientific")
17706 "/include/python2.7/Scientific")
17707 "Include/Scientific"))))))
17708 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17709 (synopsis "Python library for molecular simulation")
17710 (description "MMTK is a library for molecular simulations with an emphasis
17711 on biomolecules. It provides widely used methods such as Molecular Dynamics
17712 and normal mode analysis, but also basic routines for implementing new methods
17713 for simulation and analysis. The library is currently not actively maintained
17714 and works only with Python 2 and NumPy < 1.9.")
17715 (license license:cecill-c)))
17716
17717 (define-public python-phonenumbers
17718 (package
17719 (name "python-phonenumbers")
17720 (version "8.9.1")
17721 (source
17722 (origin
17723 (method url-fetch)
17724 (uri (pypi-uri "phonenumbers" version))
17725 (sha256
17726 (base32
17727 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17728 (build-system python-build-system)
17729 (home-page
17730 "https://github.com/daviddrysdale/python-phonenumbers")
17731 (synopsis
17732 "Python library for dealing with international phone numbers")
17733 (description
17734 "This package provides a Python port of Google's libphonenumber library.")
17735 (license license:asl2.0)))
17736
17737 (define-public python2-phonenumbers
17738 (package-with-python2 python-phonenumbers))
17739
17740 (define-public python-send2trash
17741 (package
17742 (name "python-send2trash")
17743 (version "1.5.0")
17744 (source
17745 (origin (method git-fetch)
17746 ;; Source tarball on PyPI doesn't include tests.
17747 (uri (git-reference
17748 (url "https://github.com/hsoft/send2trash")
17749 (commit version)))
17750 (file-name (git-file-name name version))
17751 (sha256
17752 (base32
17753 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17754 (build-system python-build-system)
17755 (arguments
17756 '(#:phases
17757 (modify-phases %standard-phases
17758 (add-before 'check 'pre-check
17759 (lambda _
17760 (mkdir-p "/tmp/foo")
17761 (setenv "HOME" "/tmp/foo")
17762 #t)))))
17763 (home-page "https://github.com/hsoft/send2trash")
17764 (synopsis "Send files to the user's @file{~/Trash} directory")
17765 (description "This package provides a Python library to send files to the
17766 user's @file{~/Trash} directory.")
17767 (properties `((python2-variant . ,(delay python2-send2trash))))
17768 (license license:bsd-3)))
17769
17770 (define-public python2-send2trash
17771 (package
17772 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17773 (arguments
17774 (substitute-keyword-arguments (package-arguments python-send2trash)
17775 ((#:phases phases)
17776 `(modify-phases ,phases
17777 (add-before 'check 'setenv
17778 (lambda _
17779 (setenv "PYTHONPATH"
17780 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17781 #t))))))))
17782
17783 (define-public python-pyfavicon
17784 (package
17785 (name "python-pyfavicon")
17786 (version "0.1.1")
17787 (source
17788 (origin
17789 (method url-fetch)
17790 (uri (pypi-uri "pyfavicon" version))
17791 (sha256
17792 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17793 (build-system python-build-system)
17794 (arguments
17795 ;; There are no tests in the PyPI tarball and the tests from the
17796 ;; repository require online data.
17797 '(#:tests? #f))
17798 (propagated-inputs
17799 `(("python-aiohttp" ,python-aiohttp)
17800 ("python-beautifulsoup4" ,python-beautifulsoup4)
17801 ("python-pillow" ,python-pillow)))
17802 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17803 (synopsis "Async favicon fetcher")
17804 (description
17805 "@code{pyfavicon} is an async favicon fetcher.")
17806 (license license:expat)))
17807
17808 (define-public python-yapf
17809 (package
17810 (name "python-yapf")
17811 (version "0.29.0")
17812 (source
17813 (origin
17814 (method url-fetch)
17815 (uri (pypi-uri "yapf" version))
17816 (sha256
17817 (base32
17818 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17819 (build-system python-build-system)
17820 (home-page "https://github.com/google/yapf")
17821 (synopsis "Formatter for Python code")
17822 (description "YAPF is a formatter for Python code. It's based off of
17823 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17824 takes the code and reformats it to the best formatting that conforms to the
17825 style guide, even if the original code didn't violate the style guide.")
17826 (license license:asl2.0)))
17827
17828 (define-public python2-yapf
17829 (package-with-python2 python-yapf))
17830
17831 (define-public python-yq
17832 (package
17833 (name "python-yq")
17834 (version "2.11.1")
17835 (source
17836 (origin
17837 (method url-fetch)
17838 (uri (pypi-uri "yq" version))
17839 (sha256
17840 (base32
17841 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17842 (build-system python-build-system)
17843 (arguments
17844 '(#:phases
17845 (modify-phases %standard-phases
17846 (add-after 'unpack 'patch
17847 (lambda* (#:key inputs #:allow-other-keys)
17848 (substitute* "yq/__init__.py"
17849 (("Popen\\(\\[\"jq")
17850 (string-append
17851 "Popen([\""
17852 (assoc-ref inputs "jq")
17853 "/bin/jq")))
17854 #t)))))
17855 (inputs
17856 `(("python-argcomplete" ,python-argcomplete)
17857 ("python-pyyaml" ,python-pyyaml)
17858 ("python-xmltodict" ,python-xmltodict)
17859 ("jq" ,jq)))
17860 (native-inputs
17861 `(("python-coverage" ,python-coverage)
17862 ("python-flake8" ,python-flake8)
17863 ("python-wheel" ,python-wheel)))
17864 (home-page "https://github.com/kislyuk/yq")
17865 (synopsis "Command-line YAML/XML processor")
17866 (description
17867 "This package provides @command{yq} and @command{xq} for processing YAML
17868 and XML respectively. The processing is done through @command{jq}, @command{jq}
17869 filters can be used to process the data as it passes through.")
17870 (license license:asl2.0)))
17871
17872 (define-public python-gyp
17873 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17874 (revision "0"))
17875 (package
17876 (name "python-gyp")
17877 ;; Google does not release versions,
17878 ;; based on second most recent commit date.
17879 (version (git-version "0.0.0" revision commit))
17880 (source
17881 (origin
17882 ;; Google does not release tarballs,
17883 ;; git checkout is needed.
17884 (method git-fetch)
17885 (uri (git-reference
17886 (url "https://chromium.googlesource.com/external/gyp")
17887 (commit commit)))
17888 (file-name (git-file-name name version))
17889 (sha256
17890 (base32
17891 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17892 (build-system python-build-system)
17893 (home-page "https://gyp.gsrc.io/")
17894 (synopsis "GYP is a Meta-Build system")
17895 (description
17896 "GYP builds build systems for large, cross platform applications.
17897 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17898 files, and Makefiles.")
17899 (license license:bsd-3))))
17900
17901 (define-public python2-gyp
17902 (package-with-python2 python-gyp))
17903
17904 (define-public python-whatever
17905 (package
17906 (name "python-whatever")
17907 (version "0.6")
17908 (source
17909 (origin
17910 (method git-fetch)
17911 (uri (git-reference
17912 (url "https://github.com/Suor/whatever")
17913 (commit version)))
17914 (file-name (git-file-name name version))
17915 (sha256
17916 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17917 (build-system python-build-system)
17918 (arguments
17919 `(#:phases
17920 (modify-phases %standard-phases
17921 (replace 'check
17922 (lambda _
17923 (invoke "py.test"))))))
17924 (native-inputs
17925 `(("python-pytest" ,python-pytest)))
17926 (home-page "https://github.com/Suor/whatever")
17927 (synopsis "Make anonymous functions by partial application of operators")
17928 (description "@code{whatever} provides an easy way to make anonymous
17929 functions by partial application of operators.")
17930 (license license:bsd-3)))
17931
17932 (define-public python2-whatever
17933 (package-with-python2 python-whatever))
17934
17935 (define-public python-funcy
17936 (package
17937 (name "python-funcy")
17938 (version "1.11")
17939 (source
17940 (origin
17941 (method git-fetch)
17942 (uri (git-reference
17943 (url "https://github.com/Suor/funcy")
17944 (commit version)))
17945 (sha256
17946 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17947 (file-name (git-file-name name version))))
17948 (build-system python-build-system)
17949 (arguments
17950 `(#:phases
17951 (modify-phases %standard-phases
17952 (replace 'check
17953 (lambda _
17954 (invoke "py.test"))))))
17955 (native-inputs
17956 `(("python-pytest" ,python-pytest)
17957 ("python-whatever" ,python-whatever)))
17958 (home-page "https://github.com/Suor/funcy")
17959 (synopsis "Functional tools")
17960 (description "@code{funcy} is a library that provides functional tools.
17961 Examples are:
17962 @enumerate
17963 @item merge - Merges collections of the same type
17964 @item walk - Type-preserving map
17965 @item select - Selects a part of a collection
17966 @item take - Takes the first n items of a collection
17967 @item first - Takes the first item of a collection
17968 @item remove - Predicated-removes items of a collection
17969 @item concat - Concatenates two collections
17970 @item flatten - Flattens a collection with subcollections
17971 @item distinct - Returns only distinct items
17972 @item split - Predicated-splits a collection
17973 @item split_at - Splits a collection at a given item
17974 @item group_by - Groups items by group
17975 @item pairwise - Pairs off adjacent items
17976 @item partial - Partially-applies a function
17977 @item curry - Curries a function
17978 @item compose - Composes functions
17979 @item complement - Complements a predicate
17980 @item all_fn - \"all\" with predicate
17981 @end enumerate")
17982 (license license:bsd-3)))
17983
17984 (define-public python2-funcy
17985 (package-with-python2 python-funcy))
17986
17987 (define-public python-isoweek
17988 (package
17989 (name "python-isoweek")
17990 (version "1.3.3")
17991 (source
17992 (origin
17993 (method url-fetch)
17994 (uri (pypi-uri "isoweek" version))
17995 (sha256
17996 (base32
17997 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17998 (build-system python-build-system)
17999 (home-page "https://github.com/gisle/isoweek")
18000 (synopsis "Objects representing a week")
18001 (description "The @code{isoweek} module provide the class Week that
18002 implements the week definition of ISO 8601. This standard also defines
18003 a notation for identifying weeks; yyyyWww (where the W is a literal).
18004 Week instances stringify to this form.")
18005 (license license:bsd-3)))
18006
18007 (define-public python2-isoweek
18008 (package-with-python2 python-isoweek))
18009
18010 (define-public python-pyzbar
18011 (package
18012 (name "python-pyzbar")
18013 (version "0.1.8")
18014 (source
18015 (origin
18016 ;; There's no source tarball on PyPI.
18017 (method git-fetch)
18018 (uri (git-reference
18019 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18020 (commit (string-append "v" version))))
18021 (file-name (git-file-name name version))
18022 (sha256
18023 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18024 (build-system python-build-system)
18025 (arguments
18026 `(#:phases
18027 (modify-phases %standard-phases
18028 (add-after 'unpack 'remove-failing-test
18029 (lambda _
18030 ;; This tests if find_library was called once, but we remove
18031 ;; the call in the stage below to make the library find libzbar.
18032 (delete-file "pyzbar/tests/test_zbar_library.py")
18033 #t))
18034 (add-before 'build 'set-library-file-name
18035 (lambda* (#:key inputs #:allow-other-keys)
18036 (let ((libzbar (assoc-ref inputs "zbar")))
18037 (substitute* "pyzbar/zbar_library.py"
18038 (("find_library\\('zbar'\\)")
18039 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18040 #t))))))
18041 (native-inputs
18042 `(("pkg-config" ,pkg-config)
18043 ("python-numpy" ,python-numpy)
18044 ("python-pillow" ,python-pillow)))
18045 (inputs
18046 `(("zbar" ,zbar)))
18047 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18048 (synopsis "Read one-dimensional barcodes and QR codes")
18049 (description
18050 "Read one-dimensional barcodes and QR codes using the zbar library.
18051
18052 Features:
18053
18054 @itemize
18055 @item Pure python
18056 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18057 @item Decodes locations of barcodes
18058 @item No dependencies, other than the zbar library itself
18059 @end itemize")
18060 (license license:expat)))
18061
18062 (define-public python-tokenize-rt
18063 (package
18064 (name "python-tokenize-rt")
18065 (version "2.0.1")
18066 (source
18067 (origin
18068 (method url-fetch)
18069 (uri (pypi-uri "tokenize-rt" version))
18070 (sha256
18071 (base32
18072 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18073 (build-system python-build-system)
18074 (home-page "https://github.com/asottile/tokenize-rt")
18075 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18076 (description
18077 "This Python library is a wrapper around @code{tokenize} from the Python
18078 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18079 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18080 and @code{tokens_to_src} to roundtrip.")
18081 (license license:expat)))
18082
18083 (define-public python-future-fstrings
18084 (package
18085 (name "python-future-fstrings")
18086 (version "0.4.1")
18087 (source
18088 (origin
18089 (method url-fetch)
18090 (uri (pypi-uri "future_fstrings" version))
18091 (sha256
18092 (base32
18093 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18094 (build-system python-build-system)
18095 (propagated-inputs
18096 `(("python-tokenize-rt" ,python-tokenize-rt)))
18097 (home-page "https://github.com/asottile/future-fstrings")
18098 (synopsis "Backport of fstrings to Python < 3.6")
18099 (description
18100 "This package provides a UTF-8 compatible encoding
18101 @code{future_fstrings}, which performs source manipulation. It decodes the
18102 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18103 @code{f} strings.")
18104 (license license:expat)))
18105
18106 (define-public python-typed-ast
18107 (package
18108 (name "python-typed-ast")
18109 (version "1.4.0")
18110 (source
18111 (origin
18112 (method git-fetch)
18113 (uri (git-reference
18114 (url "https://github.com/python/typed_ast")
18115 (commit version)))
18116 (sha256
18117 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18118 (file-name (git-file-name name version))))
18119 (build-system python-build-system)
18120 (arguments
18121 `(#:modules ((guix build utils)
18122 (guix build python-build-system)
18123 (ice-9 ftw)
18124 (srfi srfi-1)
18125 (srfi srfi-26))
18126 #:phases
18127 (modify-phases %standard-phases
18128 (replace 'check
18129 (lambda _
18130 (let ((cwd (getcwd)))
18131 (setenv "PYTHONPATH"
18132 (string-append cwd "/build/"
18133 (find (cut string-prefix? "lib" <>)
18134 (scandir (string-append cwd "/build")))
18135 ":"
18136 (getenv "PYTHONPATH"))))
18137 (invoke "pytest")
18138 #t)))))
18139 (native-inputs `(("python-pytest" ,python-pytest)))
18140 (home-page "https://github.com/python/typed_ast")
18141 (synopsis "Fork of Python @code{ast} modules with type comment support")
18142 (description "This package provides a parser similar to the standard
18143 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18144 include PEP 484 type comments and are independent of the version of Python
18145 under which they are run. The @code{typed_ast} parsers produce the standard
18146 Python AST (plus type comments), and are both fast and correct, as they are
18147 based on the CPython 2.7 and 3.7 parsers.")
18148 ;; See the file "LICENSE" for the details.
18149 (license (list license:psfl
18150 license:asl2.0
18151 license:expat)))) ;ast27/Parser/spark.py
18152
18153 (define-public python-typing
18154 (package
18155 (name "python-typing")
18156 (version "3.7.4.3")
18157 (source
18158 (origin
18159 (method url-fetch)
18160 (uri (pypi-uri "typing" version))
18161 (sha256
18162 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18163 (build-system python-build-system)
18164 (home-page "https://docs.python.org/3/library/typing.html")
18165 (synopsis "Type hints for Python")
18166 (description "This is a backport of the standard library @code{typing}
18167 module to Python versions older than 3.5. Typing defines a standard notation
18168 for Python function and variable type annotations. The notation can be used
18169 for documenting code in a concise, standard format, and it has been designed
18170 to also be used by static and runtime type checkers, static analyzers, IDEs
18171 and other tools.")
18172 (license license:psfl)))
18173
18174 (define-public python2-typing
18175 (package-with-python2 python-typing))
18176
18177 (define-public python-typing-extensions
18178 (package
18179 (name "python-typing-extensions")
18180 (version "3.7.4.3")
18181 (source
18182 (origin
18183 (method url-fetch)
18184 (uri (pypi-uri "typing_extensions" version))
18185 (sha256
18186 (base32
18187 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18188 (build-system python-build-system)
18189 (home-page
18190 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18191 (synopsis "Experimental type hints for Python")
18192 (description
18193 "The typing_extensions module contains additional @code{typing} hints not
18194 yet present in the of the @code{typing} standard library.
18195 Included are implementations of:
18196 @enumerate
18197 @item ClassVar
18198 @item ContextManager
18199 @item Counter
18200 @item DefaultDict
18201 @item Deque
18202 @item NewType
18203 @item NoReturn
18204 @item overload
18205 @item Protocol
18206 @item runtime
18207 @item Text
18208 @item Type
18209 @item TYPE_CHECKING
18210 @item AsyncGenerator
18211 @end enumerate\n")
18212 (license license:psfl)))
18213
18214 (define-public bpython
18215 (package
18216 (name "bpython")
18217 (version "0.18")
18218 (source
18219 (origin
18220 (method url-fetch)
18221 (uri (pypi-uri "bpython" version))
18222 (sha256
18223 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18224 (build-system python-build-system)
18225 (arguments
18226 `(#:phases
18227 (modify-phases %standard-phases
18228 (add-after 'unpack 'remove-failing-test
18229 (lambda _
18230 ;; Remove failing test. FIXME: make it pass
18231 (delete-file "bpython/test/test_args.py")
18232 #t))
18233 (add-after 'wrap 'add-aliases
18234 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18235 (lambda* (#:key outputs #:allow-other-keys)
18236 (let ((out (assoc-ref outputs "out")))
18237 (for-each
18238 (lambda (old new)
18239 (symlink old (string-append out "/bin/" new)))
18240 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18241 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18242 #t)))))
18243 (propagated-inputs
18244 `(("python-pygments" ,python-pygments)
18245 ("python-requests" ,python-requests)
18246 ("python-babel" ,python-babel) ; optional, for internationalization
18247 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18248 ("python-greenlet" ,python-greenlet)
18249 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18250 ("python-six" ,python-six)))
18251 (native-inputs
18252 `(("python-sphinx" ,python-sphinx)
18253 ("python-mock" ,python-mock)))
18254 (home-page "https://bpython-interpreter.org/")
18255 (synopsis "Fancy interface to the Python interpreter")
18256 (description "Bpython is a fancy interface to the Python
18257 interpreter. bpython's main features are
18258
18259 @enumerate
18260 @item in-line syntax highlighting,
18261 @item readline-like autocomplete with suggestions displayed as you type,
18262 @item expected parameter list for any Python function,
18263 @item \"rewind\" function to pop the last line of code from memory and
18264 re-evaluate,
18265 @item send the code you've entered off to a pastebin,
18266 @item save the code you've entered to a file, and
18267 @item auto-indentation.
18268 @end enumerate")
18269 (license license:expat)))
18270
18271 (define-public bpython2
18272 (let ((base (package-with-python2
18273 (strip-python2-variant bpython))))
18274 (package (inherit base)
18275 (name "bpython2")
18276 (arguments
18277 `(#:python ,python-2
18278 #:phases
18279 (modify-phases %standard-phases
18280 (add-after 'unpack 'remove-failing-test
18281 (lambda _
18282 ;; Remove failing test. FIXME: make it pass
18283 (delete-file "bpython/test/test_args.py")
18284 ;; Disable failing test-cases (renaming inhibits they are
18285 ;; discovered)
18286 (substitute* "bpython/test/test_curtsies_repl.py"
18287 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18288 (string-append a "xxx_off_" b))
18289 (("^(\\s*def )(test_complex\\W)" _ a b)
18290 (string-append a "xxx_off_" b)))
18291 #t))
18292 (add-before 'build 'rename-scripts
18293 ;; rename the scripts to bypthon2, bpdb2, etc.
18294 (lambda _
18295 (substitute* "setup.py"
18296 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18297 (string-append name "2" rest "\n"))
18298 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18299 (string-append name "2" (or sub "") rest "\n")))
18300 #t))))))))
18301
18302 (define-public python-pyinotify
18303 (package
18304 (name "python-pyinotify")
18305 (version "0.9.6")
18306 (source (origin
18307 (method url-fetch)
18308 (uri (pypi-uri "pyinotify" version))
18309 (sha256
18310 (base32
18311 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18312 (build-system python-build-system)
18313 (arguments `(#:tests? #f)) ;no tests
18314 (home-page "https://github.com/seb-m/pyinotify")
18315 (synopsis "Python library for monitoring inotify events")
18316 (description
18317 "@code{pyinotify} provides a Python interface for monitoring
18318 file system events on Linux.")
18319 (license license:expat)))
18320
18321 (define-public python2-pyinotify
18322 (package-with-python2 python-pyinotify))
18323
18324 ;; Ada parser uses this version.
18325 (define-public python2-quex-0.67.3
18326 (package
18327 (name "python2-quex")
18328 (version "0.67.3")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18333 (version-major+minor version)
18334 "/quex-" version ".zip"))
18335 (sha256
18336 (base32
18337 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18338 (build-system python-build-system)
18339 (native-inputs
18340 `(("unzip" ,unzip)))
18341 (arguments
18342 `(#:python ,python-2
18343 #:tests? #f
18344 #:phases
18345 (modify-phases %standard-phases
18346 (delete 'configure)
18347 (delete 'build)
18348 (replace 'install
18349 (lambda* (#:key outputs #:allow-other-keys)
18350 (let* ((out (assoc-ref outputs "out"))
18351 (share/quex (string-append out "/share/quex"))
18352 (bin (string-append out "/bin")))
18353 (copy-recursively "." share/quex)
18354 (mkdir-p bin)
18355 (symlink (string-append share/quex "/quex-exe.py")
18356 (string-append bin "/quex"))
18357 #t))))))
18358 (native-search-paths
18359 (list (search-path-specification
18360 (variable "QUEX_PATH")
18361 (files '("share/quex")))))
18362 (home-page "http://quex.sourceforge.net/")
18363 (synopsis "Lexical analyzer generator in Python")
18364 (description "@code{quex} is a lexical analyzer generator in Python.")
18365 (license license:lgpl2.1+))) ; Non-military
18366
18367 (define-public python2-quex
18368 (package (inherit python2-quex-0.67.3)
18369 (name "python2-quex")
18370 (version "0.68.1")
18371 (source
18372 (origin
18373 (method url-fetch)
18374 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18375 (sha256
18376 (base32
18377 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18378 (file-name (string-append name "-" version ".tar.gz"))))))
18379
18380 (define-public python-more-itertools
18381 (package
18382 (name "python-more-itertools")
18383 (version "8.2.0")
18384 (source
18385 (origin
18386 (method url-fetch)
18387 (uri (pypi-uri "more-itertools" version))
18388 (sha256
18389 (base32
18390 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18391 (build-system python-build-system)
18392 (home-page "https://github.com/erikrose/more-itertools")
18393 (synopsis "More routines for operating on iterables, beyond itertools")
18394 (description "Python's built-in @code{itertools} module implements a
18395 number of iterator building blocks inspired by constructs from APL, Haskell,
18396 and SML. @code{more-itertools} includes additional building blocks for
18397 working with iterables.")
18398 (properties `((python2-variant . ,(delay python2-more-itertools))))
18399 (license license:expat)))
18400
18401 ;; The 5.x series are the last versions supporting Python 2.7.
18402 (define-public python2-more-itertools
18403 (package
18404 (inherit python-more-itertools)
18405 (name "python2-more-itertools")
18406 (version "5.0.0")
18407 (source (origin
18408 (method url-fetch)
18409 (uri (pypi-uri "more-itertools" version))
18410 (sha256
18411 (base32
18412 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18413 (arguments
18414 `(#:python ,python-2))
18415 (propagated-inputs
18416 `(("python2-six" ,python2-six-bootstrap)))))
18417
18418 (define-public python-latexcodec
18419 (package
18420 (name "python-latexcodec")
18421 (version "1.0.7")
18422 (source
18423 (origin
18424 (method url-fetch)
18425 (uri (pypi-uri "latexcodec" version))
18426 (sha256
18427 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18428 (build-system python-build-system)
18429 (inputs
18430 `(("python-six" ,python-six)))
18431 (home-page "https://readthedocs.org/projects/latexcodec/")
18432 (synopsis "Work with LaTeX code in Python")
18433 (description "Lexer and codec to work with LaTeX code in Python.")
18434 (license license:expat)))
18435
18436 (define-public python-pybtex
18437 (package
18438 (name "python-pybtex")
18439 (version "0.22.2")
18440 (source
18441 (origin
18442 (method url-fetch)
18443 (uri (pypi-uri "pybtex" version))
18444 (sha256
18445 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18446 (build-system python-build-system)
18447 (native-inputs
18448 `(("python-nose" ,python-nose)))
18449 (inputs
18450 `(("python-latexcodec" ,python-latexcodec)
18451 ("python-pyyaml" ,python-pyyaml)
18452 ("python-six" ,python-six)))
18453 (arguments
18454 `(#:test-target "nosetests"))
18455 (home-page "https://pybtex.org/")
18456 (synopsis "BibTeX-compatible bibliography processor")
18457 (description "Pybtex is a BibTeX-compatible bibliography processor written
18458 in Python. You can simply type pybtex instead of bibtex.")
18459 (license license:expat)))
18460
18461 (define-public python-onetimepass
18462 (package
18463 (name "python-onetimepass")
18464 (version "1.0.1")
18465 (source
18466 (origin
18467 (method url-fetch)
18468 (uri (pypi-uri "onetimepass" version))
18469 (sha256
18470 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18471 (build-system python-build-system)
18472 (propagated-inputs `(("python-six" ,python-six)))
18473 (home-page "https://github.com/tadeck/onetimepass/")
18474 (synopsis "One-time password library")
18475 (description "Python one-time password library for HMAC-based (HOTP) and
18476 time-based (TOTP) passwords.")
18477 (license license:expat)))
18478
18479 (define-public python-parso
18480 (package
18481 (name "python-parso")
18482 (version "0.7.1")
18483 (source
18484 (origin
18485 (method url-fetch)
18486 (uri (pypi-uri "parso" version))
18487 (sha256
18488 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18489 (native-inputs
18490 `(("python-pytest" ,python-pytest)))
18491 (build-system python-build-system)
18492 (arguments
18493 `(#:phases (modify-phases %standard-phases
18494 (replace 'check
18495 (lambda _ (invoke "pytest" "-vv"))))))
18496 (home-page "https://github.com/davidhalter/parso")
18497 (synopsis "Python Parser")
18498 (description "Parso is a Python parser that supports error recovery and
18499 round-trip parsing for different Python versions (in multiple Python versions).
18500 Parso is also able to list multiple syntax errors in your Python file.")
18501 (license license:expat)))
18502
18503 (define-public python2-parso
18504 (package-with-python2 python-parso))
18505
18506 (define-public python-async-generator
18507 (package
18508 (name "python-async-generator")
18509 (version "1.10")
18510 (source
18511 (origin
18512 (method url-fetch)
18513 (uri (pypi-uri "async_generator" version))
18514 (sha256
18515 (base32
18516 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18517 (build-system python-build-system)
18518 (native-inputs
18519 `(("python-pytest" ,python-pytest)))
18520 (home-page "https://github.com/python-trio/async_generator")
18521 (synopsis "Async generators and context managers for Python 3.5+")
18522 (description "@code{async_generator} back-ports Python 3.6's native async
18523 generators and Python 3.7's context managers into Python 3.5.")
18524 ;; Dual licensed.
18525 (license (list license:expat license:asl2.0))))
18526
18527 (define-public python-async-timeout
18528 (package
18529 (name "python-async-timeout")
18530 (version "3.0.1")
18531 (source
18532 (origin
18533 (method url-fetch)
18534 (uri (pypi-uri "async-timeout" version))
18535 (sha256
18536 (base32
18537 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18538 (build-system python-build-system)
18539 (home-page "https://github.com/aio-libs/async_timeout/")
18540 (synopsis "Timeout context manager for asyncio programs")
18541 (description "@code{async-timeout} provides a timeout timeout context
18542 manager compatible with @code{asyncio}.")
18543 (license license:asl2.0)))
18544
18545 (define-public python-glob2
18546 (package
18547 (name "python-glob2")
18548 (version "0.7")
18549 (source
18550 (origin
18551 (method git-fetch)
18552 (uri (git-reference
18553 (url "https://github.com/miracle2k/python-glob2")
18554 (commit (string-append "v" version))))
18555 (file-name (git-file-name name version))
18556 (sha256
18557 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18558 (build-system python-build-system)
18559 (home-page "https://github.com/miracle2k/python-glob2/")
18560 (synopsis "Extended Version of the python buildin glob module")
18561 (description "This is an extended version of the Python
18562 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18563 adds:
18564
18565 @itemize
18566 @item The ability to capture the text matched by glob patterns, and return
18567 those matches alongside the file names.
18568 @item A recursive @code{**} globbing syntax, akin for example to the
18569 @code{globstar} option of Bash.
18570 @item The ability to replace the file system functions used, in order to glob
18571 on virtual file systems.
18572 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18573 @end itemize
18574
18575 Glob2 currently based on the glob code from Python 3.3.1.")
18576 (license license:bsd-2)))
18577
18578 (define-public python2-glob2
18579 (package-with-python2 python-glob2))
18580
18581 (define-public python-gipc
18582 (package
18583 (name "python-gipc")
18584 (version "0.6.0")
18585 (source
18586 (origin
18587 (method url-fetch)
18588 (uri (pypi-uri "gipc" version ".zip"))
18589 (sha256
18590 (base32
18591 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18592 (build-system python-build-system)
18593 (native-inputs
18594 `(("unzip" ,unzip)))
18595 (propagated-inputs
18596 `(("python-gevent" ,python-gevent)))
18597 (home-page "https://gehrcke.de/gipc/")
18598 (synopsis "Child process management in the context of gevent")
18599 (description "Usage of Python's multiprocessing package in a
18600 gevent-powered application may raise problems. With @code{gipc},
18601 process-based child processes can safely be created anywhere within a
18602 gevent-powered application.")
18603 (license license:expat)))
18604
18605 (define-public python2-gipc
18606 (package-with-python2 python-gipc))
18607
18608 (define-public python-beautifultable
18609 (package
18610 (name "python-beautifultable")
18611 (version "1.0.0")
18612 (source
18613 (origin
18614 (method url-fetch)
18615 (uri (pypi-uri "beautifultable" version))
18616 (sha256
18617 (base32
18618 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18619 (build-system python-build-system)
18620 (propagated-inputs
18621 `(("python-wcwidth" ,python-wcwidth)))
18622 (arguments
18623 `(#:phases
18624 (modify-phases %standard-phases
18625 (add-after 'unpack 'patch-setup.py
18626 (lambda _
18627 (substitute* "setup.py"
18628 (("setup\\(")
18629 "setup(\n test_suite=\"test\",")))))))
18630 (home-page "https://github.com/pri22296/beautifultable")
18631 (synopsis "Print ASCII tables for terminals")
18632 (description "@code{python-beautifultable} provides a class for easily
18633 printing tabular data in a visually appealing ASCII format to a terminal.
18634
18635 Features include, but are not limited to:
18636 @itemize
18637 @item Full customization of the look and feel of the table
18638 @item Row and column accessors.
18639 @item Full support for colors using ANSI sequences or any library.
18640 @item Plenty of predefined styles and option to create custom ones.
18641 @item Support for Unicode characters.
18642 @item Supports streaming table when data is slow to retrieve.
18643 @end itemize")
18644 (license license:expat)))
18645
18646 (define-public python-globber
18647 (package
18648 (name "python-globber")
18649 (version "0.2.1")
18650 (source
18651 (origin
18652 (method git-fetch)
18653 (uri (git-reference
18654 (url "https://github.com/asharov/globber")
18655 (commit version)))
18656 (file-name (git-file-name name version))
18657 (sha256
18658 (base32
18659 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18660 (build-system python-build-system)
18661 (home-page "https://github.com/asharov/globber")
18662 (synopsis "Library for string matching with glob patterns")
18663 (description
18664 "Globber is a Python library for matching file names against glob patterns.
18665 In contrast to other glob-matching libraries, it matches arbitrary strings and
18666 doesn't require the matched names to be existing files. In addition, it
18667 supports the globstar @code{**} operator to match an arbitrary number of
18668 path components.")
18669 (license license:asl2.0)))
18670
18671 (define-public python-git-hammer
18672 (package
18673 (name "python-git-hammer")
18674 (version "0.3.1")
18675 (source
18676 (origin
18677 (method git-fetch)
18678 (uri (git-reference
18679 (url "https://github.com/asharov/git-hammer")
18680 (commit version)))
18681 (file-name (git-file-name name version))
18682 (sha256
18683 (base32
18684 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18685 (build-system python-build-system)
18686 (arguments
18687 `(#:phases
18688 (modify-phases %standard-phases
18689 (add-after 'unpack 'patch-setup.py
18690 (lambda _
18691 (substitute* "setup.py"
18692 (("setup\\(")
18693 "setup(\n test_suite=\"test\",")))))))
18694 (propagated-inputs
18695 `(("python-beautifultable" ,python-beautifultable)
18696 ("python-dateutil" ,python-dateutil)
18697 ("python-gitpython" ,python-gitpython)
18698 ("python-globber" ,python-globber)
18699 ("python-matplotlib" ,python-matplotlib)
18700 ("python-sqlalchemy" ,python-sqlalchemy)
18701 ("python-sqlalchemy-utils"
18702 ,python-sqlalchemy-utils)))
18703 (home-page "https://github.com/asharov/git-hammer")
18704 (synopsis "Provide statistics for git repositories")
18705 (description
18706 "Git Hammer is a statistics tool for projects in git repositories.
18707 Its major feature is tracking the number of lines authored by each person for every
18708 commit, but it also includes some other useful statistics.")
18709 (license license:asl2.0)))
18710
18711 (define-public python-fusepy
18712 (package
18713 (name "python-fusepy")
18714 (version "2.0.4")
18715 (source
18716 (origin
18717 (method url-fetch)
18718 (uri (pypi-uri "fusepy" version))
18719 (sha256
18720 (base32
18721 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18722 (build-system python-build-system)
18723 (arguments
18724 `(#:phases
18725 (modify-phases %standard-phases
18726 (add-before 'build 'set-library-file-name
18727 (lambda* (#:key inputs #:allow-other-keys)
18728 (let ((fuse (assoc-ref inputs "fuse")))
18729 (substitute* "fuse.py"
18730 (("find_library\\('fuse'\\)")
18731 (string-append "'" fuse "/lib/libfuse.so'")))
18732 #t))))))
18733 (propagated-inputs
18734 `(("fuse" ,fuse)))
18735 (home-page "https://github.com/fusepy/fusepy")
18736 (synopsis "Simple ctypes bindings for FUSE")
18737 (description "Python module that provides a simple interface to FUSE and
18738 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18739 (license license:isc)))
18740
18741 (define-public python2-fusepy
18742 (package-with-python2 python-fusepy))
18743
18744 (define-public python-fusepyng
18745 (package
18746 (name "python-fusepyng")
18747 (version "1.0.7")
18748 (source
18749 (origin
18750 (method url-fetch)
18751 (uri (pypi-uri "fusepyng" version))
18752 (sha256
18753 (base32
18754 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18755 (build-system python-build-system)
18756 (arguments
18757 '(#:phases
18758 (modify-phases %standard-phases
18759 (add-after 'unpack 'set-libfuse-path
18760 (lambda* (#:key inputs #:allow-other-keys)
18761 (let ((fuse (assoc-ref inputs "fuse")))
18762 (substitute* "fusepyng.py"
18763 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18764 (string-append "\"" fuse "/lib/libfuse.so\""))))
18765 #t)))))
18766 (inputs
18767 `(("fuse" ,fuse)))
18768 (propagated-inputs
18769 `(("python-paramiko" ,python-paramiko)))
18770 (home-page "https://github.com/rianhunter/fusepyng")
18771 (synopsis "Simple ctypes bindings for FUSE")
18772 (description "@code{fusepyng} is a Python module that provides a simple
18773 interface to FUSE on various operating systems. It's just one file and is
18774 implemented using @code{ctypes}.")
18775 (license license:isc)))
18776
18777 (define-public python2-gdrivefs
18778 (package
18779 (name "python2-gdrivefs")
18780 (version "0.14.9")
18781 (source
18782 (origin
18783 (method url-fetch)
18784 (uri (pypi-uri "gdrivefs" version))
18785 (sha256
18786 (base32
18787 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18788 (build-system python-build-system)
18789 (arguments
18790 `(#:python ,python-2
18791 #:phases
18792 (modify-phases %standard-phases
18793 (add-before 'build 'patch-setup-py
18794 (lambda _
18795 ;; Update requirements from dependency==version
18796 ;; to dependency>=version
18797 (substitute* "gdrivefs/resources/requirements.txt"
18798 (("==") ">="))
18799 #t)))))
18800 (native-inputs
18801 `(("python2-gipc" ,python2-gipc)
18802 ("python2-gevent" ,python2-gevent)
18803 ("python2-greenlet" ,python2-greenlet)
18804 ("python2-httplib2" ,python2-httplib2)
18805 ("python2-uritemplate" ,python2-uritemplate)
18806 ("python2-oauth2client" ,python2-oauth2client)
18807 ("python2-six" ,python2-six)))
18808 (propagated-inputs
18809 `(("python2-dateutil" ,python2-dateutil)
18810 ("python2-fusepy" ,python2-fusepy)
18811 ("python2-google-api-client" ,python2-google-api-client)))
18812 (home-page "https://github.com/dsoprea/GDriveFS")
18813 (synopsis "Mount Google Drive as a local file system")
18814 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18815 under Python 2.7.")
18816 (license license:gpl2)))
18817
18818 (define-public python-userspacefs
18819 (package
18820 (name "python-userspacefs")
18821 (version "1.0.13")
18822 (source
18823 (origin
18824 (method url-fetch)
18825 (uri (pypi-uri "userspacefs" version))
18826 (sha256
18827 (base32
18828 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18829 (build-system python-build-system)
18830 (propagated-inputs
18831 `(("python-fusepyng" ,python-fusepyng)))
18832 (home-page "https://github.com/rianhunter/userspacefs")
18833 (synopsis "User-space file systems for Python")
18834 (description
18835 "@code{userspacefs} is a library that allows you to easily write
18836 user-space file systems in Python.")
18837 (license license:gpl3+)))
18838
18839 (define-public pybind11
18840 (package
18841 (name "pybind11")
18842 (version "2.4.3")
18843 (source (origin
18844 (method git-fetch)
18845 (uri (git-reference
18846 (url "https://github.com/pybind/pybind11")
18847 (commit (string-append "v" version))))
18848 (sha256
18849 (base32
18850 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18851 (file-name (git-file-name name version))))
18852 (build-system cmake-build-system)
18853 (native-inputs
18854 `(("python" ,python-wrapper)
18855
18856 ;; The following dependencies are used for tests.
18857 ("python-pytest" ,python-pytest)
18858 ("catch" ,catch-framework2-1)
18859 ("eigen" ,eigen)))
18860 (arguments
18861 `(#:configure-flags
18862 (list (string-append "-DCATCH_INCLUDE_DIR="
18863 (assoc-ref %build-inputs "catch")
18864 "/include/catch"))
18865
18866 #:phases (modify-phases %standard-phases
18867 (add-after 'install 'install-python
18868 (lambda* (#:key outputs #:allow-other-keys)
18869 (let ((out (assoc-ref outputs "out")))
18870 (with-directory-excursion "../source"
18871 (setenv "PYBIND11_USE_CMAKE" "yes")
18872 (invoke "python" "setup.py" "install"
18873 "--single-version-externally-managed"
18874 "--root=/"
18875 (string-append "--prefix=" out)))))))
18876
18877 #:test-target "check"))
18878 (home-page "https://github.com/pybind/pybind11/")
18879 (synopsis "Seamless operability between C++11 and Python")
18880 (description
18881 "@code{pybind11} is a lightweight header-only library that exposes C++
18882 types in Python and vice versa, mainly to create Python bindings of existing
18883 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18884 library: to minimize boilerplate code in traditional extension modules by
18885 inferring type information using compile-time introspection.")
18886 (license license:bsd-3)))
18887
18888 (define-public python-fasteners
18889 (package
18890 (name "python-fasteners")
18891 (version "0.15")
18892 (source
18893 (origin
18894 (method url-fetch)
18895 (uri (pypi-uri "fasteners" version))
18896 (sha256
18897 (base32
18898 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18899 (build-system python-build-system)
18900 (propagated-inputs
18901 `(("python-monotonic" ,python-monotonic)
18902 ("python-six" ,python-six)))
18903 (native-inputs
18904 `(("python-testtools" ,python-testtools)))
18905 (home-page "https://github.com/harlowja/fasteners")
18906 (synopsis "Python package that provides useful locks")
18907 (description
18908 "This package provides a Python program that provides following locks:
18909
18910 @itemize
18911 @item Locking decorator
18912 @item Reader-writer locks
18913 @item Inter-process locks
18914 @item Generic helpers
18915 @end itemize\n")
18916 (properties `((python2-variant . ,(delay python2-fasteners))))
18917 (license license:asl2.0)))
18918
18919 (define-public python2-fasteners
18920 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18921 (package
18922 (inherit base)
18923 (propagated-inputs
18924 `(("python2-futures" ,python2-futures)
18925 ,@(package-propagated-inputs base))))))
18926
18927 (define-public python-requests-file
18928 (package
18929 (name "python-requests-file")
18930 (version "1.4.3")
18931 (source
18932 (origin
18933 (method url-fetch)
18934 (uri (pypi-uri "requests-file" version))
18935 (sha256
18936 (base32
18937 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18938 (build-system python-build-system)
18939 (propagated-inputs
18940 `(("python-requests" ,python-requests)
18941 ("python-six" ,python-six)))
18942 (home-page
18943 "https://github.com/dashea/requests-file")
18944 (synopsis "File transport adapter for Requests")
18945 (description
18946 "Requests-File is a transport adapter for use with the Requests Python
18947 library to allow local file system access via @code{file://} URLs.")
18948 (license license:asl2.0)))
18949
18950 (define-public python2-requests-file
18951 (package-with-python2 python-requests-file))
18952
18953 (define-public python-identify
18954 (package
18955 (name "python-identify")
18956 (version "1.4.25")
18957 (source
18958 (origin
18959 ;; There are no tests in the PyPI tarball.
18960 (method git-fetch)
18961 (uri (git-reference
18962 (url "https://github.com/chriskuehl/identify")
18963 (commit (string-append "v" version))))
18964 (file-name (git-file-name name version))
18965 (sha256
18966 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18967 (build-system python-build-system)
18968 (arguments
18969 `(#:phases
18970 (modify-phases %standard-phases
18971 (replace 'check
18972 (lambda _
18973 (invoke "pytest" "-vv"))))))
18974 (native-inputs
18975 `(("python-coverage" ,python-coverage)
18976 ("python-pytest" ,python-pytest)))
18977 (propagated-inputs
18978 `(("python-editdistance" ,python-editdistance)))
18979 (home-page "https://github.com/chriskuehl/identify")
18980 (synopsis "File identification library for Python")
18981 (description
18982 "@code{identify} is a file identification library for Python. Given
18983 a file (or some information about a file), return a set of standardized tags
18984 identifying what the file is.")
18985 (license license:expat)))
18986
18987 (define-public python-tldextract
18988 (package
18989 (name "python-tldextract")
18990 (version "2.2.0")
18991 (source
18992 (origin
18993 (method url-fetch)
18994 (uri (pypi-uri "tldextract" version))
18995 (sha256
18996 (base32
18997 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18998 (build-system python-build-system)
18999 (native-inputs
19000 `(("python-pytest" ,python-pytest)
19001 ("python-responses" ,python-responses)))
19002 (propagated-inputs
19003 `(("python-idna" ,python-idna)
19004 ("python-requests" ,python-requests)
19005 ("python-requests-file" ,python-requests-file)))
19006 (home-page
19007 "https://github.com/john-kurkowski/tldextract")
19008 (synopsis
19009 "Separate the TLD from the registered domain and subdomains of a URL")
19010 (description
19011 "TLDExtract accurately separates the TLD from the registered domain and
19012 subdomains of a URL, using the Public Suffix List. By default, this includes
19013 the public ICANN TLDs and their exceptions. It can optionally support the
19014 Public Suffix List's private domains as well.")
19015 (license license:bsd-3)))
19016
19017 (define-public python2-tldextract
19018 (package-with-python2 python-tldextract))
19019
19020 (define-public python-nodeenv
19021 (package
19022 (name "python-nodeenv")
19023 (version "1.4.0")
19024 (source
19025 (origin
19026 ;; There's no tarball in PyPI.
19027 (method git-fetch)
19028 (uri (git-reference
19029 (url "https://github.com/ekalinin/nodeenv")
19030 (commit version)))
19031 (file-name (git-file-name name version))
19032 (sha256
19033 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19034 (build-system python-build-system)
19035 (arguments
19036 `(#:phases
19037 (modify-phases %standard-phases
19038 (replace 'check
19039 (lambda _
19040 ;; This test fails. It tries to open a network socket.
19041 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19042 (native-inputs
19043 `(("python-coverage" ,python-coverage)
19044 ("python-mock" ,python-mock)
19045 ("python-pytest" ,python-pytest)))
19046 (home-page "https://ekalinin.github.io/nodeenv/")
19047 (synopsis "Create isolated node.js environments")
19048 (description
19049 "Nodeenv (node.js virtual environment) is a tool to create isolated
19050 node.js environments. It creates an environment that has its own installation
19051 directories, that doesn't share libraries with other node.js virtual
19052 environments.")
19053 (license license:bsd-3)))
19054
19055 (define-public python-pynamecheap
19056 (package
19057 (name "python-pynamecheap")
19058 (version "0.0.3")
19059 (source
19060 (origin
19061 (method url-fetch)
19062 (uri (pypi-uri "PyNamecheap" version))
19063 (sha256
19064 (base32
19065 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19066 (build-system python-build-system)
19067 (propagated-inputs
19068 `(("python-requests" ,python-requests)))
19069 (home-page
19070 "https://github.com/Bemmu/PyNamecheap")
19071 (synopsis
19072 "Namecheap API client in Python")
19073 (description
19074 "PyNamecheap is a Namecheap API client in Python.")
19075 (license license:expat)))
19076
19077 (define-public python2-pynamecheap
19078 (package-with-python2 python-pynamecheap))
19079
19080 (define-public python-dns-lexicon
19081 (package
19082 (name "python-dns-lexicon")
19083 (version "2.4.0")
19084 (source
19085 (origin
19086 (method url-fetch)
19087 (uri (pypi-uri "dns-lexicon" version))
19088 (sha256
19089 (base32
19090 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19091 (build-system python-build-system)
19092 (arguments
19093 `(#:tests? #f)) ;requires internet access
19094 (propagated-inputs
19095 `(("python-future" ,python-future)
19096 ("python-pynamecheap" ,python-pynamecheap)
19097 ("python-requests" ,python-requests)
19098 ("python-tldextract" ,python-tldextract)
19099 ("python-urllib3" ,python-urllib3)))
19100 (home-page "https://github.com/AnalogJ/lexicon")
19101 (synopsis
19102 "Manipulate DNS records on various DNS providers")
19103 (description
19104 "Lexicon provides a way to manipulate DNS records on multiple DNS
19105 providers in a standardized way. It has a CLI but it can also be used as a
19106 Python library. It was designed to be used in automation, specifically with
19107 Let's Encrypt.")
19108 (license license:expat)))
19109
19110 (define-public python2-dns-lexicon
19111 (package-with-python2 python-dns-lexicon))
19112
19113 (define-public python-cfgv
19114 (package
19115 (name "python-cfgv")
19116 (version "3.1.0")
19117 (source
19118 (origin
19119 ;; There are no tests in the PyPI tarball.
19120 (method git-fetch)
19121 (uri (git-reference
19122 (url "https://github.com/asottile/cfgv")
19123 (commit (string-append "v" version))))
19124 (file-name (git-file-name name version))
19125 (sha256
19126 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19127 (build-system python-build-system)
19128 (arguments
19129 `(#:phases
19130 (modify-phases %standard-phases
19131 (replace 'check
19132 (lambda _
19133 (invoke "pytest" "-vv"))))))
19134 (native-inputs
19135 `(("python-covdefaults" ,python-covdefaults)
19136 ("python-coverage" ,python-coverage)
19137 ("python-pytest" ,python-pytest)))
19138 (home-page "https://github.com/asottile/cfgv")
19139 (synopsis "Configuration validation library")
19140 (description
19141 "This library helps to validate configuration files and produce human
19142 readable error messages.")
19143 (license license:expat)))
19144
19145 (define-public python-commandlines
19146 (package
19147 (name "python-commandlines")
19148 (version "0.4.1")
19149 (source
19150 (origin
19151 (method url-fetch)
19152 (uri (pypi-uri "commandlines" version))
19153 (sha256
19154 (base32
19155 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19156 (build-system python-build-system)
19157 (home-page "https://github.com/chrissimpkins/commandlines")
19158 (synopsis "Command line argument to object parsing library")
19159 (description
19160 "@code{Commandlines} is a Python library for command line application
19161 development that supports command line argument parsing, command string
19162 validation testing and application logic.")
19163 (license license:expat)))
19164
19165 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19166 ;; python-numba. They have a very unflexible relationship.
19167 (define-public python-numba
19168 (package
19169 (name "python-numba")
19170 (version "0.51.2")
19171 (source
19172 (origin
19173 (method url-fetch)
19174 (uri (pypi-uri "numba" version))
19175 (sha256
19176 (base32
19177 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19178 (build-system python-build-system)
19179 (arguments
19180 `(#:phases
19181 (modify-phases %standard-phases
19182 (add-after 'unpack 'disable-proprietary-features
19183 (lambda _
19184 (setenv "NUMBA_DISABLE_HSA" "1")
19185 (setenv "NUMBA_DISABLE_CUDA" "1")
19186 #t))
19187 (replace 'check
19188 (lambda* (#:key inputs outputs #:allow-other-keys)
19189 (add-installed-pythonpath inputs outputs)
19190 ;; Something is wrong with the PYTHONPATH when running the
19191 ;; tests from the build directory, as it complains about not being
19192 ;; able to import certain modules.
19193 (with-directory-excursion "/tmp"
19194 (setenv "HOME" (getcwd))
19195 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19196 (propagated-inputs
19197 `(("python-llvmlite" ,python-llvmlite)
19198 ("python-numpy" ,python-numpy)
19199 ("python-singledispatch" ,python-singledispatch)))
19200 (native-inputs ;for tests
19201 `(("python-jinja2" ,python-jinja2)
19202 ("python-pygments" ,python-pygments)))
19203 (home-page "https://numba.pydata.org")
19204 (synopsis "Compile Python code using LLVM")
19205 (description "Numba gives you the power to speed up your applications with
19206 high performance functions written directly in Python. With a few
19207 annotations, array-oriented and math-heavy Python code can be just-in-time
19208 compiled to native machine instructions, similar in performance to C, C++ and
19209 Fortran, without having to switch languages or Python interpreters.
19210
19211 Numba works by generating optimized machine code using the LLVM compiler
19212 infrastructure at import time, runtime, or statically (using the included pycc
19213 tool).")
19214 (license license:bsd-3)))
19215
19216 (define-public python-numcodecs
19217 (package
19218 (name "python-numcodecs")
19219 (version "0.6.4")
19220 (source
19221 (origin
19222 (method url-fetch)
19223 (uri (pypi-uri "numcodecs" version))
19224 (sha256
19225 (base32
19226 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19227 (build-system python-build-system)
19228 (propagated-inputs
19229 `(("python-numpy" ,python-numpy)
19230 ("python-msgpack" ,python-msgpack)))
19231 (native-inputs
19232 `(("python-pytest" ,python-pytest)
19233 ("python-setuptools-scm" ,python-setuptools-scm)))
19234 (home-page "https://github.com/zarr-developers/numcodecs")
19235 (synopsis "Buffer compression and transformation codecs")
19236 (description
19237 "This Python package provides buffer compression and transformation
19238 codecs for use in data storage and communication applications.")
19239 (license license:expat)))
19240
19241 (define-public python-asciitree
19242 (package
19243 (name "python-asciitree")
19244 (version "0.3.3")
19245 (source
19246 (origin
19247 (method url-fetch)
19248 (uri (pypi-uri "asciitree" version))
19249 (sha256
19250 (base32
19251 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19252 (build-system python-build-system)
19253 (home-page "https://github.com/mbr/asciitree")
19254 (synopsis "Draws ASCII trees")
19255 (description "This package draws tree structures using characters.")
19256 (license license:expat)))
19257
19258 (define-public python-zarr
19259 (package
19260 (name "python-zarr")
19261 (version "2.4.0")
19262 (source
19263 (origin
19264 (method url-fetch)
19265 (uri (pypi-uri "zarr" version))
19266 (sha256
19267 (base32
19268 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19269 (build-system python-build-system)
19270 (arguments
19271 `(#:phases
19272 (modify-phases %standard-phases
19273 (add-after 'unpack 'disable-service-tests
19274 (lambda _
19275 (setenv "ZARR_TEST_ABS" "0")
19276 (setenv "ZARR_TEST_MONGO" "0")
19277 (setenv "ZARR_TEST_REDIS" "0")
19278 #t))
19279 (replace 'check
19280 (lambda _
19281 (invoke "pytest" "-vv" "-k" "not lmdb")
19282 #t)))))
19283 (propagated-inputs
19284 `(("python-asciitree" ,python-asciitree)
19285 ("python-fasteners" ,python-fasteners)
19286 ("python-numcodecs" ,python-numcodecs)
19287 ("python-numpy" ,python-numpy)))
19288 (native-inputs
19289 `(("python-pytest" ,python-pytest)
19290 ("python-setuptools-scm" ,python-setuptools-scm)))
19291 (home-page "https://github.com/zarr-developers/zarr-python")
19292 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19293 (description
19294 "This package provides an implementation of chunked, compressed,
19295 N-dimensional arrays for Python.")
19296 (license license:expat)))
19297
19298 (define-public python-anndata
19299 (package
19300 (name "python-anndata")
19301 (version "0.7.1")
19302 (source
19303 (origin
19304 (method url-fetch)
19305 (uri (pypi-uri "anndata" version))
19306 (sha256
19307 (base32
19308 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19309 (build-system python-build-system)
19310 (arguments
19311 `(#:phases
19312 (modify-phases %standard-phases
19313 (add-after 'unpack 'delete-inconvenient-tests
19314 (lambda _
19315 ;; This test depends on python-scikit-learn.
19316 (delete-file "anndata/tests/test_inplace_subset.py")
19317 #t))
19318 (delete 'check)
19319 (add-after 'install 'check
19320 (lambda* (#:key inputs outputs #:allow-other-keys)
19321 (add-installed-pythonpath inputs outputs)
19322 (invoke "pytest" "-vv"))))))
19323 (propagated-inputs
19324 `(("python-h5py" ,python-h5py)
19325 ("python-importlib-metadata" ,python-importlib-metadata)
19326 ("python-natsort" ,python-natsort)
19327 ("python-numcodecs" ,python-numcodecs)
19328 ("python-packaging" ,python-packaging)
19329 ("python-pandas" ,python-pandas)
19330 ("python-scipy" ,python-scipy)
19331 ("python-zarr" ,python-zarr)))
19332 (native-inputs
19333 `(("python-joblib" ,python-joblib)
19334 ("python-pytest" ,python-pytest)
19335 ("python-setuptools-scm" ,python-setuptools-scm)))
19336 (home-page "https://github.com/theislab/anndata")
19337 (synopsis "Annotated data for data analysis pipelines")
19338 (description "Anndata is a package for simple (functional) high-level APIs
19339 for data analysis pipelines. In this context, it provides an efficient,
19340 scalable way of keeping track of data together with learned annotations and
19341 reduces the code overhead typically encountered when using a mostly
19342 object-oriented library such as @code{scikit-learn}.")
19343 (license license:bsd-3)))
19344
19345 (define-public python-dill
19346 (package
19347 (name "python-dill")
19348 (version "0.3.1.1")
19349 (source
19350 (origin
19351 (method url-fetch)
19352 (uri (pypi-uri "dill" version))
19353 (sha256
19354 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19355 (build-system python-build-system)
19356 (arguments
19357 `(#:phases
19358 (modify-phases %standard-phases
19359 (replace 'check
19360 (lambda _
19361 (with-directory-excursion "/tmp"
19362 (invoke "nosetests" "-v"))
19363 #t)))))
19364 (native-inputs
19365 `(("python-nose" ,python-nose)))
19366 (home-page "https://pypi.org/project/dill/")
19367 (synopsis "Serialize all of Python")
19368 (description "Dill extends Python's @code{pickle} module for serializing
19369 and de-serializing Python objects to the majority of the built-in Python
19370 types. Dill provides the user the same interface as the @code{pickle} module,
19371 and also includes some additional features. In addition to pickling Python
19372 objects, @code{dill} provides the ability to save the state of an interpreter
19373 session in a single command. Hence, it would be feasible to save a
19374 interpreter session, close the interpreter, ship the pickled file to another
19375 computer, open a new interpreter, unpickle the session and thus continue from
19376 the saved state of the original interpreter session.")
19377 (license license:bsd-3)))
19378
19379 (define-public python-multiprocess
19380 (package
19381 (name "python-multiprocess")
19382 (version "0.70.9")
19383 (source
19384 (origin
19385 (method url-fetch)
19386 (uri (pypi-uri "multiprocess" version))
19387 (sha256
19388 (base32
19389 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19390 (build-system python-build-system)
19391 (arguments
19392 `(#:phases
19393 (modify-phases %standard-phases
19394 (add-after 'unpack 'disable-broken-tests
19395 (lambda _
19396 ;; This test is broken as there is no keyboard interrupt.
19397 (substitute* "py3.7/multiprocess/tests/__init__.py"
19398 (("^(.*)def test_wait_result"
19399 line indent)
19400 (string-append indent
19401 "@unittest.skip(\"Disabled by Guix\")\n"
19402 line)))
19403 #t))
19404 ;; Tests must be run after installation.
19405 (delete 'check)
19406 (add-after 'install 'check
19407 (lambda* (#:key inputs outputs #:allow-other-keys)
19408 (add-installed-pythonpath inputs outputs)
19409 (invoke "python" "-m" "multiprocess.tests")
19410 #t)))))
19411 (propagated-inputs
19412 `(("python-dill" ,python-dill)))
19413 (home-page "https://pypi.org/project/multiprocess/")
19414 (synopsis "Multiprocessing and multithreading in Python")
19415 (description
19416 "This package is a fork of the multiprocessing Python package, a package
19417 which supports the spawning of processes using the API of the standard
19418 library's @code{threading} module.")
19419 (license license:bsd-3)))
19420
19421 (define-public python-toolz
19422 (package
19423 (name "python-toolz")
19424 (version "0.9.0")
19425 (source
19426 (origin
19427 (method url-fetch)
19428 (uri (pypi-uri "toolz" version))
19429 (sha256
19430 (base32
19431 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19432 (build-system python-build-system)
19433 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19434 ;; unregistered loader type"
19435 (arguments '(#:tests? #f))
19436 (home-page "https://github.com/pytoolz/toolz/")
19437 (synopsis "List processing tools and functional utilities")
19438 (description
19439 "This package provides a set of utility functions for iterators,
19440 functions, and dictionaries.")
19441 (license license:bsd-3)))
19442
19443 (define-public python2-toolz
19444 (package-with-python2 python-toolz))
19445
19446 (define-public python-cytoolz
19447 (package
19448 (name "python-cytoolz")
19449 (version "0.9.0.1")
19450 (source
19451 (origin
19452 (method url-fetch)
19453 (uri (pypi-uri "cytoolz" version))
19454 (sha256
19455 (base32
19456 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19457 (build-system python-build-system)
19458 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19459 ;; 'exceptions'"
19460 (arguments '(#:tests? #f))
19461 (propagated-inputs
19462 `(("python-toolz" ,python-toolz)))
19463 (native-inputs
19464 `(("python-cython" ,python-cython)))
19465 (home-page "https://github.com/pytoolz/cytoolz")
19466 (synopsis "High performance functional utilities")
19467 (description
19468 "The cytoolz package implements the same API as provided by toolz. The
19469 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19470 that is accessible to other projects developed in Cython.")
19471 (license license:bsd-3)))
19472
19473 (define-public python-sortedcontainers
19474 (package
19475 (name "python-sortedcontainers")
19476 (version "2.1.0")
19477 (source
19478 (origin
19479 (method url-fetch)
19480 (uri (pypi-uri "sortedcontainers" version))
19481 (sha256
19482 (base32
19483 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19484 (build-system python-build-system)
19485 (arguments
19486 ;; FIXME: Tests require many extra dependencies, and would introduce
19487 ;; a circular dependency on hypothesis, which uses this package.
19488 '(#:tests? #f))
19489 (propagated-inputs
19490 `(("python-appdirs" ,python-appdirs)
19491 ("python-distlib" ,python-distlib)
19492 ("python-filelock" ,python-filelock)
19493 ("python-six" ,python-six-bootstrap)))
19494 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19495 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19496 (description
19497 "This package provides a sorted collections library, written in
19498 pure-Python.")
19499 (license license:asl2.0)))
19500
19501 (define-public python2-sortedcontainers
19502 (package-with-python2 python-sortedcontainers))
19503
19504 (define-public python-cloudpickle
19505 (package
19506 (name "python-cloudpickle")
19507 (version "1.3.0")
19508 (source
19509 (origin
19510 (method url-fetch)
19511 (uri (pypi-uri "cloudpickle" version))
19512 (sha256
19513 (base32
19514 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19515 (build-system python-build-system)
19516 (arguments
19517 '(#:phases (modify-phases %standard-phases
19518 (add-before 'check 'do-not-override-PYTHONPATH
19519 (lambda _
19520 ;; Append to PYTHONPATH instead of overriding it so
19521 ;; that dependencies from Guix can be found.
19522 (substitute* "tests/testutils.py"
19523 (("env\\['PYTHONPATH'\\] = pythonpath")
19524 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19525 #t))
19526 (replace 'check
19527 (lambda* (#:key tests? #:allow-other-keys)
19528 (if tests?
19529 (invoke "pytest" "-s" "-vv")
19530 (format #t "test suite not run~%"))
19531 #t)))))
19532 (native-inputs
19533 `(;; For tests.
19534 ("python-psutil" ,python-psutil)
19535 ("python-pytest" ,python-pytest)
19536 ("python-tornado" ,python-tornado)))
19537 (home-page "https://github.com/cloudpipe/cloudpickle")
19538 (synopsis "Extended pickling support for Python objects")
19539 (description
19540 "Cloudpickle makes it possible to serialize Python constructs not
19541 supported by the default pickle module from the Python standard library. It
19542 is especially useful for cluster computing where Python expressions are
19543 shipped over the network to execute on remote hosts, possibly close to the
19544 data.")
19545 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19546 (license license:bsd-3)))
19547
19548 (define-public python2-cloudpickle
19549 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19550 (package
19551 (inherit base)
19552 (native-inputs
19553 `(("python-mock" ,python2-mock)
19554 ,@(package-native-inputs base)))
19555 (propagated-inputs
19556 `(("python-futures" ,python2-futures)
19557 ,@(package-propagated-inputs base))))))
19558
19559 (define-public python-locket
19560 (package
19561 (name "python-locket")
19562 (version "0.2.0")
19563 (source
19564 (origin
19565 (method url-fetch)
19566 (uri (pypi-uri "locket" version))
19567 (sha256
19568 (base32
19569 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19570 (build-system python-build-system)
19571 (home-page "https://github.com/mwilliamson/locket.py")
19572 (synopsis "File-based locks for Python")
19573 (description
19574 "Locket implements a lock that can be used by multiple processes provided
19575 they use the same path.")
19576 (license license:bsd-2)))
19577
19578 (define-public python2-locket
19579 (package-with-python2 python-locket))
19580
19581 (define-public python-blosc
19582 (package
19583 (name "python-blosc")
19584 (version "1.5.1")
19585 (source
19586 (origin
19587 (method url-fetch)
19588 (uri (pypi-uri "blosc" version))
19589 (sha256
19590 (base32
19591 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19592 (build-system python-build-system)
19593 ;; FIXME: all tests pass, but then this error is printed:
19594 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19595 (arguments '(#:tests? #f))
19596 (propagated-inputs
19597 `(("python-numpy" ,python-numpy)))
19598 (home-page "https://github.com/blosc/python-blosc")
19599 (synopsis "Python wrapper for the Blosc data compressor library")
19600 (description "Blosc is a high performance compressor optimized for binary
19601 data. It has been designed to transmit data to the processor cache faster
19602 than the traditional, non-compressed, direct memory fetch approach via a
19603 @code{memcpy()} system call.
19604
19605 Blosc works well for compressing numerical arrays that contains data with
19606 relatively low entropy, like sparse data, time series, grids with
19607 regular-spaced values, etc.
19608
19609 This Python package wraps the Blosc library.")
19610 (license license:bsd-3)))
19611
19612 (define-public python2-blosc
19613 (package-with-python2 python-blosc))
19614
19615 (define-public python-partd
19616 (package
19617 (name "python-partd")
19618 (version "0.3.9")
19619 (source
19620 (origin
19621 (method url-fetch)
19622 (uri (pypi-uri "partd" version))
19623 (sha256
19624 (base32
19625 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19626 (build-system python-build-system)
19627 (propagated-inputs
19628 `(("python-blosc" ,python-blosc)
19629 ("python-locket" ,python-locket)
19630 ("python-numpy" ,python-numpy)
19631 ("python-pandas" ,python-pandas)
19632 ("python-pyzmq" ,python-pyzmq)
19633 ("python-toolz" ,python-toolz)))
19634 (home-page "https://github.com/dask/partd/")
19635 (synopsis "Appendable key-value storage")
19636 (description "Partd stores key-value pairs. Values are raw bytes. We
19637 append on old values. Partd excels at shuffling operations.")
19638 (license license:bsd-3)))
19639
19640 (define-public python2-partd
19641 (package-with-python2 python-partd))
19642
19643 (define-public python-fsspec
19644 (package
19645 (name "python-fsspec")
19646 (version "0.6.1")
19647 (source
19648 (origin
19649 (method url-fetch)
19650 (uri (pypi-uri "fsspec" version))
19651 (sha256
19652 (base32
19653 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19654 (build-system python-build-system)
19655 (arguments '(#:tests? #f)) ; there are none
19656 (home-page "https://github.com/intake/filesystem_spec")
19657 (synopsis "File-system specification")
19658 (description "The purpose of this package is to produce a template or
19659 specification for a file-system interface, that specific implementations
19660 should follow, so that applications making use of them can rely on a common
19661 behavior and not have to worry about the specific internal implementation
19662 decisions with any given backend.")
19663 (license license:bsd-3)))
19664
19665 (define-public python-dask
19666 (package
19667 (name "python-dask")
19668 (version "2.14.0")
19669 (source
19670 (origin
19671 (method url-fetch)
19672 (uri (pypi-uri "dask" version))
19673 (sha256
19674 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19675 (build-system python-build-system)
19676 (arguments
19677 `(#:phases
19678 (modify-phases %standard-phases
19679 (add-after 'unpack 'disable-broken-tests
19680 (lambda _
19681 ;; This test is marked as xfail when pytest-xdist is used.
19682 (substitute* "dask/tests/test_threaded.py"
19683 (("def test_interrupt\\(\\)" m)
19684 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19685 m)))
19686 ;; This one fails with a type error:
19687 ;; TypeError: Already tz-aware, use tz_convert to convert.
19688 (substitute* "dask/dataframe/tests/test_shuffle.py"
19689 (("def test_set_index_timestamp\\(\\)" m)
19690 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19691 m)))
19692 #t))
19693 (replace 'check
19694 (lambda _ (invoke "pytest" "-vv"))))))
19695 (propagated-inputs
19696 `(("python-cloudpickle" ,python-cloudpickle)
19697 ("python-fsspec" ,python-fsspec)
19698 ("python-numpy" ,python-numpy)
19699 ("python-packaging" ,python-packaging)
19700 ("python-pandas" ,python-pandas)
19701 ("python-partd" ,python-partd)
19702 ("python-toolz" ,python-toolz)
19703 ("python-pyyaml" ,python-pyyaml)))
19704 (native-inputs
19705 `(("python-pytest" ,python-pytest)
19706 ("python-pytest-runner" ,python-pytest-runner)))
19707 (home-page "https://github.com/dask/dask/")
19708 (synopsis "Parallel computing with task scheduling")
19709 (description
19710 "Dask is a flexible parallel computing library for analytics. It
19711 consists of two components: dynamic task scheduling optimized for computation,
19712 and large data collections like parallel arrays, dataframes, and lists that
19713 extend common interfaces like NumPy, Pandas, or Python iterators to
19714 larger-than-memory or distributed environments. These parallel collections
19715 run on top of the dynamic task schedulers. ")
19716 (license license:bsd-3)))
19717
19718 (define-public python-ilinkedlist
19719 (package
19720 (name "python-ilinkedlist")
19721 (version "0.4.0")
19722 (source
19723 (origin
19724 (method url-fetch)
19725 (uri (pypi-uri "ilinkedlist" version))
19726 (sha256
19727 (base32
19728 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19729 (build-system python-build-system)
19730 (native-inputs `(("python-pytest" ,python-pytest)))
19731 (inputs `(("python" ,python)))
19732 (home-page "https://github.com/luther9/ilinkedlist-py")
19733 (synopsis "Immutable linked list library")
19734 (description
19735 "This is a implementation of immutable linked lists for Python. It
19736 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19737 Since a linked list is treated as immutable, it is hashable, and its length
19738 can be retrieved in constant time. Some of the terminology is inspired by
19739 LISP. It is possible to create an improper list by creating a @code{Pair}
19740 with a non-list @code{cdr}.")
19741 (license license:gpl3+)))
19742
19743 (define-public python-readlike
19744 (package
19745 (name "python-readlike")
19746 (version "0.1.3")
19747 (source
19748 (origin
19749 (method url-fetch)
19750 (uri (pypi-uri "readlike" version))
19751 (sha256
19752 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19753 (build-system python-build-system)
19754 (home-page "https://github.com/jangler/readlike")
19755 (synopsis "GNU Readline-like line editing module")
19756 (description
19757 "This Python module provides line editing functions similar to the default
19758 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19759 @code{readline} package, this one allows access to those capabilities in settings
19760 outside of a standard command-line interface. It is especially well-suited to
19761 interfacing with Urwid, due to a shared syntax for describing key inputs.
19762
19763 Currently, all stateless Readline commands are implemented. Yanking and history
19764 are not supported.")
19765 (license license:expat)))
19766
19767 (define-public python2-readlike
19768 (package-with-python2 python-readlike))
19769
19770 (define-public python-reparser
19771 (package
19772 (name "python-reparser")
19773 (version "1.4.3")
19774 (source
19775 (origin
19776 (method url-fetch)
19777 (uri (pypi-uri "ReParser" version))
19778 (sha256
19779 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19780 (build-system python-build-system)
19781 (home-page "https://github.com/xmikos/reparser")
19782 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19783 (description
19784 "This Python library provides a simple lexer/parser for inline markup based
19785 on regular expressions.")
19786 (license license:expat)))
19787
19788 (define-public python2-reparser
19789 (let ((reparser (package-with-python2
19790 (strip-python2-variant python-reparser))))
19791 (package (inherit reparser)
19792 (propagated-inputs
19793 `(("python2-enum34" ,python2-enum34)
19794 ,@(package-propagated-inputs reparser))))))
19795
19796 (define-public python-retrying
19797 (package
19798 (name "python-retrying")
19799 (version "1.3.3")
19800 (source
19801 (origin
19802 (method git-fetch)
19803 (uri (git-reference
19804 (url "https://github.com/rholder/retrying")
19805 (commit (string-append "v" version))))
19806 (file-name (git-file-name name version))
19807 (sha256
19808 (base32
19809 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19810 (build-system python-build-system)
19811 (propagated-inputs
19812 `(("python-six" ,python-six)))
19813 (home-page "https://github.com/rholder/retrying")
19814 (synopsis "Library for adding retry behavior")
19815 (description "Retrying is a general-purpose retrying library to simplify
19816 the task of adding retry behavior to just about anything.
19817
19818 Features:
19819
19820 @itemize
19821 @item Generic Decorator API.
19822 @item Specify stop condition (i.e. limit by number of attempts).
19823 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19824 @item Customize retrying on Exceptions.
19825 @item Customize retrying on expected returned result.
19826 @end itemize")
19827 (license license:asl2.0)))
19828
19829 (define-public python-precis-i18n
19830 (package
19831 (name "python-precis-i18n")
19832 (version "1.0.0")
19833 (source
19834 (origin
19835 (method url-fetch)
19836 (uri (pypi-uri "precis_i18n" version))
19837 (sha256
19838 (base32
19839 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19840 (build-system python-build-system)
19841 (home-page "https://github.com/byllyfish/precis_i18n")
19842 (synopsis "Implementation of the PRECIS framework")
19843 (description
19844 "This module implements the PRECIS Framework as described in RFC 8264,
19845 RFC 8265 and RFC 8266.")
19846 (license license:expat)))
19847
19848 (define-public python-absl-py
19849 (package
19850 (name "python-absl-py")
19851 (version "0.6.1")
19852 (source
19853 (origin
19854 (method url-fetch)
19855 (uri (pypi-uri "absl-py" version))
19856 (sha256
19857 (base32
19858 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19859 (build-system python-build-system)
19860 (propagated-inputs
19861 `(("python-six" ,python-six)))
19862 (home-page "https://github.com/abseil/abseil-py")
19863 (synopsis "Abseil Python common libraries")
19864 (description
19865 "This package provides the Abseil Python Common Libraries, a collection
19866 of Python libraries for building Python applications.")
19867 (license license:asl2.0)))
19868
19869 (define-public python-astor
19870 (package
19871 (name "python-astor")
19872 (version "0.7.1")
19873 (source
19874 (origin
19875 (method url-fetch)
19876 (uri (pypi-uri "astor" version))
19877 (sha256
19878 (base32
19879 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19880 (build-system python-build-system)
19881 ;; FIXME: There are two errors and two test failures.
19882 (arguments `(#:tests? #f))
19883 (home-page "https://github.com/berkerpeksag/astor")
19884 (synopsis "Read and write Python ASTs")
19885 (description "Astor is designed to allow easy manipulation of Python
19886 source via the Abstract Syntax Tree.")
19887 (license license:bsd-3)))
19888
19889 (define-public python2-astor
19890 (package-with-python2 python-astor))
19891
19892 (define-public python-astunparse
19893 (package
19894 (name "python-astunparse")
19895 (version "1.6.2")
19896 (source
19897 (origin
19898 (method url-fetch)
19899 (uri (pypi-uri "astunparse" version))
19900 (sha256
19901 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19902 (build-system python-build-system)
19903 (arguments '(#:tests? #f)) ; there are none
19904 (propagated-inputs
19905 `(("python-six" ,python-six)
19906 ("python-wheel" ,python-wheel)))
19907 (home-page "https://github.com/simonpercivall/astunparse")
19908 (synopsis "AST unparser for Python")
19909 (description "This package provides an AST unparser for Python. It is a
19910 factored out version of @code{unparse} found in the Python source
19911 distribution.")
19912 (license license:bsd-3)))
19913
19914 (define-public python-gast
19915 (package
19916 (name "python-gast")
19917 (version "0.3.3")
19918 (source
19919 (origin
19920 (method url-fetch)
19921 (uri (pypi-uri "gast" version))
19922 (sha256
19923 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19924 (build-system python-build-system)
19925 (propagated-inputs
19926 `(("python-astunparse" ,python-astunparse)))
19927 (home-page "https://pypi.org/project/gast/")
19928 (synopsis "Generic Python AST that abstracts the underlying Python version")
19929 (description
19930 "GAST provides a compatibility layer between the AST of various Python
19931 versions, as produced by @code{ast.parse} from the standard @code{ast}
19932 module.")
19933 (license license:bsd-3)))
19934
19935 (define-public python-wikidata
19936 (package
19937 (name "python-wikidata")
19938 (version "0.6.1")
19939 (source
19940 (origin
19941 (method url-fetch)
19942 (uri (pypi-uri "Wikidata" version))
19943 (sha256
19944 (base32
19945 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19946 (build-system python-build-system)
19947 (propagated-inputs
19948 `(("python-babel" ,python-babel)))
19949 (home-page "https://github.com/dahlia/wikidata")
19950 (synopsis "Wikidata client library")
19951 (description
19952 "This package provides a Python interface to
19953 @url{https://www.wikidata.org/, Wikidata}.")
19954 (properties '((upstream-name . "Wikidata")))
19955 (license license:gpl3+)))
19956
19957 (define-public python-doctest-ignore-unicode
19958 (package
19959 (name "python-doctest-ignore-unicode")
19960 (version "0.1.2")
19961 (source
19962 (origin
19963 (method url-fetch)
19964 (uri (pypi-uri "doctest-ignore-unicode" version))
19965 (sha256
19966 (base32
19967 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19968 (build-system python-build-system)
19969 (native-inputs
19970 `(("python-nose" ,python-nose)))
19971 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19972 (synopsis "Ignore Unicode literal prefixes in doctests")
19973 (description
19974 "This package adds support for a flag to ignore Unicode literal prefixes
19975 in doctests.")
19976 (license license:asl2.0)))
19977
19978 (define-public python-attr
19979 (package
19980 (name "python-attr")
19981 (version "0.3.1")
19982 (source
19983 (origin
19984 (method url-fetch)
19985 (uri (pypi-uri "attr" version))
19986 (sha256
19987 (base32
19988 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19989 (build-system python-build-system)
19990 (home-page "https://github.com/denis-ryzhkov/attr")
19991 (synopsis "Decorator for attributes of target function or class")
19992 (description "Simple decorator to set attributes of target function or
19993 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19994 (license license:expat)))
19995
19996 (define-public python-construct
19997 (package
19998 (name "python-construct")
19999 (version "2.10.56")
20000 (source
20001 (origin
20002 (method url-fetch)
20003 (uri (pypi-uri "construct" version))
20004 (sha256
20005 (base32
20006 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20007 (build-system python-build-system)
20008 (arguments
20009 `(#:tests? #f)) ; No tests exist.
20010 (propagated-inputs
20011 `(("python-extras" ,python-extras)
20012 ("python-arrow" ,python-arrow)
20013 ("python-numpy" ,python-numpy)
20014 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20015 (home-page "https://construct.readthedocs.io")
20016 (synopsis "Declarative and symmetrical parser and builder for binary data")
20017 (description
20018 "This package provides both simple, atomic constructs (such as
20019 integers of various sizes), as well as composite ones which allow you
20020 form hierarchical and sequential structures of increasing complexity.
20021 It features bit and byte granularity, easy debugging and testing, an
20022 easy-to-extend subclass system, and lots of primitive constructs to
20023 make your work easier.")
20024 (license license:expat)))
20025
20026 (define-public python-outcome
20027 (package
20028 (name "python-outcome")
20029 (version "1.0.1")
20030 (source
20031 (origin
20032 (method url-fetch)
20033 (uri (pypi-uri "outcome" version))
20034 (sha256
20035 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20036 (build-system python-build-system)
20037 (arguments
20038 `(#:phases
20039 (modify-phases %standard-phases
20040 (replace 'check
20041 (lambda* (#:key inputs outputs #:allow-other-keys)
20042 (add-installed-pythonpath inputs outputs)
20043 (invoke "pytest" "-vv"))))))
20044 (native-inputs
20045 `(("python-pytest" ,python-pytest)
20046 ("python-pytest-cov" ,python-pytest-cov)
20047 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20048 (propagated-inputs
20049 `(("python-async-generator" ,python-async-generator)
20050 ("python-attrs" ,python-attrs)))
20051 (home-page "https://github.com/python-trio/outcome")
20052 (synopsis "Capture the outcome of Python function calls")
20053 (description
20054 "Capture the outcome of Python function calls. Extracted from the Trio
20055 project.")
20056 ;; Either license applies.
20057 (license (list license:expat license:asl2.0))))
20058
20059 (define-public python-trio
20060 (package
20061 (name "python-trio")
20062 (version "0.17.0")
20063 (source
20064 (origin
20065 (method url-fetch)
20066 (uri (pypi-uri "trio" version))
20067 (sha256
20068 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20069 (build-system python-build-system)
20070 (arguments
20071 `(#:phases
20072 (modify-phases %standard-phases
20073 (add-before 'check 'change-home
20074 (lambda _
20075 ;; Tests require a writable home.
20076 (setenv "HOME" "/tmp")
20077 #t))
20078 (replace 'check
20079 (lambda _
20080 (invoke "pytest" "-vv" "-k"
20081 (string-append
20082 ;; This test times out.
20083 "not test_ki_protection_works"
20084 ;; Assertion errors.
20085 " and not test_guest_mode_ki"
20086 " and not test_run_in_trio_thread_ki"
20087 ;; These try to raise KeyboardInterrupt which does not work
20088 ;; in the build environment.
20089 " and not test_ki_self"
20090 " and not test_ki_wakes_us_up"
20091 ;; Failure in name resolution.
20092 " and not test_getnameinfo"
20093 " and not test_SocketType_resolve"
20094 ;; OSError: protocol not found.
20095 " and not test_getprotobyname")))))))
20096 (native-inputs
20097 `(("python-astor" ,python-astor)
20098 ("python-ipython" ,python-ipython)
20099 ("python-jedi" ,python-jedi)
20100 ("python-pylint" ,python-pylint)
20101 ("python-pyopenssl" ,python-pyopenssl)
20102 ("python-pytest" ,python-pytest)
20103 ("python-pytest-cov" ,python-pytest-cov)
20104 ("python-trustme" ,python-trustme)))
20105 (propagated-inputs
20106 `(("python-attrs" ,python-attrs)
20107 ("python-idna" ,python-idna)
20108 ("python-outcome" ,python-outcome)
20109 ("python-sniffio" ,python-sniffio)
20110 ("python-sortedcontainers"
20111 ,python-sortedcontainers)))
20112 (home-page "https://github.com/python-trio/trio")
20113 (synopsis "Friendly Python library for async concurrency and I/O")
20114 (description
20115 "Trio strives to be a production-quality, async/await-native I/O library
20116 for Python. Like all async libraries, its main purpose is to help you write
20117 programs that do multiple things at the same time with parallelized I/O.")
20118 ;; Either license applies.
20119 (license (list license:expat license:asl2.0))))
20120
20121 (define-public python-trio-typing
20122 (package
20123 (name "python-trio-typing")
20124 (version "0.5.0")
20125 (source
20126 (origin
20127 (method url-fetch)
20128 (uri (pypi-uri "trio-typing" version))
20129 (sha256
20130 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20131 (build-system python-build-system)
20132 (arguments
20133 `(#:phases
20134 (modify-phases %standard-phases
20135 (replace 'check
20136 (lambda _
20137 (invoke "pytest" "-vv"))))))
20138 (native-inputs
20139 `(("python-attrs" ,python-attrs)
20140 ("python-pytest" ,python-pytest)))
20141 (propagated-inputs
20142 `(("python-mypy" ,python-mypy)
20143 ("python-mypy-extensions"
20144 ,python-mypy-extensions)
20145 ("python-trio" ,python-trio)
20146 ("python-typing-extensions"
20147 ,python-typing-extensions)))
20148 (home-page "https://github.com/python-trio/trio-typing")
20149 (synopsis "Static type checking support for Trio and related projects")
20150 (description
20151 "This package provides:
20152
20153 @itemize
20154 @item PEP 561 typing stubs packages for the Trio project packages:
20155
20156 @itemize
20157 @item trio (@code{trio-stubs})
20158 @item outcome (@code{outcome-stubs})
20159 @item async_generator (@code{async_generator-stubs})
20160 @end itemize
20161
20162 @item A package @code{trio_typing} containing types that Trio programs often
20163 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20164 a mypy plugin that smooths over some limitations in the basic type hints.
20165 @end itemize")
20166 ;; Either license applies.
20167 (license (list license:expat license:asl2.0))))
20168
20169 (define-public python-humanize
20170 (package
20171 (name "python-humanize")
20172 (version "0.5.1")
20173 (source
20174 (origin
20175 (method url-fetch)
20176 (uri (pypi-uri "humanize" version))
20177 (sha256
20178 (base32
20179 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20180 (arguments
20181 '(#:tests? #f)) ; tests not in pypi archive
20182 (build-system python-build-system)
20183 (home-page "https://github.com/jmoiron/humanize")
20184 (synopsis "Print numerical information in a human-readable form")
20185 (description "This package provides a Python module that displays numbers
20186 and dates in \"human readable\" forms. For example, it would display
20187 \"12345591313\" as \"12.3 billion\".")
20188 (license license:expat)))
20189
20190 (define-public python-txaio
20191 (package
20192 (name "python-txaio")
20193 (version "18.8.1")
20194 (source
20195 (origin
20196 (method url-fetch)
20197 (uri (pypi-uri "txaio" version))
20198 (sha256
20199 (base32
20200 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20201 (build-system python-build-system)
20202 (propagated-inputs
20203 `(("python-twisted" ,python-twisted)
20204 ("python-six" ,python-six)))
20205 (home-page "https://github.com/crossbario/txaio")
20206 (synopsis "Compatibility layer between Python asyncio and Twisted")
20207 (description "Txaio provides a compatibility layer between the Python
20208 @code{asyncio} module and @code{Twisted}.")
20209 (license license:expat)))
20210
20211 (define-public python-toolshed
20212 (package
20213 (name "python-toolshed")
20214 (version "0.4.6")
20215 (source
20216 (origin
20217 (method url-fetch)
20218 (uri (pypi-uri "toolshed" version))
20219 (sha256
20220 (base32
20221 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20222 (build-system python-build-system)
20223 (native-inputs
20224 `(("python-nose" ,python-nose)))
20225 (home-page "https://github.com/brentp/toolshed/")
20226 (synopsis "Collection of modules and functions for working with data")
20227 (description "This is a collection of well-tested, simple modules and
20228 functions that aim to reduce boilerplate when working with data.")
20229 (license license:bsd-2)))
20230
20231 (define-public python-annoy
20232 (package
20233 (name "python-annoy")
20234 (version "1.15.1")
20235 (source
20236 (origin
20237 (method url-fetch)
20238 (uri (pypi-uri "annoy" version))
20239 (sha256
20240 (base32
20241 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20242 (build-system python-build-system)
20243 (native-inputs
20244 `(("python-nose" ,python-nose)))
20245 (home-page "https://github.com/spotify/annoy/")
20246 (synopsis "Approximate nearest neighbors library")
20247 (description
20248 "Annoy is a C++ library with Python bindings to search for points in
20249 space that are close to a given query point. It also creates large read-only
20250 file-based data structures that are @code{mmap}ped into memory so that many
20251 processes may share the same data.")
20252 (license license:asl2.0)))
20253
20254 (define-public python-croniter
20255 (package
20256 (name "python-croniter")
20257 (version "0.3.34")
20258 (source (origin
20259 (method url-fetch)
20260 (uri (pypi-uri "croniter" version))
20261 (sha256
20262 (base32
20263 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20264 (build-system python-build-system)
20265 (propagated-inputs
20266 `(("python-dateutil" ,python-dateutil)
20267 ("python-natsort" ,python-natsort)))
20268 (home-page "https://github.com/kiorky/croniter")
20269 (synopsis "Iterate datetime objects with cron-like syntax")
20270 (description
20271 "@code{croniter} provides iteration for datetime object with cron-like
20272 format.")
20273 (license license:expat)))
20274
20275 (define-public python-pylzma
20276 (package
20277 (name "python-pylzma")
20278 (version "0.5.0")
20279 (source
20280 (origin
20281 (method url-fetch)
20282 (uri (pypi-uri "pylzma" version))
20283 (sha256
20284 (base32
20285 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20286 (build-system python-build-system)
20287 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20288 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20289 (description "This package provides Python bindings for the LZMA library
20290 by Igor Pavlov.")
20291 (license license:lgpl2.1+)))
20292
20293 (define-public python2-pylzma
20294 (package-with-python2 python-pylzma))
20295
20296 (define-public python2-zeroconf
20297 (package
20298 (name "python2-zeroconf")
20299
20300 ;; This is the last version that supports Python 2.x.
20301 (version "0.19.1")
20302 (source
20303 (origin
20304 (method url-fetch)
20305 (uri (pypi-uri "zeroconf" version))
20306 (sha256
20307 (base32
20308 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20309 (build-system python-build-system)
20310 (arguments
20311 `(#:python ,python-2
20312 #:phases
20313 (modify-phases %standard-phases
20314 (add-after 'unpack 'patch-requires
20315 (lambda* (#:key inputs #:allow-other-keys)
20316 (substitute* "setup.py"
20317 (("enum-compat")
20318 "enum34"))
20319 #t)))))
20320 (native-inputs
20321 `(("python2-six" ,python2-six)
20322 ("python2-enum32" ,python2-enum34)
20323 ("python2-netifaces" ,python2-netifaces)
20324 ("python2-typing" ,python2-typing)))
20325 (home-page "https://github.com/jstasiak/python-zeroconf")
20326 (synopsis "Pure Python mDNS service discovery")
20327 (description
20328 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20329 compatible).")
20330 (license license:lgpl2.1+)))
20331
20332 (define-public python-bsddb3
20333 (package
20334 (name "python-bsddb3")
20335 (version "6.2.6")
20336 (source
20337 (origin
20338 (method url-fetch)
20339 (uri (pypi-uri "bsddb3" version))
20340 (sha256
20341 (base32
20342 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20343 (build-system python-build-system)
20344 (inputs
20345 `(("bdb" ,bdb)))
20346 (arguments
20347 '(#:phases
20348 (modify-phases %standard-phases
20349 (add-after 'unpack 'configure-locations
20350 (lambda* (#:key inputs #:allow-other-keys)
20351 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20352 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20353 #t))
20354 (replace 'check
20355 (lambda _
20356 (invoke "python3" "test3.py" "-v"))))))
20357 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20358 (synopsis "Python bindings for Oracle Berkeley DB")
20359 (description
20360 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20361 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20362 Transaction objects, and each of these is exposed as a Python type in the
20363 bsddb3.db module. The database objects can use various access methods: btree,
20364 hash, recno, and queue. Complete support of Berkeley DB distributed
20365 transactions. Complete support for Berkeley DB Replication Manager.
20366 Complete support for Berkeley DB Base Replication. Support for RPC.")
20367 (license license:bsd-3)))
20368
20369 (define-public python-dbfread
20370 (package
20371 (name "python-dbfread")
20372 (version "2.0.7")
20373 (source (origin
20374 (method url-fetch)
20375 (uri (pypi-uri "dbfread" version))
20376 (sha256
20377 (base32
20378 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20379 (build-system python-build-system)
20380 (native-inputs
20381 `(("python-pytest" ,python-pytest)))
20382 (home-page "https://dbfread.readthedocs.io")
20383 (synopsis "Read DBF Files with Python")
20384 (description
20385 "This library reads DBF files and returns the data as native Python data
20386 types for further processing. It is primarily intended for batch jobs and
20387 one-off scripts.")
20388 (license license:expat)))
20389
20390 (define-public python-cached-property
20391 (package
20392 (name "python-cached-property")
20393 (version "1.5.1")
20394 (source
20395 (origin
20396 (method url-fetch)
20397 (uri (pypi-uri "cached-property" version))
20398 (sha256
20399 (base32
20400 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20401 (build-system python-build-system)
20402 (arguments
20403 `(#:phases
20404 (modify-phases %standard-phases
20405 ;; https://github.com/pydanny/cached-property/issues/131
20406 ;; recent versions of freezegun break one test
20407 (add-after 'unpack 'disable-broken-test
20408 (lambda _
20409 (substitute* "tests/test_cached_property.py"
20410 (("def test_threads_ttl_expiry\\(self\\)" m)
20411 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20412 " " m)))
20413 #t)))))
20414 (native-inputs
20415 `(("python-freezegun" ,python-freezegun)))
20416 (home-page
20417 "https://github.com/pydanny/cached-property")
20418 (synopsis
20419 "Decorator for caching properties in classes")
20420 (description
20421 "This package provides a decorator which makes caching
20422 time-or-computationally-expensive properties quick and easy and works in Python
20423 2 or 3.")
20424 (license license:bsd-3)))
20425
20426 (define-public python-folium
20427 (package
20428 (name "python-folium")
20429 (version "0.11.0")
20430 (source
20431 (origin
20432 (method url-fetch)
20433 (uri (pypi-uri "folium" version))
20434 (sha256
20435 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20436 (build-system python-build-system)
20437 (propagated-inputs
20438 `(("python-branca" ,python-branca)
20439 ("python-jinja2" ,python-jinja2)
20440 ("python-numpy" ,python-numpy)
20441 ("python-requests" ,python-requests)))
20442 (native-inputs
20443 `(("python-pytest" ,python-pytest)))
20444 (home-page "https://github.com/python-visualization/folium")
20445 (synopsis "Make beautiful maps with Leaflet.js & Python")
20446 (description "@code{folium} makes it easy to visualize data that’s been
20447 manipulated in Python on an interactive leaflet map. It enables both the
20448 binding of data to a map for @code{choropleth} visualizations as well as
20449 passing rich vector/raster/HTML visualizations as markers on the map.
20450
20451 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20452 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20453 supports Image, Video, GeoJSON and TopoJSON overlays.")
20454 (license license:expat)))
20455
20456 (define-public jube
20457 (package
20458 ;; This is a command-line tool, so no "python-" prefix.
20459 (name "jube")
20460 (version "2.2.2")
20461 (source (origin
20462 (method url-fetch)
20463 (uri (string-append
20464 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20465 version))
20466 (sha256
20467 (base32
20468 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20469 (file-name (string-append "jube-" version ".tar.gz"))))
20470 (build-system python-build-system)
20471 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20472 (synopsis "Benchmarking environment")
20473 (description
20474 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20475 benchmarked application, benchmark data is stored in a format that allows JUBE
20476 to deduct the desired information. This data can be parsed by automatic pre-
20477 and post-processing scripts that draw information and store it more densely
20478 for manual interpretation.")
20479 (license license:gpl3+)))
20480
20481 (define-public python-pyroutelib3
20482 (package
20483 (name "python-pyroutelib3")
20484 (version "1.3.post1")
20485 (source
20486 (origin
20487 (method url-fetch)
20488 (uri (pypi-uri "pyroutelib3" version))
20489 (sha256
20490 (base32
20491 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20492 (build-system python-build-system)
20493 (propagated-inputs
20494 `(("python-dateutil" ,python-dateutil)))
20495 (home-page "https://github.com/MKuranowski/pyroutelib3")
20496 (synopsis "Library for simple routing on OSM data")
20497 (description "Library for simple routing on OSM data")
20498 (license license:gpl3+)))
20499
20500 (define-public python-bibtexparser
20501 (package
20502 (name "python-bibtexparser")
20503 (version "1.1.0")
20504 (source
20505 (origin
20506 (method url-fetch)
20507 (uri (pypi-uri "bibtexparser" version))
20508 (sha256
20509 (base32
20510 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20511 (build-system python-build-system)
20512 (propagated-inputs
20513 `(("python-pyparsing" ,python-pyparsing)))
20514 (native-inputs
20515 `(("python-future" ,python-future)))
20516 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20517 (synopsis "Python library to parse BibTeX files")
20518 (description "BibtexParser is a Python library to parse BibTeX files.")
20519 (license (list license:bsd-3 license:lgpl3))))
20520
20521 (define-public python-distro
20522 (package
20523 (name "python-distro")
20524 (version "1.4.0")
20525 (source
20526 (origin
20527 (method url-fetch)
20528 (uri (pypi-uri "distro" version))
20529 (sha256
20530 (base32
20531 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20532 (build-system python-build-system)
20533 (native-inputs
20534 `(("python-pytest" ,python-pytest)))
20535 (home-page "https://github.com/nir0s/distro")
20536 (synopsis
20537 "OS platform information API")
20538 (description
20539 "@code{distro} provides information about the OS distribution it runs on,
20540 such as a reliable machine-readable ID, or version information.
20541
20542 It is the recommended replacement for Python's original
20543 `platform.linux_distribution` function (which will be removed in Python 3.8).
20544 @code{distro} also provides a command-line interface to output the platform
20545 information in various formats.")
20546 (license license:asl2.0)))
20547
20548 (define-public python-cairosvg
20549 (package
20550 (name "python-cairosvg")
20551 (version "2.5.0")
20552 (source
20553 (origin
20554 (method url-fetch)
20555 (uri (pypi-uri "CairoSVG" version))
20556 (sha256
20557 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20558 (build-system python-build-system)
20559 (arguments
20560 `(#:phases
20561 (modify-phases %standard-phases
20562 (replace 'check
20563 (lambda _ (invoke "pytest"))))))
20564 (propagated-inputs
20565 `(("python-cairocffi" ,python-cairocffi)
20566 ("python-cssselect2" ,python-cssselect2)
20567 ("python-defusedxml" ,python-defusedxml)
20568 ("python-pillow" ,python-pillow)
20569 ("python-tinycss2" ,python-tinycss2)))
20570 (native-inputs
20571 `(("python-pytest-flake8" ,python-pytest-flake8)
20572 ("python-pytest-isort" ,python-pytest-isort)
20573 ("python-pytest-runner" ,python-pytest-runner)))
20574 (home-page "https://cairosvg.org/")
20575 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20576 (description "CairoSVG is a SVG converter based on Cairo. It can export
20577 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20578 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20579 parsed, the result is drawn to a Cairo surface that can be exported to
20580 qvarious formats: PDF, PostScript, PNG and even SVG.")
20581 (license license:lgpl3+)))
20582
20583 (define-public python-pyphen
20584 (package
20585 (name "python-pyphen")
20586 (version "0.10.0")
20587 (source
20588 (origin
20589 (method url-fetch)
20590 (uri (pypi-uri "Pyphen" version))
20591 (sha256
20592 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20593 (build-system python-build-system)
20594 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20595 ;; embedded set provided by upstream - like Debian does.
20596 (home-page "https://github.com/Kozea/Pyphen")
20597 (synopsis "Pure Python module to hyphenate text")
20598 (description "Pyphen is a pure Python module to hyphenate text using
20599 existing Hunspell hyphenation dictionaries.")
20600 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20601
20602 (define-public python-intelhex
20603 (package
20604 (name "python-intelhex")
20605 (version "2.2.1")
20606 (source
20607 (origin
20608 (method url-fetch)
20609 (uri (pypi-uri "intelhex" version))
20610 (sha256
20611 (base32
20612 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20613 (build-system python-build-system)
20614 (arguments '(#:tests? #f)) ;issue with version
20615 (home-page "https://pypi.org/project/IntelHex/")
20616 (synopsis "Python library for Intel HEX files manipulations")
20617 (description "The Intel HEX file format is widely used in microprocessors
20618 and microcontrollers area (embedded systems etc.) as the de facto standard for
20619 representation of code to be programmed into microelectronic devices. This
20620 package provides an intelhex Python library to read, write, create from
20621 scratch and manipulate data from Intel HEX file format. It also includes
20622 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20623 converters and more, those based on the library itself.")
20624 (license license:bsd-3)))
20625
20626 (define-public python-pykwalify
20627 (package
20628 (name "python-pykwalify")
20629 (version "1.7.0")
20630 (source
20631 (origin
20632 (method url-fetch)
20633 (uri (pypi-uri "pykwalify" version))
20634 (sha256
20635 (base32
20636 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20637 (build-system python-build-system)
20638 (arguments '(#:tests? #f)) ;missing dependencies
20639 (propagated-inputs
20640 `(("python-dateutil" ,python-dateutil)
20641 ("python-docopt" ,python-docopt)
20642 ("python-pyyaml" ,python-pyyaml)))
20643 (home-page "https://github.com/grokzen/pykwalify")
20644 (synopsis
20645 "Python lib/cli for JSON/YAML schema validation")
20646 (description
20647 "This package provides a parser, schema validator, and data binding tool
20648 for YAML and JSON.")
20649 (license license:expat)))
20650
20651 (define-public python-dbusmock
20652 (package
20653 (name "python-dbusmock")
20654 (version "0.18.3")
20655 (source
20656 (origin
20657 (method url-fetch)
20658 (uri (pypi-uri "python-dbusmock" version))
20659 (sha256
20660 (base32
20661 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20662 (build-system python-build-system)
20663 (arguments
20664 '(#:phases
20665 (modify-phases %standard-phases
20666 (add-after 'unpack 'patch-shell-path
20667 (lambda _
20668 (substitute* "tests/test_code.py"
20669 (("/bin/bash") (which "bash")))
20670 #t)))))
20671 (native-inputs
20672 `(;; For tests.
20673 ("dbus" ,dbus) ; for dbus-daemon
20674 ("python-nose" ,python-nose)
20675 ("which" ,which)))
20676 (propagated-inputs
20677 `(("python-dbus" ,python-dbus)
20678 ("python-pygobject" ,python-pygobject)))
20679 (home-page "https://github.com/martinpitt/python-dbusmock")
20680 (synopsis "Python library for mock D-Bus objects")
20681 (description "python-dbusmock allows for the easy creation of mock objects on
20682 D-Bus. This is useful for writing tests for software which talks to D-Bus
20683 services such as upower, systemd, logind, gnome-session or others, and it is
20684 hard (or impossible without root privileges) to set the state of the real
20685 services to what you expect in your tests.")
20686 (license license:lgpl3+)))
20687
20688 (define-public python-jsonplus
20689 (package
20690 (name "python-jsonplus")
20691 (version "0.8.0")
20692 (home-page "https://github.com/randomir/jsonplus")
20693 (source (origin
20694 (method url-fetch)
20695 (uri (pypi-uri "jsonplus" version))
20696 (sha256
20697 (base32
20698 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20699 (build-system python-build-system)
20700 ;; XXX: No tests on PyPI, and the repository has no tags.
20701 (arguments '(#:tests? #f))
20702 (propagated-inputs
20703 `(("python-dateutil" ,python-dateutil)
20704 ("python-simplejson" ,python-simplejson)
20705 ("python-sortedcontainers" ,python-sortedcontainers)))
20706 (synopsis "Serialize Python types to/from JSON")
20707 (description
20708 "This package provides functionality to serialize arbitrary data types
20709 to and from JSON. Common data types are implemented and it is easy to
20710 register custom encoders and decoders.")
20711 (license license:expat)))
20712
20713 (define-public python-ujson
20714 (package
20715 (name "python-ujson")
20716 (version "4.0.1")
20717 (source
20718 (origin
20719 (method url-fetch)
20720 (uri (pypi-uri "ujson" version))
20721 (sha256
20722 (base32
20723 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20724 (modules '((guix build utils)))
20725 (snippet
20726 '(begin (delete-file-recursively "deps") #t))))
20727 (build-system python-build-system)
20728 (arguments
20729 `(#:phases
20730 (modify-phases %standard-phases
20731 (add-after 'unpack 'link-to-system-double-conversion
20732 (lambda* (#:key inputs #:allow-other-keys)
20733 (let ((d-c (assoc-ref inputs "double-conversion")))
20734 (substitute* "setup.py"
20735 (("./deps/double-conversion/double-conversion\"")
20736 (string-append d-c "/include/double-conversion\""))
20737 (("-lstdc++" stdc)
20738 (string-append "-L" d-c "/lib\","
20739 " \"-ldouble-conversion\","
20740 " \"" stdc)))
20741 #t)))
20742 (replace 'check
20743 (lambda* (#:key inputs outputs #:allow-other-keys)
20744 (add-installed-pythonpath inputs outputs)
20745 (invoke "pytest"))))))
20746 (native-inputs
20747 `(("double-conversion" ,double-conversion)
20748 ("python-setuptools-scm" ,python-setuptools-scm)
20749 ("python-pytest" ,python-pytest)))
20750 (home-page "https://github.com/ultrajson/ultrajson")
20751 (synopsis "Ultra fast JSON encoder and decoder for Python")
20752 (description
20753 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20754 bindings for Python 3.")
20755 (license license:bsd-3)))
20756
20757 (define-public python-iocapture
20758 ;; The latest release is more than a year older than this commit.
20759 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20760 (revision "1"))
20761 (package
20762 (name "python-iocapture")
20763 (version "0.1.2")
20764 (source
20765 (origin
20766 (method git-fetch)
20767 (uri (git-reference
20768 (url "https://github.com/oinume/iocapture")
20769 (commit commit)))
20770 (file-name (git-file-name name version))
20771 (sha256
20772 (base32
20773 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20774 (build-system python-build-system)
20775 (arguments
20776 `(#:phases
20777 (modify-phases %standard-phases
20778 (delete 'check)
20779 (add-after 'install 'check
20780 (lambda* (#:key inputs outputs #:allow-other-keys)
20781 (add-installed-pythonpath inputs outputs)
20782 (invoke "py.test" "-v" "tests")
20783 #t)))))
20784 (propagated-inputs
20785 `(("python-flexmock" ,python-flexmock)
20786 ("python-pytest" ,python-pytest)
20787 ("python-pytest-cov" ,python-pytest-cov)
20788 ("python-six" ,python-six)))
20789 (home-page "https://github.com/oinume/iocapture")
20790 (synopsis "Python capturing tool for stdout and stderr")
20791 (description
20792 "This package helps you to capture the standard out (stdout) and the
20793 standard error channel (stderr) in your program.")
20794 (license license:expat))))
20795
20796 (define-public python-argh
20797 ;; There are 21 commits since the latest release containing important
20798 ;; improvements.
20799 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20800 (revision "1"))
20801 (package
20802 (name "python-argh")
20803 (version (git-version "0.26.2" revision commit))
20804 (source
20805 (origin
20806 (method git-fetch)
20807 (uri (git-reference
20808 (url "https://github.com/neithere/argh")
20809 (commit commit)))
20810 (file-name (git-file-name name version))
20811 (sha256
20812 (base32
20813 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20814 (build-system python-build-system)
20815 (propagated-inputs
20816 `(("python-iocapture" ,python-iocapture)
20817 ("python-mock" ,python-mock)
20818 ("python-pytest" ,python-pytest)
20819 ("python-pytest-cov" ,python-pytest-cov)
20820 ("python-pytest-xdist" ,python-pytest-xdist)
20821 ("python-tox" ,python-tox)))
20822 (home-page "https://github.com/neithere/argh/")
20823 (synopsis "Argparse wrapper with natural syntax")
20824 (description
20825 "python-argh is a small library that provides several layers of
20826 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20827 always possible to declare a command with the highest possible (and least
20828 flexible) layer and then tune the behaviour with any of the lower layers
20829 including the native API of @code{python-argparse}.")
20830 (license license:lgpl3+))))
20831
20832 (define-public python-ppft
20833 (package
20834 (name "python-ppft")
20835 (version "1.6.6.1")
20836 (source
20837 (origin
20838 (method url-fetch)
20839 (uri (pypi-uri "ppft" version))
20840 (sha256
20841 (base32
20842 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20843 (build-system python-build-system)
20844 (arguments '(#:tests? #f)) ; there are none
20845 (propagated-inputs
20846 `(("python-six" ,python-six)))
20847 (home-page "https://pypi.org/project/ppft/")
20848 (synopsis "Fork of Parallel Python")
20849 (description
20850 "This package is a fork of Parallel Python. The Parallel Python
20851 module (@code{pp}) provides an easy and efficient way to create
20852 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20853 computers and clusters. It features cross-platform portability and dynamic
20854 load balancing.")
20855 (license license:bsd-3)))
20856
20857 (define-public python-pox
20858 (package
20859 (name "python-pox")
20860 (version "0.2.7")
20861 (source
20862 (origin
20863 (method url-fetch)
20864 (uri (pypi-uri "pox" version))
20865 (sha256
20866 (base32
20867 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20868 (build-system python-build-system)
20869 (arguments
20870 `(#:phases
20871 (modify-phases %standard-phases
20872 (replace 'check
20873 (lambda _
20874 (mkdir-p "/tmp/guix")
20875 (setenv "SHELL" "bash")
20876 (setenv "USERNAME" "guix")
20877 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20878 (invoke "py.test" "-vv")
20879 #t)))))
20880 (native-inputs
20881 `(("python-pytest" ,python-pytest)
20882 ("which" ,which)))
20883 (home-page "https://pypi.org/project/pox/")
20884 (synopsis "Python utilities for file system exploration and automated builds")
20885 (description
20886 "Pox provides a collection of utilities for navigating and manipulating
20887 file systems. This module is designed to facilitate some of the low-level
20888 operating system interactions that are useful when exploring a file system on a
20889 remote host. Pox provides Python equivalents of several shell commands such
20890 as @command{which} and @command{find}. These commands allow automated
20891 discovery of what has been installed on an operating system, and where the
20892 essential tools are located.")
20893 (license license:bsd-3)))
20894
20895 (define-public python-pathos
20896 (package
20897 (name "python-pathos")
20898 (version "0.2.5")
20899 (source
20900 (origin
20901 (method url-fetch)
20902 (uri (pypi-uri "pathos" version))
20903 (sha256
20904 (base32
20905 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20906 (build-system python-build-system)
20907 (arguments
20908 '(#:phases
20909 (modify-phases %standard-phases
20910 (replace 'check
20911 (lambda _
20912 (setenv "PYTHONPATH"
20913 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20914 (invoke "python" "./tests/__main__.py"))))))
20915 (propagated-inputs
20916 `(("python-dill" ,python-dill)
20917 ("python-multiprocess" ,python-multiprocess)
20918 ("python-pox" ,python-pox)
20919 ("python-ppft" ,python-ppft)))
20920 (native-inputs
20921 `(("python-pytest" ,python-pytest)))
20922 (home-page "https://pypi.org/project/pathos/")
20923 (synopsis
20924 "Parallel graph management and execution in heterogeneous computing")
20925 (description
20926 "Python-pathos is a framework for heterogeneous computing. It provides a
20927 consistent high-level interface for configuring and launching parallel
20928 computations across heterogeneous resources. Python-pathos provides configurable
20929 launchers for parallel and distributed computing, where each launcher contains
20930 the syntactic logic to configure and launch jobs in an execution environment.")
20931 (license license:bsd-3)))
20932
20933 (define-public python-flit
20934 (package
20935 (name "python-flit")
20936 (version "3.0.0")
20937 (source
20938 (origin
20939 (method url-fetch)
20940 (uri (pypi-uri "flit" version))
20941 (sha256
20942 (base32
20943 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
20944 (build-system python-build-system)
20945 (arguments
20946 `(#:tests? #f)) ; XXX: Check requires network access.
20947 (home-page "https://flit.readthedocs.io/")
20948 (synopsis
20949 "Simple packaging tool for simple packages")
20950 (description
20951 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20952 packages a single importable module or package at a time, using the import
20953 name as the name on PyPI. All subpackages and data files within a package
20954 are included automatically.")
20955 (license license:bsd-3)))
20956
20957 (define-public python-pathtools
20958 (package
20959 (name "python-pathtools")
20960 (version "0.1.2")
20961 (source
20962 (origin
20963 (method url-fetch)
20964 (uri (pypi-uri "pathtools" version))
20965 (sha256
20966 (base32
20967 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20968 (build-system python-build-system)
20969 (home-page
20970 "https://github.com/gorakhargosh/pathtools")
20971 (synopsis "Path utilities for Python")
20972 (description "Pattern matching and various utilities for file systems
20973 paths.")
20974 (license license:expat)))
20975
20976 (define-public python-fastentrypoints
20977 (package
20978 (name "python-fastentrypoints")
20979 (version "0.12")
20980 (source
20981 (origin
20982 (method url-fetch)
20983 (uri (pypi-uri "fastentrypoints" version))
20984 (sha256
20985 (base32
20986 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20987 (build-system python-build-system)
20988 (home-page
20989 "https://github.com/ninjaaron/fast-entry_points")
20990 (synopsis
20991 "Makes entry_points specified in setup.py load more quickly")
20992 (description
20993 "Using entry_points in your setup.py makes scripts that start really
20994 slowly because it imports pkg_resources. This package allows such setup
20995 scripts to load entry points more quickly.")
20996 (license license:bsd-3)))
20997
20998 (define-public python-funcparserlib
20999 (package
21000 (name "python-funcparserlib")
21001 (version "0.3.6")
21002 (source
21003 (origin
21004 (method url-fetch)
21005 (uri (pypi-uri "funcparserlib" version))
21006 (sha256
21007 (base32
21008 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21009 (native-inputs
21010 `(("python-tox" ,python-tox)))
21011 (arguments
21012 `(#:phases
21013 (modify-phases %standard-phases
21014 (replace 'check
21015 (lambda _
21016 (invoke "tox"))))))
21017 (build-system python-build-system)
21018 (home-page
21019 "https://github.com/vlasovskikh/funcparserlib")
21020 (synopsis
21021 "Recursive descent parsing library based on functional combinators")
21022 (description
21023 "This package is a recursive descent parsing library for Python based on
21024 functional combinators. Parser combinators are just higher-order functions
21025 that take parsers as their arguments and return them as result values.")
21026 (license license:expat)))
21027
21028 (define-public python-speg
21029 (package
21030 (name "python-speg")
21031 (version "0.3")
21032 (source
21033 (origin
21034 (method url-fetch)
21035 (uri (pypi-uri "speg" version ".zip"))
21036 (sha256
21037 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21038 (arguments
21039 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21040 (native-inputs
21041 `(("unzip" ,unzip)))
21042 (build-system python-build-system)
21043 (home-page "https://github.com/avakar/speg")
21044 (synopsis "PEG-based parser interpreter with memoization")
21045 (description "This package is a PEG-based parser and interpreter with
21046 memoization.")
21047 (license license:expat)))
21048
21049 (define-public python-cson
21050 (package
21051 (name "python-cson")
21052 (version "0.8")
21053 (source
21054 (origin
21055 (method url-fetch)
21056 (uri (pypi-uri "cson" version))
21057 (sha256
21058 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21059 (build-system python-build-system)
21060 (propagated-inputs
21061 `(("python-speg" ,python-speg)))
21062 (home-page "https://github.com/avakar/pycson")
21063 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21064 (description "This package is a parser for Coffeescript Object
21065 Notation (CSON).")
21066 (license license:expat)))
21067
21068 (define-public python-asynctest
21069 (package
21070 (name "python-asynctest")
21071 (version "0.13.0")
21072 (source
21073 (origin
21074 (method url-fetch)
21075 (uri (pypi-uri "asynctest" version))
21076 (sha256
21077 (base32
21078 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21079 (build-system python-build-system)
21080 (arguments
21081 '(#:phases
21082 (modify-phases %standard-phases
21083 (replace 'check
21084 (lambda _
21085 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21086 (add-after 'unpack 'disable-tests
21087 (lambda* _
21088 ;; XXX: 7 tests fail out of 220. Disable them for now.
21089 (substitute* (list "test/test_selector.py"
21090 "test/test_mock.py")
21091 (("def test_events_watched_outside_test_are_ignored")
21092 "@unittest.skip('disabled by guix')
21093 def test_events_watched_outside_test_are_ignored")
21094 (("def test_awaited_from_autospec_mock.*" line)
21095 (string-append line " return True\n"))
21096 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21097 (string-append line " return True\n"))
21098 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21099 (string-append line " return True\n"))
21100 (("def test_multiple_patches_on_coroutine.*" line)
21101 (string-append line " return True\n"))
21102 (("def test_patch_coroutine_only_when_running.*" line)
21103 (string-append line " return True\n")))
21104 #t)))))
21105 (home-page "https://github.com/Martiusweb/asynctest")
21106 (synopsis "Extension of unittest for testing asyncio libraries")
21107 (description
21108 "The package asynctest is built on top of the standard unittest module
21109 and cuts down boilerplate code when testing libraries for asyncio.")
21110 (license license:asl2.0)))
21111
21112 (define-public python-aionotify
21113 (package
21114 (name "python-aionotify")
21115 (version "0.2.0")
21116 (source
21117 (origin
21118 ;; Source tarball on PyPi lacks tests
21119 (method git-fetch)
21120 (uri (git-reference
21121 (url "https://github.com/rbarrois/aionotify")
21122 (commit (string-append "v" version))))
21123 (file-name (git-file-name name version))
21124 (sha256
21125 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21126 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21127 (build-system python-build-system)
21128 (home-page "https://github.com/rbarrois/aionotify")
21129 (synopsis "Asyncio-powered inotify library")
21130 (description
21131 "@code{aionotify} is a simple, asyncio-based inotify library.")
21132 (license license:bsd-3)))
21133
21134 (define-public python-forbiddenfruit
21135 (package
21136 (name "python-forbiddenfruit")
21137 (version "0.1.3")
21138 (source
21139 (origin
21140 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21141 (method git-fetch)
21142 (uri (git-reference
21143 (url "https://github.com/clarete/forbiddenfruit")
21144 (commit version)))
21145 (file-name (git-file-name name version))
21146 (sha256
21147 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21148 (build-system python-build-system)
21149 (arguments
21150 '(#:phases
21151 (modify-phases %standard-phases
21152 (replace 'check
21153 (lambda _
21154 (invoke "make" "SKIP_DEPS=1"))))))
21155 (native-inputs
21156 `(("python-nose" ,python-nose)
21157 ("python-coverage" ,python-coverage)))
21158 (home-page "https://github.com/clarete/forbiddenfruit")
21159 (synopsis "Patch python built-in objects")
21160 (description "This project allows Python code to extend built-in types.")
21161 (license (list license:gpl3+ license:expat))))
21162
21163 (define-public python-shouldbe
21164 (package
21165 (name "python-shouldbe")
21166 (version "0.1.2")
21167 (source
21168 (origin
21169 (method url-fetch)
21170 (uri (pypi-uri "shouldbe" version))
21171 (sha256
21172 (base32
21173 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21174 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21175 (build-system python-build-system)
21176 (propagated-inputs
21177 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21178 (native-inputs
21179 `(("python-nose" ,python-nose)))
21180 (home-page "https://github.com/directxman12/should_be")
21181 (synopsis "Python Assertion Helpers inspired by Shouldly")
21182 (description
21183 "Python Assertion Helpers inspired by Shouldly.")
21184 (license license:isc)))
21185
21186 (define-public python-k5test
21187 (package
21188 (name "python-k5test")
21189 (version "0.9.2")
21190 (source
21191 (origin
21192 (method url-fetch)
21193 (uri (pypi-uri "k5test" version))
21194 (sha256
21195 (base32
21196 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21197 (build-system python-build-system)
21198 (propagated-inputs
21199 `(("python-six" ,python-six)
21200 ;; `which`, `kadmin.local` binaries called inside library
21201 ("which" ,which)
21202 ("mit-krb5" ,mit-krb5)))
21203 (native-inputs `(("mit-krb5" ,mit-krb5)))
21204 (arguments
21205 '(#:phases
21206 (modify-phases %standard-phases
21207 (add-after 'unpack 'patch-paths
21208 (lambda* _
21209 (substitute* "k5test/realm.py"
21210 (("'kadmin_local'") "'kadmin.local'")))))))
21211 (home-page "https://github.com/pythongssapi/k5test")
21212 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21213 (description
21214 "@code{k5test} is a library for setting up self-contained Kerberos 5
21215 environments, and running Python unit tests inside those environments. It is
21216 based on the file of the same name found alongside the MIT Kerberos 5 unit
21217 tests.")
21218 (license license:isc)))
21219
21220 (define-public python-gssapi
21221 (package
21222 (name "python-gssapi")
21223 (version "1.6.9")
21224 (source
21225 (origin
21226 (method url-fetch)
21227 (uri (pypi-uri "gssapi" version))
21228 (sha256
21229 (base32
21230 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21231 (build-system python-build-system)
21232 (arguments
21233 `(#:phases
21234 (modify-phases %standard-phases
21235 ;; Work around
21236 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21237 (add-before 'check 'disable-failing-tests
21238 (lambda _
21239 (let ((reason "Disabled failing test (see: \
21240 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21241 (substitute* "gssapi/tests/test_high_level.py"
21242 ((".*def test_add_with_impersonate.*" all)
21243 (string-append all " self.skipTest('" reason "')\n")))
21244 (substitute* "gssapi/tests/test_raw.py"
21245 ((".*def test_.*impersonate_name.*" all)
21246 (string-append all " self.skipTest('" reason "')\n")))
21247 #t))))))
21248 (propagated-inputs
21249 `(("python-decorator" ,python-decorator)
21250 ("python-six" ,python-six)))
21251 (inputs
21252 `(("mit-krb5" ,mit-krb5)))
21253 ;; for tests
21254 (native-inputs
21255 `(("python-shouldbe" ,python-shouldbe)
21256 ("python-parameterized" ,python-parameterized)
21257 ("python-k5test" ,python-k5test)
21258 ("python-nose" ,python-nose)))
21259 (home-page "https://github.com/pythongssapi/python-gssapi")
21260 (synopsis "Python GSSAPI Wrapper")
21261 (description
21262 "Python-GSSAPI provides both low-level and high level wrappers around the
21263 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21264 also be usable with other GSSAPI mechanisms.")
21265 (license license:isc)))
21266
21267 (define-public python-check-manifest
21268 (package
21269 (name "python-check-manifest")
21270 (version "0.37")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "check-manifest" version))
21275 (sha256
21276 (base32
21277 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21278 (build-system python-build-system)
21279 (native-inputs
21280 `(("python-mock" ,python-mock)
21281 ("git" ,git)))
21282 (home-page "https://github.com/mgedmin/check-manifest")
21283 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21284 (description "Python package can include a MANIFEST.in file to help with
21285 sending package files to the Python Package Index. This package checks that
21286 file to ensure it completely and accurately describes your project.")
21287 (license license:expat)))
21288
21289 (define-public python-android-stringslib
21290 (package
21291 (name "python-android-stringslib")
21292 (version "0.1.2")
21293 (source
21294 (origin
21295 (method git-fetch)
21296 (uri (git-reference
21297 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21298 (commit (string-append "v" version))))
21299 (file-name (git-file-name name version))
21300 (sha256
21301 (base32
21302 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21303 (build-system python-build-system)
21304 (arguments
21305 `(#:tests? #f))
21306 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21307 (synopsis "Android strings.xml support")
21308 (description "Android Strings Lib provides support for android's strings.xml
21309 files. These files are used to translate strings in android apps.")
21310 (license license:expat)))
21311
21312 (define-public python-watchdog
21313 (package
21314 (name "python-watchdog")
21315 (version "0.9.0")
21316 (source
21317 (origin
21318 (method url-fetch)
21319 (uri (pypi-uri "watchdog" version))
21320 (sha256
21321 (base32
21322 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21323 (build-system python-build-system)
21324 (arguments
21325 `(#:phases
21326 (modify-phases %standard-phases
21327 (add-before 'check 'remove-failing
21328 (lambda _
21329 (delete-file "tests/test_inotify_buffer.py")
21330 (delete-file "tests/test_snapshot_diff.py")
21331 #t)))))
21332 (propagated-inputs
21333 `(("python-argh" ,python-argh)
21334 ("python-pathtools" ,python-pathtools)
21335 ("python-pyyaml" ,python-pyyaml)))
21336 (native-inputs
21337 `(("python-pytest-cov" ,python-pytest-cov)
21338 ("python-pytest-timeout" ,python-pytest-timeout)))
21339 (home-page "https://github.com/gorakhargosh/watchdog")
21340 (synopsis "File system events monitoring")
21341 (description "This package provides a way to monitor file system events
21342 such as a file modification and trigger an action. This is similar to inotify,
21343 but portable.")
21344 (license license:asl2.0)))
21345
21346 (define-public python-watchgod
21347 (package
21348 (name "python-watchgod")
21349 (version "0.6")
21350 (source
21351 (origin
21352 ;; There are no tests in the PyPI tarball.
21353 (method git-fetch)
21354 (uri (git-reference
21355 (url "https://github.com/samuelcolvin/watchgod")
21356 (commit (string-append "v" version))))
21357 (file-name (git-file-name name version))
21358 (sha256
21359 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21360 (build-system python-build-system)
21361 (arguments
21362 `(#:phases
21363 (modify-phases %standard-phases
21364 (replace 'check
21365 (lambda _
21366 (invoke "pytest" "-vv"))))))
21367 (native-inputs
21368 `(("python-coverage" ,python-coverage)
21369 ("python-docutils" ,python-docutils)
21370 ("python-flake8" ,python-flake8)
21371 ("python-isort" ,python-isort)
21372 ("python-pycodestyle" ,python-pycodestyle)
21373 ("python-pyflakes" ,python-pyflakes)
21374 ("python-pygments" ,python-pygments)
21375 ("python-pytest" ,python-pytest)
21376 ("python-pytest-cov" ,python-pytest-cov)
21377 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21378 ("python-pytest-mock" ,python-pytest-mock)
21379 ("python-pytest-sugar" ,python-pytest-sugar)
21380 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21381 (home-page "https://github.com/samuelcolvin/watchgod")
21382 (synopsis "Simple, modern file watching and code reload in Python")
21383 (description
21384 "Simple, modern file watching and code reload in Python inspired by
21385 @code{watchdog}. Among the differences are a unified approach for each
21386 operating systems and an elegant approach to concurrency using threading.")
21387 (license license:expat)))
21388
21389 (define-public python-wget
21390 (package
21391 (name "python-wget")
21392 (version "3.2")
21393 (source
21394 (origin
21395 (method url-fetch)
21396 (uri (pypi-uri "wget" version ".zip"))
21397 (sha256
21398 (base32
21399 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21400 (build-system python-build-system)
21401 (native-inputs `(("unzip" ,unzip)))
21402 (home-page "https://bitbucket.org/techtonik/python-wget/")
21403 (synopsis "Pure Python download utility")
21404 (description "The python-wget library provides an API to download files
21405 with features similar to the @command{wget} utility.")
21406 (license license:unlicense)))
21407
21408 (define-public offlate
21409 (package
21410 (name "offlate")
21411 (version "0.5")
21412 (source
21413 (origin
21414 (method git-fetch)
21415 (uri (git-reference
21416 (url "https://framagit.org/tyreunom/offlate")
21417 (commit version)))
21418 (file-name (git-file-name name version))
21419 (sha256
21420 (base32
21421 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21422 (build-system python-build-system)
21423 (arguments
21424 ;; No tests
21425 `(#:tests? #f))
21426 (propagated-inputs
21427 `(("python-android-stringslib" ,python-android-stringslib)
21428 ("python-dateutil" ,python-dateutil)
21429 ("python-gitlab" ,python-gitlab)
21430 ("python-lxml" ,python-lxml)
21431 ("python-polib" ,python-polib)
21432 ("python-pyenchant" ,python-pyenchant)
21433 ("python-pygit2" ,python-pygit2)
21434 ("python-pygithub" ,python-pygithub)
21435 ("python-pyqt" ,python-pyqt)
21436 ("python-requests" ,python-requests)
21437 ("python-ruamel.yaml" ,python-ruamel.yaml)
21438 ("python-translation-finder" ,python-translation-finder)
21439 ("python-watchdog" ,python-watchdog)))
21440 (native-inputs
21441 `(("qttools" ,qttools)))
21442 (home-page "https://framagit.org/tyreunom/offlate")
21443 (synopsis "Offline translation interface for online translation tools")
21444 (description "Offlate offers a unified interface for different translation
21445 file formats, as well as many different online translation platforms. You can
21446 use it to get work from online platforms, specialized such as the Translation
21447 Project, or not such a gitlab instance when your upstream doesn't use any
21448 dedicated platform. The tool proposes a unified interface for any format and
21449 an upload option to send your work back to the platform.")
21450 (license license:gpl3+)))
21451
21452 (define-public python-titlecase
21453 (package
21454 (name "python-titlecase")
21455 (version "0.12.0")
21456 (source
21457 (origin
21458 (method url-fetch)
21459 (uri (pypi-uri "titlecase" version))
21460 (sha256
21461 (base32
21462 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21463 (build-system python-build-system)
21464 (native-inputs
21465 `(("python-nose" ,python-nose)))
21466 (home-page "https://github.com/ppannuto/python-titlecase")
21467 (synopsis "Capitalize strings similar to book titles")
21468 (description
21469 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21470 It capitalizes (predominantly English) strings in a way that is similar to
21471 book titles, using the New York Times Manual of Style to leave certain words
21472 lowercase.")
21473 (license license:expat)))
21474
21475 (define-public python-pypng
21476 (package
21477 (name "python-pypng")
21478 (version "0.0.20")
21479 (source
21480 (origin
21481 (method url-fetch)
21482 (uri (pypi-uri "pypng" version))
21483 (sha256
21484 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21485 (build-system python-build-system)
21486 (home-page "https://github.com/drj11/pypng")
21487 (synopsis "Pure Python PNG image encoder/decoder")
21488 (description
21489 "The PyPNG module implements support for PNG images. It reads and writes
21490 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21491 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21492 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21493 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21494 A number of optional chunks can be specified (when writing) and
21495 understood (when reading): tRNS, bKGD, gAMA.
21496
21497 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21498 aim at being a replacement or competitor. Its strength lies in fine-grained
21499 extensive support of PNG features. It can also read and write Netpbm PAM
21500 files, with a focus on its use as an intermediate format for implementing
21501 custom PNG processing.")
21502 (license license:expat)))
21503
21504 (define-public python-fuzzywuzzy
21505 (package
21506 (name "python-fuzzywuzzy")
21507 (version "0.18.0")
21508 (source
21509 (origin
21510 (method url-fetch)
21511 (uri (pypi-uri "fuzzywuzzy" version))
21512 (sha256
21513 (base32
21514 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21515 (build-system python-build-system)
21516 (native-inputs
21517 `(("python-hypothesis" ,python-hypothesis)
21518 ("python-pycodestyle" ,python-pycodestyle)
21519 ("python-pytest" ,python-pytest)))
21520 (propagated-inputs
21521 `(("python-levenshtein" ,python-levenshtein)))
21522 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21523 (synopsis "Fuzzy string matching in Python")
21524 (description "Approximate string matching using
21525 @emph{Levenshtein Distance} to calculate the differences between
21526 sequences.")
21527 (license license:gpl2)))
21528
21529 (define-public python2-fuzzywuzzy
21530 (package-with-python2 python-fuzzywuzzy))
21531
21532 (define-public python-block-tracing
21533 (package
21534 (name "python-block-tracing")
21535 (version "1.0.1")
21536 (source
21537 (origin
21538 (method url-fetch)
21539 (uri (pypi-uri "block_tracing" version))
21540 (sha256
21541 (base32
21542 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21543 (build-system python-build-system)
21544 (arguments '(#:tests? #f)) ; no tests
21545 (home-page "https://github.com/rianhunter/block_tracing")
21546 (synopsis "Protect process memory")
21547 (description
21548 "@code{block_tracing} is a tiny Python library that can be used to
21549 prevent debuggers and other applications from inspecting the memory within
21550 your process.")
21551 (license license:expat)))
21552
21553 (define-public python-gcovr
21554 (package
21555 (name "python-gcovr")
21556 (version "4.2")
21557 (source
21558 (origin
21559 (method url-fetch)
21560 (uri (pypi-uri "gcovr" version))
21561 (sha256
21562 (base32
21563 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21564 (build-system python-build-system)
21565 (propagated-inputs
21566 `(("python-lxml" ,python-lxml)
21567 ("python-jinja2" ,python-jinja2)))
21568 (home-page "https://gcovr.com/")
21569 (synopsis "Utility for generating code coverage results")
21570 (description
21571 "Gcovr provides a utility for managing the use of the GNU gcov
21572 utility and generating summarized code coverage results. It is inspired
21573 by the Python coverage.py package, which provides a similar utility for
21574 Python.")
21575 (license license:bsd-3)))
21576
21577 (define-public python-owslib
21578 (package
21579 (name "python-owslib")
21580 (version "0.19.2")
21581 (source
21582 (origin
21583 (method url-fetch)
21584 (uri (pypi-uri "OWSLib" version))
21585 (sha256
21586 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21587 (build-system python-build-system)
21588 (arguments
21589 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21590 (synopsis "Interface for Open Geospatial Consortium web service")
21591 (description
21592 "OWSLib is a Python package for client programming with Open Geospatial
21593 Consortium (OGC) web service (hence OWS) interface standards, and their related
21594 content models.")
21595 (home-page "https://geopython.github.io/OWSLib/")
21596 (license license:bsd-3)))
21597
21598 (define-public python-docusign-esign
21599 (package
21600 (name "python-docusign-esign")
21601 (version "3.1.0")
21602 (source (origin
21603 (method url-fetch)
21604 (uri (pypi-uri "docusign_esign" version))
21605 (sha256
21606 (base32
21607 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21608 (build-system python-build-system)
21609 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21610 (arguments `(#:tests? #f))
21611 (propagated-inputs
21612 `(("python-certifi" ,python-certifi)
21613 ("python-six" ,python-six)
21614 ("python-dateutil" ,python-dateutil)
21615 ("python-urllib3" ,python-urllib3)
21616 ("python-pyjwt" ,python-pyjwt)
21617 ("python-cryptography" ,python-cryptography)
21618 ("python-nose" ,python-nose)))
21619 (synopsis "DocuSign Python Client")
21620 (description "The Official DocuSign Python Client Library used to interact
21621 with the eSign REST API. Send, sign, and approve documents using this client.")
21622 (home-page "https://www.docusign.com/devcenter")
21623 (license license:expat)))
21624
21625 (define-public python-xattr
21626 (package
21627 (name "python-xattr")
21628 (version "0.9.7")
21629 (source
21630 (origin
21631 (method url-fetch)
21632 (uri (pypi-uri "xattr" version))
21633 (sha256
21634 (base32
21635 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21636 (build-system python-build-system)
21637 (propagated-inputs
21638 `(("python-cffi" ,python-cffi)))
21639 (home-page "https://github.com/xattr/xattr")
21640 (synopsis
21641 "Python wrapper for extended file system attributes")
21642 (description "This package provides a Python wrapper for using extended
21643 file system attributes. Extended attributes extend the basic attributes of files
21644 and directories in the file system. They are stored as name:data pairs
21645 associated with file system objects (files, directories, symlinks, etc).")
21646 (license license:expat)))
21647
21648 (define-public python-json-logger
21649 (package
21650 (name "python-json-logger")
21651 (version "0.1.11")
21652 (source
21653 (origin
21654 (method url-fetch)
21655 (uri (pypi-uri "python-json-logger" version))
21656 (sha256
21657 (base32
21658 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21659 (build-system python-build-system)
21660 (home-page
21661 "https://github.com/madzak/python-json-logger")
21662 (synopsis "JSON log formatter in Python")
21663 (description "This library allows standard Python logging to output log data
21664 as JSON objects. With JSON we can make our logs more readable by machines and
21665 we can stop writing custom parsers for syslog-type records.")
21666 (license license:bsd-3)))
21667
21668 (define-public python-daiquiri
21669 (package
21670 (name "python-daiquiri")
21671 (version "2.1.1")
21672 (source
21673 (origin
21674 (method url-fetch)
21675 (uri (pypi-uri "daiquiri" version))
21676 (sha256
21677 (base32
21678 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21679 (build-system python-build-system)
21680 (propagated-inputs
21681 `(("python-json-logger" ,python-json-logger)))
21682 (native-inputs
21683 `(("python-mock" ,python-mock)
21684 ("python-pytest" ,python-pytest)
21685 ("python-setuptools-scm" ,python-setuptools-scm)
21686 ("python-six" ,python-six)))
21687 (home-page "https://github.com/jd/daiquiri")
21688 (synopsis
21689 "Library to configure Python logging easily")
21690 (description "The daiquiri library provides an easy way to configure
21691 logging in Python. It also provides some custom formatters and handlers.")
21692 (license license:asl2.0)))
21693
21694 (define-public python-pifpaf
21695 (package
21696 (name "python-pifpaf")
21697 (version "2.5.0")
21698 (source
21699 (origin
21700 (method url-fetch)
21701 (uri (pypi-uri "pifpaf" version))
21702 (sha256
21703 (base32
21704 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21705 (build-system python-build-system)
21706 (arguments
21707 '(#:phases
21708 (modify-phases %standard-phases
21709 (replace 'check
21710 (lambda _
21711 (invoke "python" "setup.py" "testr" "--slowest"
21712 "--testr-args=until-failure"))))))
21713 (propagated-inputs
21714 `(("python-click" ,python-click)
21715 ("python-daiquiri" ,python-daiquiri)
21716 ("python-fixtures" ,python-fixtures)
21717 ("python-jinja2" ,python-jinja2)
21718 ("python-pbr" ,python-pbr)
21719 ("python-psutil" ,python-psutil)
21720 ("python-six" ,python-six)
21721 ("python-xattr" ,python-xattr)))
21722 (native-inputs
21723 `(("python-mock" ,python-mock)
21724 ("python-os-testr" ,python-os-testr)
21725 ("python-requests" ,python-requests)
21726 ("python-testrepository" ,python-testrepository)
21727 ("python-testtools" ,python-testtools)))
21728 (home-page "https://github.com/jd/pifpaf")
21729 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21730 (description "Pifpaf is a suite of fixtures and a command-line tool that
21731 starts and stops daemons for a quick throw-away usage. This is typically
21732 useful when needing these daemons to run integration testing. It originally
21733 evolved from its precursor @code{overtest}.")
21734 (license license:asl2.0)))
21735
21736 (define-public python-pytest-check-links
21737 (package
21738 (name "python-pytest-check-links")
21739 (version "0.3.0")
21740 (source
21741 (origin
21742 (method url-fetch)
21743 ;; URI uses underscores
21744 (uri (pypi-uri "pytest_check_links" version))
21745 (sha256
21746 (base32
21747 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21748 (build-system python-build-system)
21749 (propagated-inputs
21750 `(("python-docutils" ,python-docutils)
21751 ("python-html5lib" ,python-html5lib)
21752 ("python-nbconvert" ,python-nbconvert)
21753 ("python-nbformat" ,python-nbformat)
21754 ("python-pytest" ,python-pytest)
21755 ("python-six" ,python-six)))
21756 (native-inputs
21757 `(("python-pbr-minimal" ,python-pbr-minimal)))
21758 (home-page "https://github.com/minrk/pytest-check-links")
21759 (synopsis "Check links in files")
21760 (description "This package provides a pytest plugin that checks URLs for
21761 HTML-containing files.")
21762 (license license:bsd-3)))
21763
21764 (define-public python-json5
21765 (package
21766 (name "python-json5")
21767 (version "0.8.5")
21768 (source
21769 (origin
21770 ;; sample.json5 is missing from PyPi source tarball
21771 (method git-fetch)
21772 (uri (git-reference
21773 (url "https://github.com/dpranke/pyjson5")
21774 (commit (string-append "v" version))))
21775 (file-name (git-file-name name version))
21776 (sha256
21777 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21778 (build-system python-build-system)
21779 (home-page "https://github.com/dpranke/pyjson5")
21780 (synopsis
21781 "Python implementation of the JSON5 data format")
21782 (description
21783 "JSON5 extends the JSON data interchange format to make it slightly more
21784 usable as a configuration language. This Python package implements parsing and
21785 dumping of JSON5 data structures.")
21786 (license license:asl2.0)))
21787
21788 (define-public python-frozendict
21789 (package
21790 (name "python-frozendict")
21791 (version "1.2")
21792 (source
21793 (origin
21794 (method url-fetch)
21795 (uri (pypi-uri "frozendict" version))
21796 (sha256
21797 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21798 (build-system python-build-system)
21799 (home-page "https://github.com/slezica/python-frozendict")
21800 (synopsis "Simple immutable mapping for Python")
21801 (description
21802 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21803 implements the complete mapping interface. It can be used as a drop-in
21804 replacement for dictionaries where immutability is desired.")
21805 (license license:expat)))
21806
21807 (define-public python-unpaddedbase64
21808 (package
21809 (name "python-unpaddedbase64")
21810 (version "1.1.0")
21811 (source
21812 (origin
21813 (method git-fetch)
21814 (uri (git-reference
21815 (url "https://github.com/matrix-org/python-unpaddedbase64")
21816 (commit (string-append "v" version))))
21817 (file-name (git-file-name name version))
21818 (sha256
21819 (base32
21820 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21821 (build-system python-build-system)
21822 (home-page "https://pypi.org/project/unpaddedbase64/")
21823 (synopsis "Encode and decode Base64 without “=” padding")
21824 (description
21825 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21826 using “=” characters. However this conveys no benefit so many protocols
21827 choose to use Base64 without the “=” padding.")
21828 (license license:asl2.0)))
21829
21830 (define-public python-py-cpuinfo
21831 (package
21832 (name "python-py-cpuinfo")
21833 (version "5.0.0")
21834 (source
21835 (origin
21836 (method url-fetch)
21837 (uri (pypi-uri "py-cpuinfo" version))
21838 (sha256
21839 (base32
21840 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21841 (build-system python-build-system)
21842 (home-page "https://github.com/workhorsy/py-cpuinfo")
21843 (synopsis "Get CPU info with Python")
21844 (description
21845 "This Python module returns the CPU info by using the best sources of
21846 information for your operating system.")
21847 (license license:expat)))
21848
21849 (define-public python-canonicaljson
21850 (package
21851 (name "python-canonicaljson")
21852 (version "1.4.0")
21853 (source
21854 (origin
21855 (method url-fetch)
21856 (uri (pypi-uri "canonicaljson" version))
21857 (sha256
21858 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21859 (build-system python-build-system)
21860 (propagated-inputs
21861 `(("python-six" ,python-six)
21862 ("python-frozendict" ,python-frozendict)
21863 ("python-simplejson" ,python-simplejson)))
21864 (home-page "https://github.com/matrix-org/python-canonicaljson")
21865 (synopsis "Canonical JSON")
21866 (description
21867 "Deterministically encode JSON.
21868
21869 @itemize
21870 @item Encodes objects and arrays as RFC 7159 JSON.
21871 @item Sorts object keys so that you get the same result each time.
21872 @item Has no insignificant whitespace to make the output as small as possible.
21873 @item Escapes only the characters that must be escaped, U+0000 to
21874 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21875 @item Uses the shortest escape sequence for each escaped character.
21876 @item Encodes the JSON as UTF-8.
21877 @item Can encode frozendict immutable dictionaries.
21878 @end itemize")
21879 (license license:asl2.0)))
21880
21881 (define-public python-signedjson
21882 (package
21883 (name "python-signedjson")
21884 (version "1.1.1")
21885 (source
21886 (origin
21887 (method url-fetch)
21888 (uri (pypi-uri "signedjson" version))
21889 (sha256
21890 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21891 (build-system python-build-system)
21892 (propagated-inputs
21893 `(("python-canonicaljson" ,python-canonicaljson)
21894 ("python-importlib-metadata" ,python-importlib-metadata)
21895 ("python-pynacl" ,python-pynacl)
21896 ("python-typing-extensions" ,python-typing-extensions)
21897 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21898 (native-inputs
21899 `(("python-setuptools-scm" ,python-setuptools-scm)))
21900 (home-page "https://github.com/matrix-org/python-signedjson")
21901 (synopsis "Sign JSON objects with ED25519 signatures")
21902 (description
21903 "Sign JSON objects with ED25519 signatures.
21904
21905 @itemize
21906 @item More than one entity can sign the same object.
21907 @item Each entity can sign the object with more than one key making it easier to
21908 rotate keys
21909 @item ED25519 can be replaced with a different algorithm.
21910 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21911 key.
21912 @end itemize")
21913 (license license:asl2.0)))
21914
21915 (define-public python-daemonize
21916 (package
21917 (name "python-daemonize")
21918 (version "2.5.0")
21919 (source
21920 (origin
21921 (method url-fetch)
21922 (uri (pypi-uri "daemonize" version))
21923 (sha256
21924 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21925 (build-system python-build-system)
21926 (home-page "https://github.com/thesharp/daemonize")
21927 (synopsis "Library for writing system daemons in Python")
21928 (description "Daemonize is a library for writing system daemons in Python.")
21929 (license license:expat)))
21930
21931 (define-public python-pymacaroons
21932 (package
21933 (name "python-pymacaroons")
21934 (version "0.13.0")
21935 (source
21936 (origin
21937 (method url-fetch)
21938 (uri (pypi-uri "pymacaroons" version))
21939 (sha256
21940 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21941 (build-system python-build-system)
21942 (propagated-inputs
21943 `(("python-six" ,python-six)
21944 ("python-pynacl" ,python-pynacl)))
21945 (home-page "https://github.com/ecordell/pymacaroons")
21946 (synopsis "Python Macaroon Library")
21947 (description
21948 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21949 tokens, macaroons embed caveats that define specific authorization
21950 requirements for the target service, the service that issued the root macaroon
21951 and which is capable of verifying the integrity of macaroons it receives.
21952
21953 Macaroons allow for delegation and attenuation of authorization. They are
21954 simple and fast to verify, and decouple authorization policy from the
21955 enforcement of that policy.")
21956 (license license:expat)))
21957
21958 (define-public python-ldap3
21959 (package
21960 (name "python-ldap3")
21961 (version "2.7")
21962 (home-page "https://github.com/cannatag/ldap3")
21963 (source
21964 (origin
21965 (method git-fetch)
21966 (uri (git-reference (url home-page)
21967 (commit (string-append "v" version))))
21968 (file-name (git-file-name name version))
21969 (sha256
21970 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21971 (build-system python-build-system)
21972 (arguments
21973 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21974 #:phases (modify-phases %standard-phases
21975 (replace 'check
21976 (lambda* (#:key tests? #:allow-other-keys)
21977 (when tests?
21978 (invoke "nosetests" "-s" "test"))
21979 #t)))))
21980 (native-inputs
21981 `(("python-nose" ,python-nose)))
21982 (propagated-inputs
21983 `(("python-gssapi" ,python-gssapi)
21984 ("python-pyasn1" ,python-pyasn1)))
21985 (synopsis "Python LDAP client")
21986 (description
21987 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21988 library.")
21989 (license license:lgpl3+)))
21990
21991 (define-public python-boltons
21992 (package
21993 (name "python-boltons")
21994 (version "20.0.0")
21995 (source
21996 (origin
21997 (method url-fetch)
21998 (uri (pypi-uri "boltons" version))
21999 (sha256
22000 (base32
22001 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22002 (build-system python-build-system)
22003 (home-page "https://github.com/mahmoud/boltons")
22004 (synopsis "Extensions to the Python standard library")
22005 (description
22006 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22007 as — and yet conspicuously missing from — the standard library, including:
22008
22009 @itemize
22010 @item Atomic file saving, bolted on with fileutils
22011 @item A highly-optimized OrderedMultiDict, in dictutils
22012 @item Two types of PriorityQueue, in queueutils
22013 @item Chunked and windowed iteration, in iterutils
22014 @item Recursive data structure iteration and merging, with iterutils.remap
22015 @item Exponential backoff functionality, including jitter, through
22016 iterutils.backoff
22017 @item A full-featured TracebackInfo type, for representing stack traces, in
22018 tbutils
22019 @end itemize")
22020 (license license:bsd-3)))
22021
22022 (define-public python-eliot
22023 (package
22024 (name "python-eliot")
22025 (version "1.12.0")
22026 (source
22027 (origin
22028 (method url-fetch)
22029 (uri (pypi-uri "eliot" version))
22030 (sha256
22031 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22032 (build-system python-build-system)
22033 (arguments
22034 `(#:phases
22035 (modify-phases %standard-phases
22036 (add-after 'unpack 'remove-journald-support
22037 (lambda _
22038 (for-each delete-file
22039 '("eliot/tests/test_journald.py"
22040 "eliot/journald.py"))
22041 #t))
22042 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22043 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22044 ;; be installed and these tests should pass.
22045 (lambda _
22046 (delete-file "eliot/tests/test_prettyprint.py")
22047 #t)))))
22048 (propagated-inputs
22049 `(("python-boltons" ,python-boltons)
22050 ("python-pyrsistent" ,python-pyrsistent)
22051 ("python-six" ,python-six)
22052 ("python-zope-interface" ,python-zope-interface)))
22053 (native-inputs
22054 `(("python-black" ,python-black)
22055 ("python-coverage" ,python-coverage)
22056 ("python-dask" ,python-dask)
22057 ("python-flake8" ,python-flake8)
22058 ("python-hypothesis" ,python-hypothesis)
22059 ("python-pytest" ,python-pytest)
22060 ("python-setuptools" ,python-setuptools)
22061 ("python-sphinx" ,python-sphinx)
22062 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22063 ("python-testtools" ,python-testtools)
22064 ("python-twine" ,python-twine)
22065 ("python-twisted" ,python-twisted)))
22066 (home-page "https://github.com/itamarst/eliot/")
22067 (synopsis "Eliot: the logging system that tells you why it happened")
22068 (description
22069 "@dfn{eliot} is a Python logging system that outputs causal chains of
22070 actions: actions can spawn other actions, and eventually they either succeed
22071 or fail. The resulting logs tell you the story of what your software did: what
22072 happened, and what caused it.")
22073 (license license:asl2.0)))
22074
22075 (define-public python-pem
22076 (package
22077 (name "python-pem")
22078 (version "20.1.0")
22079 (source
22080 (origin
22081 (method url-fetch)
22082 (uri (pypi-uri "pem" version))
22083 (sha256
22084 (base32
22085 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22086 (build-system python-build-system)
22087 (native-inputs
22088 `(("python-certifi" ,python-certifi)
22089 ("python-coverage" ,python-coverage)
22090 ("python-pretend" ,python-pretend)
22091 ("python-pyopenssl" ,python-pyopenssl)
22092 ("python-pytest" ,python-pytest)
22093 ("python-sphinx" ,python-sphinx)
22094 ("python-twisted" ,python-twisted)))
22095 (home-page "https://pem.readthedocs.io/")
22096 (synopsis "Easy PEM file parsing in Python")
22097 (description
22098 "This package provides a Python module for parsing and splitting PEM files.")
22099 (license license:expat)))
22100
22101 (define-public python-txsni
22102 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22103 ;; Python and OpenSSL.
22104 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22105 (revision "0"))
22106 (package
22107 (name "python-txsni")
22108 (version (git-version "0.1.9" revision commit))
22109 (home-page "https://github.com/glyph/txsni")
22110 (source
22111 (origin
22112 (method git-fetch)
22113 (uri (git-reference (url home-page) (commit commit)))
22114 (file-name (git-file-name name version))
22115 (sha256
22116 (base32
22117 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22118 (build-system python-build-system)
22119 (propagated-inputs
22120 `(("python-pyopenssl" ,python-pyopenssl)
22121 ("python-service-identity" ,python-service-identity)
22122 ("python-twisted" ,python-twisted)))
22123 (synopsis "Run TLS servers with Twisted")
22124 (description
22125 "This package provides an easy-to-use SNI endpoint for use
22126 with the Twisted web framework.")
22127 (license license:expat))))
22128
22129 (define-public python-txacme
22130 (package
22131 (name "python-txacme")
22132 (version "0.9.2")
22133 (source
22134 (origin
22135 (method url-fetch)
22136 (uri (pypi-uri "txacme" version))
22137 (sha256
22138 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22139 (build-system python-build-system)
22140 (propagated-inputs
22141 `(("python-acme" ,python-acme)
22142 ("python-attrs" ,python-attrs)
22143 ("python-eliot" ,python-eliot)
22144 ("python-josepy" ,python-josepy)
22145 ("python-pem" ,python-pem)
22146 ("python-treq" ,python-treq)
22147 ("python-twisted" ,python-twisted)
22148 ("python-txsni" ,python-txsni)))
22149 (native-inputs
22150 `(("python-fixtures" ,python-fixtures)
22151 ("python-hypothesis" ,python-hypothesis)
22152 ("python-mock" ,python-mock)
22153 ("python-service-identity"
22154 ,python-service-identity)
22155 ("python-testrepository" ,python-testrepository)
22156 ("python-testscenarios" ,python-testscenarios)
22157 ("python-testtools" ,python-testtools)))
22158 (home-page "https://github.com/twisted/txacme")
22159 (synopsis "Twisted implexmentation of the ACME protocol")
22160 (description
22161 "ACME is Automatic Certificate Management Environment, a protocol that
22162 allows clients and certificate authorities to automate verification and
22163 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22164 Certificate Authority.
22165
22166 txacme is an implementation of the protocol for Twisted, the event-driven
22167 networking engine for Python.")
22168 (license license:expat)))
22169
22170 (define-public python-pysaml2
22171 (package
22172 (name "python-pysaml2")
22173 (version "5.0.0")
22174 (source
22175 (origin
22176 (method url-fetch)
22177 (uri (pypi-uri "pysaml2" version))
22178 (sha256
22179 (base32
22180 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22181 (build-system python-build-system)
22182 (propagated-inputs
22183 `(("python-cryptography" ,python-cryptography)
22184 ("python-dateutil" ,python-dateutil)
22185 ("python-defusedxml" ,python-defusedxml)
22186 ("python-pyopenssl" ,python-pyopenssl)
22187 ("python-pytz" ,python-pytz)
22188 ("python-requests" ,python-requests)
22189 ("python-six" ,python-six)))
22190 (home-page "https://idpy.org")
22191 (synopsis "Python implementation of SAML Version 2 Standard")
22192 (description
22193 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22194 It contains all necessary pieces for building a SAML2 service provider or
22195 an identity provider. The distribution contains examples of both.
22196
22197 This package was originally written to work in a WSGI environment, but
22198 there are extensions that allow you to use it with other frameworks.")
22199 (license license:asl2.0)))
22200
22201 (define-public python-click-plugins
22202 (package
22203 (name "python-click-plugins")
22204 (version "1.1.1")
22205 (source
22206 (origin
22207 (method url-fetch)
22208 (uri (pypi-uri "click-plugins" version))
22209 (sha256
22210 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22211 (build-system python-build-system)
22212 (native-inputs
22213 `(("python-pytest" ,python-pytest)))
22214 (propagated-inputs
22215 `(("python-click" ,python-click)))
22216 (synopsis "Extension for Click to register external CLI commands")
22217 (description "This package provides n extension module for Click to
22218 register external CLI commands via setuptools entry-points.")
22219 (home-page "https://github.com/click-contrib/click-plugins")
22220 (license license:bsd-3)))
22221
22222 (define-public python-diceware
22223 (package
22224 (name "python-diceware")
22225 (version "0.9.6")
22226 (source
22227 (origin
22228 (method url-fetch)
22229 (uri (pypi-uri "diceware" version))
22230 (sha256
22231 (base32
22232 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22233 (build-system python-build-system)
22234 (native-inputs
22235 `(("python-coverage" ,python-coverage)
22236 ("python-pytest" ,python-pytest)
22237 ("python-pytest-runner" ,python-pytest-runner)))
22238 (home-page "https://github.com/ulif/diceware/")
22239 (synopsis "Generates memorable passphrases")
22240 (description "This package generates passphrases by concatenating words
22241 randomly picked from wordlists. It supports several sources of
22242 randomness (including real life dice) and different wordlists (including
22243 cryptographically signed ones).")
22244 (license license:gpl3+)))
22245
22246 (define-public python-dictdiffer
22247 (package
22248 (name "python-dictdiffer")
22249 (version "0.8.1")
22250 (source (origin
22251 (method url-fetch)
22252 (uri (pypi-uri "dictdiffer" version))
22253 (sha256
22254 (base32
22255 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22256 (build-system python-build-system)
22257 (native-inputs
22258 `(("python-check-manifest" ,python-check-manifest)
22259 ("python-coverage" ,python-coverage)
22260 ("python-isort" ,python-isort)
22261 ("python-mock" ,python-mock)
22262 ("python-pydoctstyle" ,python-pydocstyle)
22263 ("python-pytest-cache" ,python-pytest-cache)
22264 ("python-pytest-cov" ,python-pytest-cov)
22265 ("python-pytest-pep8" ,python-pytest-pep8)
22266 ("python-pytest-runner" ,python-pytest-runner)
22267 ("python-pytest" ,python-pytest)
22268 ("python-setuptools-scm" ,python-setuptools-scm)
22269 ("python-tox" ,python-tox)))
22270 (home-page "https://github.com/inveniosoftware/dictdiffer")
22271 (synopsis "Diff and patch Python dictionary objects")
22272 (description
22273 "Dictdiffer is a Python module that helps you to diff and patch
22274 dictionaries.")
22275 (license license:expat)))
22276
22277 (define-public pyzo
22278 (package
22279 (name "pyzo")
22280 (version "4.11.2")
22281 (source
22282 (origin
22283 (method url-fetch)
22284 (uri (pypi-uri "pyzo" version))
22285 (sha256
22286 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22287 (build-system python-build-system)
22288 (arguments
22289 `(#:phases
22290 (modify-phases %standard-phases
22291 (add-before 'check 'fix-home-directory
22292 (lambda _
22293 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22294 (setenv "HOME" "/tmp")
22295 #t)))
22296 ;; Tests fail with "Uncaught Python exception: python: undefined
22297 ;; symbol: objc_getClass".
22298 #:tests? #f))
22299 (propagated-inputs
22300 `(("python-pyqt" ,python-pyqt)))
22301 (home-page "https://pyzo.org")
22302 (synopsis
22303 "Python IDE for scientific computing")
22304 (description
22305 "Pyzo is a Python IDE focused on interactivity and introspection,
22306 which makes it very suitable for scientific computing. Its practical
22307 design is aimed at simplicity and efficiency.
22308
22309 It consists of two main components, the editor and the shell, and uses
22310 a set of pluggable tools to help the programmer in various ways. Some
22311 example tools are source structure, project manager, interactive help,
22312 workspace...")
22313 (license license:bsd-2)))
22314
22315 (define-public python-osc
22316 (package
22317 (name "python-osc")
22318 (version "1.7.4")
22319 (source
22320 (origin
22321 (method url-fetch)
22322 (uri (pypi-uri "python-osc" version))
22323 (sha256
22324 (base32
22325 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22326 (build-system python-build-system)
22327 (home-page "https://github.com/attwad/python-osc")
22328 (synopsis "Open Sound Control server and client implementations")
22329 (description
22330 "@code{python-osc} is a pure Python library with no external
22331 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22332 Open Sound Control 1.0} specification.")
22333 (license license:unlicense)))
22334
22335 (define-public python-voluptuous
22336 (package
22337 (name "python-voluptuous")
22338 (version "0.11.7")
22339 (source
22340 (origin
22341 (method url-fetch)
22342 (uri (pypi-uri "voluptuous" version))
22343 (sha256
22344 (base32
22345 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22346 (build-system python-build-system)
22347 (native-inputs
22348 `(("python-nose" ,python-nose)))
22349 (home-page "https://github.com/alecthomas/voluptuous")
22350 (synopsis "Python data validation library")
22351 (description
22352 "Voluptuous is a Python data validation library. It is primarily
22353 intended for validating data coming into Python as JSON, YAML, etc.")
22354 (license license:bsd-3)))
22355
22356 (define-public python-cmd2
22357 (package
22358 (name "python-cmd2")
22359 (version "1.0.2")
22360 (source
22361 (origin
22362 (method url-fetch)
22363 (uri (pypi-uri "cmd2" version))
22364 (sha256
22365 (base32
22366 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22367 (build-system python-build-system)
22368 (propagated-inputs
22369 `(("python-attrs" ,python-attrs)
22370 ("python-colorama" ,python-colorama)
22371 ("python-pyperclip" ,python-pyperclip)
22372 ("python-wcwidth" ,python-wcwidth)))
22373 (native-inputs
22374 `(("python-codecov" ,python-codecov)
22375 ("python-coverage" ,python-coverage)
22376 ("python-doc8" ,python-doc8)
22377 ("python-flake8" ,python-flake8)
22378 ("python-invoke" ,python-invoke)
22379 ("python-mock" ,python-mock)
22380 ("python-pytest" ,python-pytest)
22381 ("python-pytest-cov" ,python-pytest-cov)
22382 ("python-pytest-mock" ,python-pytest-mock)
22383 ("python-setuptools-scm" ,python-setuptools-scm)
22384 ("python-sphinx" ,python-sphinx)
22385 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22386 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22387 ("python-tox" ,python-tox)
22388 ("python-twine" ,python-twine)
22389 ("which" ,which)))
22390 (home-page "https://github.com/python-cmd2/cmd2")
22391 (synopsis "Tool for building interactive command line applications")
22392 (description
22393 "Cmd2 is a tool for building interactive command line applications in
22394 Python. Its goal is to make it quick and easy for developers to build
22395 feature-rich and user-friendly interactive command line applications. It
22396 provides a simple API which is an extension of Python's built-in @code{cmd}
22397 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22398 make your life easier and eliminates much of the boilerplate code which would
22399 be necessary when using @code{cmd}.")
22400 (license license:expat)))
22401
22402 (define-public python-pytidylib
22403 (package
22404 (name "python-pytidylib")
22405 (version "0.3.2")
22406 (source (origin
22407 (method url-fetch)
22408 (uri (pypi-uri "pytidylib" version))
22409 (sha256
22410 (base32
22411 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22412 (build-system python-build-system)
22413 (arguments
22414 '(#:phases
22415 (modify-phases %standard-phases
22416 (add-before 'build 'qualify-libtidy
22417 (lambda* (#:key inputs #:allow-other-keys)
22418 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22419 "/lib/libtidy.so")))
22420 (substitute* "tidylib/tidy.py"
22421 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22422 (format #f "'~a'" libtidy)))
22423 #t))))))
22424 (inputs `(("tidy" ,tidy)))
22425 (home-page "https://github.com/countergram/pytidylib")
22426 (synopsis "Python wrapper for HTML Tidy library")
22427 (description
22428 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22429 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22430 (license license:expat)))
22431
22432 (define-public python2-pytidylib
22433 (package-with-python2 python-pytidylib))
22434
22435 (define-public python-mujson
22436 (package
22437 (name "python-mujson")
22438 (version "1.4")
22439 (source
22440 (origin
22441 (method url-fetch)
22442 (uri (pypi-uri "mujson" version))
22443 (sha256
22444 (base32
22445 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22446 (build-system python-build-system)
22447 (home-page "https://github.com/mattgiles/mujson")
22448 (synopsis "Use the fastest JSON functions available at import time")
22449 (description "This package selects the fastest JSON functions available
22450 at import time.")
22451 (license license:expat)))
22452
22453 (define-public python-bashlex
22454 (package
22455 (name "python-bashlex")
22456 (version "0.14")
22457 (source
22458 (origin
22459 (method url-fetch)
22460 (uri (pypi-uri "bashlex" version))
22461 (sha256
22462 (base32
22463 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22464 (build-system python-build-system)
22465 (arguments
22466 `(#:phases
22467 (modify-phases %standard-phases
22468 (add-before 'build 'pregenerate-yacc-tables
22469 (lambda _
22470 ;; parser.py caches tables, which attempts to write to site lib
22471 ;; see https://github.com/idank/bashlex/issues/51
22472 (invoke "python" "-c" "import bashlex"))))))
22473 (home-page
22474 "https://github.com/idank/bashlex")
22475 (synopsis "Python parser for bash")
22476 (description "@code{bashlex} is a Python port of the parser used
22477 internally by GNU bash.
22478
22479 For the most part it's transliterated from C, the major differences are:
22480
22481 @itemize
22482 @item it does not execute anything
22483 @item it is reentrant
22484 @item it generates a complete AST
22485 @end itemize
22486 ")
22487 (license license:gpl3+)))
22488
22489 (define-public python-jinxed
22490 (package
22491 (name "python-jinxed")
22492 (version "1.0.0")
22493 (source
22494 (origin
22495 (method url-fetch)
22496 (uri (pypi-uri "jinxed" version))
22497 (sha256
22498 (base32
22499 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22500 (build-system python-build-system)
22501 (arguments
22502 '(#:phases
22503 (modify-phases %standard-phases
22504 (add-before 'check 'set-environment-variables
22505 (lambda* (#:key inputs #:allow-other-keys)
22506 (let ((ncurses (assoc-ref inputs "ncurses")))
22507 (setenv "TERM" "LINUX")
22508 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22509 #t))))
22510 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22511 (native-inputs
22512 `(("ncurses" ,ncurses)))
22513 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22514 (synopsis "Jinxed Terminal Library")
22515 (description
22516 "Jinxed is an implementation of a subset of the Python curses library.")
22517 (license license:mpl2.0)))
22518
22519 (define-public python-blessed
22520 (package
22521 (name "python-blessed")
22522 (version "1.17.8")
22523 (source
22524 (origin
22525 (method url-fetch)
22526 (uri (pypi-uri "blessed" version))
22527 (sha256
22528 (base32
22529 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22530 (modules '((guix build utils)))
22531 (snippet
22532 '(begin
22533 ;; Don't get hung up on Windows test failures.
22534 (delete-file "blessed/win_terminal.py") #t))))
22535 (build-system python-build-system)
22536 (propagated-inputs
22537 `(("python-jinxed" ,python-jinxed)
22538 ("python-six" ,python-six)
22539 ("python-wcwidth" ,python-wcwidth)))
22540 (native-inputs
22541 `(("python-mock" ,python-mock)
22542 ("python-pytest" ,python-pytest)))
22543 (home-page "https://github.com/jquast/blessed")
22544 (synopsis "Wrapper around terminal capabilities")
22545 (description
22546 "Blessed is a thin, practical wrapper around terminal styling, screen
22547 positioning, and keyboard input.")
22548 (license license:expat)))
22549
22550 (define-public python-readme-renderer
22551 (package
22552 (name "python-readme-renderer")
22553 (version "26.0")
22554 (source
22555 (origin
22556 (method url-fetch)
22557 (uri (pypi-uri "readme_renderer" version))
22558 (sha256
22559 (base32
22560 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22561 (build-system python-build-system)
22562 (propagated-inputs
22563 `(("python-bleach" ,python-bleach)
22564 ("python-docutils" ,python-docutils)
22565 ("python-pygments" ,python-pygments)
22566 ("python-six" ,python-six)))
22567 (native-inputs
22568 `(("python-mock" ,python-mock)
22569 ("python-pytest" ,python-pytest)))
22570 (home-page "https://github.com/pypa/readme_renderer")
22571 (synopsis "Render README files in Warehouse")
22572 (description
22573 "Readme Renderer is a library that will safely render arbitrary README
22574 files into HTML. It is designed to be used in Warehouse to render the
22575 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22576 and plain text.")
22577 (license license:asl2.0)))
22578
22579 (define-public python-lazr-delegates
22580 (package
22581 (name "python-lazr-delegates")
22582 (version "2.0.4")
22583 (source
22584 (origin
22585 (method url-fetch)
22586 (uri (pypi-uri "lazr.delegates" version))
22587 (sha256
22588 (base32
22589 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22590 (build-system python-build-system)
22591 (arguments
22592 '(#:phases
22593 (modify-phases %standard-phases
22594 (replace 'check
22595 (lambda _
22596 (invoke "python" "setup.py" "nosetests"))))))
22597 (native-inputs
22598 `(("python-nose" ,python-nose)))
22599 (propagated-inputs
22600 `(("python-zope-interface" ,python-zope-interface)))
22601 (home-page "https://launchpad.net/lazr.delegates")
22602 (synopsis "Easily write objects that delegate behavior")
22603 (description
22604 "The @code{lazr.delegates} package makes it easy to write objects that
22605 delegate behavior to another object. The new object adds some property or
22606 behavior on to the other object, while still providing the underlying interface,
22607 and delegating behavior.")
22608 (license license:lgpl3)))
22609
22610 (define-public python-lazr-config
22611 (package
22612 (name "python-lazr-config")
22613 (version "2.2.2")
22614 (source
22615 (origin
22616 (method url-fetch)
22617 (uri (pypi-uri "lazr.config" version))
22618 (sha256
22619 (base32
22620 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22621 (build-system python-build-system)
22622 (arguments
22623 '(#:phases
22624 (modify-phases %standard-phases
22625 (replace 'check
22626 (lambda _
22627 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22628 (native-inputs
22629 `(("python-nose" ,python-nose)))
22630 (propagated-inputs
22631 `(("python-lazr-delegates" ,python-lazr-delegates)
22632 ("python-zope-interface" ,python-zope-interface)))
22633 (home-page "https://launchpad.net/lazr.config")
22634 (synopsis "Create configuration schemas and process and validate configurations")
22635 (description
22636 "The LAZR config system is typically used to manage process configuration.
22637 Process configuration is for saying how things change when we run systems on
22638 different machines, or under different circumstances. This system uses ini-like
22639 file format of section, keys, and values. The config file supports inheritance
22640 to minimize duplication of information across files. The format supports schema
22641 validation.")
22642 (license license:lgpl3)))
22643
22644 (define-public python-flufl-bounce
22645 (package
22646 (name "python-flufl-bounce")
22647 (version "3.0.1")
22648 (source
22649 (origin
22650 (method url-fetch)
22651 (uri (pypi-uri "flufl.bounce" version))
22652 (sha256
22653 (base32
22654 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22655 (build-system python-build-system)
22656 (propagated-inputs
22657 `(("python-atpublic" ,python-atpublic)
22658 ("python-zope-interface" ,python-zope-interface)))
22659 (native-inputs
22660 `(("python-nose2" ,python-nose2)))
22661 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22662 (synopsis "Email bounce detectors")
22663 (description "The @code{flufl.bounce} library provides a set of heuristics
22664 and an API for detecting the original bouncing email addresses from a bounce
22665 message. Many formats found in the wild are supported, as are VERP and
22666 RFC 3464.")
22667 (license (list license:asl2.0
22668 license:lgpl3)))) ; only for setup_headers.py
22669
22670 (define-public python-flufl-i18n
22671 (package
22672 (name "python-flufl-i18n")
22673 (version "3.0")
22674 (source
22675 (origin
22676 (method url-fetch)
22677 (uri (pypi-uri "flufl.i18n" version))
22678 (sha256
22679 (base32
22680 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22681 (build-system python-build-system)
22682 (propagated-inputs
22683 `(("python-atpublic" ,python-atpublic)))
22684 (home-page "https://flufli18n.readthedocs.io")
22685 (synopsis "API for Python internationalization")
22686 (description
22687 "This package provides a high-level, convenient API for managing
22688 internationalization/translation contexts in Python applications. There is a
22689 simple API for single-context applications, such as command line scripts which
22690 only need to translate into one language during the entire course of their
22691 execution. There is a more flexible, but still convenient API for multi-context
22692 applications, such as servers, which may need to switch language contexts for
22693 different tasks.")
22694 (license license:asl2.0)))
22695
22696 (define-public python-flufl-lock
22697 (package
22698 (name "python-flufl-lock")
22699 (version "4.0")
22700 (source
22701 (origin
22702 (method url-fetch)
22703 (uri (pypi-uri "flufl.lock" version))
22704 (sha256
22705 (base32
22706 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22707 (build-system python-build-system)
22708 (propagated-inputs
22709 `(("python-atpublic" ,python-atpublic)
22710 ("python-psutil" ,python-psutil)))
22711 (home-page "https://flufllock.readthedocs.io")
22712 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22713 (description
22714 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22715 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22716 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22717 and have a maximum lifetime built-in.")
22718 (license (list license:asl2.0
22719 license:lgpl3)))) ; only for setup_helpers.py
22720
22721 (define-public python-flufl-testing
22722 (package
22723 (name "python-flufl-testing")
22724 (version "0.8")
22725 (source
22726 (origin
22727 (method url-fetch)
22728 (uri (pypi-uri "flufl.testing" version))
22729 (sha256
22730 (base32
22731 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22732 (build-system python-build-system)
22733 (native-inputs
22734 `(("python-nose2" ,python-nose2)))
22735 (home-page "https://gitlab.com/warsaw/flufl.testing")
22736 (synopsis "Collection of test tool plugins")
22737 (description
22738 "This package contains a small collection of test tool plugins for
22739 @code{nose2} and @code{flake8}.")
22740 (license license:asl2.0)))
22741
22742 (define-public python-devtools
22743 (package
22744 (name "python-devtools")
22745 (version "0.6")
22746 (source
22747 (origin
22748 (method git-fetch)
22749 (uri (git-reference
22750 (url "https://github.com/samuelcolvin/python-devtools")
22751 (commit (string-append "v" version))))
22752 (file-name (git-file-name name version))
22753 (sha256
22754 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22755 (build-system python-build-system)
22756 (native-inputs
22757 `(("python-pytest" ,python-pytest)
22758 ("python-pytest-mock" ,python-pytest-mock)))
22759 (propagated-inputs
22760 `(("python-pygments" ,python-pygments)))
22761 (arguments
22762 `(#:phases (modify-phases %standard-phases
22763 (replace 'check
22764 (lambda _
22765 (invoke "pytest")
22766 #t)))))
22767 (home-page "https://github.com/samuelcolvin/python-devtools")
22768 (synopsis "Debug command and development tools")
22769 (description
22770 "This package provides a debug print command and other development tools.
22771 It adds a simple and readable way to print stuff during development.")
22772 (license license:expat)))
22773
22774 (define-public python-dateparser
22775 (package
22776 (name "python-dateparser")
22777 (version "0.7.6")
22778 (source
22779 (origin
22780 (method url-fetch)
22781 (uri (pypi-uri "dateparser" version))
22782 (sha256
22783 (base32
22784 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22785 (build-system python-build-system)
22786 (propagated-inputs
22787 `(("python-dateutil" ,python-dateutil)
22788 ("python-pytz" ,python-pytz)
22789 ("python-regex" ,python-regex)
22790 ("python-ruamel.yaml" ,python-ruamel.yaml)
22791 ("python-tzlocal" ,python-tzlocal)))
22792 (native-inputs
22793 `(("python-mock" ,python-mock)
22794 ("python-parameterized" ,python-parameterized)
22795 ("tzdata" ,tzdata-for-tests)))
22796 (arguments
22797 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22798 #:tests? #f
22799 #:phases
22800 (modify-phases %standard-phases
22801 (add-before 'check 'set-check-environment
22802 (lambda* (#:key inputs #:allow-other-keys)
22803 (setenv "TZ" "UTC")
22804 (setenv "TZDIR"
22805 (string-append (assoc-ref inputs "tzdata")
22806 "/share/zoneinfo"))
22807 #t)))))
22808 (home-page "https://github.com/scrapinghub/dateparser")
22809 (synopsis
22810 "Date parsing library designed to parse dates from HTML pages")
22811 (description
22812 "@code{python-dateparser} provides modules to easily parse localized
22813 dates in almost any string formats commonly found on web pages.")
22814 (license license:bsd-3)))
22815
22816 (define-public python-dparse
22817 (package
22818 (name "python-dparse")
22819 (version "0.5.1")
22820 (source
22821 (origin
22822 (method url-fetch)
22823 (uri (pypi-uri "dparse" version))
22824 (sha256
22825 (base32
22826 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22827 (build-system python-build-system)
22828 (native-inputs
22829 `(("python-pytest" ,python-pytest)))
22830 (propagated-inputs
22831 `(("python-packaging" ,python-packaging)
22832 ("python-pyyaml" ,python-pyyaml)
22833 ("python-toml" ,python-toml)))
22834 (home-page "https://github.com/pyupio/dparse")
22835 (synopsis "Parser for Python dependency files")
22836 (description "This package provides a parser for Python dependency files.")
22837 (license license:expat)))
22838
22839 (define-public python-dpath
22840 (package
22841 (name "python-dpath")
22842 (version "2.0.1")
22843 (source
22844 (origin
22845 (method url-fetch)
22846 (uri (pypi-uri "dpath" version))
22847 (sha256
22848 (base32
22849 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22850 (build-system python-build-system)
22851 (native-inputs
22852 `(("python-hypothesis" ,python-hypothesis)
22853 ("python-mock" ,python-mock)
22854 ("python-nose" ,python-nose)))
22855 (arguments
22856 '(#:phases
22857 (modify-phases %standard-phases
22858 (replace 'check
22859 (lambda* (#:key inputs outputs #:allow-other-keys)
22860 (add-installed-pythonpath inputs outputs)
22861 ;; This invokation is taken from tox.ini.
22862 (invoke "nosetests" "-d" "-v" "tests/"))))))
22863 (home-page "https://github.com/akesterson/dpath-python")
22864 (synopsis "Filesystem-like pathing and searching for dictionaries")
22865 (description
22866 "@code{python-dpath} is a library for accessing and searching
22867 dictionaries via /slashed/paths ala xpath.
22868
22869 Basically it lets you glob over a dictionary as if it were a filesystem. It
22870 allows you to specify globs (ala the bash eglob syntax, through some advanced
22871 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22872 facility for filtering those results.")
22873 (license license:expat)))
22874
22875 (define-public python-safety
22876 (package
22877 (name "python-safety")
22878 (version "1.9.0")
22879 (source
22880 (origin
22881 (method url-fetch)
22882 (uri (pypi-uri "safety" version))
22883 (sha256
22884 (base32
22885 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22886 (build-system python-build-system)
22887 (arguments
22888 `(#:phases
22889 (modify-phases %standard-phases
22890 (add-after 'unpack 'disable-tests
22891 (lambda _
22892 (substitute* "tests/test_safety.py"
22893 ;; requires network
22894 (("def test_check_live") "def _test_check_live"))
22895 #t)))))
22896 (propagated-inputs
22897 `(("python-click" ,python-click)
22898 ("python-dparse" ,python-dparse)
22899 ("python-packaging" ,python-packaging)
22900 ("python-requests" ,python-requests)))
22901 (home-page "https://github.com/pyupio/safety")
22902 (synopsis "Check installed dependencies for known vulnerabilities")
22903 (description "Safety checks installed dependencies for known vulnerabilities.
22904 By default it uses the open Python vulnerability database Safety DB.")
22905 (license license:expat)))
22906
22907 (define-public python-pypandoc
22908 (package
22909 (name "python-pypandoc")
22910 (version "1.5")
22911 (source
22912 (origin
22913 (method url-fetch)
22914 (uri (pypi-uri "pypandoc" version))
22915 (sha256
22916 (base32
22917 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22918 (build-system python-build-system)
22919 (inputs
22920 `(("pandoc" ,pandoc)
22921 ("pandoc-citeproc" ,pandoc-citeproc)))
22922 (propagated-inputs
22923 `(("wheel" ,python-wheel)))
22924 (native-inputs
22925 `(("texlive" ,(texlive-union (list texlive-amsfonts
22926 texlive-fonts-ec
22927 texlive-latex-hyperref
22928 texlive-latex-oberdiek
22929 texlive-lm
22930 texlive-xcolor)))))
22931 (arguments
22932 `(#:phases
22933 (modify-phases %standard-phases
22934 (add-before 'check 'disable-tests
22935 (lambda _
22936 ;; Disable test requiring network access
22937 (substitute* "tests.py"
22938 (("test_basic_conversion_from_http_url")
22939 "skip_test_basic_conversion_from_http_url"))
22940 ;; Needed by texlive-union to generate fonts
22941 (setenv "HOME" "/tmp")
22942 #t)))))
22943 (home-page "https://github.com/bebraw/pypandoc")
22944 (synopsis "Python wrapper for pandoc")
22945 (description "pypandoc is a thin Python wrapper around pandoc
22946 and pandoc-citeproc.")
22947 (license license:expat)))
22948
22949 (define-public python-rnc2rng
22950 (package
22951 (name "python-rnc2rng")
22952 (version "2.6.4")
22953 (source
22954 (origin
22955 (method url-fetch)
22956 (uri (pypi-uri "rnc2rng" version))
22957 (sha256
22958 (base32
22959 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22960 (build-system python-build-system)
22961 (propagated-inputs
22962 `(("python-rply" ,python-rply)))
22963 (arguments
22964 `(#:phases (modify-phases %standard-phases
22965 (replace 'check
22966 (lambda _
22967 (invoke "python" "test.py"))))))
22968 (home-page "https://github.com/djc/rnc2rng")
22969 (synopsis "Convert RELAX NG Compact to regular syntax")
22970 (description
22971 "This package provides the @command{rnc2rng} command-line tool as well as
22972 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22973 equivalent schemata in the XML-based default RELAX NG syntax.")
22974 (license license:expat)))
22975
22976 (define-public python-telethon
22977 (package
22978 (name "python-telethon")
22979 (version "1.17.5")
22980 (source
22981 (origin
22982 (method git-fetch)
22983 (uri (git-reference
22984 (url "https://github.com/LonamiWebs/Telethon")
22985 (commit (string-append "v" version))))
22986 (file-name (git-file-name name version))
22987 (sha256
22988 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22989 (build-system python-build-system)
22990 (arguments
22991 '(#:phases
22992 (modify-phases %standard-phases
22993 (replace 'check
22994 (lambda* (#:key tests? #:allow-other-keys)
22995 (when tests?
22996 (invoke "py.test" "-v"))
22997 #t)))))
22998 (propagated-inputs
22999 `(("python-rsa" ,python-rsa)
23000 ("python-pyaes" ,python-pyaes)))
23001 (native-inputs
23002 `(("python-pytest" ,python-pytest)
23003 ("python-pytest-asyncio" ,python-pytest-asyncio)
23004 ("python-pytest-trio" ,python-pytest-trio)))
23005 (home-page "https://docs.telethon.dev")
23006 (synopsis "Full-featured Telegram client library for Python 3")
23007 (description "This library is designed to make it easy to write Python
23008 programs that can interact with Telegram.")
23009 (license license:expat)))
23010
23011 (define-public python-citeproc-py
23012 (package
23013 (name "python-citeproc-py")
23014 (version "0.5.1")
23015 (source
23016 (origin
23017 (method url-fetch)
23018 (uri (pypi-uri "citeproc-py" version))
23019 (sha256
23020 (base32
23021 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23022 (build-system python-build-system)
23023 (propagated-inputs
23024 `(("python-lxml" ,python-lxml)
23025 ("python-rnc2rng" ,python-rnc2rng)))
23026 (home-page
23027 "https://github.com/brechtm/citeproc-py")
23028 (synopsis "Citations and bibliography formatter")
23029 (description
23030 "Citeproc-py is a CSL processor for Python. It aims to implement the
23031 CSL 1.0.1 specification. citeproc-py can output styled citations and
23032 bibliographies in a number of different output formats. Currently supported
23033 are plain text, reStructuredText and HTML.")
23034 (license license:bsd-2)))
23035
23036 (define-public python-inform
23037 (package
23038 (name "python-inform")
23039 (version "1.23.0")
23040 (source
23041 (origin
23042 (method url-fetch)
23043 (uri (pypi-uri "inform" version))
23044 (sha256
23045 (base32
23046 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23047 (build-system python-build-system)
23048 (arguments
23049 `(#:tests? #f)) ; PyPI tarball lacks tests
23050 (native-inputs
23051 `(("python-hypothesis" ,python-hypothesis)
23052 ("python-pytest-cov" ,python-pytest-cov)
23053 ("python-pytest-runner" ,python-pytest-runner)))
23054 (propagated-inputs
23055 `(("python-arrow" ,python-arrow)
23056 ("python-six" ,python-six)))
23057 (home-page "https://inform.readthedocs.io")
23058 (synopsis "Print & logging utilities for communicating with user")
23059 (description
23060 "Inform is designed to display messages from programs that are typically run from
23061 a console. It provides a collection of ‘print’ functions that allow you to simply and
23062 cleanly print different types of messages.")
23063 (license license:gpl3+)))
23064
23065 (define-public python-nestedtext
23066 (package
23067 (name "python-nestedtext")
23068 (version "1.0.0")
23069 (source
23070 (origin
23071 (method url-fetch)
23072 (uri (pypi-uri "nestedtext" version))
23073 (sha256
23074 (base32
23075 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23076 (build-system python-build-system)
23077 (arguments
23078 `(#:tests? #f)) ; PyPI tarball lacks tests
23079 (propagated-inputs
23080 `(("python-inform" ,python-inform)))
23081 (home-page "https://nestedtext.org")
23082 (synopsis "Human readable and writable data interchange format")
23083 (description
23084 "NestedText is a file format for holding data that is to be entered, edited, or
23085 viewed by people. It allows data to be organized into a nested collection of
23086 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23087 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23088 NestedText is both simple and natural. Only a small number of concepts and rules must
23089 be kept in mind when creating it. It is easily created, modified, or viewed with
23090 a text editor and easily understood and used by both programmers and non-programmers.")
23091 (license license:expat))) ; MIT license
23092
23093 (define-public python-parallel
23094 (package
23095 (name "python-parallel")
23096 (version "1.6.4.4")
23097 (source
23098 (origin
23099 (method url-fetch)
23100 (uri (string-append
23101 "https://www.parallelpython.com/downloads/pp/pp-"
23102 version ".zip"))
23103 (sha256
23104 (base32
23105 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23106 (native-inputs
23107 `(("unzip" ,unzip)))
23108 (build-system python-build-system)
23109 (arguments '(#:tests? #f)) ; No test suite.
23110 (home-page "https://www.parallelpython.com")
23111 (synopsis "Parallel and distributed programming for Python")
23112 (description "Parallel Python module (PP) provides an easy and efficient
23113 way to create parallel-enabled applications for SMP computers and clusters.
23114 PP module features cross-platform portability and dynamic load balancing.
23115 Thus applications written with PP will parallelize efficiently even on
23116 heterogeneous and multi-platform clusters (including clusters running other
23117 applications with variable CPU loads).")
23118 (license license:bsd-3)))
23119
23120 (define-public python2-parallel
23121 (package-with-python2 python-parallel))
23122
23123 (define-public python-djvulibre
23124 (package
23125 (name "python-djvulibre")
23126 (version "0.8.5")
23127 (source
23128 (origin
23129 (method url-fetch)
23130 (uri (pypi-uri "python-djvulibre" version))
23131 (sha256
23132 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23133 (build-system python-build-system)
23134 (native-inputs
23135 `(("ghostscript" ,ghostscript)
23136 ("pkg-config" ,pkg-config)
23137 ("python-nose" ,python-nose)))
23138 (inputs
23139 `(("djvulibre" ,djvulibre)
23140 ("python-cython" ,python-cython)))
23141 (arguments
23142 `(#:phases
23143 (modify-phases %standard-phases
23144 (add-after 'unpack 'fix-tests
23145 (lambda _
23146 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23147 ;; doesn't make sense on GNU/Linux.
23148 (delete-file "djvu/dllpath.py")
23149 #t)))))
23150 (synopsis "Python bindings for DjVuLibre")
23151 (description "This is a set of Python bindings for the DjVuLibre library.")
23152 (home-page "https://jwilk.net/software/python-djvulibre")
23153 (license license:gpl2)))
23154
23155 (define-public python2-djvulibre
23156 (package-with-python2 python-djvulibre))
23157
23158 (define-public python-versioneer
23159 (package
23160 (name "python-versioneer")
23161 (version "0.19")
23162 (source
23163 (origin
23164 (method url-fetch)
23165 (uri (pypi-uri "versioneer" version))
23166 (sha256
23167 (base32
23168 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23169 (build-system python-build-system)
23170 (home-page
23171 "https://github.com/python-versioneer/python-versioneer")
23172 (synopsis
23173 "Version-string management for VCS-controlled trees")
23174 (description
23175 "@code{versioneer} is a tool for managing a recorded version number in
23176 distutils-based python projects. The goal is to remove the tedious and
23177 error-prone \"update the embedded version string\" step from your release
23178 process.")
23179 (license license:public-domain)))
23180
23181 (define-public python2-gamera
23182 (package
23183 (name "python2-gamera")
23184 (version "3.4.4")
23185 (source
23186 (origin
23187 (method url-fetch)
23188 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23189 "gamera-" version ".tar.gz"))
23190 (sha256
23191 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23192 (modules '((guix build utils)))
23193 (snippet
23194 '(begin
23195 ;; Remove bundled libraries.
23196 (for-each delete-file-recursively
23197 '("src/libpng-1.2.5"
23198 "src/libtiff"
23199 "src/zlib-1.2.8"))))))
23200 (build-system python-build-system)
23201 (inputs
23202 `(("libpng" ,libpng)
23203 ("libtiff" ,libtiff)
23204 ("python2-wxpython" ,python2-wxpython)
23205 ("zlib" ,zlib)))
23206 (arguments
23207 `(#:python ,python-2))
23208 (synopsis "Framework for building document analysis applications")
23209 (description
23210 "Gamera is a toolkit for building document image recognition systems.")
23211 (home-page "https://gamera.informatik.hsnr.de/")
23212 (license license:gpl2+)))