gnu: Add python-pulp.
[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, 2021 Eric Bavier <bavier@posteo.net>
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, 2021 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, 2021 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021 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, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 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, 2021 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, 2021 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, 2021 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 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages kerberos)
155 #:use-module (gnu packages libevent)
156 #:use-module (gnu packages libffi)
157 #:use-module (gnu packages libidn)
158 #:use-module (gnu packages linux)
159 #:use-module (gnu packages llvm)
160 #:use-module (gnu packages man)
161 #:use-module (gnu packages markup)
162 #:use-module (gnu packages maths)
163 #:use-module (gnu packages monitoring)
164 #:use-module (gnu packages multiprecision)
165 #:use-module (gnu packages networking)
166 #:use-module (gnu packages ncurses)
167 #:use-module (gnu packages openstack)
168 #:use-module (gnu packages pcre)
169 #:use-module (gnu packages pdf)
170 #:use-module (gnu packages perl)
171 #:use-module (gnu packages photo)
172 #:use-module (gnu packages pkg-config)
173 #:use-module (gnu packages python)
174 #:use-module (gnu packages python-build)
175 #:use-module (gnu packages python-check)
176 #:use-module (gnu packages python-compression)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-science)
179 #:use-module (gnu packages python-web)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdf)
182 #:use-module (gnu packages readline)
183 #:use-module (gnu packages sdl)
184 #:use-module (gnu packages search)
185 #:use-module (gnu packages scanner)
186 #:use-module (gnu packages shells)
187 #:use-module (gnu packages sphinx)
188 #:use-module (gnu packages ssh)
189 #:use-module (gnu packages swig)
190 #:use-module (gnu packages terminals)
191 #:use-module (gnu packages tex)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages time)
195 #:use-module (gnu packages tls)
196 #:use-module (gnu packages version-control)
197 #:use-module (gnu packages video)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages wxwidgets)
200 #:use-module (gnu packages base)
201 #:use-module (gnu packages xml)
202 #:use-module (gnu packages xorg)
203 #:use-module (gnu packages xdisorg)
204 #:use-module (gnu packages tcl)
205 #:use-module (gnu packages bdw-gc)
206 #:use-module (gnu packages serialization)
207 #:use-module (guix packages)
208 #:use-module (guix download)
209 #:use-module (guix git-download)
210 #:use-module (guix hg-download)
211 #:use-module (guix utils)
212 #:use-module (guix build-system gnu)
213 #:use-module (guix build-system cmake)
214 #:use-module (guix build-system python)
215 #:use-module (guix build-system trivial)
216 #:use-module (srfi srfi-1)
217 #:use-module (srfi srfi-26))
218
219 (define-public python-slixmpp
220 (package
221 (name "python-slixmpp")
222 (version "1.5.2")
223 (source
224 (origin
225 (method git-fetch)
226 (uri
227 (git-reference
228 (url "https://lab.louiz.org/poezio/slixmpp.git")
229 (commit
230 (string-append "slix-" version))))
231 (file-name
232 (git-file-name name version))
233 (sha256
234 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
235 (build-system python-build-system)
236 (arguments
237 `(#:phases
238 (modify-phases %standard-phases
239 (add-after 'unpack 'patch
240 (lambda _
241 (substitute* "setup.py"
242 (("'CC', 'cc'")
243 "'CC', 'gcc'"))
244 #t)))))
245 (native-inputs
246 `(("cython" ,python-cython)
247 ("gnupg" ,gnupg)
248 ("pkg-config" ,pkg-config)))
249 (propagated-inputs
250 `(("python-aiodns" ,python-aiodns)
251 ("python-aiohttp" ,python-aiohttp)
252 ("python-pyasn1" ,python-pyasn1)
253 ("python-pyasn1-modules" ,python-pyasn1-modules)))
254 (inputs
255 `(("libidn" ,libidn)
256 ("python" ,python))) ; We are building a Python extension.
257 (synopsis "XMPP library without threads")
258 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
259 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
260 socket handling, the timers, the events dispatching) in order to remove all
261 threads.")
262 (home-page "https://lab.louiz.org/poezio/slixmpp")
263 (license license:expat)))
264
265 (define-public python-tenacity
266 (package
267 (name "python-tenacity")
268 (version "6.1.0")
269 (source (origin
270 (method url-fetch)
271 (uri (pypi-uri "tenacity" version))
272 (sha256
273 (base32
274 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
275 (build-system python-build-system)
276 (native-inputs
277 `(("python-setuptools-scm" ,python-setuptools-scm)
278 ("python-sphinx" ,python-sphinx)
279 ("python-tornado" ,python-tornado)
280 ("python-pytest" ,python-pytest)))
281 (propagated-inputs
282 `(("python-six" ,python-six)))
283 (arguments
284 `(#:phases (modify-phases %standard-phases
285 (replace 'check
286 (lambda _
287 (invoke "pytest")
288 #t)))))
289 (home-page "https://github.com/jd/tenacity")
290 (synopsis "Retrying library for python")
291 (description "Tenacity is a general-purpose python library to simplify the
292 task of adding retry behavior to just about anything.")
293 (license license:asl2.0)))
294
295 (define-public python-pytelegrambotapi
296 (package
297 (name "python-pytelegrambotapi")
298 (version "3.7.4")
299 (source
300 (origin
301 (method git-fetch)
302 (uri (git-reference
303 (url "https://github.com/eternnoir/pyTelegramBotAPI")
304 (commit version)))
305 (file-name (git-file-name name version))
306 (sha256
307 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
308 (build-system python-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (replace 'check
313 (lambda* (#:key tests? #:allow-other-keys)
314 (when tests?
315 (with-directory-excursion "tests"
316 (invoke "py.test")))
317 #t)))))
318 (propagated-inputs
319 `(("python-requests" ,python-requests)))
320 (native-inputs
321 `(("python-pytest" ,python-pytest)))
322 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
323 (synopsis "Python Telegram bot api")
324 (description "This package provides a simple, but extensible Python
325 implementation for the Telegram Bot API.")
326 (license license:gpl2)))
327
328 (define-public python-colorlog
329 (package
330 (name "python-colorlog")
331 (version "4.1.0")
332 (source (origin
333 (method url-fetch)
334 (uri (pypi-uri "colorlog" version))
335 (sha256
336 (base32
337 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
338 (build-system python-build-system)
339 (native-inputs
340 `(("python-pytest" ,python-pytest)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
344 (lambda _
345 ;; Extend PYTHONPATH so the built package will be found.
346 (setenv "PYTHONPATH"
347 (string-append (getcwd) "/build/lib:"
348 (getenv "PYTHONPATH")))
349 (invoke "pytest" "-p" "no:logging")
350 #t)))))
351 (home-page "https://github.com/borntyping/python-colorlog")
352 (synopsis "Log formatting with colors for python")
353 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
354 with Python's logging module that outputs records using terminal colors.")
355 (license license:expat)))
356
357 (define-public python-pyprind
358 (package
359 (name "python-pyprind")
360 (version "2.11.2")
361 (source (origin
362 (method url-fetch)
363 (uri (pypi-uri "PyPrind" version))
364 (sha256
365 (base32
366 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
367 (build-system python-build-system)
368 (propagated-inputs
369 `(("python-psutil" ,python-psutil)))
370 (home-page "https://github.com/rasbt/pyprind")
371 (synopsis "Python Progress Bar and Percent Indicator Utility")
372 (description "The PyPrind (Python Progress Indicator) module provides a
373 progress bar and a percentage indicator object that let you track the progress
374 of a loop structure or other iterative computation.")
375 (license license:bsd-3)))
376
377 (define-public python-gphoto2
378 (package
379 (name "python-gphoto2")
380 (version "2.2.1")
381 (source (origin
382 (method url-fetch)
383 (uri (pypi-uri "gphoto2" version))
384 (sha256
385 (base32
386 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
387 (build-system python-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)))
390 (inputs
391 `(("libgphoto2" ,libgphoto2)))
392 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
393 (synopsis "Python interface to libgphoto2")
394 (description "@code{python-gphoto2} is a comprehensive Python interface
395 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
396 automatically generate the interface code.")
397 (license license:gpl3+)))
398
399 (define-public python-colour
400 (package
401 (name "python-colour")
402 (version "0.1.5")
403 (source (origin
404 (method url-fetch)
405 (uri (pypi-uri "colour" version))
406 (sha256
407 (base32
408 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-d2to1" ,python-d2to1)))
412 (home-page "https://github.com/vaab/colour")
413 (synopsis "Convert and manipulate various color representations")
414 (description "Pythonic way to manipulate color representations (HSL, RVB,
415 web, X11, ...).")
416 (license license:expat)))
417
418 (define-public python-d2to1
419 (package
420 (name "python-d2to1")
421 (version "0.2.12.post1")
422 (source (origin
423 (method url-fetch)
424 (uri (pypi-uri "d2to1" version))
425 (sha256
426 (base32
427 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
428 (build-system python-build-system)
429 (native-inputs
430 `(("python-nose" ,python-nose)))
431 (home-page "https://github.com/embray/d2to1")
432 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
433 in python")
434 (description "The python package d2to1 (the d is for distutils) allows
435 using distutils2-like setup.cfg files for a package's metadata with a
436 distribute/setuptools setup.py script.")
437 (license license:bsd-2)))
438
439 (define-public python-rawkit
440 (package
441 (name "python-rawkit")
442 (version "0.6.0")
443 (source (origin
444 (method url-fetch)
445 (uri (pypi-uri "rawkit" version))
446 (sha256
447 (base32
448 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-pytest" ,python-pytest)
452 ("python-mock" ,python-mock)))
453 (inputs
454 `(("libraw" ,libraw)))
455 (home-page "https://rawkit.readthedocs.io")
456 (synopsis "Ctypes-based LibRaw binding for Python")
457 (description "The rawkit package provides two modules: rawkit and libraw.
458 The rawkit module provides a high-level Pythonic interface for developing raw
459 photos, while the libraw module provides a CTypes based interface for
460 interacting with the low-level LibRaw C APIs.")
461 (license license:expat)))
462
463 (define-public python-easygui
464 (package
465 (name "python-easygui")
466 (version "0.98.1")
467 (source (origin
468 (method url-fetch)
469 (uri (pypi-uri "easygui" version))
470 (sha256
471 (base32
472 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
473 (build-system python-build-system)
474 (propagated-inputs
475 `(("python-tkinter" ,python "tk")))
476 (home-page "https://github.com/robertlugg/easygui")
477 (synopsis "GUI programming module for Python")
478 (description "EasyGUI is a module for very simple, very easy GUI
479 programming in Python. EasyGUI is different from other GUI generators in that
480 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
481 simple function calls.")
482 (license license:bsd-3)))
483
484 (define-public python-pymd4c
485 (package
486 (name "python-pymd4c")
487 (version "0.4.6.0b1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "pymd4c" version))
492 (sha256
493 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
494 (build-system python-build-system)
495 (inputs
496 `(("md4c" ,md4c)))
497 (native-inputs
498 `(("python-flake8" ,python-flake8)
499 ("python-pkgconfig" ,python-pkgconfig)
500 ("pkg-config" ,pkg-config)))
501 (home-page "https://github.com/dominickpastore/pymd4c")
502 (synopsis "Python bindings for MD4C")
503 (description
504 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
505 to CommonMark.")
506 (license license:expat)))
507
508 (define-public python-pymediainfo
509 (package
510 (name "python-pymediainfo")
511 (version "4.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (pypi-uri "pymediainfo" version))
516 (sha256
517 (base32
518 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
519 (build-system python-build-system)
520 (native-inputs
521 `(("python-setuptools-scm" ,python-setuptools-scm)
522 ("python-pytest" ,python-pytest)))
523 (inputs
524 `(("libmediainfo" ,libmediainfo)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'patch-libmediainfo
529 (lambda _
530 (substitute* "pymediainfo/__init__.py"
531 (("libmediainfo.so.0")
532 (string-append (assoc-ref %build-inputs "libmediainfo")
533 "/lib/libmediainfo.so.0")))
534 #t))
535 (replace 'check
536 (lambda _
537 ;; Extend PYTHONPATH so the built package will be found.
538 (setenv "PYTHONPATH"
539 (string-append (getcwd) "/build/lib:"
540 (getenv "PYTHONPATH")))
541 ;; Skip the only failing test "test_parse_url"
542 (invoke "pytest" "-vv" "-k" "not test_parse_url")
543 #t)))))
544 (home-page
545 "https://github.com/sbraz/pymediainfo")
546 (synopsis
547 "Python wrapper for the mediainfo library")
548 (description
549 "Python wrapper for the mediainfo library to access the technical and tag
550 data for video and audio files.")
551 (license license:expat)))
552
553 (define-public python-psutil
554 (package
555 (name "python-psutil")
556 (version "5.8.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "psutil" version))
561 (sha256
562 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
563 (build-system python-build-system)
564 (arguments
565 ;; FIXME: some tests do not return and time out. Some tests fail because
566 ;; some processes survive kill().
567 '(#:tests? #f))
568 (home-page "https://github.com/giampaolo/psutil")
569 (synopsis "Library for retrieving information on running processes")
570 (description
571 "@code{psutil} (Python system and process utilities) is a library for
572 retrieving information on running processes and system utilization (CPU,
573 memory, disks, network) in Python. It is useful mainly for system monitoring,
574 profiling and limiting process resources and management of running processes.
575 It implements many functionalities offered by command line tools such as: ps,
576 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
577 iotop, uptime, pidof, tty, taskset, pmap.")
578 (properties `((python2-variant . ,(delay python2-psutil))))
579 (license license:bsd-3)))
580
581 (define-public python2-psutil
582 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
583 (package
584 (inherit base)
585 (propagated-inputs
586 `(("python2-enum34" ,python2-enum34) ;optional
587 ,@(package-propagated-inputs base))))))
588
589 (define-public python-shapely
590 (package
591 (name "python-shapely")
592 (version "1.7.1")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "Shapely" version))
597 (sha256
598 (base32
599 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
600 (modules '((guix build utils)))
601 (snippet
602 '(begin
603 (delete-file "shapely/speedups/_speedups.c")
604 (delete-file "shapely/vectorized/_vectorized.c")
605 #t))))
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-cython" ,python-cython)
609 ("python-matplotlib" ,python-matplotlib)
610 ("python-pytest" ,python-pytest)
611 ("python-pytest-cov" ,python-pytest-cov)))
612 (inputs
613 `(("geos" ,geos)))
614 (propagated-inputs
615 `(("python-numpy" ,python-numpy)))
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (add-after 'unpack 'patch-geos-path
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((geos (assoc-ref inputs "geos"))
622 (glibc (assoc-ref inputs ,(if (%current-target-system)
623 "cross-libc" "libc"))))
624 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
625 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
626 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
627 geos "/lib/libgeos_c.so'])"))
628 (("free = load_dll\\('c'\\)\\.free")
629 (string-append "free = load_dll('c', fallbacks=['"
630 glibc "/lib/libc.so.6']).free"))
631 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
632 (string-append "free = load_dll('c', fallbacks=['"
633 glibc "/lib/libc.so.6']).free"))))
634 #t)))))
635 (home-page "https://github.com/Toblerity/Shapely")
636 (synopsis "Library for the manipulation and analysis of geometric objects")
637 (description "Shapely is a Python package for manipulation and analysis of
638 planar geometric objects. It is based on the @code{GEOS} library.")
639 (license license:bsd-3)))
640
641 (define-public python-shortuuid
642 (package
643 (name "python-shortuuid")
644 (version "0.5.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "shortuuid" version))
649 (sha256
650 (base32
651 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-pep8" ,python-pep8)))
655 (home-page "https://github.com/skorokithakis/shortuuid")
656 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
657 (description
658 "@code{shortuuid} is a Python library for generating concise, unambiguous
659 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
660 module and then similar looking characters are removed.")
661 (license license:bsd-3)))
662
663 (define-public python-logwrap
664 (package
665 (name "python-logwrap")
666 (version "8.2.0.post0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "logwrap" version))
671 (sha256
672 (base32
673 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
674 (build-system python-build-system)
675 (arguments
676 `(#:tests? #f ; Tests not included in pypi release.
677 #:phases
678 (modify-phases %standard-phases
679 (replace 'check
680 (lambda* (#:key tests? #:allow-other-keys)
681 (when tests?
682 (invoke "pytest"))
683 #t)))))
684 (native-inputs
685 `(("python-cython" ,python-cython)
686 ("python-pytest" ,python-pytest)
687 ("python-setuptools-scm" ,python-setuptools-scm)
688 ("python-toml" ,python-toml)
689 ("python-wheel" ,python-wheel)))
690 (home-page "https://github.com/python-useful-helpers/logwrap")
691 (synopsis "Decorator for logging function arguments")
692 (description "This package provides a decorator to log function arguments
693 and function call return values in a human-readable way.")
694 (license license:asl2.0)))
695
696 (define-public python2-shapely
697 (package-with-python2 python-shapely))
698
699 (define-public python-clyent
700 (package
701 (name "python-clyent")
702 (version "1.2.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "clyent" version))
707 (sha256
708 (base32
709 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-mock" ,python-mock)))
713 (home-page "https://github.com/Anaconda-Platform/clyent")
714 (synopsis "Command line client library")
715 (description "Clyent is a Python command line utility library. It is used
716 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
717 (license license:bsd-3)))
718
719 (define-public python2-clyent
720 (package-with-python2 python-clyent))
721
722 (define-public python-babel
723 (package
724 (name "python-babel")
725 (version "2.9.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-freezegun" ,python-freezegun)
736 ("python-pytest" ,python-pytest)))
737 (propagated-inputs
738 `(("python-pytz" ,python-pytz)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (replace 'check
742 (lambda _
743 (invoke "pytest" "-vv"))))))
744 (home-page "http://babel.pocoo.org/")
745 (synopsis
746 "Tools for internationalizing Python applications")
747 (description
748 "Babel is composed of two major parts:
749 - tools to build and work with gettext message catalogs
750 - a Python interface to the CLDR (Common Locale Data Repository), providing
751 access to various locale display names, localized number and date formatting,
752 etc. ")
753 (license license:bsd-3)))
754
755 (define-public python2-babel
756 (package-with-python2 python-babel))
757
758 (define-public python2-backport-ssl-match-hostname
759 (package
760 (name "python2-backport-ssl-match-hostname")
761 (version "3.5.0.1")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "backports.ssl_match_hostname" version))
766 (sha256
767 (base32
768 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
769 (build-system python-build-system)
770 (arguments
771 `(#:python ,python-2
772 #:tests? #f)) ; no test target
773 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
774 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
775 (description
776 "This backport brings the ssl.match_hostname() function to users of
777 earlier versions of Python. The function checks the hostname in the
778 certificate returned by the server to which a connection has been established,
779 and verifies that it matches the intended target hostname.")
780 (license license:psfl)))
781
782 (define-public python-bidict
783 (package
784 (name "python-bidict")
785 (version "0.21.2")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "bidict" version))
790 (sha256
791 (base32
792 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
793 (build-system python-build-system)
794 (native-inputs
795 `(("python-coverage" ,python-coverage)
796 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
797 ("python-pre-commit" ,python-pre-commit)
798 ("python-py" ,python-py)
799 ("python-pytest" ,python-pytest)
800 ("python-pytest-benchmark" ,python-pytest-benchmark)
801 ("python-pytest-cov" ,python-pytest-cov)
802 ("python-setuptools-scm" ,python-setuptools-scm)
803 ("python-sortedcollections" ,python-sortedcollections)
804 ("python-sortedcontainers" ,python-sortedcontainers)
805 ("python-sphinx" ,python-sphinx)
806 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
807 ("python-tox" ,python-tox)))
808 (arguments
809 `(#:phases (modify-phases %standard-phases
810 (add-after 'unpack 'relax-reqs
811 (lambda _
812 (substitute* "setup.py"
813 (("sortedcollections < 2") "sortedcollections"))
814 #t))
815 (replace 'check
816 (lambda _ (invoke "./run_tests.py"))))))
817 (home-page "https://bidict.readthedocs.io")
818 (synopsis "Bidirectional mapping library")
819 (description "The @code{bidict} library provides several data structures
820 for working with bidirectional mappings in Python.")
821 (license license:mpl2.0)))
822
823 (define-public python-bitarray
824 (package
825 (name "python-bitarray")
826 (version "1.4.0")
827 (source (origin
828 (method url-fetch)
829 (uri (pypi-uri "bitarray" version))
830 (sha256
831 (base32
832 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
833 (build-system python-build-system)
834 (home-page "https://github.com/ilanschnell/bitarray")
835 (synopsis "Efficient arrays of booleans")
836 (description "This package provides an object type which efficiently
837 represents an array of booleans. Bitarrays are sequence types and behave very
838 much like usual lists. Eight bits are represented by one byte in a contiguous
839 block of memory. The user can select between two representations:
840 little-endian and big-endian. All of the functionality is implemented in C.
841 Methods for accessing the machine representation are provided. This can be
842 useful when bit level access to binary files is required, such as portable
843 bitmap image files. Also, when dealing with compressed data which uses
844 variable bit length encoding, you may find this module useful.")
845 (license license:psfl)))
846
847 (define-public python-boolean.py
848 (package
849 (name "python-boolean.py")
850 (version "3.6")
851 (source
852 (origin
853 ;; There's no source tarball on PyPI.
854 (method git-fetch)
855 (uri (git-reference
856 (url "https://github.com/bastikr/boolean.py")
857 (commit (string-append "v" version))))
858 (file-name (git-file-name name version))
859 (sha256
860 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
861 (build-system python-build-system)
862 (home-page "https://github.com/bastikr/boolean.py")
863 (synopsis "Boolean algebra in one Python module")
864 (description
865 "This is a small Python library that implements boolean algebra.
866 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
867 @code{Symbol} class that can take on one of these two values. Calculations
868 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
869 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
870 Expressions are constructed from parsed strings or directly in Python.")
871 (license license:bsd-2)))
872
873 (define-public python-hdf4
874 (package
875 (name "python-hdf4")
876 (version "0.9")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri name version))
881 (sha256
882 (base32
883 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
884 (build-system python-build-system)
885 (native-inputs `(("nose" ,python-nose)))
886 (propagated-inputs `(("numpy" ,python-numpy)))
887 (inputs
888 `(("hdf4" ,hdf4)
889 ("libjpeg" ,libjpeg-turbo)
890 ("zlib" ,zlib)))
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda _
896 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
897 ;; on to import numpy. Somehow this works on their CI system.
898 ;; Let's just manage PYTHONPATH here instead.
899 (substitute* "runexamples.sh"
900 (("export PYTHONPATH=.*") ""))
901 (setenv "PYTHONPATH"
902 (string-append (getcwd) ":"
903 (getenv "PYTHONPATH")))
904 (invoke "./runexamples.sh")
905 (invoke "nosetests" "-v"))))))
906 (home-page "https://github.com/fhs/python-hdf4")
907 (synopsis "Python interface to the NCSA HDF4 library")
908 (description
909 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
910 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
911 NetCDF files can also be read and modified. Python-HDF4 is a fork of
912 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
913 (license license:expat)))
914
915 (define-public python2-hdf4
916 (package-with-python2 python-hdf4))
917
918 (define-public python-h5py
919 (package
920 (name "python-h5py")
921 (version "2.10.0")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "h5py" version))
926 (sha256
927 (base32
928 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
929 (build-system python-build-system)
930 (arguments
931 `(#:tests? #f ; no test target
932 #:phases
933 (modify-phases %standard-phases
934 (add-after 'unpack 'fix-hdf5-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 (let ((prefix (assoc-ref inputs "hdf5")))
937 (substitute* "setup_build.py"
938 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
939 (string-append "['" prefix "/lib" "']"))
940 (("'/opt/local/include', '/usr/local/include'")
941 (string-append "'" prefix "/include" "'")))
942 (substitute* "setup_configure.py"
943 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
944 (string-append "['" prefix "/lib" "']")))
945 #t))))))
946 (propagated-inputs
947 `(("python-six" ,python-six)
948 ("python-numpy" ,python-numpy)))
949 (inputs
950 `(("hdf5" ,hdf5-1.10)))
951 (native-inputs
952 `(("python-cython" ,python-cython)
953 ("python-pkgconfig" ,python-pkgconfig)
954 ("pkg-config" ,pkg-config)))
955 (home-page "https://www.h5py.org/")
956 (synopsis "Read and write HDF5 files from Python")
957 (description
958 "The h5py package provides both a high- and low-level interface to the
959 HDF5 library from Python. The low-level interface is intended to be a
960 complete wrapping of the HDF5 API, while the high-level component supports
961 access to HDF5 files, datasets and groups using established Python and NumPy
962 concepts.")
963 (license license:bsd-3)))
964
965 (define-public python2-h5py
966 (package-with-python2 python-h5py))
967
968 (define-public python-sh
969 (package
970 (name "python-sh")
971 (version "1.12.14")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "sh" version))
976 (sha256
977 (base32
978 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
979 (build-system python-build-system)
980 (arguments
981 '(#:phases
982 (modify-phases %standard-phases
983 (replace 'check
984 (lambda _
985 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
986 (setenv "HOME" "/tmp")
987 (invoke "python" "sh.py" "test"))))))
988 (native-inputs
989 `(("python-coverage" ,python-coverage)))
990 (home-page "https://github.com/amoffat/sh")
991 (synopsis "Python subprocess replacement")
992 (description "This package provides a replacement for Python's
993 @code{subprocess} feature.")
994 (license license:expat)))
995
996 (define-public python2-sh
997 (package-with-python2 python-sh))
998
999 (define-public python-cftime
1000 (package
1001 (name "python-cftime")
1002 (version "1.0.4.2")
1003 (source
1004 (origin
1005 (method url-fetch)
1006 (uri (pypi-uri "cftime" version))
1007 (sha256
1008 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1009 (build-system python-build-system)
1010 (propagated-inputs
1011 `(("python-numpy" ,python-numpy)))
1012 (native-inputs
1013 `(("python-coveralls" ,python-coveralls)
1014 ("python-cython" ,python-cython)
1015 ("python-pytest-cov" ,python-pytest-cov)))
1016 (home-page "https://github.com/Unidata/cftime")
1017 (synopsis "Library for time handling")
1018 (description
1019 "This package provides time-handling functionality that used to be part
1020 of the netcdf4 package before.")
1021 ;; This package claims to include code under the GPLv3 but is released
1022 ;; under ISC.
1023 (license (list license:isc license:gpl3+))))
1024
1025 (define-public python-netcdf4
1026 (package
1027 (name "python-netcdf4")
1028 (version "1.5.3")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "netCDF4" version))
1033 (sha256
1034 (base32
1035 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1036 (build-system python-build-system)
1037 (arguments
1038 '(#:phases
1039 (modify-phases %standard-phases
1040 (add-after 'unpack 'configure-locations
1041 (lambda* (#:key inputs #:allow-other-keys)
1042 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1043 #t)))))
1044 (native-inputs
1045 `(("python-cython" ,python-cython)))
1046 (propagated-inputs
1047 `(("python-numpy" ,python-numpy)
1048 ("python-cftime" ,python-cftime)))
1049 (inputs
1050 `(("netcdf" ,netcdf)
1051 ("hdf4" ,hdf4)
1052 ("hdf5" ,hdf5)))
1053 (home-page "https://github.com/Unidata/netcdf4-python")
1054 (synopsis "Python/numpy interface to the netCDF library")
1055 (description "Netcdf4-python is a Python interface to the netCDF C
1056 library. netCDF version 4 has many features not found in earlier
1057 versions of the library and is implemented on top of HDF5. This module
1058 can read and write files in both the new netCDF 4 and the old netCDF 3
1059 format, and can create files that are readable by HDF5 clients. The
1060 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1061 to users of that module.")
1062 ;; The software is mainly ISC, but includes some files covered
1063 ;; by the Expat license.
1064 (license (list license:isc license:expat))))
1065
1066 (define-public python-license-expression
1067 (package
1068 (name "python-license-expression")
1069 (version "1.2")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (pypi-uri "license-expression" version))
1074 (sha256
1075 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1076 (build-system python-build-system)
1077 (propagated-inputs
1078 `(("python-boolean.py" ,python-boolean.py)))
1079 (home-page "https://github.com/nexB/license-expression")
1080 (synopsis "Apply boolean logic to license expressions")
1081 (description
1082 "This Python module defines a tiny language to evaluate and compare
1083 license expressions using boolean logic. Logical combinations of licenses can
1084 be tested for equality, containment, and equivalence. They can be normalised
1085 and simplified. It supports SPDX license expressions as well as other naming
1086 conventions and aliases in the same expression.")
1087 (license license:gpl2+)))
1088
1089 (define-public python-lockfile
1090 (package
1091 (name "python-lockfile")
1092 (version "0.12.2")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "lockfile" version))
1097 (sha256
1098 (base32
1099 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1100 (build-system python-build-system)
1101 (arguments '(#:test-target "check"))
1102 (native-inputs
1103 `(("python-pbr" ,python-pbr)))
1104 (home-page "https://launchpad.net/pylockfile")
1105 (synopsis "Platform-independent file locking module")
1106 (description
1107 "The lockfile package exports a LockFile class which provides a simple
1108 API for locking files.")
1109 (license license:expat)))
1110
1111 (define-public python-filelock
1112 (package
1113 (name "python-filelock")
1114 (version "3.0.12")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "filelock" version))
1119 (sha256
1120 (base32
1121 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1122 (build-system python-build-system)
1123 (home-page
1124 "https://github.com/benediktschmitt/py-filelock")
1125 (synopsis "Platform independent file lock")
1126 (description "@code{filelock} contains a single module implementing
1127 a platform independent file lock in Python, which provides a simple way of
1128 inter-process communication.")
1129 (license license:unlicense)))
1130
1131 (define-public python-semantic-version
1132 (package
1133 (name "python-semantic-version")
1134 (version "2.8.5")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "semantic_version" version))
1139 (sha256
1140 (base32
1141 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1142 (build-system python-build-system)
1143 (home-page "https://github.com/rbarrois/python-semanticversion")
1144 (synopsis "Semantic versioning module for Python")
1145 (description
1146 "The @code{semantic_version} class is a small library for handling
1147 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1148
1149 It can compare versions, generate a new version that represents a bump in one of
1150 the version levels, and check whether any given string is a proper semantic
1151 version identifier.")
1152 (license license:bsd-3)))
1153
1154 (define-public python2-semantic-version
1155 (package-with-python2 python-semantic-version))
1156
1157 (define-public python-serpent
1158 (package
1159 (name "python-serpent")
1160 (version "1.28")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "serpent" version))
1165 (sha256
1166 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1167 (build-system python-build-system)
1168 (native-inputs
1169 `(("python-attrs" ,python-attrs)
1170 ("python-pytz" ,python-pytz)))
1171 (home-page "https://github.com/irmen/Serpent")
1172 (synopsis "Serializer for literal Python expressions")
1173 (description
1174 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1175 serialization. It serializes an object tree into bytes (an utf-8 encoded
1176 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1177 to rebuild the original object tree.
1178
1179 Because only safe literals are encoded, it is safe to send serpent data to
1180 other machines, such as over the network.")
1181 (properties `((python2-variant . ,(delay python2-serpent))))
1182 (license license:expat)))
1183
1184 (define-public python2-serpent
1185 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1186 (package
1187 (inherit base)
1188 (propagated-inputs
1189 `(("python-enum34" ,python2-enum34)
1190 ,@(package-propagated-inputs base))))))
1191
1192 (define-public python-setuptools
1193 (package
1194 (name "python-setuptools")
1195 (version "52.0.0")
1196 (source
1197 (origin
1198 (method url-fetch)
1199 (uri (pypi-uri "setuptools" version))
1200 (sha256
1201 (base32
1202 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1203 (modules '((guix build utils)))
1204 (snippet
1205 '(begin
1206 ;; Remove included binaries which are used to build self-extracting
1207 ;; installers for Windows.
1208 ;; TODO: Find some way to build them ourself so we can include them.
1209 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1210 #t))))
1211 (build-system python-build-system)
1212 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1213 ;; One could bootstrap with an internal untested setuptools.
1214 (arguments
1215 `(#:tests? #f))
1216 (home-page "https://pypi.org/project/setuptools/")
1217 (synopsis
1218 "Library designed to facilitate packaging Python projects")
1219 (description
1220 "Setuptools is a fully-featured, stable library designed to facilitate
1221 packaging Python projects, where packaging includes:
1222 Python package and module definitions,
1223 distribution package metadata,
1224 test hooks,
1225 project installation,
1226 platform-specific details,
1227 Python 3 support.")
1228 ;; TODO: setuptools now bundles the following libraries:
1229 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1230 (license (list license:psfl ; setuptools itself
1231 license:expat ; six, appdirs, pyparsing
1232 license:asl2.0 ; packaging is dual ASL2/BSD-2
1233 license:bsd-2))
1234 (properties `((python2-variant . ,(delay python2-setuptools))))))
1235
1236 ;; Newer versions of setuptools no longer support Python 2.
1237 (define-public python2-setuptools
1238 (package
1239 (name "python2-setuptools")
1240 (version "41.0.1")
1241 (source
1242 (origin
1243 (method url-fetch)
1244 (uri (pypi-uri "setuptools" version ".zip"))
1245 (sha256
1246 (base32
1247 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1248 (modules '((guix build utils)))
1249 (snippet
1250 '(begin
1251 ;; Remove included binaries which are used to build self-extracting
1252 ;; installers for Windows.
1253 ;; TODO: Find some way to build them ourself so we can include them.
1254 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1255 #t))))
1256 (build-system python-build-system)
1257 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1258 ;; One could bootstrap with an internal untested setuptools.
1259 (arguments
1260 `(#:tests? #f))
1261 (native-inputs
1262 `(("unzip" ,unzip)))
1263 (home-page "https://pypi.org/project/setuptools/")
1264 (synopsis
1265 "Library designed to facilitate packaging Python projects")
1266 (description
1267 "Setuptools is a fully-featured, stable library designed to facilitate
1268 packaging Python projects, where packaging includes:
1269 Python package and module definitions,
1270 distribution package metadata,
1271 test hooks,
1272 project installation,
1273 platform-specific details,
1274 Python 3 support.")
1275 ;; TODO: setuptools now bundles the following libraries:
1276 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1277 (license (list license:psfl ; setuptools itself
1278 license:expat ; six, appdirs, pyparsing
1279 license:asl2.0 ; packaging is dual ASL2/BSD-2
1280 license:bsd-2))))
1281
1282 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1283 (define-public python-setuptools-for-tensorflow
1284 (hidden-package
1285 (package
1286 (inherit python-setuptools)
1287 (version "39.1.0")
1288 (source (origin
1289 (inherit (package-source python-setuptools))
1290 (uri (pypi-uri "setuptools" version ".zip"))
1291 (sha256
1292 (base32
1293 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1294
1295 (define-public python-uniseg
1296 (package
1297 (name "python-uniseg")
1298 (version "0.7.1")
1299 (source
1300 (origin
1301 (method url-fetch)
1302 (uri (pypi-uri "uniseg" version ".zip"))
1303 (sha256
1304 (base32
1305 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1306 (build-system python-build-system)
1307 (arguments
1308 '(#:tests? #f)) ; The test suite requires network access.
1309 (native-inputs
1310 `(("unzip" ,unzip)))
1311 (home-page
1312 "https://bitbucket.org/emptypage/uniseg-python")
1313 (synopsis
1314 "Python library to determine Unicode text segmentations")
1315 (description
1316 "Uniseg is a Python package used to determine Unicode text segmentations.
1317 Supported segmentations include:
1318 @enumerate
1319 @item @dfn{Code point} (any value in the Unicode codespace)
1320 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1321 multiple Unicode code points, e.g. \"G\" + acute-accent)
1322 @item Word break
1323 @item Sentence break
1324 @item Line break
1325 @end enumerate")
1326 (license license:expat)))
1327
1328 (define-public python2-uniseg
1329 (package-with-python2 python-uniseg))
1330
1331 (define-public python-humanfriendly
1332 (package
1333 (name "python-humanfriendly")
1334 (version "8.2")
1335 (source
1336 (origin
1337 (method url-fetch)
1338 (uri (pypi-uri "humanfriendly" version))
1339 (sha256
1340 (base32
1341 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1345 #:tests? #f))
1346 (home-page "https://humanfriendly.readthedocs.io")
1347 (synopsis "Human-friendly input and output in Python")
1348 (description
1349 "The functions and classes in @code{humanfriendly} can be used to make
1350 text interfaces more user-friendly. It includes tools to parse and format
1351 numbers, file sizes, and timespans, timers for long-running operations, menus
1352 to allow the user to choose from a list of options, and terminal interaction
1353 helpers.")
1354 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1355 (license license:expat)))
1356
1357 (define-public python2-humanfriendly
1358 (let ((base (package-with-python2
1359 (strip-python2-variant python-humanfriendly))))
1360 (package (inherit base)
1361 (propagated-inputs
1362 `(("python2-monotonic" ,python2-monotonic)
1363 ,@(package-propagated-inputs base))))))
1364
1365 (define-public python-textparser
1366 (package
1367 (name "python-textparser")
1368 (version "0.23.0")
1369 (source
1370 (origin
1371 (method url-fetch)
1372 (uri (pypi-uri "textparser" version))
1373 (sha256
1374 (base32
1375 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1376 (build-system python-build-system)
1377 (home-page "https://github.com/eerimoq/textparser")
1378 (synopsis "Fast text parser for Python")
1379 (description "This library provides a text parser written in the Python
1380 language. It aims to be fast.")
1381 (license license:expat)))
1382
1383 (define-public python-aenum
1384 (package
1385 (name "python-aenum")
1386 (version "2.2.4")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "aenum" version))
1391 (sha256
1392 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1393 (build-system python-build-system)
1394 (arguments
1395 `(#:phases (modify-phases %standard-phases
1396 (replace 'check
1397 (lambda _
1398 (format #t "current working dir ~s~%" (getcwd))
1399 (setenv "PYTHONPATH"
1400 (string-append ".:" (getenv "PYTHONPATH")))
1401 ;; We must run the test suite module directly, as it
1402 ;; fails to define the 'tempdir' variable in scope for
1403 ;; the tests otherwise
1404 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1405 ;; issues/32/running-tests-with-python-setuppy-test).
1406 (invoke "python3" "aenum/test.py")
1407 ;; This one fails with "NameError: name
1408 ;; 'test_pickle_dump_load' is not defined" (see:
1409 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1410 ;; /error-running-the-test_v3py-test-suite).
1411 ;; (invoke "python3" "aenum/test_v3.py")
1412 #t)))))
1413 (home-page "https://bitbucket.org/stoneleaf/aenum")
1414 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1415 (description "The aenum library includes an @code{Enum} base class, a
1416 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1417 class.")
1418 (license license:bsd-3)))
1419
1420 (define-public python-can
1421 (package
1422 (name "python-can")
1423 (version "3.3.3")
1424 (source
1425 (origin
1426 (method url-fetch)
1427 (uri (pypi-uri "python-can" version))
1428 (sha256
1429 (base32
1430 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1431 (build-system python-build-system)
1432 (arguments
1433 `(#:phases (modify-phases %standard-phases
1434 (add-after 'unpack 'relax-version-requirements
1435 (lambda _
1436 (substitute* "setup.py"
1437 (("mock~=2\\.0") "mock")
1438 (("coverage<5") "coverage")
1439 (("pytest~=4\\.3") "pytest")
1440 (("hypothesis~=4\\.56") "hypothesis"))
1441 #t))
1442 (add-after 'unpack 'fix-broken-tests
1443 ;; The tests try to run two scripts it expects should be
1444 ;; in PATH, but they aren't at this time (see:
1445 ;; https://github.com/hardbyte/python-can/issues/805).
1446 (lambda _
1447 (substitute* "test/test_scripts.py"
1448 (("\"can_logger\\.py --help\"") "")
1449 (("\"can_player\\.py --help\"") ""))
1450 #t)))))
1451 (propagated-inputs
1452 `(("python-aenum" ,python-aenum)
1453 ("python-wrapt" ,python-wrapt)))
1454 (native-inputs
1455 `(("python-codecov" ,python-codecov)
1456 ("python-coverage" ,python-coverage)
1457 ("python-future" ,python-future)
1458 ("python-hypothesis" ,python-hypothesis)
1459 ("python-mock" ,python-mock)
1460 ("python-pyserial" ,python-pyserial)
1461 ("python-pytest" ,python-pytest)
1462 ("python-pytest-cov" ,python-pytest-cov)
1463 ("python-pytest-runner" ,python-pytest-runner)
1464 ("python-pytest-timeout" ,python-pytest-timeout)))
1465 (home-page "https://github.com/hardbyte/python-can")
1466 (synopsis "Controller Area Network (CAN) interface module for Python")
1467 (description "This package defines the @code{can} module, which provides
1468 controller area network (CAN) support for Python developers; providing common
1469 abstractions to different hardware devices, and a suite of utilities for
1470 sending and receiving messages on a CAN bus.")
1471 (license license:lgpl3+)))
1472
1473 (define-public python-caniusepython3
1474 (package
1475 (name "python-caniusepython3")
1476 (version "7.2.0")
1477 (source
1478 (origin
1479 (method url-fetch)
1480 (uri (pypi-uri "caniusepython3" version))
1481 (sha256
1482 (base32
1483 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1484 (build-system python-build-system)
1485 (arguments
1486 `(#:phases (modify-phases %standard-phases
1487 (add-after 'unpack 'relax-requirements
1488 (lambda _
1489 (substitute* "setup.py"
1490 ;; These are for compatibility with Python 2.
1491 ((".*'argparse', 'backports.functools_lru_cache',.*")
1492 ""))
1493 (substitute* "dev_requirements.txt"
1494 ((".*pylint.*") "")) ;not actually required
1495 #t))
1496 (replace 'check
1497 (lambda _
1498 (invoke "py.test" "-k" "not NetworkTests"))))))
1499 (propagated-inputs
1500 `(("python-distlib" ,python-distlib)
1501 ("python-packaging" ,python-packaging)
1502 ("python-requests" ,python-requests)))
1503 (native-inputs
1504 `(("python-mock" ,python-mock)
1505 ("python-pytest" ,python-pytest)))
1506 (home-page "https://github.com/brettcannon/caniusepython3")
1507 (synopsis "Check for Python 3-incompatible Python libraries")
1508 (description "The @command{caniusepython3} command scans your project and
1509 reports the Python 3-incompatible libraries it found. It can also be used as
1510 a library.")
1511 (license license:asl2.0)))
1512
1513 (define-public python-diskcache
1514 (package
1515 (name "python-diskcache")
1516 (version "4.1.0")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "diskcache" version))
1521 (sha256
1522 (base32
1523 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1524 (build-system python-build-system)
1525 (arguments
1526 `(#:tests? #f)) ;test suite not included in the release
1527 (home-page "http://www.grantjenks.com/docs/diskcache/")
1528 (synopsis "Disk and file backed cache library")
1529 (description "DiskCache is a disk and file backed persistent cache.")
1530 (license license:asl2.0)))
1531
1532 (define-public python-bitstruct
1533 (package
1534 (name "python-bitstruct")
1535 (version "8.9.0")
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (pypi-uri "bitstruct" version))
1540 (sha256
1541 (base32
1542 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1543 (build-system python-build-system)
1544 (home-page "https://github.com/eerimoq/bitstruct")
1545 (synopsis "Python values to and C bit field structs converter")
1546 (description "This module performs conversions between Python values and C
1547 bit field structs represented as Python byte strings. It is intended to have
1548 a similar interface as the @code{struct} module from Python, but working on
1549 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1550 (license license:expat)))
1551
1552 (define-public python-cantools
1553 (package
1554 (name "python-cantools")
1555 (version "33.1.1")
1556 (source
1557 (origin
1558 ;; We take the sources from the Git repository as the documentation is
1559 ;; not included with the PyPI archive.
1560 (method git-fetch)
1561 (uri (git-reference
1562 (url "https://github.com/eerimoq/cantools")
1563 (commit version)))
1564 (file-name (git-file-name name version))
1565 (sha256
1566 (base32
1567 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1568 (build-system python-build-system)
1569 (arguments
1570 `(#:phases
1571 (modify-phases %standard-phases
1572 (add-after 'build 'build-doc
1573 (lambda _
1574 ;; See: https://github.com/eerimoq/cantools/issues/190.
1575 (substitute* "README.rst"
1576 (("https://github.com/eerimoq/cantools/raw/master\
1577 /docs/monitor.png")
1578 "monitor.png"))
1579 (with-directory-excursion "docs"
1580 (invoke "make" "man" "info"))))
1581 (add-after 'install 'install-doc
1582 (lambda* (#:key outputs #:allow-other-keys)
1583 (let* ((out (assoc-ref outputs "out"))
1584 (info (string-append out "/share/info"))
1585 (man1 (string-append out "/share/man/man1")))
1586 (format #t "CWD: ~s~%" (getcwd))
1587 (install-file "docs/_build/texinfo/cantools.info" info)
1588 (install-file "docs/_build/man/cantools.1" man1)
1589 #t))))))
1590 (native-inputs
1591 `(("sphinx" ,python-sphinx)
1592 ("texinfo" ,texinfo)))
1593 (propagated-inputs
1594 `(("python-bitstruct" ,python-bitstruct)
1595 ("python-can" ,python-can)
1596 ("python-diskcache" ,python-diskcache)
1597 ("python-textparser" ,python-textparser)))
1598 (home-page "https://github.com/eerimoq/cantools")
1599 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1600 (description "This package includes Controller Area Network (CAN) related
1601 tools that can be used to:
1602 @itemize
1603 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1604 @item encode and decode CAN messages
1605 @item multiplex simple and extended signals
1606 @item diagnose DID encoding and decoding
1607 @item dump the CAN decoder output
1608 @item test CAN nodes
1609 @item generate C source code
1610 @item monitor the CAN bus
1611 @end itemize")
1612 (license license:expat)))
1613
1614 (define-public python-capturer
1615 (package
1616 (name "python-capturer")
1617 (version "2.4")
1618 (source
1619 (origin
1620 (method url-fetch)
1621 (uri (pypi-uri "capturer" version))
1622 (sha256
1623 (base32
1624 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1625 (build-system python-build-system)
1626 (arguments
1627 `(#:tests? #f))
1628 (propagated-inputs
1629 `(("python-humanfriendly" ,python-humanfriendly)))
1630 (home-page "https://capturer.readthedocs.io")
1631 (synopsis "Capture stdout and stderr streams of the current process")
1632 (description
1633 "The capturer package makes it easy to capture the stdout and stderr
1634 streams of the current process and subprocesses. Output can be relayed
1635 to the terminal in real time but is also available to the Python program
1636 for additional processing.")
1637 (license license:expat)))
1638
1639 (define-public python2-capturer
1640 (package-with-python2 python-capturer))
1641
1642 (define-public python-case
1643 (package
1644 (name "python-case")
1645 (version "1.5.3")
1646 (source
1647 (origin
1648 (method url-fetch)
1649 (uri (pypi-uri "case" version))
1650 (sha256
1651 (base32
1652 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1653 (build-system python-build-system)
1654 (propagated-inputs
1655 `(("python-mock" ,python-mock)
1656 ("python-nose" ,python-nose)
1657 ("python-six" ,python-six)
1658 ("python-unittest2" ,python-unittest2)))
1659 (native-inputs
1660 `(("python-coverage" ,python-coverage)))
1661 (home-page "https://github.com/celery/case")
1662 (synopsis "Unittest utilities and convenience methods")
1663 (description
1664 "The @code{case} package provides utilities on top of unittest, including
1665 some helpful Python 2 compatibility convenience methods.")
1666 (license license:bsd-3)))
1667
1668 (define-public python-verboselogs
1669 (package
1670 (name "python-verboselogs")
1671 (version "1.7")
1672 (source
1673 (origin
1674 (method url-fetch)
1675 (uri (pypi-uri "verboselogs" version))
1676 (sha256
1677 (base32
1678 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1679 (build-system python-build-system)
1680 (arguments
1681 `(#:phases
1682 (modify-phases %standard-phases
1683 (replace 'check
1684 (lambda _
1685 ;; Do not run pylint plugin test, as astroid is an old
1686 ;; unsupported version.
1687 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1688 "verboselogs/tests.py"))))))
1689 (native-inputs
1690 `(("python-mock" ,python-mock)
1691 ("python-pytest" ,python-pytest)))
1692 (home-page "https://verboselogs.readthedocs.io")
1693 (synopsis "Verbose logging level for Python's logging module")
1694 (description
1695 "The @code{verboselogs} package extends Python's @code{logging} module to
1696 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1697 (license license:expat)))
1698
1699 (define-public python2-verboselogs
1700 (package-with-python2 python-verboselogs))
1701
1702 (define-public python-coloredlogs
1703 (package
1704 (name "python-coloredlogs")
1705 (version "10.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "coloredlogs" version))
1710 (sha256
1711 (base32
1712 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1713 (build-system python-build-system)
1714 (arguments
1715 `(;Tests require some updated modules
1716 #:tests? #f))
1717 (propagated-inputs
1718 `(("python-capturer" ,python-capturer)))
1719 (home-page "https://coloredlogs.readthedocs.io")
1720 (synopsis "Colored stream handler for Python's logging module")
1721 (description
1722 "The @code{coloredlogs} package enables colored terminal output for
1723 Python's logging module. The @code{ColoredFormatter} class inherits from
1724 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1725 messages in color.")
1726 (license license:expat)))
1727
1728 (define-public python2-coloredlogs
1729 (package-with-python2 python-coloredlogs))
1730
1731 (define-public python-editorconfig
1732 (package
1733 (name "python-editorconfig")
1734 (version "0.12.2")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "EditorConfig" version))
1739 (sha256
1740 (base32
1741 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1742 (build-system python-build-system)
1743 (home-page "https://editorconfig.org/")
1744 (synopsis "EditorConfig bindings for python")
1745 (description "The EditorConfig project consists of a file format for
1746 defining coding styles and a collection of text editor plugins that enable
1747 editors to read the file format and adhere to defined styles. EditorConfig
1748 files are easily readable and they work nicely with version control systems.")
1749 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1750 (license (list license:bsd-2 license:psfl))))
1751
1752 (define-public dosage
1753 (package
1754 (name "dosage")
1755 (version "2.17")
1756 (source
1757 (origin
1758 (method url-fetch)
1759 (uri (pypi-uri "dosage" version))
1760 (sha256
1761 (base32
1762 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1763 (build-system python-build-system)
1764 (propagated-inputs
1765 `(("python2-backports-functools-lru-cache"
1766 ,python2-backports-functools-lru-cache)
1767 ("python2-backports-shutil-get-terminal-size"
1768 ,python2-backports-shutil-get-terminal-size)
1769 ("python-cached-property" ,python-cached-property)
1770 ("python-colorama" ,python-colorama)
1771 ("python-imagesize" ,python-imagesize)
1772 ("python-importlib-metadata" ,python-importlib-metadata)
1773 ("python-lxml" ,python-lxml)
1774 ("python-requests" ,python-requests)
1775 ("python-six" ,python-six)))
1776 (native-inputs
1777 `(("python-pytest-cov" ,python-pytest-cov)
1778 ("python-pytest-xdist" ,python-pytest-xdist)
1779 ("python-responses" ,python-responses)
1780 ("python-setuptools-scm" ,python-setuptools-scm)))
1781 (home-page "https://github.com/webcomics/dosage")
1782 (synopsis "Comic strip downloader and archiver")
1783 (description "Dosage is designed to keep a local copy of specific webcomics and other
1784 picture-based content such as Picture of the Day sites. With the @command{dosage}
1785 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1786 downloaded, or download a strip for a particular date or index, if possible.")
1787 (license license:expat)))
1788
1789 (define-public python-et-xmlfile
1790 (package
1791 (name "python-et-xmlfile")
1792 (version "1.0.1")
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (pypi-uri "et_xmlfile" version))
1797 (sha256
1798 (base32
1799 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1800 (build-system python-build-system)
1801 (arguments
1802 `(#:phases (modify-phases %standard-phases
1803 (replace 'check
1804 (lambda _
1805 (invoke "pytest"))))))
1806 (native-inputs
1807 `(("python-pytest" ,python-pytest)
1808 ("python-lxml" ,python-lxml))) ;used for the tests
1809 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1810 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1811 (description "This Python library is based upon the @code{xmlfile} module
1812 from @code{lxml}. It aims to provide a low memory, compatible implementation
1813 of @code{xmlfile}.")
1814 (license license:expat)))
1815
1816 (define-public python2-et-xmlfile
1817 (package-with-python2 python-et-xmlfile))
1818
1819 (define-public python-openpyxl
1820 (package
1821 (name "python-openpyxl")
1822 (version "3.0.5")
1823 (source
1824 (origin
1825 ;; We use the upstream repository, as the tests are not included in the
1826 ;; PyPI releases.
1827 (method hg-fetch)
1828 (uri (hg-reference
1829 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1830 (changeset version)))
1831 (file-name (string-append name "-" version "-checkout"))
1832 (sha256
1833 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1834 (build-system python-build-system)
1835 (arguments
1836 `(#:phases (modify-phases %standard-phases
1837 (replace 'check
1838 (lambda _
1839 (invoke "pytest"))))))
1840 (native-inputs
1841 ;; For the test suite.
1842 `(("python-lxml" ,python-lxml)
1843 ("python-pillow" ,python-pillow)
1844 ("python-pytest" ,python-pytest)))
1845 (propagated-inputs
1846 `(("python-et-xmlfile" ,python-et-xmlfile)
1847 ("python-jdcal" ,python-jdcal)))
1848 (home-page "https://openpyxl.readthedocs.io")
1849 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1850 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1851 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1852 standard.")
1853 (properties `((python2-variant . ,(delay python2-openpyxl))))
1854 (license license:expat)))
1855
1856 (define-public python2-openpyxl
1857 (let ((base (package-with-python2
1858 (strip-python2-variant python-openpyxl))))
1859 (package
1860 (inherit base)
1861 ;; This is the latest version that has python2 support
1862 (version "2.6.4")
1863 (source
1864 (origin
1865 (method url-fetch)
1866 (uri (pypi-uri "openpyxl" version))
1867 (sha256
1868 (base32
1869 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1870 (arguments '(#:tests? #f))))) ; No test suite.
1871
1872 (define-public python-eventlet
1873 (package
1874 (name "python-eventlet")
1875 (version "0.25.1")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "eventlet" version))
1880 (sha256
1881 (base32
1882 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1883 (build-system python-build-system)
1884 (propagated-inputs
1885 `(("python-dnspython" ,python-dnspython)
1886 ("python-greenlet" ,python-greenlet)
1887 ("python-monotonic" ,python-monotonic)))
1888 (arguments
1889 ;; TODO: Requires unpackaged 'enum-compat'.
1890 '(#:tests? #f))
1891 (home-page "https://eventlet.net")
1892 (synopsis "Concurrent networking library for Python")
1893 (description
1894 "Eventlet is a concurrent networking library for Python that
1895 allows you to change how you run your code, not how you write it.
1896 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1897 Coroutines ensure that the developer uses a blocking style of programming
1898 that is similar to threading, but provide the benefits of non-blocking I/O.
1899 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1900 from the Python interpreter, or as a small part of a larger application.")
1901 (license license:expat)))
1902
1903 (define-public python-six
1904 (package
1905 (name "python-six")
1906 (version "1.14.0")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "six" version))
1911 (sha256
1912 (base32
1913 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1914 (build-system python-build-system)
1915 (arguments
1916 `(#:phases
1917 (modify-phases %standard-phases
1918 (replace 'check
1919 (lambda _
1920 (invoke "py.test" "-v"))))))
1921 (native-inputs
1922 `(("python-pytest" ,python-pytest-bootstrap)))
1923 (home-page "https://pypi.org/project/six/")
1924 (synopsis "Python 2 and 3 compatibility utilities")
1925 (description
1926 "Six is a Python 2 and 3 compatibility library. It provides utility
1927 functions for smoothing over the differences between the Python versions with
1928 the goal of writing Python code that is compatible on both Python versions.
1929 Six supports every Python version since 2.5. It is contained in only one
1930 Python file, so it can be easily copied into your project.")
1931 (license license:x11)))
1932
1933 (define-public python2-six
1934 (package-with-python2 python-six))
1935
1936 (define-public python-six-bootstrap
1937 (package
1938 (inherit python-six)
1939 (name "python-six-bootstrap")
1940 (native-inputs `())
1941 (arguments `(#:tests? #f))))
1942
1943 (define-public python2-six-bootstrap
1944 (package-with-python2 python-six-bootstrap))
1945
1946 (define-public python-schedule
1947 (package
1948 (name "python-schedule")
1949 (version "0.4.3")
1950 (source
1951 (origin
1952 (method url-fetch)
1953 (uri (pypi-uri "schedule" version))
1954 (sha256
1955 (base32
1956 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1957 (build-system python-build-system)
1958 (native-inputs
1959 `(("python-pytest" ,python-pytest)
1960 ("python-mock" ,python-mock)))
1961 (home-page "https://github.com/dbader/schedule")
1962 (synopsis "Schedule periodic function calls in Python")
1963 (description
1964 "Schedule is an in-process scheduler for periodic jobs that uses the
1965 builder pattern for configuration. Schedule lets you run Python functions (or
1966 any other callable) periodically at pre-determined intervals using a simple,
1967 human-friendly syntax.")
1968 (license license:expat)))
1969
1970 (define-public python2-schedule
1971 (package-with-python2 python-schedule))
1972
1973 (define-public python-scour
1974 (package
1975 (name "python-scour")
1976 (version "038.1")
1977 (source
1978 (origin
1979 (method git-fetch)
1980 (uri
1981 (git-reference
1982 (url "https://github.com/scour-project/scour")
1983 (commit
1984 (string-append "v" version))))
1985 (file-name (git-file-name name version))
1986 (sha256
1987 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1988 (propagated-inputs
1989 `(("python-six" ,python-six)))
1990 (build-system python-build-system)
1991 (home-page "https://github.com/scour-project/scour")
1992 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1993 (description "The goal of Scour is to output a file that renderes
1994 identically at a fraction of the size by removing a lot of redundant
1995 information created by most SVG editors. Optimization options are typically
1996 lossless but can be tweaked for more aggressive cleaning.")
1997 (license license:asl2.0)))
1998
1999 (define-public python-mechanize
2000 (package
2001 (name "python-mechanize")
2002 (version "0.4.5")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "mechanize" version))
2007 (sha256
2008 (base32
2009 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2010 (build-system python-build-system)
2011 (propagated-inputs
2012 `(("python-html5lib" ,python-html5lib)))
2013 (home-page "https://github.com/python-mechanize/mechanize")
2014 (synopsis
2015 "Stateful programmatic web browsing in Python")
2016 (description
2017 "Mechanize implements stateful programmatic web browsing in Python,
2018 after Andy Lester’s Perl module WWW::Mechanize.")
2019 (license license:bsd-3)))
2020
2021 (define-public python2-mechanize
2022 (package-with-python2 python-mechanize))
2023
2024 (define-public python-simpleaudio
2025 (package
2026 (name "python-simpleaudio")
2027 (version "1.0.4")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "simpleaudio" version))
2032 (sha256
2033 (base32
2034 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2035 (build-system python-build-system)
2036 (arguments
2037 `(#:tests? #f))
2038 (inputs
2039 `(("alsa-lib" ,alsa-lib)))
2040 (home-page
2041 "https://github.com/hamiltron/py-simple-audio")
2042 (synopsis "Simple, asynchronous audio playback for Python 3")
2043 (description
2044 "The @code{simplaudio} package provides cross-platform, dependency-free
2045 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2046 (license license:expat))) ; MIT license
2047
2048 (define-public python-simplejson
2049 (package
2050 (name "python-simplejson")
2051 (version "3.17.0")
2052 (source
2053 (origin
2054 (method url-fetch)
2055 (uri (pypi-uri "simplejson" version))
2056 (sha256
2057 (base32
2058 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2059 (build-system python-build-system)
2060 (home-page "http://simplejson.readthedocs.org/en/latest/")
2061 (synopsis
2062 "Json library for Python")
2063 (description
2064 "JSON (JavaScript Object Notation) is a subset of JavaScript
2065 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2066 format.
2067
2068 Simplejson exposes an API familiar to users of the standard library marshal
2069 and pickle modules. It is the externally maintained version of the json
2070 library contained in Python 2.6, but maintains compatibility with Python 2.5
2071 and (currently) has significant performance advantages, even without using
2072 the optional C extension for speedups. Simplejson is also supported on
2073 Python 3.3+.")
2074 (license license:x11)))
2075
2076 (define-public python2-simplejson
2077 (package-with-python2 python-simplejson))
2078
2079
2080 (define-public python-pyicu
2081 (package
2082 (name "python-pyicu")
2083 (version "2.4.3")
2084 (source
2085 (origin
2086 (method url-fetch)
2087 (uri (pypi-uri "PyICU" version))
2088 (sha256
2089 (base32
2090 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2091 (build-system python-build-system)
2092 (inputs
2093 `(("icu4c" ,icu4c)))
2094 (native-inputs
2095 `(("python-pytest" ,python-pytest)
2096 ("python-six" ,python-six)))
2097 (home-page "https://github.com/ovalhub/pyicu")
2098 (synopsis "Python extension wrapping the ICU C++ API")
2099 (description
2100 "PyICU is a python extension wrapping the ICU C++ API.")
2101 (license license:x11)))
2102
2103 (define-public python2-pyicu
2104 (package-with-python2 python-pyicu))
2105
2106 (define-public python-dogtail
2107 (package
2108 (name "python-dogtail")
2109 (version "0.9.11")
2110 (source (origin
2111 (method url-fetch)
2112 (uri
2113 (string-append
2114 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2115 "dogtail-" version ".tar.gz"))
2116 (sha256
2117 (base32
2118 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2119 (build-system python-build-system)
2120 (arguments
2121 `(#:tests? #f ; TODO Launching dbus for the tests
2122 ; fails
2123 #:phases
2124 (modify-phases %standard-phases
2125 (replace 'check
2126 (lambda* (#:key tests? #:allow-other-keys)
2127 (when tests?
2128 (system "Xvfb :1 &")
2129 (setenv "DISPLAY" ":1")
2130 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2131 #t)))))
2132 (propagated-inputs
2133 `(("python-pygobject" ,python-pygobject)
2134 ("python-pycairo" ,python-pycairo)
2135 ("python-pyatspi" ,python-pyatspi)))
2136 (native-inputs
2137 `(("python-nose" ,python-nose)
2138 ("gtk+" ,gtk+)
2139 ("xvfb" ,xorg-server)
2140 ("dbus" ,dbus)
2141 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2142 ("gobject-introspection" ,gobject-introspection)))
2143 (home-page "https://gitlab.com/dogtail/dogtail/")
2144 (synopsis "GUI test tool and automation framework written in Python")
2145 (description
2146 "Dogtail is a GUI test tool and automation framework written in Python.
2147 It uses Accessibility (a11y) technologies to communicate with desktop
2148 applications. dogtail scripts are written in Python and executed like any
2149 other Python program.")
2150 (license license:gpl2+)))
2151
2152 (define-public python2-dogtail
2153 (package-with-python2 python-dogtail))
2154
2155 (define-public python-empy
2156 (package
2157 (name "python-empy")
2158 (version "3.3.3")
2159 (source (origin
2160 (method url-fetch)
2161 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2162 version ".tar.gz"))
2163 (sha256
2164 (base32
2165 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2166 (build-system python-build-system)
2167 (arguments
2168 `(#:tests? #f)) ; python2 only
2169 (home-page "http://www.alcyone.com/software/empy/")
2170 (synopsis "Templating system for Python")
2171 (description
2172 "EmPy is a system for embedding Python expressions and statements in
2173 template text; it takes an EmPy source file, processes it, and produces
2174 output. This is accomplished via expansions, which are special signals to the
2175 EmPy system and are set off by a special prefix (by default the at sign, @@).
2176 EmPy can expand arbitrary Python expressions and statements in this way, as
2177 well as a variety of special forms. Textual data not explicitly delimited in
2178 this way is sent unaffected to the output, allowing Python to be used in
2179 effect as a markup language. Also supported are callbacks via hooks,
2180 recording and playback via diversions, and dynamic, chainable filters. The
2181 system is highly configurable via command line options and embedded
2182 commands.")
2183 (license license:lgpl2.1+)))
2184
2185 (define-public python2-empy
2186 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2187 (package
2188 (inherit base)
2189 (arguments `(,@(package-arguments base)
2190 #:tests? #t)))))
2191
2192 (define-public python2-element-tree
2193 (package
2194 (name "python2-element-tree")
2195 (version "1.2.6")
2196 (source (origin
2197 (method url-fetch)
2198 (uri (string-append
2199 "http://effbot.org/media/downloads/elementtree-"
2200 version "-20050316.tar.gz"))
2201 (sha256
2202 (base32
2203 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2204 (build-system python-build-system)
2205 (arguments
2206 `(#:python ,python-2 ; seems to be part of Python 3
2207 #:tests? #f)) ; no 'test' sub-command
2208 (synopsis "Toolkit for XML processing in Python")
2209 (description
2210 "ElementTree is a Python library supporting lightweight XML processing.")
2211 (home-page "https://effbot.org/zone/element-index.htm")
2212 (license (license:x11-style
2213 "http://docs.python.org/2/license.html"
2214 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2215
2216 (define-public python2-pybugz
2217 (package
2218 (name "python2-pybugz")
2219 (version "0.6.11")
2220 (source (origin
2221 (method url-fetch)
2222 (uri (string-append
2223 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2224 version ".tar.gz"))
2225 (sha256
2226 (base32
2227 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2228 (patches (search-patches "pybugz-stty.patch"
2229 "pybugz-encode-error.patch"))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:python ,python-2 ; SyntaxError with Python 3
2233 #:tests? #f)) ; no 'test' sub-command
2234 (propagated-inputs
2235 `(("element-tree" ,python2-element-tree)))
2236 (synopsis "Python and command-line interface to Bugzilla")
2237 (description
2238 "PyBugz is a Python library and command-line tool to query the Bugzilla
2239 bug tracking system. It is meant as an aid to speed up interaction with the
2240 bug tracker.")
2241 (home-page "http://www.liquidx.net/pybugz/")
2242 (license license:gpl2)))
2243
2244 (define-public python2-enum
2245 (package
2246 (name "python2-enum")
2247 (version "0.4.6")
2248 (source (origin
2249 (method url-fetch)
2250 (uri (pypi-uri "enum" version))
2251 (sha256
2252 (base32
2253 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2254 (build-system python-build-system)
2255 (arguments
2256 `(#:python ,python-2))
2257 (home-page "https://pypi.org/project/enum/")
2258 (synopsis "Robust enumerated type support in Python")
2259 (description
2260 "This provides a module for robust enumerations in Python. It has
2261 been superseded by the Python standard library and is provided only for
2262 compatibility.")
2263 ;; Choice of either license.
2264 (license (list license:gpl3+ license:psfl))))
2265
2266 (define-public python-enum34
2267 (package
2268 (name "python-enum34")
2269 (version "1.1.6")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "enum34" version))
2274 (sha256
2275 (base32
2276 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2277 (build-system python-build-system)
2278 (home-page "https://pypi.org/project/enum34/")
2279 (synopsis "Backported Python 3.4 Enum")
2280 (description
2281 "Enum34 is the new Python stdlib enum module available in Python 3.4
2282 backported for previous versions of Python from 2.4 to 3.3.")
2283 (license license:bsd-3)))
2284
2285 (define-public python2-enum34
2286 (package-with-python2 python-enum34))
2287
2288 (define-public python-parse-type
2289 (package
2290 (name "python-parse-type")
2291 (version "0.4.2")
2292 (source
2293 (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "parse_type" version))
2296 (sha256
2297 (base32
2298 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2299 (build-system python-build-system)
2300 (propagated-inputs
2301 `(("python-six" ,python-six)
2302 ("python-parse" ,python-parse)))
2303 (native-inputs
2304 `(("python-pytest" ,python-pytest)
2305 ("python-pytest-runner" ,python-pytest-runner)))
2306 (home-page "https://github.com/jenisys/parse_type")
2307 (synopsis "Extended parse module")
2308 (description
2309 "Parse_type extends the python parse module.")
2310 (properties
2311 `((python2-variant . ,(delay python2-parse-type))))
2312 (license license:bsd-3)))
2313
2314 (define-public python2-parse-type
2315 (let ((base (package-with-python2
2316 (strip-python2-variant python-parse-type))))
2317 (package (inherit base)
2318 (propagated-inputs
2319 `(("python2-enum34" ,python2-enum34)
2320 ,@(package-propagated-inputs base))))))
2321
2322 (define-public python-parse
2323 (package
2324 (name "python-parse")
2325 (version "1.18.0")
2326 (source
2327 (origin
2328 (method url-fetch)
2329 (uri (pypi-uri "parse" version))
2330 (sha256
2331 (base32
2332 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2333 (build-system python-build-system)
2334 (arguments
2335 `(#:phases
2336 (modify-phases %standard-phases
2337 (replace 'check
2338 (lambda _ (invoke "python" "test_parse.py"))))))
2339 (home-page "https://github.com/r1chardj0n3s/parse")
2340 (synopsis "Parse strings")
2341 (description
2342 "Parse strings using a specification based on the Python @code{format()}
2343 syntax.")
2344 (license license:x11)))
2345
2346 (define-public python-polib
2347 (package
2348 (name "python-polib")
2349 (version "1.1.0")
2350 (source (origin
2351 (method url-fetch)
2352 (uri (pypi-uri "polib" version))
2353 (sha256
2354 (base32
2355 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2356 (build-system python-build-system)
2357 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2358 (synopsis "Manipulate, create and modify gettext files")
2359 (description "Polib can manipulate any gettext format (po, pot and mo)
2360 files. It can be used to create po files from scratch or to modify
2361 existing ones.")
2362 (license license:expat)))
2363
2364 (define-public python2-polib
2365 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2366 (package
2367 (inherit base)
2368 (arguments `(,@(package-arguments base)
2369 ;; Tests don't work with python2.
2370 #:tests? #f)))))
2371
2372 (define-public python-poyo
2373 (package
2374 (name "python-poyo")
2375 (version "0.5.0")
2376 (source
2377 (origin
2378 (method url-fetch)
2379 (uri (pypi-uri "poyo" version))
2380 (sha256
2381 (base32
2382 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2383 (build-system python-build-system)
2384 (home-page "https://github.com/hackebrot/poyo")
2385 (synopsis "Lightweight YAML Parser for Python")
2386 (description
2387 "This package provides a lightweight YAML Parser for Python. It supports
2388 only a chosen subset of the YAML format that is required to parse cookiecutter
2389 user configuration files. It does not have support for serializing into YAML
2390 and is not compatible with JSON.")
2391 (license license:expat)))
2392
2393 (define-public scons
2394 (package
2395 (name "scons")
2396 (version "3.0.4")
2397 (source (origin
2398 (method git-fetch)
2399 (uri (git-reference
2400 (url "https://github.com/SCons/scons")
2401 (commit version)))
2402 (file-name (git-file-name name version))
2403 (sha256
2404 (base32
2405 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2406 (build-system python-build-system)
2407 (arguments
2408 `(#:use-setuptools? #f ; still relies on distutils
2409 #:tests? #f ; no 'python setup.py test' command
2410 #:phases
2411 (modify-phases %standard-phases
2412 (add-before 'build 'bootstrap
2413 (lambda _
2414 (substitute* "src/engine/SCons/compat/__init__.py"
2415 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2416 "sys.modules[new] = __import__(old)"))
2417 (substitute* "src/engine/SCons/Platform/__init__.py"
2418 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2419 "mod = __import__(full_name)"))
2420 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2421 (chdir "build/scons")
2422 #t)))))
2423 (home-page "https://scons.org/")
2424 (synopsis "Software construction tool written in Python")
2425 (description
2426 "SCons is a software construction tool. Think of SCons as an improved,
2427 cross-platform substitute for the classic Make utility with integrated
2428 functionality similar to autoconf/automake and compiler caches such as ccache.
2429 In short, SCons is an easier, more reliable and faster way to build
2430 software.")
2431 (license license:x11)))
2432
2433 (define-public scons-python2
2434 (package
2435 (inherit (package-with-python2 scons))
2436 (name "scons-python2")))
2437
2438 (define-public python-extension-helpers
2439 (package
2440 (name "python-extension-helpers")
2441 (version "0.1")
2442 (source
2443 (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "extension-helpers" version))
2446 (sha256
2447 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2448 (build-system python-build-system)
2449 (native-inputs
2450 `(("coverage" ,python-coverage)
2451 ("pytest" ,python-pytest-astropy)
2452 ("pytest-cov" ,python-pytest-cov)
2453 ("setuptools-scm" ,python-setuptools-scm)))
2454 (home-page "https://github.com/astropy/astropy-helpers")
2455 (synopsis
2456 "Utilities for building and installing packages in the Astropy ecosystem")
2457 (description
2458 "The extension-helpers package includes many build, installation, and
2459 documentation-related tools used by the Astropy project.")
2460 (license license:bsd-3)))
2461
2462 (define-public python-extras
2463 (package
2464 (name "python-extras")
2465 (version "1.0.0")
2466 (source
2467 (origin
2468 (method url-fetch)
2469 (uri (pypi-uri "extras" version))
2470 (sha256
2471 (base32
2472 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2473 (build-system python-build-system)
2474 (arguments
2475 ;; FIXME: Circular dependency on testtools.
2476 '(#:tests? #f))
2477 (home-page "https://github.com/testing-cabal/extras")
2478 (synopsis "Useful extensions to the Python standard library")
2479 (description
2480 "Extras is a set of extensions to the Python standard library.")
2481 (license license:expat)))
2482
2483 (define-public python2-extras
2484 (package-with-python2 python-extras))
2485
2486 (define-public python-mimeparse
2487 (package
2488 (name "python-mimeparse")
2489 (version "1.6.0")
2490 (source
2491 (origin
2492 (method url-fetch)
2493 (uri (pypi-uri "python-mimeparse" version))
2494 (sha256
2495 (base32
2496 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2497 (build-system python-build-system)
2498 (arguments
2499 '(#:phases
2500 (modify-phases %standard-phases
2501 (replace 'check
2502 (lambda _
2503 (invoke "./mimeparse_test.py"))))))
2504 (home-page
2505 "https://github.com/dbtsai/python-mimeparse")
2506 (synopsis "Python library for parsing MIME types")
2507 (description
2508 "Mimeparse provides basic functions for parsing MIME type names and
2509 matching them against a list of media-ranges.")
2510 (license license:expat)))
2511
2512 (define-public python2-mimeparse
2513 (package-with-python2 python-mimeparse))
2514
2515 (define-public python-miniboa
2516 (package
2517 (name "python-miniboa")
2518 (version "1.0.7")
2519 (source
2520 (origin
2521 (method url-fetch)
2522 (uri (pypi-uri "miniboa" version))
2523 (sha256
2524 (base32
2525 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2526 (build-system python-build-system)
2527 (home-page "https://github.com/shmup/miniboa")
2528 (synopsis "Simple, single-threaded Telnet server")
2529 (description
2530 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2531 server.")
2532 (license license:asl2.0)))
2533
2534 (define-public python2-miniboa
2535 (package-with-python2 python-miniboa))
2536
2537 (define-public python-pafy
2538 (package
2539 (name "python-pafy")
2540 (version "0.5.3.1")
2541 (source
2542 (origin
2543 (method url-fetch)
2544 (uri (pypi-uri "pafy" version))
2545 (sha256
2546 (base32
2547 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2548 (build-system python-build-system)
2549 (arguments
2550 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2551 (propagated-inputs
2552 ;; Youtube-dl is a python package which is imported in the file
2553 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2554 `(("youtube-dl" ,youtube-dl)))
2555 (home-page "https://np1.github.io/pafy/")
2556 (synopsis "Retrieve YouTube content and metadata")
2557 (description
2558 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2559 (license license:lgpl3+)))
2560
2561 (define-public python2-funcsigs
2562 (package
2563 (name "python2-funcsigs")
2564 (version "1.0.2")
2565 (source (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "funcsigs" version))
2568 (sha256
2569 (base32
2570 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:python ,python-2))
2574 (native-inputs
2575 `(("python2-unittest2" ,python2-unittest2)))
2576 (home-page "http://funcsigs.readthedocs.org")
2577 (synopsis "Python function signatures from PEP362")
2578 (description
2579 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2580 (license license:asl2.0)))
2581
2582 (define-public python2-funcsigs-bootstrap
2583 (package
2584 (inherit python2-funcsigs)
2585 (name "python2-funcsigs-bootstrap")
2586 (native-inputs `())
2587 (arguments
2588 `(#:tests? #f
2589 ,@(package-arguments python2-funcsigs)))))
2590
2591 (define-public python-py
2592 (package
2593 (name "python-py")
2594 (version "1.8.1")
2595 (source
2596 (origin
2597 (method url-fetch)
2598 (uri (pypi-uri "py" version))
2599 (sha256
2600 (base32
2601 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2602 (build-system python-build-system)
2603 (arguments
2604 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2605 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2606 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2607 ;; Is this module globally installed?"
2608 '(#:tests? #f))
2609 (native-inputs
2610 `(("python-setuptools-scm" ,python-setuptools-scm)))
2611 (home-page "https://github.com/pytest-dev/py")
2612 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2613 (description
2614 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2615 code introspection, and logging.")
2616 (license license:expat)))
2617
2618 (define-public python-py-next
2619 (package
2620 (inherit python-py)
2621 (version "1.9.0")
2622 (source
2623 (origin
2624 (method url-fetch)
2625 (uri (pypi-uri "py" version))
2626 (sha256
2627 (base32
2628 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2629
2630 (define-public python2-py
2631 (package-with-python2 python-py))
2632
2633 ;; Recent versions of python-fixtures and python-testrepository need
2634 ;; python-pbr for packaging, which itself needs these two packages for
2635 ;; testing.
2636 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2637 ;; same source, just without any test dependencies and with tests disabled.
2638 ;; python-pbr-minmal is then used to package python-fixtures and
2639 ;; python-testrepository.
2640 ;; Strictly speaking we currently could remove the test-requirements from the
2641 ;; normal python-pbr package (and save this package) since test are disabled
2642 ;; there anyway. But this may change in future.
2643 (define-public python-pbr-minimal
2644 (package
2645 (name "python-pbr-minimal")
2646 (version "3.0.1")
2647 (source
2648 (origin
2649 (method url-fetch)
2650 (uri (pypi-uri "pbr" version))
2651 (sha256
2652 (base32
2653 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2654 (build-system python-build-system)
2655 (arguments
2656 `(#:tests? #f))
2657 (home-page "https://docs.openstack.org/pbr/latest/")
2658 (synopsis "Minimal build of python-pbr used for bootstrapping")
2659 (description
2660 "Used only for bootstrapping python2-pbr, you should not need this.")
2661 (license license:asl2.0)))
2662
2663 (define-public python-pbr
2664 (package
2665 (inherit python-pbr-minimal)
2666 (name "python-pbr")
2667 (arguments
2668 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2669 (propagated-inputs
2670 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2671 (native-inputs
2672 `(("python-fixtures" ,python-fixtures-bootstrap)
2673 ;; discover, coverage, hacking, subunit
2674 ("python-mock" ,python-mock)
2675 ("python-six" ,python-six)
2676 ("python-sphinx" ,python-sphinx)
2677 ("python-testrepository" ,python-testrepository-bootstrap)
2678 ("python-testresources" ,python-testresources-bootstrap)
2679 ("python-testscenarios" ,python-testscenarios-bootstrap)
2680 ("python-testtools" ,python-testtools-bootstrap)
2681 ("python-virtualenv" ,python-virtualenv)))
2682 (synopsis "Enhance the default behavior of Python’s setuptools")
2683 (description
2684 "Python Build Reasonableness (PBR) is a library that injects some useful
2685 and sensible default behaviors into your setuptools run. It will set
2686 versions, process requirements files and generate AUTHORS and ChangeLog file
2687 from git information.
2688 ")))
2689
2690 (define-public python-pyrsistent
2691 (package
2692 (name "python-pyrsistent")
2693 (version "0.16.0")
2694 (home-page "https://github.com/tobgu/pyrsistent")
2695 (source (origin
2696 (method url-fetch)
2697 (uri (pypi-uri "pyrsistent" version))
2698 (sha256
2699 (base32
2700 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2701 (build-system python-build-system)
2702 (arguments
2703 '(#:phases (modify-phases %standard-phases
2704 ;; The package works fine with newer Pytest and Hypothesis, but
2705 ;; has pinned older versions to stay compatible with Python 2.
2706 (add-before 'check 'loosen-pytest-requirement
2707 (lambda _
2708 (substitute* "setup.py"
2709 (("pytest<5") "pytest")
2710 (("hypothesis<5") "hypothesis"))
2711 #t)))))
2712 (native-inputs
2713 `(("python-hypothesis" ,python-hypothesis)
2714 ("python-pytest" ,python-pytest)
2715 ("python-pytest-runner" ,python-pytest-runner)))
2716 (propagated-inputs
2717 `(("python-six" ,python-six)))
2718 (synopsis "Persistent data structures for Python")
2719 (description
2720 "Pyrsistent is a number of persistent collections (by some referred to as
2721 functional data structures). Persistent in the sense that they are immutable.
2722
2723 All methods on a data structure that would normally mutate it instead return a
2724 new copy of the structure containing the requested updates. The original
2725 structure is left untouched.")
2726 (license license:expat)))
2727
2728 (define-public python2-pyrsistent
2729 (package-with-python2 python-pyrsistent))
2730
2731 (define-public python-exif-read
2732 (package
2733 (name "python-exif-read")
2734 (version "2.1.2")
2735 (source (origin
2736 (method url-fetch)
2737 (uri (pypi-uri "ExifRead" version))
2738 (sha256
2739 (base32
2740 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2741 (build-system python-build-system)
2742 (arguments `(#:tests? #f)) ; no tests
2743 (home-page "https://github.com/ianare/exif-py")
2744 (synopsis "Python library to extract EXIF data from image files")
2745 (description
2746 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2747 files.")
2748 (license license:bsd-3)))
2749
2750 (define-public python2-exif-read
2751 (package-with-python2 python-exif-read))
2752
2753 (define-public python-pyld
2754 (package
2755 (name "python-pyld")
2756 (version "1.0.5")
2757 (source (origin
2758 (method url-fetch)
2759 (uri (pypi-uri "PyLD" version))
2760 (sha256
2761 (base32
2762 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2763 (build-system python-build-system)
2764 (home-page "https://github.com/digitalbazaar/pyld")
2765 (synopsis "Python implementation of the JSON-LD specification")
2766 (description
2767 "PyLD is an implementation of the JSON-LD specification.")
2768 (license license:bsd-3)))
2769
2770 (define-public python2-pyld
2771 (package-with-python2 python-pyld))
2772
2773 (define-public python-cli-helpers
2774 (package
2775 (name "python-cli-helpers")
2776 (version "2.0.1")
2777 (source
2778 (origin
2779 ;; There's no source tarball on PyPI.
2780 (method git-fetch)
2781 (uri (git-reference
2782 (url "https://github.com/dbcli/cli_helpers")
2783 (commit (string-append "v" version))))
2784 (file-name (git-file-name name version))
2785 (sha256
2786 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2787 (build-system python-build-system)
2788 (native-inputs
2789 `(("python-pytest" ,python-pytest)))
2790 (propagated-inputs
2791 `(("python-wcwidth" ,python-wcwidth)
2792 ("python-configobj" ,python-configobj)
2793 ("python-tabulate" ,python-tabulate)
2794 ("python-terminaltables" ,python-terminaltables)))
2795 (home-page "https://github.com/dbcli/cli_helpers")
2796 (synopsis "Helpers for building command-line apps")
2797 (description
2798 "CLI Helpers is a Python package that makes it easy to perform common
2799 tasks when building command-line apps. It's a helper library for command-line
2800 interfaces.")
2801 (license license:bsd-3)))
2802
2803 (define-public python-click
2804 (package
2805 (name "python-click")
2806 (version "7.1.2")
2807 (source
2808 (origin
2809 (method url-fetch)
2810 (uri (pypi-uri "click" version))
2811 (sha256
2812 (base32
2813 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2814 (build-system python-build-system)
2815 (arguments
2816 `(#:phases
2817 (modify-phases %standard-phases
2818 (add-after 'unpack 'fix-paths
2819 (lambda* (#:key inputs #:allow-other-keys)
2820 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2821 "cross-libc" "libc"))))
2822 (substitute* "src/click/_unicodefun.py"
2823 (("'locale'")
2824 (string-append "'" glibc "/bin/locale'"))))
2825 #t))
2826 (replace 'check
2827 (lambda _
2828 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2829 (invoke "python" "-m" "pytest"))))))
2830 (native-inputs
2831 `(("python-pytest" ,python-pytest)))
2832 (home-page "https://palletsprojects.com/p/click/")
2833 (synopsis "Command line library for Python")
2834 (description
2835 "Click is a Python package for creating command line interfaces in a
2836 composable way with as little code as necessary. Its name stands for
2837 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2838 with sensible defaults out of the box.")
2839 (license license:bsd-3)))
2840
2841 (define-public python2-click
2842 (package-with-python2 python-click))
2843
2844 (define-public python-click-5
2845 (package (inherit python-click)
2846 (name "python-click")
2847 (version "5.1")
2848 (source
2849 (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "click" version))
2852 (sha256
2853 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2854 (arguments `())))
2855
2856 (define-public python-vcversioner
2857 (package
2858 (name "python-vcversioner")
2859 (version "2.16.0.0")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "vcversioner" version))
2864 (sha256
2865 (base32
2866 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2867 (build-system python-build-system)
2868 (synopsis "Python library for version number discovery")
2869 (description "Vcversioner is a Python library that inspects tagging
2870 information in a variety of version control systems in order to discover
2871 version numbers.")
2872 (home-page "https://github.com/habnabit/vcversioner")
2873 (license license:isc)))
2874
2875 (define-public python2-vcversioner
2876 (package-with-python2 python-vcversioner))
2877
2878 (define-public python-jdcal
2879 (package
2880 (name "python-jdcal")
2881 (version "1.4")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (pypi-uri "jdcal" version))
2886 (sha256
2887 (base32
2888 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2889 (build-system python-build-system)
2890 (arguments
2891 `(#:phases (modify-phases %standard-phases
2892 (replace 'check
2893 (lambda _
2894 (invoke "pytest"))))))
2895 (native-inputs
2896 `(("python-pytest" ,python-pytest)))
2897 (home-page "https://github.com/phn/jdcal")
2898 (synopsis "Functions to convert between Julian dates Gregorian dates")
2899 (description "This Python library provides functions for converting
2900 between Julian dates and Gregorian dates.")
2901 (license license:bsd-2)))
2902
2903 (define-public python2-jdcal
2904 (package-with-python2 python-jdcal))
2905
2906 (define-public python-jsondiff
2907 (package
2908 (name "python-jsondiff")
2909 (version "1.2.0")
2910 (source
2911 (origin
2912 (method url-fetch)
2913 (uri (pypi-uri "jsondiff" version))
2914 (sha256
2915 (base32
2916 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2917 (build-system python-build-system)
2918 (native-inputs
2919 `(("python-nose" ,python-nose)
2920 ("python-nose-random" ,python-nose-random)))
2921 (home-page
2922 "https://github.com/fzumstein/jsondiff")
2923 (synopsis "Compare JSON and JSON-like structures in Python")
2924 (description "@code{jsondiff} is a Python library which lets you
2925 compare, diff, and patch JSON and JSON-like structures in Python.")
2926 (license license:expat)))
2927
2928 (define-public python-jsonschema
2929 (package
2930 (name "python-jsonschema")
2931 (version "3.2.0")
2932 (source (origin
2933 (method url-fetch)
2934 (uri (pypi-uri "jsonschema" version))
2935 (sha256
2936 (base32
2937 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2938 (build-system python-build-system)
2939 (arguments
2940 '(#:phases
2941 (modify-phases %standard-phases
2942 (replace 'check
2943 (lambda* (#:key inputs outputs #:allow-other-keys)
2944 (add-installed-pythonpath inputs outputs)
2945 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2946 (invoke "trial" "jsonschema"))))))
2947 (native-inputs
2948 `(("python-setuptools_scm" ,python-setuptools-scm)
2949 ("python-twisted" ,python-twisted)))
2950 (propagated-inputs
2951 `(("python-attrs" ,python-attrs)
2952 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2953 ("python-pyrsistent" ,python-pyrsistent)
2954 ("python-six" ,python-six)))
2955 (home-page "https://github.com/Julian/jsonschema")
2956 (synopsis "Implementation of JSON Schema for Python")
2957 (description
2958 "Jsonschema is an implementation of JSON Schema for Python.")
2959 (license license:expat)
2960 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2961
2962 (define-public python2-jsonschema
2963 (let ((jsonschema (package-with-python2
2964 (strip-python2-variant python-jsonschema))))
2965 (package (inherit jsonschema)
2966 (propagated-inputs
2967 `(("python2-functools32" ,python2-functools32)
2968 ,@(package-propagated-inputs jsonschema))))))
2969
2970 (define-public python-schema
2971 (package
2972 (name "python-schema")
2973 (version "0.6.6")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "schema" version))
2978 (sha256
2979 (base32
2980 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2981 (build-system python-build-system)
2982 (native-inputs
2983 `(("python-pytest" ,python-pytest)))
2984 (home-page "https://github.com/keleshev/schema")
2985 (synopsis "Simple data validation library")
2986 (description
2987 "@code{python-schema} is a library for validating Python data
2988 structures, such as those obtained from config-files, forms, external
2989 services or command-line parsing, converted from JSON/YAML (or
2990 something else) to Python data-types.")
2991 (license license:psfl)))
2992
2993 (define-public python2-schema
2994 (package-with-python2 python-schema))
2995
2996 (define-public python-schema-0.5
2997 (package (inherit python-schema)
2998 (version "0.5.0")
2999 (source
3000 (origin
3001 (method url-fetch)
3002 (uri (pypi-uri "schema" version))
3003 (sha256
3004 (base32
3005 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3006
3007 (define-public python2-schema-0.5
3008 (package-with-python2 python-schema-0.5))
3009
3010 (define-public python-kitchen
3011 (package
3012 (name "python-kitchen")
3013 (version "1.2.5")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "kitchen" version))
3018 (sha256
3019 (base32
3020 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3021 (build-system python-build-system)
3022 (propagated-inputs
3023 `(("python-chardet" ,python-chardet)))
3024 (home-page "https://github.com/fedora-infra/kitchen")
3025 (synopsis "Python API for snippets")
3026 (description "@code{kitchen} module provides a python API for all sorts of
3027 little useful snippets of code that everybody ends up writing for their projects
3028 but never seem big enough to build an independent release. Use kitchen and stop
3029 cutting and pasting that code over and over.")
3030 (license (list license:lgpl2.1+
3031 ;; subprocess.py, test_subprocess.py,
3032 ;; kitchen/pycompat25/defaultdict.py:
3033 license:psfl))))
3034
3035 (define-public python2-kitchen
3036 (package-with-python2 python-kitchen))
3037
3038 (define-public python-unidecode
3039 (package
3040 (name "python-unidecode")
3041 (version "1.1.1")
3042 (source (origin
3043 (method url-fetch)
3044 (uri (pypi-uri "Unidecode" version))
3045 (sha256
3046 (base32
3047 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3048 (build-system python-build-system)
3049 (home-page "https://pypi.org/project/Unidecode/")
3050 (synopsis "ASCII transliterations of Unicode text")
3051 (description
3052 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3053 useful when integrating with legacy code that doesn't support Unicode, or for
3054 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3055 machine identifiers from human-readable Unicode strings that should still be
3056 somewhat intelligible.")
3057 (license license:gpl2+)))
3058
3059 (define-public python2-unidecode
3060 (package-with-python2 python-unidecode))
3061
3062 (define-public python-text-unidecode
3063 (package
3064 (name "python-text-unidecode")
3065 (version "1.3")
3066 (source (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "text-unidecode" version))
3069 (sha256
3070 (base32
3071 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3072 (build-system python-build-system)
3073 (arguments
3074 '(#:phases (modify-phases %standard-phases
3075 (replace 'check
3076 (lambda _
3077 (setenv "PYTHONPATH"
3078 (string-append "./build/lib:"
3079 (getenv "PYTHONPATH")))
3080 (invoke "pytest" "-vv"))))))
3081 (native-inputs
3082 `(("python-pytest" ,python-pytest)))
3083 (home-page "https://github.com/kmike/text-unidecode/")
3084 (synopsis "Decode Unicode data")
3085 (description
3086 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3087 Perl library. It can create ASCII representations of Unicode data. In general
3088 users should prefer the @code{python-unidecode} package which offers better
3089 memory usage and transliteration quality.")
3090 ;; The user can choose either license.
3091 (license (list license:clarified-artistic license:gpl2+))))
3092
3093 (define-public python2-text-unidecode
3094 (package-with-python2 python-text-unidecode))
3095
3096 (define-public python-pyjwt
3097 (package
3098 (name "python-pyjwt")
3099 (version "1.7.1")
3100 (source
3101 (origin
3102 (method url-fetch)
3103 (uri (pypi-uri "PyJWT" version))
3104 (sha256
3105 (base32
3106 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3107 (modules '((guix build utils)))
3108 (snippet
3109 '(begin
3110 (for-each delete-file-recursively
3111 (find-files "." "\\.pyc$"))
3112 #t))))
3113 (build-system python-build-system)
3114 (arguments
3115 '(#:phases (modify-phases %standard-phases
3116 (replace 'check
3117 (lambda _
3118 ;; Mimic upstream commit 3a20892442b34c7 to get
3119 ;; rid of dependency on pytest-runner < 5.0.
3120 ;; Remove substitution for PyJWT > 1.7.1.
3121 (substitute* "setup.py"
3122 ((".*pytest-runner.*")
3123 ""))
3124 (invoke "pytest" "-vv"))))))
3125 (native-inputs
3126 `(("python-pytest" ,python-pytest)
3127 ("python-pytest-cov" ,python-pytest-cov)))
3128 (home-page "https://github.com/progrium/pyjwt")
3129 (synopsis "JSON Web Token implementation in Python")
3130 (description
3131 "PyJWT is a JSON Web Token implementation written in Python.")
3132 (license license:expat)))
3133
3134 (define-public python2-pyjwt
3135 (package-with-python2 python-pyjwt))
3136
3137 (define-public python-pykka
3138 (package
3139 (name "python-pykka")
3140 (version "1.2.1")
3141 (source
3142 (origin
3143 (method url-fetch)
3144 (uri (pypi-uri "Pykka" version))
3145 (sha256
3146 (base32
3147 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3148 (build-system python-build-system)
3149 (native-inputs
3150 `(("python-mock" ,python-mock)
3151 ("python-nose" ,python-nose)
3152 ("python-gevent" ,python-gevent)
3153 ("python-eventlet" ,python-eventlet)))
3154 (home-page "https://www.pykka.org/")
3155 (synopsis "Pykka is a Python implementation of the actor model")
3156 (description
3157 "Pykka is a Python implementation of the actor model.
3158 The actor model introduces some simple rules to control the sharing
3159 of state and cooperation between execution units, which makes it
3160 easier to build concurrent applications.")
3161 (license license:asl2.0)))
3162
3163 (define-public python-pymsgbox
3164 (package
3165 (name "python-pymsgbox")
3166 (version "1.0.6")
3167 (source
3168 (origin
3169 (method git-fetch)
3170 (uri (git-reference
3171 ;; LICENSE.txt is not present on pypi
3172 (url "https://github.com/asweigart/PyMsgBox")
3173 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3174 (file-name (git-file-name name version))
3175 (sha256
3176 (base32
3177 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3178 (arguments
3179 ;; Circular dependency to run tests:
3180 ;; Tests need pyautogui, which depends on pymsgbox.
3181 '(#:tests? #f))
3182 (build-system python-build-system)
3183 (home-page "https://github.com/asweigart/PyMsgBox")
3184 (synopsis "Python module for JavaScript-like message boxes")
3185 (description
3186 "PyMsgBox is a simple, cross-platform, pure Python module for
3187 JavaScript-like message boxes. Types of dialog boxes include:
3188 @enumerate
3189 @item alert
3190 @item confirm
3191 @item prompt
3192 @item password
3193 @end enumerate
3194 ")
3195 (license license:bsd-3)))
3196
3197 (define-public python-pympler
3198 (package
3199 (name "python-pympler")
3200 (home-page "https://pythonhosted.org/Pympler/")
3201 (version "0.8")
3202 (source (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "Pympler" version))
3205 (sha256
3206 (base32
3207 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3208 (build-system python-build-system)
3209 (arguments
3210 `(#:phases (modify-phases %standard-phases
3211 (delete 'check)
3212 (add-after 'install 'check
3213 (lambda* (#:key inputs outputs #:allow-other-keys)
3214 (add-installed-pythonpath inputs outputs)
3215 (invoke "python" "setup.py" "test"))))))
3216 (synopsis "Measure, monitor and analyze memory behavior")
3217 (description
3218 "Pympler is a development tool to measure, monitor and analyze
3219 the memory behavior of Python objects in a running Python application.
3220
3221 By pympling a Python application, detailed insight in the size and the
3222 lifetime of Python objects can be obtained. Undesirable or unexpected
3223 runtime behavior like memory bloat and other @samp{pymples} can easily
3224 be identified.
3225
3226 A web profiling frontend exposes process statistics, garbage
3227 visualisation and class tracker statistics.")
3228 (license license:asl2.0)))
3229
3230 (define-public python2-pympler
3231 (package-with-python2 python-pympler))
3232
3233 (define-public python-itsdangerous
3234 (package
3235 (name "python-itsdangerous")
3236 (version "1.1.0")
3237 (source
3238 (origin
3239 (method url-fetch)
3240 (uri (pypi-uri "itsdangerous" version))
3241 (sha256
3242 (base32
3243 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3244 (build-system python-build-system)
3245 (home-page "https://palletsprojects.com/p/itsdangerous/")
3246 (synopsis "Python library for passing data to/from untrusted environments")
3247 (description
3248 "Itsdangerous provides various helpers to pass trusted data to untrusted
3249 environments and back.")
3250 (license license:bsd-3)))
3251
3252 (define-public python2-itsdangerous
3253 (package-with-python2 python-itsdangerous))
3254
3255 (define-public python-pyyaml
3256 (package
3257 (name "python-pyyaml")
3258 (version "5.3.1")
3259 (source
3260 (origin
3261 (method url-fetch)
3262 (uri (pypi-uri "PyYAML" version))
3263 (sha256
3264 (base32
3265 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3266 (build-system python-build-system)
3267 (inputs
3268 `(("libyaml" ,libyaml)))
3269 (home-page "https://pyyaml.org")
3270 (synopsis "YAML parser and emitter for Python")
3271 (description
3272 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3273 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3274 API, and sensible error messages. PyYAML supports standard YAML tags and
3275 provides Python-specific tags that represent an arbitrary Python object.")
3276 (license license:expat)))
3277
3278 (define-public python2-pyyaml
3279 (package-with-python2 python-pyyaml))
3280
3281 (define-public python-vine
3282 (package
3283 (name "python-vine")
3284 (version "1.1.4")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "vine" version))
3289 (sha256
3290 (base32
3291 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3292 (build-system python-build-system)
3293 (native-inputs
3294 `(("python-pytest" ,python-pytest)
3295 ("python-case" ,python-case)))
3296 (home-page "https://github.com/celery/vine")
3297 (synopsis "Promises for Python")
3298 (description
3299 "@code{vine} provides a special implementation of promises in that it can
3300 be used both for \"promise of a value\" and lazy evaluation. The biggest
3301 upside for this is that everything in a promise can also be a promise,
3302 e.g. filters, callbacks and errbacks can all be promises.")
3303 (license license:bsd-3)))
3304
3305 (define-public python-virtualenv
3306 (package
3307 (name "python-virtualenv")
3308 (version "20.2.1")
3309 (source
3310 (origin
3311 (method url-fetch)
3312 (uri (pypi-uri "virtualenv" version))
3313 (sha256
3314 (base32
3315 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3316 (build-system python-build-system)
3317 (native-inputs
3318 `(("python-mock" ,python-mock)
3319 ("python-pytest" ,python-pytest)
3320 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3321 ;; be an input at all". However, removing the input makes the build error:
3322 ;; File "setup.py", line 4, in <module>
3323 ;; raise RuntimeError("setuptools >= 41 required to build")
3324 ("python-setuptools" ,python-setuptools)
3325 ("python-setuptools-scm" ,python-setuptools-scm)))
3326 (propagated-inputs
3327 `(("python-appdirs" ,python-appdirs)
3328 ("python-distlib" ,python-distlib/next)
3329 ("python-filelock" ,python-filelock)
3330 ("python-six" ,python-six)
3331 ("python-importlib-metadata" ,python-importlib-metadata)))
3332 (home-page "https://virtualenv.pypa.io/")
3333 (synopsis "Virtual Python environment builder")
3334 (description
3335 "Virtualenv is a tool to create isolated Python environments.")
3336 (license license:expat)))
3337
3338 (define-public python-markupsafe
3339 (package
3340 (name "python-markupsafe")
3341 (version "1.1.1")
3342 (source
3343 (origin
3344 (method url-fetch)
3345 (uri (pypi-uri "MarkupSafe" version))
3346 (sha256
3347 (base32
3348 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3349 (build-system python-build-system)
3350 (arguments
3351 `(#:modules ((ice-9 ftw)
3352 (srfi srfi-1)
3353 (srfi srfi-26)
3354 (guix build utils)
3355 (guix build python-build-system))
3356 #:phases (modify-phases %standard-phases
3357 (replace 'check
3358 (lambda _
3359 (let ((cwd (getcwd))
3360 (libdir (find (cut string-prefix? "lib." <>)
3361 (scandir "build"))))
3362 (setenv "PYTHONPATH"
3363 (string-append cwd "/build/" libdir ":"
3364 (getenv "PYTHONPATH")))
3365 (invoke "pytest" "-vv")))))))
3366 (native-inputs
3367 `(("python-pytest" ,python-pytest)))
3368 (home-page "https://github.com/mitsuhiko/markupsafe")
3369 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3370 (description
3371 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3372 for Python.")
3373 (license license:bsd-3)))
3374
3375 (define-public python2-markupsafe
3376 (package-with-python2 python-markupsafe))
3377
3378 (define-public python-jinja2
3379 (package
3380 (name "python-jinja2")
3381 (version "2.11.2")
3382 (source
3383 (origin
3384 (method url-fetch)
3385 (uri (pypi-uri "Jinja2" version))
3386 (sha256
3387 (base32
3388 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3389 (build-system python-build-system)
3390 (arguments
3391 '(#:phases (modify-phases %standard-phases
3392 (replace 'check
3393 (lambda* (#:key tests? #:allow-other-keys)
3394 (if tests?
3395 (begin
3396 (setenv "PYTHONPATH"
3397 (string-append "./build/lib:"
3398 (getenv "PYTHONPATH")))
3399 (invoke "pytest" "-vv"))
3400 (format #t "test suite not run~%"))
3401 #t)))))
3402 (native-inputs
3403 `(("python-pytest" ,python-pytest)))
3404 (propagated-inputs
3405 `(("python-markupsafe" ,python-markupsafe)))
3406 (home-page "http://jinja.pocoo.org/")
3407 (synopsis "Python template engine")
3408 (description
3409 "Jinja2 is a small but fast and easy to use stand-alone template engine
3410 written in pure Python.")
3411 (license license:bsd-3)))
3412
3413 (define-public python2-jinja2
3414 (package-with-python2 python-jinja2))
3415
3416 (define-public python-jinja2-time
3417 (package
3418 (name "python-jinja2-time")
3419 (version "0.2.0")
3420 (source
3421 (origin
3422 (method url-fetch)
3423 (uri (pypi-uri "jinja2-time" version))
3424 (sha256
3425 (base32
3426 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3427 (build-system python-build-system)
3428 (propagated-inputs
3429 `(("python-arrow" ,python-arrow)
3430 ("python-jinja2" ,python-jinja2)))
3431 (home-page
3432 "https://github.com/hackebrot/jinja2-time")
3433 (synopsis "Jinja2 Extension for Dates and Times")
3434 (description
3435 "This package provides an extension for the template engine Jinja2. It
3436 adds a 'now' tag providing a convenient access to the arrow.now() API from
3437 templates. A format string can be provided to control the output.")
3438 (license license:expat)))
3439
3440 (define-public python-pystache
3441 (package
3442 (name "python-pystache")
3443 (version "0.5.4")
3444 (source (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "pystache" version))
3447 (sha256
3448 (base32
3449 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3450 (build-system python-build-system)
3451 (arguments
3452 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3453 (home-page "http://defunkt.io/pystache/")
3454 (synopsis "Python logic-less template engine")
3455 (description
3456 "Pystache is a Python implementation of the framework agnostic,
3457 logic-free templating system Mustache.")
3458 (license license:expat)
3459 (properties `((python2-variant . ,(delay python2-pystache))))))
3460
3461 (define-public python2-pystache
3462 (package (inherit (package-with-python2
3463 (strip-python2-variant python-pystache)))
3464 (arguments
3465 `(#:python ,python-2
3466 #:phases
3467 (modify-phases %standard-phases
3468 (replace 'check
3469 (lambda _
3470 (invoke "python" "test_pystache.py"))))))))
3471
3472 (define-public python-joblib
3473 (package
3474 (name "python-joblib")
3475 (version "0.14.1")
3476 (source (origin
3477 (method url-fetch)
3478 (uri (pypi-uri "joblib" version))
3479 (sha256
3480 (base32
3481 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3482 (build-system python-build-system)
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (replace 'check
3487 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3488 (native-inputs
3489 `(("python-pytest" ,python-pytest)))
3490 (home-page "https://joblib.readthedocs.io/")
3491 (synopsis "Using Python functions as pipeline jobs")
3492 (description
3493 "Joblib is a set of tools to provide lightweight pipelining in Python.
3494 In particular, joblib offers: transparent disk-caching of the output values
3495 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3496 logging and tracing of the execution.")
3497 (license license:bsd-3)))
3498
3499 (define-public python2-joblib
3500 (package-with-python2 python-joblib))
3501
3502 (define-public python-daemon
3503 (package
3504 (name "python-daemon")
3505 (version "2.2.3")
3506 (source
3507 (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "python-daemon" version))
3510 (sha256
3511 (base32
3512 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3513 (build-system python-build-system)
3514 (arguments
3515 `(#:phases
3516 (modify-phases %standard-phases
3517 (add-before 'check 'disable-tests
3518 (lambda _
3519 ;; FIXME: Determine why test fails
3520 (substitute* "test/test_daemon.py"
3521 (("test_detaches_process_context")
3522 "skip_test_detaches_process_context"))
3523 #t)))))
3524 (propagated-inputs
3525 `(("python-lockfile" ,python-lockfile)))
3526 (native-inputs
3527 `(("python-unittest2" ,python-unittest2)
3528 ("python-testtools" ,python-testtools)
3529 ("python-testscenarios" ,python-testscenarios)
3530 ("python-mock" ,python-mock)
3531 ("python-docutils" ,python-docutils)))
3532 (home-page "https://pagure.io/python-daemon/")
3533 (synopsis "Python library for making a Unix daemon process")
3534 (description "Python-daemon is a library that assists a Python program to
3535 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3536
3537 This library provides a @code{DaemonContext} class that manages the following
3538 important tasks for becoming a daemon process:
3539 @enumerate
3540 @item Detach the process into its own process group.
3541 @item Set process environment appropriate for running inside a chroot.
3542 @item Renounce suid and sgid privileges.
3543 @item Close all open file descriptors.
3544 @item Change the working directory, uid, gid, and umask.
3545 @item Set appropriate signal handlers.
3546 @item Open new file descriptors for stdin, stdout, and stderr.
3547 @item Manage a specified PID lock file.
3548 @item Register cleanup functions for at-exit processing.
3549 @end enumerate")
3550 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3551 (license (list license:asl2.0 license:gpl3+))))
3552
3553 (define-public python-anytree
3554 (package
3555 (name "python-anytree")
3556 (version "2.8.0")
3557 (source (origin
3558 (method url-fetch)
3559 (uri (pypi-uri "anytree" version))
3560 (sha256
3561 (base32
3562 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3563 (build-system python-build-system)
3564 (propagated-inputs
3565 `(("python-six" ,python-six)))
3566 (native-inputs
3567 `(;; For tests.
3568 ("graphviz" ,graphviz) ;for 'dot'
3569 ("python-nose" ,python-nose)))
3570 (home-page "https://github.com/c0fec0de/anytree")
3571 (synopsis "Lightweight tree data library")
3572 (description
3573 "@code{anytree} is a simple, lightweight, and extensible tree data
3574 structure for Python.")
3575 (license license:asl2.0)))
3576
3577 (define-public python-docutils
3578 (package
3579 (name "python-docutils")
3580 (version "0.16")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "docutils" version))
3585 (sha256
3586 (base32
3587 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3588 (build-system python-build-system)
3589 (arguments
3590 '(#:phases (modify-phases %standard-phases
3591 (replace 'check
3592 (lambda* (#:key tests? #:allow-other-keys)
3593 (if tests?
3594 (invoke "python" "test/alltests.py")
3595 (format #t "test suite not run~%"))
3596 #t)))))
3597 (home-page "http://docutils.sourceforge.net/")
3598 (synopsis "Python Documentation Utilities")
3599 (description
3600 "Docutils is a modular system for processing documentation into useful
3601 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3602 easy to use markup language, for input.
3603
3604 This package provides tools for converting @file{.rst} files to other formats
3605 via commands such as @command{rst2man}, as well as supporting Python code.")
3606 ;; Most of the source code is public domain, but some source files are
3607 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3608 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3609
3610 (define-public python2-docutils
3611 (package-with-python2 python-docutils))
3612
3613 ;; python2-sphinx fails its test suite with newer versions.
3614 (define-public python2-docutils-0.14
3615 (package
3616 (inherit python2-docutils)
3617 (version "0.14")
3618 (source (origin
3619 (method url-fetch)
3620 (uri (pypi-uri "docutils" version))
3621 (sha256
3622 (base32
3623 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3624
3625 (define-public python-restructuredtext-lint
3626 (package
3627 (name "python-restructuredtext-lint")
3628 (version "1.3.0")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (pypi-uri "restructuredtext-lint" version))
3633 (sha256
3634 (base32
3635 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3636 (build-system python-build-system)
3637 (arguments
3638 `(#:phases
3639 (modify-phases %standard-phases
3640 (delete 'check)
3641 (add-after 'install 'check
3642 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3643 (when tests?
3644 (add-installed-pythonpath inputs outputs)
3645 (invoke "nosetests" "-v"))
3646 #t)))))
3647 (propagated-inputs
3648 `(("python-docutils" ,python-docutils)))
3649 (native-inputs
3650 `(("python-nose" ,python-nose)))
3651 (home-page "https://github.com/twolfson/restructuredtext-lint")
3652 (synopsis "reStructuredText linter")
3653 (description "This package provides a linter for the reStructuredText
3654 format.")
3655 (license license:unlicense)))
3656
3657 (define-public python-doc8
3658 (package
3659 (name "python-doc8")
3660 (version "0.8.0")
3661 (source
3662 (origin
3663 (method url-fetch)
3664 (uri (pypi-uri "doc8" version))
3665 (sha256
3666 (base32
3667 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3668 (build-system python-build-system)
3669 (arguments
3670 `(#:phases
3671 (modify-phases %standard-phases
3672 (delete 'check)
3673 (add-after 'install 'check
3674 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3675 (when tests?
3676 (add-installed-pythonpath inputs outputs)
3677 (invoke "pytest" "-v"))
3678 #t)))))
3679 (propagated-inputs
3680 `(("python-chardet" ,python-chardet)
3681 ("python-docutils" ,python-docutils)
3682 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3683 ("python-six" ,python-six)
3684 ("python-stevedore" ,python-stevedore)))
3685 (native-inputs
3686 `(("python-testtools" ,python-testtools)
3687 ("python-pytest" ,python-pytest)))
3688 (home-page "https://launchpad.net/doc8")
3689 (synopsis
3690 "Style checker for Sphinx (or other) RST documentation")
3691 (description
3692 "Doc8 is an opinionated style checker for reStructured Text and plain
3693 text styles of documentation.")
3694 (license license:asl2.0)))
3695
3696 (define-public python-pygments
3697 (package
3698 (name "python-pygments")
3699 (version "2.7.3")
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "Pygments" version))
3704 (sha256
3705 (base32
3706 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3707 (build-system python-build-system)
3708 (arguments
3709 ;; FIXME: Tests require sphinx, which depends on this.
3710 '(#:tests? #f))
3711 (home-page "https://pygments.org/")
3712 (synopsis "Syntax highlighting")
3713 (description
3714 "Pygments is a syntax highlighting package written in Python.")
3715 (license license:bsd-2)
3716 (properties `((python2-variant . ,(delay python2-pygments))))))
3717
3718 ;; Pygments 2.6 and later does not support Python 2.
3719 (define-public python2-pygments
3720 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3721 (package
3722 (inherit base)
3723 (version "2.5.2")
3724 (source (origin
3725 (method url-fetch)
3726 (uri (pypi-uri "Pygments" version))
3727 (sha256
3728 (base32
3729 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3730
3731 (define-public python-bump2version
3732 (package
3733 (name "python-bump2version")
3734 (version "1.0.1")
3735 (source
3736 (origin
3737 (method url-fetch)
3738 (uri (pypi-uri "bump2version" version))
3739 (sha256
3740 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3741 (build-system python-build-system)
3742 (arguments
3743 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3744 ;; required: --new-version".
3745 `(#:tests? #false))
3746 (home-page "https://github.com/c4urself/bump2version")
3747 (synopsis "Version-bump your software with a single command!")
3748 (description
3749 "This package provides a small command line tool to simplify releasing
3750 software by updating all version strings in your source code by the correct
3751 increment. It also creates commits and tags.")
3752 (license license:expat)))
3753
3754 (define-public python-bumpversion
3755 (package
3756 (name "python-bumpversion")
3757 (version "0.5.3")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (pypi-uri "bumpversion" version))
3762 (sha256
3763 (base32
3764 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3765 (build-system python-build-system)
3766 (home-page "https://github.com/peritus/bumpversion")
3767 (synopsis "Tool to bump software version")
3768 (description "This tool provides a command-line interface (CLI) to bump a
3769 software version simply.")
3770 (license license:expat)))
3771
3772 (define-public python-deprecated
3773 (package
3774 (name "python-deprecated")
3775 (version "1.2.5")
3776 (source
3777 (origin
3778 (method git-fetch)
3779 (uri (git-reference
3780 (url "https://github.com/tantale/deprecated")
3781 (commit (string-append "v" version))))
3782 (file-name (git-file-name name version))
3783 (sha256
3784 (base32
3785 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3786 (build-system python-build-system)
3787 (arguments
3788 `(#:phases (modify-phases %standard-phases
3789 (replace 'check
3790 (lambda _
3791 (invoke "pytest"))))))
3792 (propagated-inputs
3793 `(("python-wrapt" ,python-wrapt)))
3794 (native-inputs
3795 `(("python-bumpversion" ,python-bumpversion)
3796 ("python-pytest" ,python-pytest)
3797 ("python-pytest-cov" ,python-pytest-cov)
3798 ("python-sphinx" ,python-sphinx)
3799 ("python-tox" ,python-tox)))
3800 (home-page "https://github.com/tantale/deprecated")
3801 (synopsis "Python decorator to deprecate classes, functions or methods")
3802 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3803 to deprecate classes, functions or methods.")
3804 (license license:expat)))
3805
3806 (define-public python-pygithub
3807 (package
3808 (name "python-pygithub")
3809 (version "1.43.8")
3810 (source
3811 ;; We fetch from the Git repo because there are no tests in the PyPI
3812 ;; archive.
3813 (origin
3814 (method git-fetch)
3815 (uri (git-reference
3816 (url "https://github.com/PyGithub/PyGithub")
3817 (commit (string-append "v" version))))
3818 (file-name (git-file-name name version))
3819 (sha256
3820 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3821 (build-system python-build-system)
3822 (arguments
3823 `(#:phases (modify-phases %standard-phases
3824 ;; Some tests rely on the network.
3825 (add-after 'unpack 'disable-failing-tests
3826 (lambda _
3827 (substitute* "tests/Issue142.py"
3828 (("testDecodeJson") "disabled_testDecodeJson"))
3829 #t))
3830 (add-before 'check 'prepare-for-tests
3831 (lambda _
3832 (for-each (lambda (f)
3833 (chmod f #o666))
3834 (find-files "./tests"))
3835 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3836 (setenv "PYTHONPATH"
3837 (string-append "./tests:" (getenv "PYTHONPATH")))
3838 #t)))))
3839 (propagated-inputs
3840 `(("python-deprecated" ,python-deprecated)
3841 ("python-pyjwt" ,python-pyjwt)
3842 ("python-requests" ,python-requests)))
3843 (native-inputs `(("python-httpretty" ,python-httpretty)))
3844 (home-page "https://pygithub.readthedocs.io/en/latest/")
3845 (synopsis "Python library for the GitHub API")
3846 (description "This library allows managing GitHub resources such as
3847 repositories, user profiles, and organizations in your Python applications,
3848 using version 3 of the GitHub application programming interface (API).")
3849 (license license:lgpl3+)))
3850
3851 (define-public python-rellu
3852 (package
3853 (name "python-rellu")
3854 (version "0.7")
3855 (source
3856 (origin
3857 (method url-fetch)
3858 (uri (pypi-uri "rellu" version))
3859 (sha256
3860 (base32
3861 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3862 (build-system python-build-system)
3863 (propagated-inputs
3864 `(("python-invoke" ,python-invoke)
3865 ("python-pygithub" ,python-pygithub)))
3866 (home-page "https://github.com/robotframework/rellu")
3867 (synopsis "Utilities to create PyPI releases")
3868 (description "This collection of utilities contains tooling and templates
3869 to assist in creating releases on GitHub and publishing them on PyPI. It is
3870 designed to be used by Robot Framework and tools and libraries in its
3871 ecosystem, but can naturally be used also by other projects.")
3872 (license license:asl2.0)))
3873
3874 (define-public python-robotframework
3875 (package
3876 (name "python-robotframework")
3877 (version "3.2.2")
3878 ;; There are no tests in the PyPI archive.
3879 (source
3880 (origin
3881 (method git-fetch)
3882 (uri (git-reference
3883 (url "https://github.com/robotframework/robotframework")
3884 (commit (string-append "v" version))))
3885 (file-name (git-file-name name version))
3886 (sha256
3887 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3888 (patches (search-patches
3889 "python-robotframework-source-date-epoch.patch"))))
3890 (build-system python-build-system)
3891 (arguments
3892 `(#:phases (modify-phases %standard-phases
3893 (add-before 'build 'build-and-install-doc
3894 (lambda* (#:key outputs #:allow-other-keys)
3895 (let* ((doc-output (assoc-ref outputs "doc"))
3896 (doc (string-append doc-output "/share/"
3897 ,name "-" ,version "/")))
3898 (invoke "invoke" "library-docs" "all")
3899 (mkdir-p doc)
3900 (copy-recursively "doc/libraries"
3901 (string-append doc "/libraries"))
3902 #t)))
3903 (replace 'check
3904 (lambda* (#:key inputs #:allow-other-keys)
3905 ;; Some tests require timezone data. Otherwise, they
3906 ;; look up /etc/localtime, which doesn't exist, and fail
3907 ;; with:
3908 ;;
3909 ;; OverflowError: mktime argument out of range
3910 (setenv "TZDIR"
3911 (string-append (assoc-ref inputs "tzdata")
3912 "/share/zoneinfo"))
3913 (setenv "TZ" "Europe/Paris")
3914
3915 (invoke "python" "utest/run.py"))))))
3916 (native-inputs
3917 `(("python-invoke" ,python-invoke)
3918 ("python-rellu" ,python-rellu)
3919 ("python:tk" ,python "tk") ;used when building the HTML doc
3920 ("tzdata" ,tzdata-for-tests)))
3921 (outputs '("out" "doc"))
3922 (home-page "https://robotframework.org")
3923 (synopsis "Generic automation framework")
3924 (description "Robot Framework is a generic automation framework for
3925 acceptance testing, acceptance test driven development (ATDD), and robotic
3926 process automation (RPA).")
3927 (license license:asl2.0)))
3928
3929 (define-public python-robotframework-lint
3930 ;; There is no properly tagged release; the commit below seems to correspond
3931 ;; to the 0.9 stable release available from PyPI. The tests are not
3932 ;; included in the PyPI archive, so we fetch the sources from the upstream
3933 ;; Git repo.
3934 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3935 (revision "0"))
3936 (package
3937 (name "python-robotframework-lint")
3938 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3939 revision commit))
3940 (source
3941 (origin
3942 (method git-fetch)
3943 (uri (git-reference
3944 (url "https://github.com/boakley/robotframework-lint")
3945 (commit commit)))
3946 (file-name (git-file-name name version))
3947 (sha256
3948 (base32
3949 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3950 (build-system python-build-system)
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (replace 'check
3955 (lambda _
3956 (invoke "python" "-m" "robot" "-A"
3957 "tests/conf/default.args" "tests"))))))
3958 (propagated-inputs
3959 `(("python-robotframework" ,python-robotframework)))
3960 (home-page "https://github.com/boakley/robotframework-lint/")
3961 (synopsis "Static analysis tool (linter) for Robot Framework")
3962 (description "This package provides the @code{rflint} command-line
3963 utility, a static analysis tool (linter) for Robot Framework source files.")
3964 (license license:asl2.0))))
3965
3966 (define-public python-robotframework-sshlibrary
3967 (package
3968 (name "python-robotframework-sshlibrary")
3969 (version "3.3.0")
3970 ;; There are no tests in the PyPI archive.
3971 (source
3972 (origin
3973 (method git-fetch)
3974 (uri (git-reference
3975 (url "https://github.com/robotframework/SSHLibrary")
3976 (commit (string-append "v" version))))
3977 (file-name (git-file-name name version))
3978 (sha256
3979 (base32
3980 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3981 (build-system python-build-system)
3982 (arguments
3983 `(#:phases
3984 (modify-phases %standard-phases
3985 (add-before 'build 'build-and-install-doc
3986 (lambda* (#:key outputs #:allow-other-keys)
3987 (let* ((doc-output (assoc-ref outputs "doc"))
3988 (doc (string-append doc-output "/share/"
3989 ,name "-" ,version "/")))
3990 (invoke "chmod" "-R" "+w" "docs")
3991 (invoke "invoke" "kw-docs" "project-docs")
3992 (mkdir-p doc)
3993 (for-each delete-file (find-files "docs" "\\.rst"))
3994 (copy-recursively "docs" doc)
3995 #t)))
3996 (replace 'check
3997 (lambda _
3998 ;; Some tests require an SSH server; we remove them.
3999 (delete-file "utest/test_client_api.py")
4000 (delete-file "utest/test_scp.py")
4001 (invoke "python" "utest/run.py"))))))
4002 (propagated-inputs
4003 `(("python-robotframework" ,python-robotframework)
4004 ("python-paramiko" ,python-paramiko)
4005 ("python-scp" ,python-scp)))
4006 (native-inputs
4007 `(("openssh" ,openssh)
4008 ("which" ,which)
4009 ;; To generate the documentation
4010 ("python-docutils" ,python-docutils)
4011 ("python-invoke" ,python-invoke)
4012 ("python-pygments" ,python-pygments)
4013 ("python-rellu" ,python-rellu)))
4014 (outputs '("out" "doc"))
4015 (home-page "https://github.com/robotframework/SSHLibrary")
4016 (synopsis "Robot Framework library for SSH and SFTP")
4017 (description "SSHLibrary is a Robot Framework library providing support
4018 for SSH and SFTP. It has the following main usages:
4019 @itemize @bullet
4020 @item Executing commands on the remote machine, either blocking or non-blocking.
4021 @item Writing and reading in an interactive shell.
4022 @item Transferring files and directories over SFTP.
4023 @item Ensuring that files and directories exist on the remote machine.
4024 @end itemize")
4025 (license license:asl2.0)))
4026
4027 (define-public python-rstr
4028 (package
4029 (name "python-rstr")
4030 (version "2.2.6")
4031 (source
4032 (origin
4033 (method url-fetch)
4034 (uri (pypi-uri "rstr" version))
4035 (sha256
4036 (base32
4037 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4038 (build-system python-build-system)
4039 (home-page "https://github.com/leapfrogonline/rstr")
4040 (synopsis "Generate random strings in Python")
4041 (description "This package provides a python module for generating
4042 random strings of various types. It could be useful for fuzz testing,
4043 generating dummy data, or other applications. It has no dependencies
4044 outside the standard library.")
4045 (license license:bsd-3)))
4046
4047 (define-public python-scp
4048 (package
4049 (name "python-scp")
4050 (version "0.13.3")
4051 (source
4052 (origin
4053 (method url-fetch)
4054 (uri (pypi-uri "scp" version))
4055 (sha256
4056 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4057 (build-system python-build-system)
4058 (arguments
4059 '(#:tests? #f)) ;tests require an SSH server
4060 (propagated-inputs
4061 `(("python-paramiko" ,python-paramiko)))
4062 (home-page "https://github.com/jbardin/scp.py")
4063 (synopsis "SCP protocol module for Python and Paramiko")
4064 (description "The scp module extends the Paramiko library to send and
4065 receive files via the SCP1 protocol, as implemented by the OpenSSH
4066 @command{scp} program.")
4067 (license license:gpl2+)))
4068
4069 (define-public python-rst.linker
4070 (package
4071 (name "python-rst.linker")
4072 (version "1.11")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "rst.linker" version))
4077 (sha256
4078 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4079 (build-system python-build-system)
4080 (propagated-inputs
4081 `(("python-dateutil" ,python-dateutil)
4082 ("python-six" ,python-six)))
4083 (native-inputs
4084 `(("python-setuptools-scm" ,python-setuptools-scm)))
4085 ;; Test would require path.py, which would introduce a cyclic dependence.
4086 (arguments `(#:tests? #f))
4087 ;; Note: As of version 1.7 the documentation is not worth building.
4088 (home-page "https://github.com/jaraco/rst.linker")
4089 (synopsis "Sphinx plugin to add links and timestamps")
4090 (description "rst.linker automatically replaces text by a
4091 reStructuredText external reference or timestamps. It's primary purpose is to
4092 augment the changelog, but it can be used for other documents, too.")
4093 (license license:expat)))
4094
4095 (define-public python2-rst.linker
4096 (package-with-python2 python-rst.linker))
4097
4098 (define-public python-sshpubkeys
4099 (package
4100 (name "python-sshpubkeys")
4101 (version "3.1.0")
4102 (home-page "https://github.com/ojarva/python-sshpubkeys")
4103 (source (origin
4104 (method git-fetch)
4105 (uri (git-reference
4106 (url home-page)
4107 (commit (string-append "v" version))))
4108 (file-name (git-file-name name version))
4109 (sha256
4110 (base32
4111 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4112 (build-system python-build-system)
4113 (propagated-inputs
4114 `(("python-cryptography" ,python-cryptography)
4115 ("python-ecdsa" ,python-ecdsa)))
4116 (synopsis "OpenSSH public key parser")
4117 (description
4118 "This package provides a library for parsing and validating OpenSSH
4119 public key files.")
4120 (license license:bsd-3)))
4121
4122 (define-public python-feedgenerator
4123 (package
4124 (name "python-feedgenerator")
4125 (version "1.9")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (pypi-uri "feedgenerator" version))
4130 (sha256
4131 (base32
4132 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4133 (modules '((guix build utils)))
4134 (snippet
4135 '(begin
4136 ;; Remove pre-compiled .pyc files from source.
4137 (for-each delete-file-recursively
4138 (find-files "." "__pycache__" #:directories? #t))
4139 (for-each delete-file (find-files "." "\\.pyc$"))
4140 #t))))
4141 (build-system python-build-system)
4142 (propagated-inputs
4143 `(("python-pytz" ,python-pytz)
4144 ("python-six" ,python-six)))
4145 (home-page "https://github.com/getpelican/feedgenerator")
4146 (synopsis
4147 "Standalone version of Django's Atom/RSS feed generator")
4148 (description
4149 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4150 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4151 (license license:bsd-3)))
4152
4153 (define-public python2-feedgenerator
4154 (package-with-python2 python-feedgenerator))
4155
4156 (define-public python-jsonrpc-server
4157 (package
4158 (name "python-jsonrpc-server")
4159 (version "0.4.0")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "python-jsonrpc-server" version))
4164 (sha256
4165 (base32
4166 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4167 (build-system python-build-system)
4168 (propagated-inputs
4169 `(("python-mock" ,python-mock)
4170 ("python-pytest" ,python-pytest)
4171 ("python-ujson" ,python-ujson)))
4172 (home-page
4173 "https://github.com/palantir/python-jsonrpc-server")
4174 (synopsis "JSON RPC 2.0 server library")
4175 (description
4176 "This package provides a JSON RPC 2.0 server library for Python.")
4177 (license license:expat)))
4178
4179 (define-public python-pydantic
4180 (package
4181 (name "python-pydantic")
4182 (version "1.6.1")
4183 (source
4184 (origin
4185 (method git-fetch)
4186 (uri (git-reference
4187 (url "https://github.com/samuelcolvin/pydantic")
4188 (commit (string-append "v" version))))
4189 (file-name (git-file-name name version))
4190 (sha256
4191 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4192 (build-system python-build-system)
4193 (arguments
4194 '(#:phases
4195 (modify-phases %standard-phases
4196 ;; Reported upstream:
4197 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4198 ;; Disable the faulty test as the fix is unclear.
4199 (add-before 'check 'disable-test
4200 (lambda _
4201 (substitute* "tests/test_validators.py"
4202 (("test_assert_raises_validation_error")
4203 "_test_assert_raises_validation_error"))
4204 #t))
4205 (replace 'check
4206 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4207 (native-inputs
4208 `(("python-pytest" ,python-pytest)))
4209 (home-page "https://github.com/samuelcolvin/pydantic")
4210 (synopsis "Python data validation and settings management")
4211 (description
4212 "Pydantic enforces type hints at runtime, and provides user friendly
4213 errors when data is invalid.")
4214 (license license:expat)))
4215
4216 (define-public python-pydocstyle
4217 (package
4218 (name "python-pydocstyle")
4219 (version "3.0.0")
4220 (source
4221 (origin
4222 (method url-fetch)
4223 (uri (pypi-uri "pydocstyle" version))
4224 (sha256
4225 (base32
4226 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4227 (build-system python-build-system)
4228 (propagated-inputs
4229 `(("python-six" ,python-six)
4230 ("python-snowballstemmer" ,python-snowballstemmer)))
4231 (home-page
4232 "https://github.com/PyCQA/pydocstyle/")
4233 (synopsis "Python docstring style checker")
4234 (description
4235 "This package provides a style checker for the Python Language
4236 Server (PLS).")
4237 (license license:expat)))
4238
4239 (define-public python-language-server
4240 (package
4241 (name "python-language-server")
4242 (version "0.36.2")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (pypi-uri "python-language-server" version))
4247 (sha256
4248 (base32
4249 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4250 (build-system python-build-system)
4251 (propagated-inputs
4252 `(("python-autopep8" ,python-autopep8)
4253 ("python-configparser" ,python-configparser)
4254 ("python-pydocstyle" ,python-pydocstyle)
4255 ("python-future" ,python-future)
4256 ("python-jedi" ,python-jedi)
4257 ("python-jsonrpc-server" ,python-jsonrpc-server)
4258 ("python-pluggy" ,python-pluggy)
4259 ("python-pycodestyle" ,python-pycodestyle)
4260 ("python-pyflakes" ,python-pyflakes)
4261 ("python-rope" ,python-rope)
4262 ("python-ujson" ,python-ujson)
4263 ("python-yapf" ,python-yapf)))
4264 (native-inputs
4265 `(("python-coverage" ,python-coverage)
4266 ("python-flaky" ,python-flaky)
4267 ("python-matplotlib" ,python-matplotlib)
4268 ("python-mock" ,python-mock)
4269 ("python-numpy" ,python-numpy)
4270 ("python-pandas" ,python-pandas)
4271 ("python-pylint" ,python-pylint)
4272 ("python-pytest" ,python-pytest)
4273 ("python-pytest-cov" ,python-pytest-cov)
4274 ("python-versioneer" ,python-versioneer)))
4275 (home-page "https://github.com/palantir/python-language-server")
4276 (synopsis "Python implementation of the Language Server Protocol")
4277 (description
4278 "The Python Language Server (pyls) is an implementation of the Python 3
4279 language specification for the Language Server Protocol (LSP). This tool is
4280 used in text editing environments to provide a complete and integrated
4281 feature-set for programming Python effectively.")
4282 (license license:expat)))
4283
4284 (define-public python-pathspec
4285 (package
4286 (name "python-pathspec")
4287 (version "0.7.0")
4288 (source
4289 (origin
4290 (method url-fetch)
4291 (uri (pypi-uri "pathspec" version))
4292 (sha256
4293 (base32
4294 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4295 (build-system python-build-system)
4296 (home-page "https://github.com/cpburnz/python-path-specification")
4297 (synopsis "Utility library for gitignore style pattern matching of file paths")
4298 (description
4299 "This package provides a utility library for gitignore style pattern
4300 matching of file paths.")
4301 (license license:mpl2.0)))
4302
4303 (define-public python-black
4304 (package
4305 (name "python-black")
4306 (version "20.8b1")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "black" version))
4311 (sha256
4312 (base32
4313 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4314 (build-system python-build-system)
4315 (arguments
4316 `(#:phases
4317 (modify-phases %standard-phases
4318 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4319 (lambda _
4320 (let ((python3 (which "python3")))
4321 (substitute* '("tests/data/fmtonoff.py"
4322 "tests/data/string_prefixes.py"
4323 "tests/data/function.py"
4324 "tests/data/python37.py")
4325 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4326 (string-append "#!" python3 (if (string? minor-version)
4327 minor-version
4328 "")))))
4329 #t))
4330 (add-after 'unpack 'disable-broken-tests
4331 (lambda* (#:key outputs inputs #:allow-other-keys)
4332 ;; Make installed package available for running the tests
4333 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4334 ":" (getenv "PATH")))
4335
4336 ;; These tests are supposed to be skipped when the blackd
4337 ;; dependencies are missing, but this doesn't quite work.
4338 (substitute* "tests/test_black.py"
4339 (("( *)class BlackDTestCase.*" match indent)
4340 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4341 indent "class BlackDTestCase(unittest.TestCase):\n"))
4342 (("web.Application") "False")
4343 (("@unittest_run_loop") ""))
4344
4345 ;; Patching the above file breaks the self test
4346 (substitute* "tests/test_black.py"
4347 (("( *)def test_self" match indent)
4348 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4349
4350 (substitute* "tests/test_black.py"
4351 (("( *)def test_python38" match indent)
4352 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4353 #t)))))
4354 (propagated-inputs
4355 `(("python-click" ,python-click)
4356 ("python-attrs" ,python-attrs)
4357 ("python-appdirs" ,python-appdirs)
4358 ("python-pathspec" ,python-pathspec)
4359 ("python-mypy-extensions" ,python-mypy-extensions)
4360 ("python-regex" ,python-regex)
4361 ("python-toml" ,python-toml)
4362 ("python-typed-ast" ,python-typed-ast)
4363 ("python-typing-extensions" ,python-typing-extensions)))
4364 (native-inputs
4365 `(("python-setuptools-scm" ,python-setuptools-scm)))
4366 (home-page "https://github.com/ambv/black")
4367 (synopsis "The uncompromising code formatter")
4368 (description "Black is the uncompromising Python code formatter.")
4369 (license license:expat)))
4370
4371 (define-public python-black-macchiato
4372 (package
4373 (name "python-black-macchiato")
4374 (version "1.3.0")
4375 (source
4376 (origin
4377 (method url-fetch)
4378 (uri (pypi-uri "black-macchiato" version))
4379 (sha256
4380 (base32
4381 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4382 (build-system python-build-system)
4383 (propagated-inputs
4384 `(("python-black" ,python-black)))
4385 (home-page "https://github.com/wbolster/black-macchiato")
4386 (synopsis "Partial @code{python-black} formatting")
4387 (description
4388 "This package is built on top the @{python-black} code formatter to
4389 enable formatting of partial files.")
4390 (license license:bsd-3)))
4391
4392 (define-public python-blinker
4393 (package
4394 (name "python-blinker")
4395 (version "1.4")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "blinker" version))
4400 (sha256
4401 (base32
4402 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4403 (build-system python-build-system)
4404 (home-page "https://pythonhosted.org/blinker/")
4405 (synopsis "Fast, simple object-to-object and broadcast signaling")
4406 (description
4407 "Blinker provides a fast dispatching system that allows any number of
4408 interested parties to subscribe to events, or \"signals\".")
4409 (license license:expat)))
4410
4411 (define-public python2-blinker
4412 (package-with-python2 python-blinker))
4413
4414 (define-public pelican
4415 (package
4416 (name "pelican")
4417 (version "4.2.0")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "pelican" version))
4422 (sha256
4423 (base32
4424 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4425 (build-system python-build-system)
4426 (propagated-inputs
4427 `(("python-blinker" ,python-blinker)
4428 ("python-dateutil" ,python-dateutil)
4429 ("python-docutils" ,python-docutils)
4430 ("python-feedgenerator" ,python-feedgenerator)
4431 ("python-jinja2" ,python-jinja2)
4432 ("python-markdown" ,python-markdown)
4433 ("python-pygments" ,python-pygments)
4434 ("python-pytz" ,python-pytz)
4435 ("python-six" ,python-six)
4436 ("python-unidecode" ,python-unidecode)))
4437 (home-page "https://getpelican.com/")
4438 (arguments
4439 `(;; XXX Requires a lot more packages to do unit tests :P
4440 #:tests? #f))
4441 (synopsis "Python-based static site publishing system")
4442 (description
4443 "Pelican is a tool to generate a static blog from reStructuredText,
4444 Markdown input files, and more. Pelican uses Jinja2 for templating
4445 and is very extensible.")
4446 (license license:agpl3+)))
4447
4448 (define-public mallard-ducktype
4449 (package
4450 (name "mallard-ducktype")
4451 (version "1.0.2")
4452 (source
4453 (origin
4454 (method git-fetch)
4455 ;; git-reference because tests are not included in pypi source tarball
4456 ;; https://issues.guix.gnu.org/issue/36755#2
4457 (uri (git-reference
4458 (url "https://github.com/projectmallard/mallard-ducktype")
4459 (commit version)))
4460 (file-name (git-file-name name version))
4461 (sha256
4462 (base32
4463 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4464 (build-system python-build-system)
4465 (arguments
4466 '(#:phases
4467 (modify-phases %standard-phases
4468 (replace 'check
4469 (lambda _
4470 (with-directory-excursion "tests"
4471 (invoke "sh" "runtests")))))))
4472 (home-page "http://projectmallard.org")
4473 (synopsis "Convert Ducktype to Mallard documentation markup")
4474 (description
4475 "Ducktype is a lightweight syntax that can represent all the semantics
4476 of the Mallard XML documentation system. Ducktype files can be converted to
4477 Mallard using the @command{ducktype} tool. The yelp-tools package
4478 provides additional functionality on the produced Mallard documents.")
4479 (license license:expat)))
4480
4481 (define-public python-cython
4482 (package
4483 (name "python-cython")
4484 (version "0.29.21")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "Cython" version))
4489 (sha256
4490 (base32
4491 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4492 (build-system python-build-system)
4493 ;; we need the full python package and not just the python-wrapper
4494 ;; because we need libpython3.3m.so
4495 (inputs
4496 `(("python" ,python)))
4497 (arguments
4498 `(#:phases
4499 (modify-phases %standard-phases
4500 (add-before 'check 'set-HOME
4501 ;; some tests require access to "$HOME/.cython"
4502 (lambda _ (setenv "HOME" "/tmp") #t))
4503 (replace 'check
4504 (lambda _
4505 ;; Disable compiler optimizations to greatly reduce the running
4506 ;; time of the test suite.
4507 (setenv "CFLAGS" "-O0")
4508
4509 (invoke "python" "runtests.py" "-vv"
4510 "-j" (number->string (parallel-job-count))
4511 ;; XXX: On 32-bit architectures, running the parallel tests
4512 ;; fails on many-core systems, see
4513 ;; <https://github.com/cython/cython/issues/2807>.
4514 ,@(if (not (target-64bit?))
4515 '("-x" "run.parallel")
4516 '())))))))
4517 (home-page "https://cython.org/")
4518 (synopsis "C extensions for Python")
4519 (description "Cython is an optimising static compiler for both the Python
4520 programming language and the extended Cython programming language. It makes
4521 writing C extensions for Python as easy as Python itself.")
4522 (license license:asl2.0)
4523 (properties `((python2-variant . ,(delay python2-cython))))))
4524
4525 (define-public python2-cython
4526 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4527 (package
4528 (inherit base)
4529 (name "python2-cython")
4530 (inputs
4531 `(("python-2" ,python-2))) ;this is not automatically changed
4532 (arguments
4533 (substitute-keyword-arguments (package-arguments base)
4534 ((#:phases phases)
4535 `(modify-phases ,phases
4536 (add-before 'check 'adjust-test_embed
4537 (lambda _
4538 (substitute* "runtests.py"
4539 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4540 ;; so it can give the right -L flag to GCC when embedding static
4541 ;; builds of Python. It is unaware that the Python "config"
4542 ;; directory (where the static library lives) was renamed in
4543 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4544 ;; which works fine, because that is where the shared library is.
4545 ;;
4546 ;; It also appears to be unaware that the Makefile in Demos/embed
4547 ;; already unconditionally pass the static library location to GCC,
4548 ;; after checking sysconfig.get_config_var('LIBPL).
4549 ;;
4550 ;; The effect is that the linker is unable to resolve libexpat
4551 ;; symbols when building for Python 2, because neither the Python 2
4552 ;; shared library nor Expat is available. To fix it, we can either
4553 ;; add Expat as an input and make it visible to the linker, or just
4554 ;; prevent it from overriding the Python shared library location.
4555 ;; The end result is identical, so we take the easy route.
4556 ((" or libname not in os\\.listdir\\(libdir\\)")
4557 ""))
4558 #t)))))))))
4559
4560 ;; The RPython toolchain currently does not support Python 3.
4561 (define-public python2-rpython
4562 (package
4563 (name "python2-rpython")
4564 (version "0.2.1")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (pypi-uri "rpython" version))
4569 (sha256
4570 (base32
4571 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4572 (build-system python-build-system)
4573 (arguments `(#:python ,python-2))
4574 (native-inputs
4575 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4576 (home-page "https://rpython.readthedocs.org")
4577 (synopsis "Framework for implementing interpreters and virtual machines")
4578 (description "RPython is a translation and support framework for
4579 producing implementations of dynamic languages, emphasizing a clean separation
4580 between language specification and implementation aspects.")
4581 (license license:expat)))
4582
4583 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4584 ;; python-scipy still build, as these three packages are often used together.
4585 (define-public python-numpy
4586 (package
4587 (name "python-numpy")
4588 (version "1.17.3")
4589 (source
4590 (origin
4591 (method url-fetch)
4592 (uri (string-append
4593 "https://github.com/numpy/numpy/releases/download/v"
4594 version "/numpy-" version ".tar.gz"))
4595 (sha256
4596 (base32
4597 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4598 (build-system python-build-system)
4599 (inputs
4600 `(("openblas" ,openblas)
4601 ("lapack" ,lapack)))
4602 (native-inputs
4603 `(("python-cython" ,python-cython)
4604 ("python-pytest" ,python-pytest)
4605 ("gfortran" ,gfortran)))
4606 (arguments
4607 `(#:phases
4608 (modify-phases %standard-phases
4609 (add-before 'build 'configure-blas-lapack
4610 (lambda* (#:key inputs #:allow-other-keys)
4611 (call-with-output-file "site.cfg"
4612 (lambda (port)
4613 (format port
4614 "[openblas]
4615 libraries = openblas
4616 library_dirs = ~a/lib
4617 include_dirs = ~a/include
4618
4619 # backslash-n to make emacs happy
4620 \n[lapack]
4621 lapack_libs = lapack
4622 library_dirs = ~a/lib
4623 include_dirs = ~a/include
4624 "
4625 (assoc-ref inputs "openblas")
4626 (assoc-ref inputs "openblas")
4627 (assoc-ref inputs "lapack")
4628 (assoc-ref inputs "lapack"))))
4629 #t))
4630 (add-before 'build 'fix-executable-paths
4631 (lambda* (#:key inputs #:allow-other-keys)
4632 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4633 ;; instead of /bin/sh.
4634 (substitute* "numpy/distutils/exec_command.py"
4635 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4636 (string-append match-start (assoc-ref inputs "bash") match-end)))
4637 ;; Use "gcc" executable, not "cc".
4638 (substitute* "numpy/distutils/system_info.py"
4639 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4640 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4641 #t))
4642 ;; Tests can only be run after the library has been installed and not
4643 ;; within the source directory.
4644 (delete 'check)
4645 (add-after 'install 'check
4646 (lambda* (#:key outputs inputs #:allow-other-keys)
4647 ;; Make installed package available for running the tests
4648 (add-installed-pythonpath inputs outputs)
4649 ;; Make sure "f2py" etc is found.
4650 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4651 ":" (getenv "PATH")))
4652 (with-directory-excursion "/tmp"
4653 (invoke "python" "-c"
4654 "import numpy; numpy.test(verbose=2)")))))))
4655 (home-page "https://numpy.org")
4656 (synopsis "Fundamental package for scientific computing with Python")
4657 (description "NumPy is the fundamental package for scientific computing
4658 with Python. It contains among other things: a powerful N-dimensional array
4659 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4660 and Fortran code, useful linear algebra, Fourier transform, and random number
4661 capabilities.")
4662 (properties `((python2-variant . ,(delay python2-numpy))))
4663 (license license:bsd-3)))
4664
4665 ;; Numpy 1.16.x are the last versions that support Python 2.
4666 (define-public python2-numpy
4667 (let ((numpy (package-with-python2
4668 (strip-python2-variant python-numpy))))
4669 (package/inherit
4670 numpy
4671 (version "1.16.5")
4672 (source (origin
4673 (method url-fetch)
4674 (uri (string-append
4675 "https://github.com/numpy/numpy/releases/download/v"
4676 version "/numpy-" version ".tar.gz"))
4677 (sha256
4678 (base32
4679 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4680
4681 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4682 ;; interest only for legacy code going back to NumPy's predecessor
4683 ;; Numeric.
4684 (define-public python2-numpy-1.8
4685 (package (inherit python2-numpy)
4686 (version "1.8.2")
4687 (source
4688 (origin
4689 (method git-fetch)
4690 (uri (git-reference
4691 (url "https://github.com/numpy/numpy")
4692 (commit (string-append "v" version))))
4693 (file-name (git-file-name "numpy" version))
4694 (sha256
4695 (base32
4696 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4697 (arguments
4698 (substitute-keyword-arguments (package-arguments python2-numpy)
4699 ((#:phases phases)
4700 `(modify-phases ,phases
4701 (replace 'configure-blas-lapack
4702 (lambda* (#:key inputs #:allow-other-keys)
4703 (call-with-output-file "site.cfg"
4704 (lambda (port)
4705 (format port
4706 "[openblas]
4707 libraries = openblas,lapack
4708 library_dirs = ~a/lib:~a/lib
4709 include_dirs = ~a/include:~a/include
4710 "
4711 (assoc-ref inputs "openblas")
4712 (assoc-ref inputs "lapack")
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "lapack"))))
4715 #t))))))
4716 (native-inputs
4717 `(("python2-nose" ,python2-nose)))
4718 (description "NumPy is the fundamental package for scientific computing
4719 with Python. It contains among other things: a powerful N-dimensional array
4720 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4721 and Fortran code, useful linear algebra, Fourier transform, and random number
4722 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4723 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4724 Numeric.")
4725 (license license:bsd-3)))
4726
4727 (define-public python-munch
4728 (package
4729 (name "python-munch")
4730 (version "2.0.4")
4731 (source
4732 (origin
4733 (method url-fetch)
4734 (uri (pypi-uri "munch" version))
4735 (sha256
4736 (base32
4737 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4738 (build-system python-build-system)
4739 (home-page "https://github.com/Infinidat/munch")
4740 (synopsis "Dot-accessible dictionary")
4741 (description "Munch is a dot-accessible dictionary similar to JavaScript
4742 objects.")
4743 (license license:expat)))
4744
4745 (define-public python2-munch
4746 (package-with-python2 python-munch))
4747
4748 (define-public python-colormath
4749 (package
4750 (name "python-colormath")
4751 (version "3.0.0")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (pypi-uri "colormath" version))
4756 (sha256
4757 (base32
4758 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4759 (build-system python-build-system)
4760 (propagated-inputs
4761 `(("python-networkx" ,python-networkx)
4762 ("python-numpy" ,python-numpy)))
4763 (home-page "https://github.com/gtaylor/python-colormath")
4764 (synopsis "Color math and conversion library")
4765 (description
4766 "This is a Python library for color math and conversions.")
4767 (license license:bsd-3)))
4768
4769 (define-public python2-colormath
4770 (package-with-python2 python-colormath))
4771
4772 (define-public python-spectra
4773 (package
4774 (name "python-spectra")
4775 (version "0.0.11")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "spectra" version))
4780 (sha256
4781 (base32
4782 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4783 (build-system python-build-system)
4784 (arguments
4785 `(#:phases
4786 (modify-phases %standard-phases
4787 (replace 'check
4788 (lambda _ (invoke "nosetests" "-v"))))))
4789 (propagated-inputs
4790 `(("python-colormath" ,python-colormath)))
4791 (native-inputs
4792 `(("python-nose" ,python-nose)))
4793 (home-page "https://github.com/jsvine/spectra")
4794 (synopsis "Color scales and color conversion")
4795 (description
4796 "This package provides a Python library intended to make color math,
4797 color scales, and color space conversion easy. It has support for:
4798
4799 @enumerate
4800 @item Color scales
4801 @item Color ranges
4802 @item Color blending
4803 @item Brightening/darkening colors
4804 @item Saturating/desaturating colors
4805 @item Conversion to/from multiple color spaces.
4806 @end enumerate\n")
4807 (license license:expat)))
4808
4809 (define-public python2-spectra
4810 (package-with-python2 python-spectra))
4811
4812 (define-public python-numpy-documentation
4813 (package
4814 (name "python-numpy-documentation")
4815 (version (package-version python-numpy))
4816 (source (package-source python-numpy))
4817 (build-system python-build-system)
4818 (native-inputs
4819 `(("python-matplotlib" ,python-matplotlib)
4820 ("python-numpy" ,python-numpy)
4821 ("pkg-config" ,pkg-config)
4822 ("python-sphinx" ,python-sphinx)
4823 ("python-numpydoc" ,python-numpydoc)
4824 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4825 texlive-fonts-ec
4826 texlive-generic-ifxetex
4827 texlive-generic-pdftex
4828 texlive-amsfonts
4829 texlive-latex-capt-of
4830 texlive-latex-cmap
4831 texlive-latex-environ
4832 texlive-latex-eqparbox
4833 texlive-latex-etoolbox
4834 texlive-latex-expdlist
4835 texlive-latex-fancyhdr
4836 texlive-latex-fancyvrb
4837 texlive-latex-fncychap
4838 texlive-latex-float
4839 texlive-latex-framed
4840 texlive-latex-geometry
4841 texlive-latex-graphics
4842 texlive-latex-hyperref
4843 texlive-latex-mdwtools
4844 texlive-latex-multirow
4845 texlive-latex-needspace
4846 texlive-latex-oberdiek
4847 texlive-latex-parskip
4848 texlive-latex-preview
4849 texlive-latex-tabulary
4850 texlive-latex-threeparttable
4851 texlive-latex-titlesec
4852 texlive-latex-trimspaces
4853 texlive-latex-ucs
4854 texlive-latex-upquote
4855 texlive-latex-url
4856 texlive-latex-varwidth
4857 texlive-latex-wrapfig)))
4858 ("texinfo" ,texinfo)
4859 ("perl" ,perl)
4860 ("scipy-sphinx-theme"
4861 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4862 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4863 (method git-fetch)
4864 (uri (git-reference
4865 (url "https://github.com/scipy/scipy-sphinx-theme")
4866 (commit commit)))
4867 (file-name (git-file-name "python-scipy-sphinx-theme"
4868 (string-take commit 7)))
4869 (sha256
4870 (base32
4871 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4872 ,@(package-native-inputs python-numpy)))
4873 (arguments
4874 `(#:tests? #f ; we're only generating the documentation
4875 #:phases
4876 (modify-phases %standard-phases
4877 (delete 'build)
4878 (replace 'install
4879 (lambda* (#:key inputs outputs #:allow-other-keys)
4880 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4881 (doc (string-append
4882 data "/doc/" ,name "-"
4883 ,(package-version python-numpy)))
4884 (info-reader (string-append data "/info"))
4885 (html (string-append doc "/html"))
4886 (scipy-sphinx-theme "scipy-sphinx-theme")
4887 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4888 (pyver ,(string-append "PYVER=")))
4889
4890 ;; FIXME: this is needed to for texlive-union to generate
4891 ;; fonts, which are not found.
4892 (setenv "HOME" "/tmp")
4893
4894 (with-directory-excursion "doc"
4895 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4896 (mkdir-p html)
4897 (invoke "make" "html" pyver)
4898 (invoke "make" "latex" "PAPER=a4" pyver)
4899 (invoke "make" "-C" "build/latex"
4900 "all-pdf" "PAPER=a4" pyver)
4901 ;; FIXME: Generation of the info file fails.
4902 ;; (invoke "make" "info" pyver)
4903 ;; (mkdir-p info)
4904 ;; (copy-file "build/texinfo/numpy.info"
4905 ;; (string-append info "/numpy.info"))
4906 (for-each (lambda (file)
4907 (copy-file (string-append "build/latex" file)
4908 (string-append doc file)))
4909 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4910 (with-directory-excursion "build/html"
4911 (for-each (lambda (file)
4912 (let* ((dir (dirname file))
4913 (tgt-dir (string-append html "/" dir)))
4914 (unless (equal? "." dir)
4915 (mkdir-p tgt-dir))
4916 (install-file file html)))
4917 (find-files "." ".*")))))
4918 #t)))))
4919 (home-page (package-home-page python-numpy))
4920 (synopsis "Documentation for the python-numpy package")
4921 (description (package-description python-numpy))
4922 (license (package-license python-numpy))))
4923
4924 (define-public python2-numpy-documentation
4925 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4926 (package
4927 (inherit numpy-documentation)
4928 (native-inputs `(("python2-functools32" ,python2-functools32)
4929 ,@(package-native-inputs numpy-documentation))))))
4930
4931 (define-public python-pygit2
4932 (package
4933 (name "python-pygit2")
4934 (version "1.4.0")
4935 (source
4936 (origin
4937 (method url-fetch)
4938 (uri (pypi-uri "pygit2" version))
4939 (sha256
4940 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4941 (build-system python-build-system)
4942 (arguments
4943 '(#:tests? #f)) ; tests don't run correctly in our environment
4944 (propagated-inputs
4945 `(("python-cached-property" ,python-cached-property)
4946 ("python-cffi" ,python-cffi)
4947 ("libgit2" ,libgit2)))
4948 (native-inputs
4949 `(("python-pytest" ,python-pytest)))
4950 (home-page "https://github.com/libgit2/pygit2")
4951 (synopsis "Python bindings for libgit2")
4952 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4953 library, libgit2 implements Git plumbing.")
4954 ;; GPL2.0 only, with linking exception.
4955 (license license:gpl2)))
4956
4957 (define-public python-patiencediff
4958 (package
4959 (name "python-patiencediff")
4960 (version "0.2.0")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "patiencediff" version))
4965 (sha256
4966 (base32
4967 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4968 (build-system python-build-system)
4969 (home-page "https://www.breezy-vcs.org/")
4970 (synopsis "Python implementation of the patiencediff algorithm")
4971 (description
4972 "This package contains a Python implementation of the @code{patiencediff}
4973 algorithm. Patiencediff provides a good balance of performance, nice output for
4974 humans, and implementation simplicity.")
4975 (license license:gpl2)))
4976
4977 (define-public python-pdftotext
4978 (package
4979 (name "python-pdftotext")
4980 (version "2.1.5")
4981 (source
4982 (origin
4983 (method url-fetch)
4984 (uri (pypi-uri "pdftotext" version))
4985 (sha256
4986 (base32
4987 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4988 (build-system python-build-system)
4989 (inputs
4990 `(("poppler" ,poppler)))
4991 (home-page "https://github.com/jalan/pdftotext")
4992 (synopsis "Simple PDF text extraction")
4993 (description "Pdftotext is a Python library of PDF text extraction.")
4994 (license license:expat)))
4995
4996 (define-public python-pyparsing
4997 (package
4998 (name "python-pyparsing")
4999 (version "2.4.6")
5000 (source
5001 (origin
5002 (method url-fetch)
5003 (uri (pypi-uri "pyparsing" version))
5004 (sha256
5005 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5006 (build-system python-build-system)
5007 (outputs '("out" "doc"))
5008 (arguments
5009 `(#:tests? #f ; no test target
5010 #:phases
5011 (modify-phases %standard-phases
5012 (add-after 'install 'install-doc
5013 (lambda* (#:key outputs #:allow-other-keys)
5014 (let* ((doc (string-append (assoc-ref outputs "doc")
5015 "/share/doc/" ,name "-" ,version))
5016 (html-doc (string-append doc "/html"))
5017 (examples (string-append doc "/examples")))
5018 (mkdir-p html-doc)
5019 (mkdir-p examples)
5020 (for-each
5021 (lambda (dir tgt)
5022 (map (lambda (file)
5023 (install-file file tgt))
5024 (find-files dir ".*")))
5025 (list "docs" "htmldoc" "examples")
5026 (list doc html-doc examples))
5027 #t))))))
5028 (home-page "https://github.com/pyparsing/pyparsing")
5029 (synopsis "Python parsing class library")
5030 (description
5031 "The pyparsing module is an alternative approach to creating and
5032 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5033 of regular expressions. The pyparsing module provides a library of classes
5034 that client code uses to construct the grammar directly in Python code.")
5035 (license license:expat)))
5036
5037 (define-public python2-pyparsing
5038 (package-with-python2 python-pyparsing))
5039
5040 (define-public python-pyparsing-2.4.7
5041 (package
5042 (inherit python-pyparsing)
5043 (version "2.4.7")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "pyparsing" version))
5048 (sha256
5049 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5050
5051 (define-public python-numpydoc
5052 (package
5053 (name "python-numpydoc")
5054 (version "0.8.0")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "numpydoc" version))
5059 (sha256
5060 (base32
5061 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5062 (build-system python-build-system)
5063 (propagated-inputs
5064 `(("python-sphinx" ,python-sphinx)))
5065 (native-inputs
5066 `(("python-nose" ,python-nose)))
5067 (home-page "https://pypi.org/project/numpydoc/")
5068 (synopsis
5069 "Numpy's Sphinx extensions")
5070 (description
5071 "Sphinx extension to support docstrings in Numpy format.")
5072 (license license:bsd-2)
5073 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5074
5075 (define-public python2-numpydoc
5076 (let ((base (package-with-python2
5077 (strip-python2-variant python-numpydoc))))
5078 (package
5079 (inherit base)
5080 (propagated-inputs
5081 `(("python2-jinja2" ,python2-jinja2)
5082 ,@(package-propagated-inputs base))))))
5083
5084 (define-public python-numexpr
5085 (package
5086 (name "python-numexpr")
5087 (version "2.6.5")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (pypi-uri "numexpr" version))
5092 (sha256
5093 (base32
5094 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5095 (build-system python-build-system)
5096 (arguments `(#:tests? #f)) ; no tests included
5097 (propagated-inputs
5098 `(("python-numpy" ,python-numpy)))
5099 (home-page "https://github.com/pydata/numexpr")
5100 (synopsis "Fast numerical expression evaluator for NumPy")
5101 (description
5102 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5103 expressions that operate on arrays are accelerated and use less memory than
5104 doing the same calculation in Python. In addition, its multi-threaded
5105 capabilities can make use of all your cores, which may accelerate
5106 computations, most specially if they are not memory-bounded (e.g. those using
5107 transcendental functions).")
5108 (license license:expat)))
5109
5110 (define-public python2-numexpr
5111 (package-with-python2 python-numexpr))
5112
5113 (define-public python-cycler
5114 (package
5115 (name "python-cycler")
5116 (version "0.10.0")
5117 (source (origin
5118 (method url-fetch)
5119 (uri (pypi-uri "cycler" version))
5120 (sha256
5121 (base32
5122 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5123 (build-system python-build-system)
5124 (arguments
5125 ;; XXX: The current version requires 'coveralls' which we don't have.
5126 ;; Enable this for the next release which uses 'python-pytest'.
5127 '(#:tests? #f))
5128 (propagated-inputs
5129 `(("python-six" ,python-six)))
5130 (home-page "https://matplotlib.org/cycler/")
5131 (synopsis "Composable keyword argument iterator")
5132 (description
5133 "When using @code{matplotlib} and plotting more than one line, it is
5134 common to want to be able to want to be able to cycle over one or more artist
5135 styles; but the plotting logic can quickly become involved.
5136 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5137 @code{Cycler} class was developed.")
5138 (license license:bsd-3)))
5139
5140 (define-public python2-cycler
5141 (package-with-python2 python-cycler))
5142
5143 (define-public python-colorspacious
5144 (package
5145 (name "python-colorspacious")
5146 (version "1.1.2")
5147 (source
5148 (origin
5149 (method git-fetch)
5150 (uri (git-reference
5151 (url "https://github.com/njsmith/colorspacious")
5152 (commit (string-append "v" version))))
5153 (file-name (git-file-name name version))
5154 (sha256
5155 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5156 (build-system python-build-system)
5157 (propagated-inputs
5158 `(("python-numpy" ,python-numpy)))
5159 (native-inputs
5160 `(("python-nose" ,python-nose)))
5161 (arguments
5162 `(#:phases
5163 (modify-phases %standard-phases
5164 (replace 'check
5165 (lambda _
5166 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5167 (home-page "https://github.com/njsmith/colorspacious")
5168 (synopsis "Python library for colorspace conversions")
5169 (description "@code{colorspacious} is a Python library that lets you
5170 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5171 (license license:expat)))
5172
5173 (define-public python2-colorspacious
5174 (package-with-python2 python-colorspacious))
5175
5176 (define-public python-matplotlib
5177 (package
5178 (name "python-matplotlib")
5179 (version "3.1.2")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (pypi-uri "matplotlib" version))
5184 (sha256
5185 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5186 (patches
5187 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5188 (build-system python-build-system)
5189 (propagated-inputs ; the following packages are all needed at run time
5190 `(("python-cycler" ,python-cycler)
5191 ("python-kiwisolver" ,python-kiwisolver)
5192 ("python-pyparsing" ,python-pyparsing)
5193 ("python-pygobject" ,python-pygobject)
5194 ("gobject-introspection" ,gobject-introspection)
5195 ("python-tkinter" ,python "tk")
5196 ("python-dateutil" ,python-dateutil)
5197 ("python-numpy" ,python-numpy)
5198 ("python-pillow" ,python-pillow)
5199 ("python-pytz" ,python-pytz)
5200 ("python-six" ,python-six)
5201 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5202 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5203 ;; object. For this reason we need to import both libraries.
5204 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5205 ("python-pycairo" ,python-pycairo)
5206 ("python-cairocffi" ,python-cairocffi)))
5207 (inputs
5208 `(("libpng" ,libpng)
5209 ("freetype" ,freetype)
5210 ("cairo" ,cairo)
5211 ("glib" ,glib)
5212 ;; FIXME: Add backends when available.
5213 ;("python-wxpython" ,python-wxpython)
5214 ("tcl" ,tcl)
5215 ("tk" ,tk)))
5216 (native-inputs
5217 `(("pkg-config" ,pkg-config)
5218 ("python-pytest" ,python-pytest)
5219 ("python-mock" ,python-mock)
5220 ("unzip" ,unzip)
5221 ("jquery-ui"
5222 ,(origin
5223 (method url-fetch)
5224 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5225 (sha256
5226 (base32
5227 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5228 (arguments
5229 `(#:phases
5230 (modify-phases %standard-phases
5231 ;; XXX We disable all image comparison tests because we're using a
5232 ;; newer version of FreeType than matplotlib expects. This leads to
5233 ;; minor differences throughout the tests.
5234 (add-after 'unpack 'fix-and-disable-failing-tests
5235 (lambda _
5236 (substitute* (append (find-files "lib/matplotlib/tests/"
5237 "test_.*\\.py$")
5238 (find-files "lib/mpl_toolkits/tests"
5239 "test_.*\\.py$"))
5240 (("^from matplotlib" match)
5241 (string-append "import pytest\n" match))
5242 (("( *)@image_comparison" match indent)
5243 (string-append indent
5244 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5245 match)))
5246 (substitute* "lib/matplotlib/tests/test_animation.py"
5247 (("/bin/sh") (which "sh")))
5248 (for-each delete-file
5249 ;; test_normal_axes, test_get_tightbbox_polar
5250 '("lib/matplotlib/tests/test_axes.py"
5251 ;; We don't use the webagg backend and this test forces it.
5252 "lib/matplotlib/tests/test_backend_webagg.py"
5253 ;; test_outward_ticks
5254 "lib/matplotlib/tests/test_tightlayout.py"
5255 ;; test_hidden_axes fails with minor extent
5256 ;; differences, possibly due to the use of a
5257 ;; different version of FreeType.
5258 "lib/matplotlib/tests/test_constrainedlayout.py"
5259 ;; Fontconfig returns no fonts.
5260 "lib/matplotlib/tests/test_font_manager.py"))
5261 #t))
5262 (add-before 'install 'install-jquery-ui
5263 (lambda* (#:key outputs inputs #:allow-other-keys)
5264 (let ((dir (string-append (assoc-ref outputs "out")
5265 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5266 (mkdir-p dir)
5267 (invoke "unzip"
5268 (assoc-ref inputs "jquery-ui")
5269 "-d" dir))
5270 #t))
5271 (replace 'check
5272 (lambda* (#:key outputs inputs #:allow-other-keys)
5273 (add-installed-pythonpath inputs outputs)
5274 (invoke "python" "tests.py" "-v"
5275 "-m" "not network and not webagg")))
5276 (add-before 'build 'configure-environment
5277 (lambda* (#:key outputs inputs #:allow-other-keys)
5278 (let ((cairo (assoc-ref inputs "cairo")))
5279 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5280 ;; has not effect.
5281 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5282 (setenv "HOME" (getcwd))
5283 ;; Fix rounding errors when using the x87 FPU.
5284 (when (string-prefix? "i686" ,(%current-system))
5285 (setenv "CFLAGS" "-ffloat-store"))
5286 (call-with-output-file "setup.cfg"
5287 (lambda (port)
5288 (format port "[directories]~%
5289 basedirlist = ~a,~a~%
5290 [packages]~%
5291 tests = True~%"
5292 (assoc-ref inputs "tcl")
5293 (assoc-ref inputs "tk")))))
5294 #t)))))
5295 (home-page "https://matplotlib.org/")
5296 (synopsis "2D plotting library for Python")
5297 (description
5298 "Matplotlib is a Python 2D plotting library which produces publication
5299 quality figures in a variety of hardcopy formats and interactive environments
5300 across platforms. Matplotlib can be used in Python scripts, the python and
5301 ipython shell, web application servers, and six graphical user interface
5302 toolkits.")
5303 (license license:psfl)
5304 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5305
5306 (define-public python2-matplotlib
5307 (let ((matplotlib (package-with-python2
5308 (strip-python2-variant python-matplotlib))))
5309 (package (inherit matplotlib)
5310 (version "2.2.4")
5311 (source
5312 (origin
5313 (method url-fetch)
5314 (uri (pypi-uri "matplotlib" version))
5315 (sha256
5316 (base32
5317 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5318 (arguments
5319 (substitute-keyword-arguments (package-arguments matplotlib)
5320 ((#:phases phases)
5321 `(modify-phases ,phases
5322 (replace 'install-jquery-ui
5323 (lambda* (#:key outputs inputs #:allow-other-keys)
5324 (let ((dir (string-append (assoc-ref outputs "out")
5325 "/lib/python2.7/site-packages/"
5326 "matplotlib/backends/web_backend/")))
5327 (mkdir-p dir)
5328 (invoke "unzip"
5329 (assoc-ref inputs "jquery-ui")
5330 "-d" dir))
5331 #t))
5332 (delete 'fix-and-disable-failing-tests)
5333 (delete 'check))))) ; These tests weren't run the the past.
5334 ;; Make sure to use special packages for Python 2 instead
5335 ;; of those automatically rewritten by package-with-python2.
5336 (propagated-inputs
5337 `(("python2-pycairo" ,python2-pycairo)
5338 ("python2-backports-functools-lru-cache"
5339 ,python2-backports-functools-lru-cache)
5340 ("python2-functools32" ,python2-functools32)
5341 ("python2-pygobject-2" ,python2-pygobject-2)
5342 ("python2-subprocess32" ,python2-subprocess32)
5343 ("python2-tkinter" ,python-2 "tk")
5344 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5345 '("python-cairocffi"
5346 "python-pycairo"
5347 "python-pygobject"
5348 "python-tkinter")))))))
5349
5350 (define-public python-matplotlib-documentation
5351 (package
5352 (name "python-matplotlib-documentation")
5353 (version (package-version python-matplotlib))
5354 (source (package-source python-matplotlib))
5355 (build-system python-build-system)
5356 (native-inputs
5357 `(("python-matplotlib" ,python-matplotlib)
5358 ("python-colorspacious" ,python-colorspacious)
5359 ("python-sphinx" ,python-sphinx)
5360 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5361 ("python-sphinx-gallery" ,python-sphinx-gallery)
5362 ("python-numpydoc" ,python-numpydoc)
5363 ("python-ipython" ,python-ipython)
5364 ("python-ipykernel" ,python-ipykernel)
5365 ("python-mock" ,python-mock)
5366 ("graphviz" ,graphviz)
5367 ("texlive" ,(texlive-union (list texlive-amsfonts
5368 texlive-latex-amsmath
5369 texlive-latex-enumitem
5370 texlive-latex-expdlist
5371 texlive-latex-geometry
5372 texlive-latex-preview
5373 texlive-latex-type1cm
5374 texlive-latex-ucs
5375
5376 texlive-generic-pdftex
5377
5378 texlive-fonts-ec
5379 texlive-fonts-adobe-times
5380 texlive-fonts-txfonts)))
5381 ("texinfo" ,texinfo)
5382 ,@(package-native-inputs python-matplotlib)))
5383 (arguments
5384 `(#:tests? #f ; we're only generating documentation
5385 #:phases
5386 (modify-phases %standard-phases
5387 ;; The tests in python-matplotlib are run after the install phase, so
5388 ;; we need to delete the extra phase here.
5389 (delete 'check)
5390 (replace 'build
5391 (lambda _
5392 (chdir "doc")
5393 (setenv "PYTHONPATH"
5394 (string-append (getenv "PYTHONPATH")
5395 ":" (getcwd) "/../examples/units"))
5396 (substitute* "conf.py"
5397 ;; Don't use git.
5398 (("^SHA = check_output.*")
5399 (string-append "SHA = \"" ,version "\"\n"))
5400 ;; Don't fetch intersphinx files from the Internet
5401 (("^explicit_order_folders" m)
5402 (string-append "intersphinx_mapping = {}\n" m))
5403 (("'sphinx.ext.intersphinx',") "")
5404 ;; Disable URL embedding which requires internet access.
5405 (("'https://docs.scipy.org/doc/numpy'") "None")
5406 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5407 (invoke "make"
5408 "SPHINXBUILD=sphinx-build"
5409 "SPHINXOPTS=" ; don't abort on warnings
5410 "html" "texinfo")))
5411 (replace 'install
5412 (lambda* (#:key inputs outputs #:allow-other-keys)
5413 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5414 (doc (string-append data "/doc/python-matplotlib-" ,version))
5415 (info (string-append data "/info"))
5416 (html (string-append doc "/html")))
5417 (mkdir-p html)
5418 (mkdir-p info)
5419 (copy-recursively "build/html" html)
5420 (symlink (string-append html "/_images")
5421 (string-append info "/matplotlib-figures"))
5422 (with-directory-excursion "build/texinfo"
5423 (substitute* "matplotlib.texi"
5424 (("@image\\{([^,]*)" all file)
5425 (string-append "@image{matplotlib-figures/" file)))
5426 (symlink (string-append html "/_images")
5427 "./matplotlib-figures")
5428 (invoke "makeinfo" "--no-split"
5429 "-o" "matplotlib.info" "matplotlib.texi"))
5430 (install-file "build/texinfo/matplotlib.info" info))
5431 #t)))))
5432 (home-page (package-home-page python-matplotlib))
5433 (synopsis "Documentation for the python-matplotlib package")
5434 (description (package-description python-matplotlib))
5435 (license (package-license python-matplotlib))))
5436
5437 (define-public python2-matplotlib-documentation
5438 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5439 (package
5440 (inherit parent)
5441 (native-inputs
5442 (alist-delete "python-sphinx-copybutton"
5443 (package-native-inputs parent))))))
5444
5445 (define-public python-matplotlib-venn
5446 (package
5447 (name "python-matplotlib-venn")
5448 (version "0.11.5")
5449 (source
5450 (origin
5451 (method url-fetch)
5452 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5453 (sha256
5454 (base32
5455 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5456 (build-system python-build-system)
5457 (arguments '(#:tests? #f)) ; tests are not included
5458 (propagated-inputs
5459 `(("python-matplotlib" ,python-matplotlib)
5460 ("python-numpy" ,python-numpy)
5461 ("python-scipy" ,python-scipy)))
5462 (native-inputs
5463 `(("unzip" ,unzip)))
5464 (home-page "https://github.com/konstantint/matplotlib-venn")
5465 (synopsis "Plot area-proportional Venn diagrams")
5466 (description
5467 "This package provides tools for plotting area-proportional two- and
5468 three-way Venn diagrams in @code{matplotlib}.")
5469 (license license:expat)))
5470
5471 (define-public python-pysnptools
5472 (package
5473 (name "python-pysnptools")
5474 (version "0.4.11")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (pypi-uri "pysnptools" version))
5479 (sha256
5480 (base32
5481 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5482 (build-system python-build-system)
5483 (arguments
5484 `(#:tests? #f ; no test data are included
5485 #:phases
5486 (modify-phases %standard-phases
5487 (replace 'check
5488 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5489 (if tests?
5490 (begin
5491 (add-installed-pythonpath inputs outputs)
5492 (invoke "python3" "pysnptools/test.py"))
5493 #t))))))
5494 (propagated-inputs
5495 `(("python-dill" ,python-dill)
5496 ("python-h5py" ,python-h5py)
5497 ("python-numpy" ,python-numpy)
5498 ("python-pandas" ,python-pandas)
5499 ("python-psutil" ,python-psutil)
5500 ("python-scipy" ,python-scipy)))
5501 (native-inputs
5502 `(("python-cython" ,python-cython)))
5503 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5504 (synopsis "Library for reading and manipulating genetic data")
5505 (description
5506 "PySnpTools is a library for reading and manipulating genetic data. It
5507 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5508 those files. It can also efficiently manipulate ranges of integers using set
5509 operators such as union, intersection, and difference.")
5510 (license license:asl2.0)))
5511
5512 (define-public python2-pysnptools
5513 (package-with-python2 python-pysnptools))
5514
5515 (define-public python-wurlitzer
5516 (package
5517 (name "python-wurlitzer")
5518 (version "2.0.1")
5519 (source
5520 (origin
5521 (method url-fetch)
5522 (uri (pypi-uri "wurlitzer" version))
5523 (sha256
5524 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5525 (build-system python-build-system)
5526 (arguments
5527 '(#:phases
5528 (modify-phases %standard-phases
5529 (replace 'check
5530 (lambda _
5531 (invoke "pytest" "-vv" "test.py"))))))
5532 (native-inputs
5533 `(("python-mock" ,python-mock)
5534 ("python-pytest" ,python-pytest)))
5535 (home-page "https://github.com/minrk/wurlitzer")
5536 (synopsis "Capture C-level output in context managers")
5537 (description
5538 "This library helps to redirect @code{sys.stdout} to a stream or a file
5539 while executing some piece of code, including C code running within a Python
5540 process.")
5541 (license license:expat)))
5542
5543 (define-public python-socksipy-branch
5544 (package
5545 (name "python-socksipy-branch")
5546 (version "1.01")
5547 (source
5548 (origin
5549 (method url-fetch)
5550 (uri (pypi-uri "SocksiPy-branch" version))
5551 (sha256
5552 (base32
5553 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5554 (build-system python-build-system)
5555 (arguments
5556 `(#:tests? #f)) ; There are no tests
5557 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5558 (synopsis "Python SOCKS module")
5559 (description
5560 "SocksiPy - A Python SOCKS client module. It provides a
5561 socket-like interface that supports connections to any TCP
5562 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5563 The original version was developed by Dan Haim, this is a
5564 branch created by Mario Vilas to address some open issues,
5565 as the original project seems to have been abandoned circa 2007.")
5566 (license license:bsd-3)))
5567
5568 (define-public python2-socksipy-branch
5569 (package-with-python2 python-socksipy-branch))
5570
5571 (define-public python-socksipychain
5572 (package
5573 (name "python-socksipychain")
5574 (version "2.1.2")
5575 (source
5576 (origin
5577 (method git-fetch)
5578 (uri (git-reference
5579 (url "https://github.com/pagekite/PySocksipyChain")
5580 (commit (string-append "v" version))))
5581 (file-name (git-file-name name version))
5582 (sha256
5583 (base32
5584 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5585 (build-system python-build-system)
5586 (arguments
5587 `(#:tests? #f)) ; Tests try to access the network.
5588 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5589 (synopsis "Python SOCKS module with chained proxies support")
5590 (description
5591 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5592 adds support for arbitrary chaining of proxy servers and various modes of
5593 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5594 a simple netcat replacement with chaining support.")
5595 (license license:bsd-3)))
5596
5597 (define-public python-pycodestyle
5598 (package
5599 (name "python-pycodestyle")
5600 (version "2.6.0")
5601 (source
5602 (origin
5603 (method url-fetch)
5604 (uri (pypi-uri "pycodestyle" version))
5605 (sha256
5606 (base32
5607 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5608 (build-system python-build-system)
5609 (arguments
5610 `(#:phases
5611 (modify-phases %standard-phases
5612 (replace 'check
5613 (lambda _
5614 (invoke "pytest" "-vv"))))))
5615 (native-inputs
5616 `(("python-pytest" ,python-pytest)))
5617 (home-page "https://pycodestyle.readthedocs.io/")
5618 (synopsis "Python style guide checker")
5619 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5620 Python code against some of the style conventions in
5621 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5622 (license license:expat)))
5623
5624 (define-public python2-pycodestyle
5625 (package-with-python2 python-pycodestyle))
5626
5627 (define-public python-multidict
5628 (package
5629 (name "python-multidict")
5630 (version "4.7.5")
5631 (source
5632 (origin
5633 (method url-fetch)
5634 (uri (pypi-uri "multidict" version))
5635 (sha256
5636 (base32
5637 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5638 (build-system python-build-system)
5639 (arguments
5640 '(#:modules ((ice-9 ftw)
5641 (srfi srfi-1)
5642 (srfi srfi-26)
5643 (guix build utils)
5644 (guix build python-build-system))
5645 #:phases (modify-phases %standard-phases
5646 (replace 'check
5647 (lambda* (#:key tests? #:allow-other-keys)
5648 (if tests?
5649 (begin
5650 (let ((libdir (find (cut string-prefix? "lib." <>)
5651 (scandir "build"))))
5652 (setenv "PYTHONPATH"
5653 (string-append "./build/" libdir ":"
5654 (getenv "PYTHONPATH")))
5655 (invoke "pytest" "-vv")))
5656 (format #t "test suite not run~%"))
5657 #t)))))
5658 (native-inputs
5659 `(("python-pytest" ,python-pytest)
5660 ("python-pytest-cov" ,python-pytest-cov)))
5661 (home-page "https://github.com/aio-libs/multidict/")
5662 (synopsis "Multidict implementation")
5663 (description "Multidict is dict-like collection of key-value pairs
5664 where key might be occurred more than once in the container.")
5665 (license license:asl2.0)))
5666
5667 (define-public python-orderedmultidict
5668 (package
5669 (name "python-orderedmultidict")
5670 (version "1.0")
5671 (source
5672 (origin
5673 (method url-fetch)
5674 (uri (pypi-uri "orderedmultidict" version))
5675 (sha256
5676 (base32
5677 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5678 (build-system python-build-system)
5679 (arguments
5680 `(#:phases
5681 (modify-phases %standard-phases
5682 (add-after 'unpack 'fix-tests
5683 (lambda _
5684 ;; The package uses nosetest for running the tests.
5685 ;; Adding this initfile allows to run the test suite
5686 ;; without requiring nosetest.
5687 (with-output-to-file "tests/__init__.py" newline)
5688 #t)))))
5689 (propagated-inputs
5690 `(("python-six" ,python-six)))
5691 (native-inputs
5692 `(("python-pycodestyle" ,python-pycodestyle)))
5693 (home-page "https://github.com/gruns/orderedmultidict")
5694 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5695 (description "This package contains a library for ordered multivalue
5696 dictionaries. A multivalue dictionary is a dictionary that can store
5697 multiple values for the same key. An ordered multivalue dictionary is a
5698 multivalue dictionary that retains the order of insertions and deletions.")
5699 (license license:unlicense)))
5700
5701 (define-public python2-orderedmultidict
5702 (package-with-python2 python-orderedmultidict))
5703
5704 (define-public python-autopep8
5705 (package
5706 (name "python-autopep8")
5707 (version "1.5.3")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "autopep8" version))
5712 (sha256
5713 (base32
5714 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5715 (build-system python-build-system)
5716 (propagated-inputs
5717 `(("python-pycodestyle" ,python-pycodestyle)
5718 ("python-toml" ,python-toml)))
5719 (home-page "https://github.com/hhatto/autopep8")
5720 (synopsis "Format Python code according to the PEP 8 style guide")
5721 (description
5722 "@code{autopep8} automatically formats Python code to conform to
5723 the PEP 8 style guide. It uses the pycodestyle utility to determine
5724 what parts of the code needs to be formatted. @code{autopep8} is
5725 capable of fixing most of the formatting issues that can be reported
5726 by pycodestyle.")
5727 (license (license:non-copyleft
5728 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5729
5730 (define-public python2-autopep8
5731 (package-with-python2 python-autopep8))
5732
5733 (define-public python-distlib
5734 (package
5735 (name "python-distlib")
5736 (version "0.3.0")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "distlib" version ".zip"))
5741 (sha256
5742 (base32
5743 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5744 (build-system python-build-system)
5745 (arguments
5746 `(#:phases
5747 (modify-phases %standard-phases
5748 (add-before 'build 'no-/bin/sh
5749 (lambda _
5750 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5751 (("/bin/sh") (which "sh")))
5752 #t))
5753 (add-before 'check 'prepare-test-env
5754 (lambda _
5755 (setenv "HOME" "/tmp")
5756 ;; NOTE: Any value works, the variable just has to be present.
5757 (setenv "SKIP_ONLINE" "1")
5758 #t)))))
5759 (native-inputs `(("unzip" ,unzip)))
5760 (home-page "https://bitbucket.org/pypa/distlib")
5761 (synopsis "Distribution utilities")
5762 (description "Distlib is a library which implements low-level functions that
5763 relate to packaging and distribution of Python software. It is intended to be
5764 used as the basis for third-party packaging tools.")
5765 (license license:psfl)))
5766
5767 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5768 (define-public python-distlib/next
5769 (package
5770 (inherit python-distlib)
5771 (version "0.3.1")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (pypi-uri "distlib" version ".zip"))
5776 (sha256
5777 (base32
5778 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5779
5780 (define-public python-distutils-extra
5781 (package
5782 (name "python-distutils-extra")
5783 (version "2.38")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5788 version "/+download/python-distutils-extra-"
5789 version ".tar.gz"))
5790 (sha256
5791 (base32
5792 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5793 (build-system python-build-system)
5794 (home-page "https://launchpad.net/python-distutils-extra/")
5795 (synopsis "Enhancements to Python's distutils")
5796 (description
5797 "The python-distutils-extra module enables you to easily integrate
5798 gettext support, themed icons, and scrollkeeper-based documentation into
5799 Python's distutils.")
5800 (license license:gpl2)))
5801
5802 (define-public python2-distutils-extra
5803 (package-with-python2 python-distutils-extra))
5804
5805 (define-public python2-elib.intl
5806 (package
5807 (name "python2-elib.intl")
5808 (version "0.0.3")
5809 (source
5810 (origin
5811 ;; This project doesn't tag releases or publish tarballs, so we take
5812 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5813 (method git-fetch)
5814 (uri (git-reference
5815 (url "https://github.com/dieterv/elib.intl")
5816 (commit "d09997cfef")))
5817 (file-name (string-append name "-" version "-checkout"))
5818 (sha256
5819 (base32
5820 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5821 (build-system python-build-system)
5822 (arguments
5823 ;; incompatible with Python 3 (exception syntax)
5824 `(#:python ,python-2
5825 #:tests? #f))
5826 (home-page "https://github.com/dieterv/elib.intl")
5827 (synopsis "Enhanced internationalization for Python")
5828 (description
5829 "The elib.intl module provides enhanced internationalization (I18N)
5830 services for your Python modules and applications.")
5831 (license license:lgpl3+)))
5832
5833 (define-public python-olefile
5834 (package
5835 (name "python-olefile")
5836 (version "0.46")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5841 "download/v" version "/olefile-" version ".tar.gz"))
5842 (file-name (string-append name "-" version ".tar.gz"))
5843 (sha256
5844 (base32
5845 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5846 (build-system python-build-system)
5847 (home-page "https://www.decalage.info/python/olefileio")
5848 (synopsis "Read and write Microsoft OLE2 files.")
5849 (description
5850 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5851 Storage or Compound Document, Microsoft Office). It is an improved version of
5852 the OleFileIO module from PIL, the Python Image Library.")
5853 (license license:bsd-3)))
5854
5855 (define-public python2-olefile
5856 (package-with-python2 python-olefile))
5857
5858 (define-public python-pikepdf
5859 (package
5860 (name "python-pikepdf")
5861 (version "2.9.0")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (pypi-uri "pikepdf" version))
5866 (sha256
5867 (base32 "1dx84gvxf8js5988b20dwpg0xd7by2bczjlrdh3cpppwaaxx5nx9"))))
5868 (build-system python-build-system)
5869 (arguments
5870 `(#:tests? #false)) ;require python-xmp-toolkit
5871 (native-inputs
5872 `(("pybind11" ,pybind11)
5873 ("python-setuptools" ,python-setuptools)
5874 ("python-setuptools-scm" ,python-setuptools-scm/next)
5875 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5876 ("python-toml" ,python-toml)
5877 ("python-wheel" ,python-wheel)))
5878 (inputs
5879 `(("qpdf" ,qpdf)))
5880 (propagated-inputs
5881 `(("python-lxml" ,python-lxml)
5882 ("python-pillow" ,python-pillow)))
5883 (home-page "https://github.com/pikepdf/pikepdf")
5884 (synopsis "Read and write PDFs with Python")
5885 (description
5886 "pikepdf is a Python library for reading and writing PDF files.")
5887 (license license:mpl2.0)))
5888
5889 (define-public python-pillow
5890 (package
5891 (name "python-pillow")
5892 (version "8.1.1")
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "Pillow" version))
5897 (sha256
5898 (base32
5899 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5900 (build-system python-build-system)
5901 (native-inputs
5902 `(("python-pytest" ,python-pytest)))
5903 (inputs
5904 `(("freetype" ,freetype)
5905 ("lcms" ,lcms)
5906 ("libjpeg" ,libjpeg-turbo)
5907 ("libtiff" ,libtiff)
5908 ("libwebp" ,libwebp)
5909 ("openjpeg" ,openjpeg)
5910 ("zlib" ,zlib)))
5911 (propagated-inputs
5912 `(("python-olefile" ,python-olefile)))
5913 (arguments
5914 `(#:phases
5915 (modify-phases %standard-phases
5916 (add-after 'unpack 'patch-ldconfig
5917 (lambda _
5918 (substitute* "setup.py"
5919 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5920 (replace 'check
5921 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5922 (if tests?
5923 (begin
5924 (setenv "HOME" (getcwd))
5925 ;; Make installed package available for running the tests.
5926 (add-installed-pythonpath inputs outputs)
5927 (invoke "python" "selftest.py" "--installed")
5928 (invoke "python" "-m" "pytest" "-vv"))
5929 #t))))))
5930 (home-page "https://python-pillow.org")
5931 (synopsis "Fork of the Python Imaging Library")
5932 (description
5933 "The Python Imaging Library adds image processing capabilities to your
5934 Python interpreter. This library provides extensive file format support, an
5935 efficient internal representation, and fairly powerful image processing
5936 capabilities. The core image library is designed for fast access to data
5937 stored in a few basic pixel formats. It should provide a solid foundation for
5938 a general image processing tool.")
5939 (properties `((python2-variant . ,(delay python2-pillow))))
5940 (license (license:x11-style
5941 "http://www.pythonware.com/products/pil/license.htm"
5942 "The PIL Software License"))))
5943
5944 (define-public python2-pillow
5945 (package-with-python2
5946 (package
5947 (inherit (strip-python2-variant python-pillow))
5948 ;; Version 6 is the last series with Python 2 support.
5949 (version "6.2.2")
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (pypi-uri "Pillow" version))
5954 (sha256
5955 (base32
5956 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5957
5958 (define-public python-pillow-2.9
5959 (package
5960 (inherit python-pillow)
5961 (version "2.9.0")
5962 (source
5963 (origin
5964 (method url-fetch)
5965 (uri (pypi-uri "Pillow" version))
5966 (sha256
5967 (base32
5968 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5969 (arguments
5970 (substitute-keyword-arguments (package-arguments python-pillow)
5971 ((#:tests? _ #f) #f)))
5972 (properties '((hidden? #t)))))
5973
5974 (define-public python-pillow-simd
5975 (package
5976 (inherit python-pillow)
5977 (name "python-pillow-simd")
5978 (version "7.1.2")
5979 ;; The PyPI tarball does not include test files.
5980 (source
5981 (origin
5982 (method git-fetch)
5983 (uri (git-reference
5984 (url "https://github.com/uploadcare/pillow-simd")
5985 (commit version)))
5986 (file-name (git-file-name name version))
5987 (sha256
5988 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5989 (arguments
5990 (substitute-keyword-arguments
5991 (package-arguments python-pillow)
5992 ((#:phases phases)
5993 `(modify-phases ,phases
5994 (add-after 'unpack 'make-tests-writable
5995 (lambda _
5996 (for-each make-file-writable (find-files "Tests"))
5997 #t))))))
5998 (inputs
5999 `(("libraqm" ,libraqm)
6000 ("libimagequant" ,libimagequant)
6001 ,@(package-inputs python-pillow)))
6002 (home-page "https://github.com/uploadcare/pillow-simd")
6003 (synopsis "Fork of the Python Imaging Library (Pillow)")
6004 (description "This package is a fork of Pillow which adds support for SIMD
6005 parallelism.")))
6006
6007 (define-public python-roifile
6008 (package
6009 (name "python-roifile")
6010 (version "2020.5.28")
6011 (source
6012 (origin
6013 (method url-fetch)
6014 (uri (pypi-uri "roifile" version))
6015 (sha256
6016 (base32
6017 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6018 (build-system python-build-system)
6019 (arguments `(#:tests? #f)) ; there are none
6020 (propagated-inputs
6021 `(("python-numpy" ,python-numpy)))
6022 (home-page "https://www.lfd.uci.edu/~gohlke/")
6023 (synopsis "Read and write ImageJ ROI format")
6024 (description "Roifile is a Python library to read, write, create, and plot
6025 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6026 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6027 (license license:bsd-3)))
6028
6029 (define-public python-tifffile
6030 (package
6031 (name "python-tifffile")
6032 (version "2020.6.3")
6033 (source
6034 (origin
6035 (method url-fetch)
6036 (uri (pypi-uri "tifffile" version))
6037 (sha256
6038 (base32
6039 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6040 (build-system python-build-system)
6041 ;; Tests require lfdfiles, which depends on tifffile
6042 (arguments `(#:tests? #f))
6043 (propagated-inputs
6044 `(("python-numpy" ,python-numpy)
6045 ;;("python-lfdfiles" ,python-lfdfiles)
6046 ("python-roifile" ,python-roifile)))
6047 (home-page "https://www.lfd.uci.edu/~gohlke/")
6048 (synopsis "Read and write TIFF(r) files")
6049 (description "This package lets you read image and metadata from many
6050 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6051 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6052 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6053 (license license:bsd-3)))
6054
6055 (define-public python-lfdfiles
6056 (package
6057 (name "python-lfdfiles")
6058 (version "2020.1.1")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (pypi-uri "lfdfiles" version))
6063 (sha256
6064 (base32
6065 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6066 (build-system python-build-system)
6067 (propagated-inputs
6068 `(("python-click" ,python-click)
6069 ("python-numpy" ,python-numpy)
6070 ("python-tifffile" ,python-tifffile)))
6071 (home-page "https://www.lfd.uci.edu/~gohlke/")
6072 (synopsis "Work with LFD data files")
6073 (description
6074 "Lfdfiles is a Python library and console script for reading, writing,
6075 converting, and viewing many of the proprietary file formats used to store
6076 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6077 (license license:bsd-3)))
6078
6079 (define-public python-imageio
6080 (package
6081 (name "python-imageio")
6082 (version "2.8.0")
6083 (source
6084 (origin
6085 (method url-fetch)
6086 (uri (pypi-uri "imageio" version))
6087 (sha256
6088 (base32
6089 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6090 (build-system python-build-system)
6091 (arguments
6092 `(#:tests? #f ; many tests require online data
6093 #:phases
6094 (modify-phases %standard-phases
6095 (replace 'check
6096 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6097 (if tests?
6098 (begin
6099 ;; Make installed package available for running the tests.
6100 (add-installed-pythonpath inputs outputs)
6101 (invoke "pytest" "-vv"))
6102 #t))))))
6103 (propagated-inputs
6104 `(("python-numpy" ,python-numpy)
6105 ("python-pillow" ,python-pillow)
6106 ("python-psutil" ,python-psutil)))
6107 (native-inputs
6108 `(("python-pytest" ,python-pytest)))
6109 (home-page "https://imageio.github.io/")
6110 (synopsis "Library for reading and writing a wide range of image data")
6111 (description
6112 "Imageio is a Python library that provides an easy interface to read and
6113 write a wide range of image data, including animated images, video, volumetric
6114 data, and scientific formats.")
6115 (license license:bsd-2)))
6116
6117 (define-public python-pycparser
6118 (package
6119 (name "python-pycparser")
6120 (version "2.20")
6121 (source
6122 (origin
6123 (method url-fetch)
6124 (uri (pypi-uri "pycparser" version))
6125 (sha256
6126 (base32
6127 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6128 (outputs '("out" "doc"))
6129 (build-system python-build-system)
6130 (native-inputs
6131 `(("pkg-config" ,pkg-config)))
6132 (arguments
6133 `(#:phases
6134 (modify-phases %standard-phases
6135 (replace 'check
6136 (lambda _
6137 (with-directory-excursion "tests"
6138 (invoke "python" "all_tests.py"))
6139 #t))
6140 (add-after 'install 'install-doc
6141 (lambda* (#:key outputs #:allow-other-keys)
6142 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6143 (doc (string-append data "/doc/" ,name "-" ,version))
6144 (examples (string-append doc "/examples")))
6145 (mkdir-p examples)
6146 (for-each (lambda (file)
6147 (copy-file (string-append "." file)
6148 (string-append doc file)))
6149 '("/README.rst" "/CHANGES" "/LICENSE"))
6150 (copy-recursively "examples" examples)
6151 #t))))))
6152 (home-page "https://github.com/eliben/pycparser")
6153 (synopsis "C parser in Python")
6154 (description
6155 "Pycparser is a complete parser of the C language, written in pure Python
6156 using the PLY parsing library. It parses C code into an AST and can serve as
6157 a front-end for C compilers or analysis tools.")
6158 (license license:bsd-3)))
6159
6160 (define-public python2-pycparser
6161 (package-with-python2 python-pycparser))
6162
6163 (define-public python-xlsxwriter
6164 (package
6165 (name "python-xlsxwriter")
6166 (version "1.3.7")
6167 (source
6168 (origin
6169 ;; There are no tests in the PyPI tarball.
6170 (method git-fetch)
6171 (uri (git-reference
6172 (url "https://github.com/jmcnamara/XlsxWriter")
6173 (commit (string-append "RELEASE_" version))))
6174 (file-name (git-file-name name version))
6175 (sha256
6176 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6177 (build-system python-build-system)
6178 (home-page "https://github.com/jmcnamara/XlsxWriter")
6179 (synopsis "Python module for creating Excel XLSX files")
6180 (description
6181 "XlsxWriter is a Python module that can be used to write text, numbers,
6182 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6183 (license license:bsd-2)))
6184
6185 (define-public python-pywavelets
6186 (package
6187 (name "python-pywavelets")
6188 (version "1.1.1")
6189 (home-page "https://github.com/PyWavelets/pywt")
6190 (source (origin
6191 (method url-fetch)
6192 (uri (pypi-uri "PyWavelets" version))
6193 (sha256
6194 (base32
6195 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6196 (build-system python-build-system)
6197 (arguments
6198 '(#:modules ((ice-9 ftw)
6199 (srfi srfi-1)
6200 (srfi srfi-26)
6201 (guix build utils)
6202 (guix build python-build-system))
6203 #:phases
6204 (modify-phases %standard-phases
6205 (replace 'check
6206 (lambda _
6207 (let ((cwd (getcwd))
6208 (libdir (find (cut string-prefix? "lib." <>)
6209 (scandir "build"))))
6210 (with-directory-excursion (string-append cwd "/build/" libdir)
6211 (invoke "pytest" "-vv"))))))))
6212 (native-inputs
6213 `(("python-matplotlib" ,python-matplotlib) ;for tests
6214 ("python-pytest" ,python-pytest)))
6215 (propagated-inputs
6216 `(("python-numpy" ,python-numpy)))
6217 (synopsis "Wavelet transforms in Python")
6218 (description
6219 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6220 mathematical basis functions that are localized in both time and frequency.
6221 Wavelet transforms are time-frequency transforms employing wavelets. They are
6222 similar to Fourier transforms, the difference being that Fourier transforms are
6223 localized only in frequency instead of in time and frequency.")
6224 (license license:expat)))
6225
6226 (define-public python-pywal
6227 (package
6228 (name "python-pywal")
6229 (version "3.3.0")
6230 (source
6231 (origin
6232 (method git-fetch)
6233 (uri (git-reference
6234 (url "https://github.com/dylanaraps/pywal")
6235 (commit version)))
6236 (file-name (git-file-name name version))
6237 (sha256
6238 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6239 (build-system python-build-system)
6240 (arguments
6241 `(#:phases
6242 (modify-phases %standard-phases
6243 (add-before 'check 'fix-home-directory
6244 (lambda _
6245 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6246 (setenv "HOME" "/tmp")
6247 #t)))))
6248 (inputs
6249 `(("imagemagick" ,imagemagick)))
6250 (home-page "https://github.com/dylanaraps/pywal")
6251 (synopsis "Color palette generator and applicator")
6252 (description
6253 "Pywal is a tool that generates a color palette from the dominant colors
6254 in an image. It then applies the colors system-wide and on-the-fly in all of
6255 your favourite programs.")
6256 (license license:expat)))
6257
6258 (define-public python-pywinrm
6259 (package
6260 (name "python-pywinrm")
6261 (version "0.4.1")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "pywinrm" version))
6266 (sha256
6267 (base32
6268 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6269 (build-system python-build-system)
6270 (propagated-inputs
6271 `(("python-six" ,python-six)
6272 ("python-requests_ntlm" ,python-requests_ntlm)
6273 ("python-xmltodict" ,python-xmltodict)
6274 ("python-kerberos" ,python-kerberos)))
6275 (native-inputs
6276 `(("python-mock" ,python-mock)
6277 ("python-pytest" ,python-pytest)))
6278 (home-page "https://github.com/diyan/pywinrm/")
6279 (synopsis
6280 "Python library for Windows Remote Management (WinRM)")
6281 (description
6282 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6283 service. It allows you to invoke commands on target Windows machines from
6284 any machine that can run Python.")
6285 (license license:expat)))
6286
6287 (define-public python-xcffib
6288 (package
6289 (name "python-xcffib")
6290 (version "0.6.0")
6291 (source
6292 (origin
6293 (method url-fetch)
6294 (uri (pypi-uri "xcffib" version))
6295 (sha256
6296 (base32
6297 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6298 (build-system python-build-system)
6299 (inputs
6300 `(("libxcb" ,libxcb)))
6301 (propagated-inputs
6302 `(("python-cffi" ,python-cffi) ; used at run time
6303 ("python-six" ,python-six)))
6304 (arguments
6305 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6306 #:tests? #f
6307 #:phases
6308 (modify-phases %standard-phases
6309 (add-after 'unpack 'fix-libxcb-path
6310 (lambda* (#:key inputs #:allow-other-keys)
6311 (let ((libxcb (assoc-ref inputs "libxcb")))
6312 (substitute* '("xcffib/__init__.py")
6313 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6314 #t)))
6315 (add-after 'install 'install-doc
6316 (lambda* (#:key outputs #:allow-other-keys)
6317 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6318 "/doc/" ,name "-" ,version)))
6319 (mkdir-p doc)
6320 (copy-file "README.md"
6321 (string-append doc "/README.md"))
6322 #t))))))
6323 (home-page "https://github.com/tych0/xcffib")
6324 (synopsis "XCB Python bindings")
6325 (description
6326 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6327 support for Python 3 and PyPy. It is based on cffi.")
6328 (license license:expat)))
6329
6330 (define-public python2-xcffib
6331 (package-with-python2 python-xcffib))
6332
6333 (define-public python-cairocffi
6334 (package
6335 (name "python-cairocffi")
6336 (version "1.2.0")
6337 (source
6338 (origin
6339 ;; The PyPI archive does not include the documentation, so use Git.
6340 (method git-fetch)
6341 (uri (git-reference
6342 (url "https://github.com/Kozea/cairocffi")
6343 (commit (string-append "v" version))))
6344 (file-name (git-file-name name version))
6345 (sha256
6346 (base32
6347 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6348 (build-system python-build-system)
6349 (outputs '("out" "doc"))
6350 (inputs
6351 `(("glib" ,glib)
6352 ("gtk+" ,gtk+)
6353 ("gdk-pixbuf" ,gdk-pixbuf)
6354 ("cairo" ,cairo)))
6355 (native-inputs
6356 `(("python-numpy" ,python-numpy)
6357 ("python-pytest" ,python-pytest)
6358 ("python-pytest-cov" ,python-pytest-cov)
6359 ("python-pytest-runner" ,python-pytest-runner)
6360 ("python-sphinx" ,python-sphinx)
6361 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6362 (propagated-inputs
6363 `(("python-xcffib" ,python-xcffib))) ; used at run time
6364 (arguments
6365 `(#:phases
6366 (modify-phases %standard-phases
6367 (add-after 'unpack 'patch-paths
6368 (lambda* (#:key inputs #:allow-other-keys)
6369 (substitute* "cairocffi/__init__.py"
6370 ;; Hack the dynamic library loading mechanism.
6371 (("find_library\\(library_name\\)")
6372 "\"found\"")
6373 (("filenames = \\(library_filename,\\) \\+ filenames")
6374 "pass")
6375 (("libcairo.so.2")
6376 (string-append (assoc-ref inputs "cairo")
6377 "/lib/libcairo.so.2")))
6378 (substitute* "cairocffi/pixbuf.py"
6379 (("libgdk_pixbuf-2.0.so.0")
6380 (string-append (assoc-ref inputs "gdk-pixbuf")
6381 "/lib/libgdk_pixbuf-2.0.so.0"))
6382 (("libgobject-2.0.so.0")
6383 (string-append (assoc-ref inputs "glib")
6384 "/lib/libgobject-2.0.so.0"))
6385 (("libglib-2.0.so.0")
6386 (string-append (assoc-ref inputs "glib")
6387 "/lib/libglib-2.0.so.0"))
6388 (("libgdk-3.so.0")
6389 (string-append (assoc-ref inputs "gtk+")
6390 "/lib/libgdk-3.so.0")))
6391 #t))
6392 (add-after 'unpack 'disable-linters
6393 ;; Their check fails; none of our business.
6394 (lambda _
6395 (substitute* "setup.cfg"
6396 ((".*pytest-flake8.*") "")
6397 ((".*pytest-isort.*") "")
6398 (("--flake8") "")
6399 (("--isort") ""))
6400 #t))
6401 (add-after 'install 'install-doc
6402 (lambda* (#:key inputs outputs #:allow-other-keys)
6403 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6404 (doc (string-append data "/doc/" ,name "-" ,version))
6405 (html (string-append doc "/html")))
6406 (setenv "LD_LIBRARY_PATH"
6407 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6408 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6409 (setenv "LANG" "en_US.UTF-8")
6410 (mkdir-p html)
6411 (for-each (lambda (file)
6412 (copy-file (string-append "." file)
6413 (string-append doc file)))
6414 '("/README.rst" "/NEWS.rst"))
6415 (system* "python" "setup.py" "build_sphinx")
6416 (copy-recursively "docs/_build/html" html)
6417 #t))))))
6418 (home-page "https://github.com/Kozea/cairocffi")
6419 (synopsis "Python bindings and object-oriented API for Cairo")
6420 (description
6421 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6422 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6423 graphics library with support for multiple backends including image buffers,
6424 PNG, PostScript, PDF, and SVG file output.")
6425 (license license:bsd-3)))
6426
6427 (define-public python2-cairocffi
6428 (package-with-python2 python-cairocffi))
6429
6430 (define-public python-decorator
6431 (package
6432 (name "python-decorator")
6433 (version "4.3.0")
6434 (source
6435 (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "decorator" version))
6438 (sha256
6439 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6440 (build-system python-build-system)
6441 (home-page "https://pypi.org/project/decorator/")
6442 (synopsis "Python module to simplify usage of decorators")
6443 (description
6444 "The aim of the decorator module is to simplify the usage of decorators
6445 for the average programmer, and to popularize decorators usage giving examples
6446 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6447 etc. The core of this module is a decorator factory.")
6448 (license license:expat)))
6449
6450 (define-public python2-decorator
6451 (package-with-python2 python-decorator))
6452
6453 (define-public python-drmaa
6454 (package
6455 (name "python-drmaa")
6456 (version "0.7.7")
6457 (source
6458 (origin
6459 (method url-fetch)
6460 (uri (pypi-uri "drmaa" version))
6461 (sha256
6462 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6463 (build-system python-build-system)
6464 ;; The test suite requires libdrmaa which is provided by the cluster
6465 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6466 ;; should be set to the path of the libdrmaa library.
6467 (arguments '(#:tests? #f))
6468 (native-inputs
6469 `(("python-nose" ,python-nose)))
6470 (home-page "https://pypi.org/project/drmaa/")
6471 (synopsis "Python bindings for the DRMAA library")
6472 (description
6473 "A Python package for Distributed Resource Management (DRM) job
6474 submission and control. This package is an implementation of the DRMAA 1.0
6475 Python language binding specification.")
6476 (license license:bsd-3)))
6477
6478 (define-public python2-drmaa
6479 (package-with-python2 python-drmaa))
6480
6481 (define-public python-grako
6482 (package
6483 (name "python-grako")
6484 (version "3.99.9")
6485 (source
6486 (origin
6487 (method url-fetch)
6488 (uri
6489 (pypi-uri "grako" version ".zip"))
6490 (sha256
6491 (base32
6492 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6493 (build-system python-build-system)
6494 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6495 (native-inputs
6496 `(("unzip" ,unzip)
6497 ("python-pytest" ,python-pytest)
6498 ("python-pytest-runner" ,python-pytest-runner)))
6499 (home-page "https://bitbucket.org/neogeny/grako")
6500 (synopsis "EBNF parser generator")
6501 (description
6502 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6503 memoizing PEG/Packrat parser in Python.")
6504 (license license:bsd-3)))
6505
6506 (define-public python2-grako
6507 (package-with-python2 python-grako))
6508
6509 (define-public python-grandalf
6510 (package
6511 (name "python-grandalf")
6512 (version "0.7")
6513 (source
6514 (origin
6515 ;; There's no source tarball on PyPI.
6516 (method git-fetch)
6517 (uri (git-reference
6518 (url "https://github.com/bdcht/grandalf")
6519 (commit (string-append "v" version))))
6520 (file-name (git-file-name name version))
6521 (sha256
6522 (base32
6523 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6524 (build-system python-build-system)
6525 (arguments
6526 '(#:phases
6527 (modify-phases %standard-phases
6528 (replace 'check
6529 (lambda _
6530 (invoke "python" "setup.py" "pytest"))))))
6531 (native-inputs
6532 `(("python-pytest" ,python-pytest)
6533 ("python-pytest-runner" ,python-pytest-runner)))
6534 (propagated-inputs
6535 `(("python-numpy" ,python-numpy)
6536 ("python-ply" ,python-ply)))
6537 (home-page "https://github.com/bdcht/grandalf")
6538 (synopsis "Graph and drawing algorithms framework")
6539 (description
6540 "Grandalf is a Python package made for experimentations with graphs
6541 drawing algorithms. It is written in pure Python, and currently implements
6542 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6543 minimization approach. While not as fast or featured as graphviz or other
6544 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6545 than thousands of nodes, while keeping the source code simple enough to tweak
6546 and hack any part of it for experimental purpose. With a total of about 1500
6547 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6548 in less than 600 lines. The energy minimization approach is comprised of only
6549 250 lines!
6550
6551 Grandalf does only 2 not-so-simple things:
6552 @itemize
6553 @item computing the nodes (x,y) coordinates (based on provided nodes
6554 dimensions, and a chosen layout)
6555 @item routing the edges with lines or nurbs
6556 @end itemize
6557
6558 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6559 will help you find where to draw things like nodes and edges, but it’s up to
6560 you to actually draw things with your favorite toolkit.")
6561 ;; The user can choose either license.
6562 (license (list license:gpl2 license:epl1.0))))
6563
6564 (define-public python-gridmap
6565 (package
6566 (name "python-gridmap")
6567 (version "0.14.0")
6568 (source
6569 (origin
6570 (method git-fetch)
6571 (uri (git-reference
6572 (url "https://github.com/pygridtools/gridmap")
6573 (commit (string-append "v" version))))
6574 (file-name (git-file-name name version))
6575 (sha256
6576 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6577 (build-system python-build-system)
6578 (arguments
6579 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6580 (propagated-inputs
6581 `(("python-psutil" ,python-psutil)
6582 ("python-drmaa" ,python-drmaa)
6583 ("python-pyzmq" ,python-pyzmq)))
6584 (home-page "https://github.com/pygridtools/gridmap")
6585 (synopsis "Create jobs on a cluster directly from Python")
6586 (description
6587 "Gridmap is a Python package to allow you to easily create jobs on the
6588 cluster directly from Python. You can directly map Python functions onto the
6589 cluster without needing to write any wrapper code yourself.")
6590 (license license:gpl3+)))
6591
6592 (define-public python2-gridmap
6593 (package-with-python2 python-gridmap))
6594
6595 (define-public python-honcho
6596 (package
6597 (name "python-honcho")
6598 (version "1.0.1")
6599 (source
6600 (origin
6601 (method git-fetch)
6602 (uri (git-reference
6603 (url "https://github.com/nickstenning/honcho")
6604 (commit (string-append "v" version))))
6605 (file-name (git-file-name name version))
6606 (sha256
6607 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6608 (build-system python-build-system)
6609 (native-inputs
6610 `(("python-pytest" ,python-pytest)
6611 ("python-mock" ,python-mock)
6612 ("python-tox" ,python-tox)
6613 ("which" ,which))) ;for tests
6614 (propagated-inputs
6615 `(("python-jinja2" ,python-jinja2)))
6616 (arguments
6617 `(#:phases
6618 (modify-phases %standard-phases
6619 (delete 'check)
6620 (add-after 'install 'check
6621 (lambda* (#:key outputs inputs #:allow-other-keys)
6622 ;; fix honcho path in testsuite
6623 (substitute* "tests/conftest.py"
6624 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6625 "/bin/honcho" "'")))
6626 ;; It's easier to run tests after install.
6627 ;; Make installed package available for running the tests
6628 (add-installed-pythonpath inputs outputs)
6629 (invoke "py.test" "-v"))))))
6630 (home-page "https://github.com/nickstenning/honcho")
6631 (synopsis "Manage Procfile-based applications")
6632 (description
6633 "A Procfile is a file which describes how to run an application
6634 consisting of several processes. honcho starts all listed processes.
6635 The output of all running processes is collected by honcho and
6636 displayed.")
6637 (license license:expat)))
6638
6639 (define-public python-pexpect
6640 (package
6641 (name "python-pexpect")
6642 (version "4.8.0")
6643 (source
6644 (origin
6645 (method url-fetch)
6646 (uri (pypi-uri "pexpect" version))
6647 (sha256
6648 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6649 (build-system python-build-system)
6650 (arguments
6651 `(#:phases
6652 (modify-phases %standard-phases
6653 (add-before 'check 'prepare-tests
6654 (lambda _
6655 (substitute* (find-files "tests")
6656 (("/bin/ls") (which "ls"))
6657 (("/bin/echo") (which "echo"))
6658 (("/bin/which") (which "which"))
6659 ;; Many tests try to use the /bin directory which
6660 ;; is not present in the build environment.
6661 ;; Use one that's non-empty and unlikely to change.
6662 (("/bin'") "/dev'")
6663 ;; Disable failing test. See upstream bug report
6664 ;; https://github.com/pexpect/pexpect/issues/568
6665 (("def test_bash") "def _test_bash"))
6666 ;; XXX: Socket connection test gets "Connection reset by peer".
6667 ;; Why does it not work? Delete for now.
6668 (delete-file "tests/test_socket.py")
6669 #t))
6670 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6671 (native-inputs
6672 `(("python-nose" ,python-nose)
6673 ("python-pytest" ,python-pytest)
6674 ("man-db" ,man-db)
6675 ("which" ,which)
6676 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6677 (propagated-inputs
6678 `(("python-ptyprocess" ,python-ptyprocess)))
6679 (home-page "http://pexpect.readthedocs.org/")
6680 (synopsis "Controlling interactive console applications")
6681 (description
6682 "Pexpect is a pure Python module for spawning child applications;
6683 controlling them; and responding to expected patterns in their output.
6684 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6685 child application and control it as if a human were typing commands.")
6686 (license license:isc)))
6687
6688 (define-public python2-pexpect
6689 (package-with-python2 python-pexpect))
6690
6691 (define-public python-setuptools-scm
6692 (package
6693 (name "python-setuptools-scm")
6694 (version "3.4.3")
6695 (source (origin
6696 (method url-fetch)
6697 (uri (pypi-uri "setuptools_scm" version))
6698 (sha256
6699 (base32
6700 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6701 (build-system python-build-system)
6702 (home-page "https://github.com/pypa/setuptools_scm/")
6703 (synopsis "Manage Python package versions in SCM metadata")
6704 (description
6705 "Setuptools_scm handles managing your Python package versions in
6706 @dfn{software configuration management} (SCM) metadata instead of declaring
6707 them as the version argument or in a SCM managed file.")
6708 (license license:expat)))
6709
6710 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6711 (define-public python-setuptools-scm/next
6712 (package
6713 (inherit python-setuptools-scm)
6714 (version "5.0.1")
6715 (source
6716 (origin
6717 (method url-fetch)
6718 (uri (pypi-uri "setuptools_scm" version))
6719 (sha256
6720 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6721
6722 (define-public python2-setuptools-scm
6723 (package-with-python2 python-setuptools-scm))
6724
6725 (define-public python-sexpdata
6726 (package
6727 (name "python-sexpdata")
6728 (version "0.0.3")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (pypi-uri "sexpdata" version))
6733 (sha256
6734 (base32
6735 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6736 (build-system python-build-system)
6737 (home-page "https://github.com/jd-boyd/sexpdata")
6738 (synopsis "S-expression parser for Python")
6739 (description
6740 "Sexpdata is an S-expression parser/serializer. It has load and dump
6741 functions like pickle, json or PyYAML module.")
6742 (license license:bsd-3)))
6743
6744 (define-public python-pathlib2
6745 (package
6746 (name "python-pathlib2")
6747 (version "2.3.3")
6748 (source
6749 (origin
6750 (method url-fetch)
6751 (uri (pypi-uri "pathlib2" version))
6752 (sha256
6753 (base32
6754 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6755 (build-system python-build-system)
6756 (propagated-inputs
6757 `(("python-scandir" ,python-scandir)
6758 ("python-six" ,python-six)))
6759 (home-page "https://pypi.org/project/pathlib2/")
6760 (synopsis "Object-oriented file system paths")
6761 (description "The goal of pathlib2 is to provide a backport of the
6762 standard @code{pathlib} module which tracks the standard library module, so
6763 all the newest features of the standard @code{pathlib} can be used also on
6764 older Python versions.")
6765 (license license:expat)))
6766
6767 (define-public python-importlib-resources
6768 (package
6769 (name "python-importlib-resources")
6770 (version "3.0.0")
6771 (source
6772 (origin
6773 (method url-fetch)
6774 (uri (pypi-uri "importlib_resources" version))
6775 (sha256
6776 (base32
6777 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6778 (build-system python-build-system)
6779 (native-inputs
6780 `(("python-setuptools-scm" ,python-setuptools-scm)
6781 ("python-toml" ,python-toml)))
6782 (home-page "http://importlib-resources.readthedocs.io/")
6783 (synopsis "Read resources from Python packages")
6784 (description
6785 "@code{importlib_resources} is a backport of Python 3's standard library
6786 @code{importlib.resources} module for Python 2.7, and Python 3.")
6787 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6788 (license license:asl2.0)))
6789
6790 (define-public python2-importlib-resources
6791 (package
6792 (name "python2-importlib-resources")
6793 (version "1.0.2")
6794 (source (origin
6795 (method url-fetch)
6796 (uri (pypi-uri "importlib_resources" version))
6797 (sha256
6798 (base32
6799 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6800 (build-system python-build-system)
6801 (arguments
6802 `(#:python ,python-2
6803 #:phases (modify-phases %standard-phases
6804 ;; The build system tests for python-wheel, but it is
6805 ;; not required for Guix nor the test suite. Just drop
6806 ;; it to make bootstrapping pytest easier.
6807 (add-after 'unpack 'drop-wheel-dependency
6808 (lambda _
6809 (substitute* "setup.cfg"
6810 (("^[[:blank:]]+wheel")
6811 ""))
6812 #t)))))
6813 (propagated-inputs
6814 `(("python-pathlib2" ,python2-pathlib2)
6815 ("python-typing" ,python2-typing)))
6816 (home-page "https://gitlab.com/python-devs/importlib_resources")
6817 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6818 (description
6819 "This package provides an implementation of @code{importlib.resources}
6820 for older versions of Python.")
6821 (license license:asl2.0)))
6822
6823 ;; For importlib-metadata-bootstrap below.
6824 (define-public python2-importlib-resources-bootstrap
6825 (hidden-package
6826 (package/inherit
6827 python2-importlib-resources
6828 (name "python2-importlib-resources-bootstrap")
6829 (propagated-inputs
6830 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6831 ("python-typing" ,python2-typing))))))
6832
6833 (define-public python-importlib-metadata
6834 (package
6835 (name "python-importlib-metadata")
6836 (version "1.5.0")
6837 (source
6838 (origin
6839 (method url-fetch)
6840 (uri (pypi-uri "importlib_metadata" version))
6841 (sha256
6842 (base32
6843 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6844 (build-system python-build-system)
6845 (propagated-inputs
6846 `(("python-zipp" ,python-zipp)))
6847 (native-inputs
6848 `(("python-setuptools-scm" ,python-setuptools-scm)
6849 ("python-pyfakefs" ,python-pyfakefs)
6850 ("python-packaging" ,python-packaging)))
6851 (home-page "https://importlib-metadata.readthedocs.io/")
6852 (synopsis "Read metadata from Python packages")
6853 (description
6854 "@code{importlib_metadata} is a library which provides an API for
6855 accessing an installed Python package's metadata, such as its entry points or
6856 its top-level name. This functionality intends to replace most uses of
6857 @code{pkg_resources} entry point API and metadata API. Along with
6858 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6859 need to use the older and less efficient @code{pkg_resources} package.")
6860 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6861 (license license:asl2.0)))
6862
6863 (define-public python2-importlib-metadata
6864 (let ((base (package-with-python2 (strip-python2-variant
6865 python-importlib-metadata))))
6866 (package/inherit
6867 base
6868 (name "python2-importlib-metadata")
6869 (native-inputs
6870 `(("python-setuptools-scm" ,python2-setuptools-scm)
6871 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6872 ("python-packaging" ,python2-packaging-bootstrap)))
6873 (propagated-inputs
6874 `(("python-configparser" ,python2-configparser)
6875 ("python-contextlib2" ,python2-contextlib2)
6876 ("python-importlib-resources" ,python2-importlib-resources)
6877 ("python-pathlib2" ,python2-pathlib2)
6878 ,@(package-propagated-inputs base))))))
6879
6880 ;; This package is used by python2-pytest, and thus must not depend on it.
6881 (define-public python2-importlib-metadata-bootstrap
6882 (hidden-package
6883 (package/inherit
6884 python2-importlib-metadata
6885 (name "python2-importlib-metadata-bootstrap")
6886 (arguments
6887 `(#:tests? #f
6888 ,@(package-arguments python2-importlib-metadata)))
6889 (propagated-inputs
6890 `(("python-zipp" ,python2-zipp-bootstrap)
6891 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6892 ("python-configparser" ,python2-configparser)
6893 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6894 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6895
6896 (define-public python-importmagic
6897 (package
6898 (name "python-importmagic")
6899 (version "0.1.7")
6900 (source
6901 (origin
6902 (method url-fetch)
6903 (uri (pypi-uri "importmagic" version))
6904 (sha256
6905 (base32
6906 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6907 (build-system python-build-system)
6908 (home-page "https://github.com/alecthomas/importmagic")
6909 (synopsis "Library for adding, removing and managing Python imports")
6910 (description
6911 "Importmagic is a Python library for automatically managing imports by
6912 finding unresolved symbols in Python code and their corresponding imports.")
6913 (license license:bsd-3)))
6914
6915 (define-public python-inotify-simple
6916 (package
6917 (name "python-inotify-simple")
6918 (version "1.3.5")
6919 (source
6920 (origin
6921 (method git-fetch)
6922 (uri (git-reference
6923 (url "https://github.com/chrisjbillington/inotify_simple")
6924 (commit version)))
6925 (file-name (git-file-name name version))
6926 (sha256
6927 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6928 (build-system python-build-system)
6929 (home-page
6930 "https://github.com/chrisjbillington/inotify_simple")
6931 (synopsis "Simple wrapper around inotify library")
6932 (description
6933 "@code{inotify-simple} is a simple wrapper around inotify library.")
6934 (license license:bsd-3)))
6935
6936 (define-public python-jaraco-packaging
6937 (package
6938 (name "python-jaraco-packaging")
6939 (version "6.1")
6940 (source
6941 (origin
6942 (method url-fetch)
6943 (uri (pypi-uri "jaraco.packaging" version))
6944 (sha256
6945 (base32
6946 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6947 (build-system python-build-system)
6948 (propagated-inputs
6949 `(("python-pytest" ,python-pytest)
6950 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6951 ("python-pytest-flake8" ,python-pytest-flake8)
6952 ("python-rst.linker" ,python-rst.linker)
6953 ("python-setuptools" ,python-setuptools)
6954 ("python-setuptools-scm" ,python-setuptools-scm)
6955 ("python-six" ,python-six)
6956 ("python-sphinx" ,python-sphinx)))
6957 (home-page "https://github.com/jaraco/jaraco.packaging")
6958 (synopsis "Tools to supplement packaging Python releases")
6959 (description
6960 "This package provides various tools to supplement packaging Python
6961 releases.")
6962 (license license:expat)))
6963
6964 (define-public python-pathpy
6965 (package
6966 (name "python-pathpy")
6967 (version "11.5.1")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "path.py" version))
6972 (sha256
6973 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6974 (outputs '("out" "doc"))
6975 (build-system python-build-system)
6976 (propagated-inputs
6977 `(("python-appdirs" ,python-appdirs)
6978 ("python-importlib-metadata" ,python-importlib-metadata)))
6979 (native-inputs
6980 `(("python-setuptools-scm" ,python-setuptools-scm)
6981 ("python-sphinx" ,python-sphinx)
6982 ("python-rst.linker" ,python-rst.linker)
6983 ("python-pytest" ,python-pytest)
6984 ("python-pytest-runner" ,python-pytest-runner)
6985 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6986 (arguments
6987 `(#:phases
6988 (modify-phases %standard-phases
6989 (add-after 'build 'build-doc
6990 (lambda _
6991 (setenv "LANG" "en_US.UTF-8")
6992 (invoke "python" "setup.py" "build_sphinx")))
6993 (add-after 'install 'install-doc
6994 (lambda* (#:key outputs #:allow-other-keys)
6995 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6996 (doc (string-append data "/doc/" ,name "-" ,version))
6997 (html (string-append doc "/html")))
6998 (mkdir-p html)
6999 (for-each (lambda (file)
7000 (copy-file file (string-append doc "/" file)))
7001 '("README.rst" "CHANGES.rst"))
7002 (copy-recursively "build/sphinx/html" html)
7003 #t)))
7004 (replace 'check
7005 (lambda _
7006 ;; The import time test aborts if an import takes longer than
7007 ;; 100ms. It may very well take a little longer than that.
7008 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7009 (home-page "https://github.com/jaraco/path.py")
7010 (synopsis "Python module wrapper for built-in os.path")
7011 (description
7012 "@code{path.py} implements path objects as first-class entities, allowing
7013 common operations on files to be invoked on those path objects directly.")
7014 (license license:expat)))
7015
7016 (define-public python-simplegeneric
7017 (package
7018 (name "python-simplegeneric")
7019 (version "0.8.1")
7020 (source
7021 (origin
7022 (method url-fetch)
7023 (uri (pypi-uri "simplegeneric" version ".zip"))
7024 (sha256
7025 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7026 (build-system python-build-system)
7027 (native-inputs
7028 `(("unzip" ,unzip)))
7029 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7030 (synopsis "Python module for simple generic functions")
7031 (description
7032 "The simplegeneric module lets you define simple single-dispatch generic
7033 functions, akin to Python’s built-in generic functions like @code{len()},
7034 @code{iter()} and so on. However, instead of using specially-named methods,
7035 these generic functions use simple lookup tables, akin to those used by
7036 e.g. @code{pickle.dump()} and other generic functions found in the Python
7037 standard library.")
7038 (license license:zpl2.1)))
7039
7040 (define-public python2-simplegeneric
7041 (package-with-python2 python-simplegeneric))
7042
7043 (define-public python-ipython-genutils
7044 ;; TODO: This package is retired, check if can be removed, see description.
7045 (package
7046 (name "python-ipython-genutils")
7047 (version "0.1.0")
7048 (source
7049 (origin
7050 (method url-fetch)
7051 (uri (pypi-uri "ipython_genutils" version))
7052 (sha256
7053 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7054 (build-system python-build-system)
7055 (arguments `(#:tests? #f)) ; no tests
7056 (home-page "https://ipython.org")
7057 (synopsis "Vestigial utilities from IPython")
7058 (description
7059 "This package provides retired utilities from IPython. No packages
7060 outside IPython/Jupyter should depend on it.
7061
7062 This package shouldn't exist. It contains some common utilities shared by
7063 Jupyter and IPython projects during The Big Split. As soon as possible, those
7064 packages will remove their dependency on this, and this package will go
7065 away.")
7066 (license license:bsd-3)))
7067
7068 (define-public python2-ipython-genutils
7069 (package-with-python2 python-ipython-genutils))
7070
7071 (define-public python-ipyparallel
7072 (package
7073 (name "python-ipyparallel")
7074 (version "6.2.4")
7075 (source
7076 (origin
7077 (method url-fetch)
7078 (uri (pypi-uri "ipyparallel" version))
7079 (sha256
7080 (base32
7081 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7082 (build-system python-build-system)
7083 (arguments
7084 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7085 #:phases
7086 (modify-phases %standard-phases
7087 (add-before 'check 'prepare-for-tests
7088 (lambda _
7089 (setenv "HOME" (getcwd))
7090 #t)))))
7091 (propagated-inputs
7092 `(("python-dateutil" ,python-dateutil)
7093 ("python-decorator" ,python-decorator)
7094 ("python-ipykernel" ,python-ipykernel)
7095 ("python-ipython" ,python-ipython)
7096 ("python-ipython-genutils" ,python-ipython-genutils)
7097 ("python-jupyter-client" ,python-jupyter-client)
7098 ("python-pyzmq" ,python-pyzmq)
7099 ("python-tornado" ,python-tornado)
7100 ("python-traitlets" ,python-traitlets)))
7101 (native-inputs
7102 `(("python-ipython" ,python-ipython)
7103 ("python-mock" ,python-mock)
7104 ("python-nose" ,python-nose)
7105 ("python-pytest" ,python-pytest)
7106 ("python-pytest-cov" ,python-pytest-cov)
7107 ("python-testpath" ,python-testpath)))
7108 (home-page "https://ipython.org/")
7109 (synopsis "Interactive Parallel Computing with IPython")
7110 (description
7111 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7112 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7113 CLI scripts:
7114 @enumerate
7115 @item ipcluster - start/stop a cluster
7116 @item ipcontroller - start a scheduler
7117 @item ipengine - start an engine
7118 @end enumerate")
7119 (license license:bsd-3)))
7120
7121 (define-public python2-ipyparallel
7122 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7123 (package
7124 (inherit ipyparallel)
7125 (propagated-inputs
7126 `(("python2-futures" ,python2-futures)
7127 ,@(package-propagated-inputs ipyparallel))))))
7128
7129 (define-public python-ipython-cluster-helper
7130 (package
7131 (name "python-ipython-cluster-helper")
7132 (version "0.6.4")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "ipython-cluster-helper" version))
7137 (sha256
7138 (base32
7139 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7140 (modules '((guix build utils)))
7141 (snippet
7142 '(begin (substitute* "requirements.txt"
7143 (("ipython.*") "ipython\n"))
7144 #t))))
7145 (build-system python-build-system)
7146 (arguments
7147 `(#:tests? #f ; Test suite can't find IPython.
7148 #:phases
7149 (modify-phases %standard-phases
7150 (replace 'check
7151 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7152 (if tests?
7153 (begin
7154 (setenv "HOME" (getcwd))
7155 (add-installed-pythonpath inputs outputs)
7156 (invoke "python" "example/example.py" "--local"))
7157 #t))))))
7158 (propagated-inputs
7159 `(("python-ipyparallel" ,python-ipyparallel)
7160 ("python-ipython" ,python-ipython)
7161 ("python-netifaces" ,python-netifaces)
7162 ("python-pyzmq" ,python-pyzmq)
7163 ("python-setuptools" ,python-setuptools)
7164 ("python-six" ,python-six)))
7165 (home-page "https://github.com/roryk/ipython-cluster-helper")
7166 (synopsis
7167 "Simplify IPython cluster start up and use for multiple schedulers")
7168 (description
7169 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7170 profile, launches a cluster and returns a view. On program exit it shuts the
7171 cluster down and deletes the throwaway profile.")
7172 (license license:expat)))
7173
7174 (define-public python2-ipython-cluster-helper
7175 (package-with-python2 python-ipython-cluster-helper))
7176
7177 (define-public python-traitlets
7178 (package
7179 (name "python-traitlets")
7180 (version "4.3.3")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (pypi-uri "traitlets" version))
7185 (sha256
7186 (base32
7187 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7188 (build-system python-build-system)
7189 (arguments
7190 `(#:phases
7191 (modify-phases %standard-phases
7192 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7193 (propagated-inputs
7194 `(("python-ipython-genutils" ,python-ipython-genutils)
7195 ("python-decorator" ,python-decorator)))
7196 (native-inputs
7197 `(("python-pytest" ,python-pytest)))
7198 (properties `((python2-variant . ,(delay python2-traitlets))))
7199 (home-page "https://ipython.org")
7200 (synopsis "Configuration system for Python applications")
7201 (description
7202 "Traitlets is a framework that lets Python classes have attributes with
7203 type checking, dynamically calculated default values, and ‘on change’
7204 callbacks. The package also includes a mechanism to use traitlets for
7205 configuration, loading values from files or from command line arguments. This
7206 is a distinct layer on top of traitlets, so you can use traitlets in your code
7207 without using the configuration machinery.")
7208 (license license:bsd-3)))
7209
7210 (define-public python2-traitlets
7211 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7212 (package
7213 (inherit traitlets)
7214 (propagated-inputs
7215 `(("python2-enum34" ,python2-enum34)
7216 ,@(package-propagated-inputs traitlets))))))
7217
7218 (define-public python-jupyter-core
7219 (package
7220 (name "python-jupyter-core")
7221 (version "4.4.0")
7222 (source
7223 (origin
7224 (method url-fetch)
7225 (uri (string-append (pypi-uri "jupyter_core" version)))
7226 (sha256
7227 (base32
7228 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7229 (build-system python-build-system)
7230 ;; FIXME: not sure how to run the tests
7231 (arguments `(#:tests? #f))
7232 (propagated-inputs
7233 `(("python-traitlets" ,python-traitlets)))
7234 (home-page "https://jupyter.org/")
7235 (synopsis "Jupyter base package")
7236 (description
7237 "Jupyter core is the base package on which Jupyter projects rely.")
7238 (license license:bsd-3)))
7239
7240 (define-public python2-jupyter-core
7241 (package-with-python2 python-jupyter-core))
7242
7243 (define-public python-jupyter-client
7244 (package
7245 (name "python-jupyter-client")
7246 (version "5.2.4")
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "jupyter_client" version))
7251 (sha256
7252 (base32
7253 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7254 (build-system python-build-system)
7255 ;; Tests fail because of missing native python kernel which I assume is
7256 ;; provided by the ipython package, which we cannot use because it would
7257 ;; cause a dependency cycle.
7258 (arguments
7259 `(#:tests? #f
7260
7261 #:phases (modify-phases %standard-phases
7262 (add-after 'unpack 'set-tool-file-names
7263 (lambda* (#:key inputs #:allow-other-keys)
7264 (let ((iproute (assoc-ref inputs "iproute")))
7265 (substitute* "jupyter_client/localinterfaces.py"
7266 (("'ip'")
7267 (string-append "'" iproute "/sbin/ip'")))
7268 #t))))))
7269 (inputs
7270 `(("iproute" ,iproute)))
7271 (propagated-inputs
7272 `(("python-pyzmq" ,python-pyzmq)
7273 ("python-traitlets" ,python-traitlets)
7274 ("python-jupyter-core" ,python-jupyter-core)))
7275 (home-page "https://jupyter.org/")
7276 (synopsis "Jupyter protocol implementation and client libraries")
7277 (description
7278 "The @code{jupyter_client} package contains the reference implementation
7279 of the Jupyter protocol. It also provides client and kernel management APIs
7280 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7281 installing @code{kernelspec}s for use with Jupyter frontends.")
7282 (license license:bsd-3)))
7283
7284 (define-public python2-jupyter-client
7285 (package-with-python2 python-jupyter-client))
7286
7287 (define-public python-ipykernel
7288 (package
7289 (name "python-ipykernel")
7290 (version "5.1.3")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "ipykernel" version))
7295 (sha256
7296 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7297 (build-system python-build-system)
7298 (arguments
7299 `(#:phases
7300 (modify-phases %standard-phases
7301 (replace 'check
7302 (lambda _
7303 (setenv "HOME" "/tmp")
7304 (invoke "pytest" "-v")
7305 #t))
7306 (add-after 'install 'set-python-file-name
7307 (lambda* (#:key outputs #:allow-other-keys)
7308 ;; Record the absolute file name of the 'python' executable in
7309 ;; 'kernel.json'.
7310 (let ((out (assoc-ref outputs "out")))
7311 (substitute* (string-append out "/share/jupyter"
7312 "/kernels/python3/kernel.json")
7313 (("\"python\"")
7314 (string-append "\"" (which "python") "\"")))
7315 #t))))))
7316 (propagated-inputs
7317 `(("python-ipython" ,python-ipython)
7318 ;; imported at runtime during connect
7319 ("python-jupyter-client" ,python-jupyter-client)))
7320 (native-inputs
7321 `(("python-flaky" ,python-flaky)
7322 ("python-nose" ,python-nose)
7323 ("python-pytest" ,python-pytest)))
7324 (home-page "https://ipython.org")
7325 (synopsis "IPython Kernel for Jupyter")
7326 (description
7327 "This package provides the IPython kernel for Jupyter.")
7328 (properties `((python2-variant . ,(delay python2-ipykernel))))
7329 (license license:bsd-3)))
7330
7331 ;; Version 5.x and above no longer support Python 2.
7332 (define-public python2-ipykernel
7333 (package
7334 (name "python2-ipykernel")
7335 (version "4.10.1")
7336 (source
7337 (origin
7338 (method url-fetch)
7339 (uri (pypi-uri "ipykernel" version))
7340 (sha256
7341 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7342 (build-system python-build-system)
7343 (arguments
7344 `(#:python ,python-2))
7345 (propagated-inputs
7346 `(("python2-ipython" ,python2-ipython)
7347 ;; imported at runtime during connect
7348 ("python2-jupyter-client" ,python2-jupyter-client)
7349 ("python2-tornado" ,python2-tornado)
7350 ("python2-traitlets" ,python2-traitlets)))
7351 (native-inputs
7352 `(("python2-mock" ,python2-mock)
7353 ("python2-nose" ,python2-nose)
7354 ("python2-pytest" ,python2-pytest)
7355 ("python2-pytest-cov" ,python2-pytest-cov)))
7356 (home-page "https://ipython.org")
7357 (synopsis "IPython Kernel for Jupyter")
7358 (description
7359 "This package provides the IPython kernel for Jupyter.")
7360 (license license:bsd-3)))
7361
7362 (define-public python-pari-jupyter
7363 (package
7364 (name "python-pari-jupyter")
7365 (version "1.3.2")
7366 (source
7367 (origin
7368 (method url-fetch)
7369 (uri (pypi-uri "pari_jupyter" version))
7370 (sha256
7371 (base32
7372 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7373 (build-system python-build-system)
7374 (propagated-inputs
7375 `(("python-ipykernel" ,python-ipykernel)))
7376 (inputs
7377 `(("pari-gp" ,pari-gp)
7378 ("readline" ,readline)))
7379 (arguments
7380 `(#:tests? #f)) ; no test suite
7381 (home-page
7382 "https://github.com/jdemeyer/pari_jupyter")
7383 (synopsis "A Jupyter kernel for PARI/GP")
7384 (description "The package provides a PARI/GP kernel for Jupyter.")
7385 (license license:gpl3+)))
7386
7387 (define-public python-backcall
7388 (package
7389 (name "python-backcall")
7390 (version "0.1.0")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "backcall" version))
7395 (sha256
7396 (base32
7397 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7398 (build-system python-build-system)
7399 (home-page "https://github.com/takluyver/backcall/")
7400 (synopsis "Specifications for callback functions passed in to an API")
7401 (description
7402 "If your code lets other people supply callback functions, it's important
7403 to specify the function signature you expect, and check that functions support
7404 that. Adding extra parameters later would break other peoples code unless
7405 you're careful. The @code{backcall} package provides a way of specifying the
7406 callback signature using a prototype function.")
7407 (license license:bsd-3)))
7408
7409 (define-public python-ipython
7410 (package
7411 (name "python-ipython")
7412 (version "7.9.0")
7413 (source
7414 (origin
7415 (method url-fetch)
7416 (uri (pypi-uri "ipython" version ".tar.gz"))
7417 (sha256
7418 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7419 (build-system python-build-system)
7420 (propagated-inputs
7421 `(("python-backcall" ,python-backcall)
7422 ("python-pyzmq" ,python-pyzmq)
7423 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7424 ("python-terminado" ,python-terminado)
7425 ("python-matplotlib" ,python-matplotlib)
7426 ("python-numpy" ,python-numpy)
7427 ("python-numpydoc" ,python-numpydoc)
7428 ("python-jedi" ,python-jedi)
7429 ("python-jinja2" ,python-jinja2)
7430 ("python-mistune" ,python-mistune)
7431 ("python-pexpect" ,python-pexpect)
7432 ("python-pickleshare" ,python-pickleshare)
7433 ("python-simplegeneric" ,python-simplegeneric)
7434 ("python-jsonschema" ,python-jsonschema)
7435 ("python-traitlets" ,python-traitlets)
7436 ("python-nbformat" ,python-nbformat)
7437 ("python-pygments" ,python-pygments)))
7438 (inputs
7439 `(("readline" ,readline)
7440 ("which" ,which)))
7441 (native-inputs
7442 `(("graphviz" ,graphviz)
7443 ("pkg-config" ,pkg-config)
7444 ("python-requests" ,python-requests) ;; for tests
7445 ("python-testpath" ,python-testpath)
7446 ("python-nose" ,python-nose)))
7447 (arguments
7448 `(#:phases
7449 (modify-phases %standard-phases
7450 (add-after 'unpack 'make-docs-reproducible
7451 (lambda _
7452 (substitute* "IPython/sphinxext/ipython_directive.py"
7453 ((".*import datetime") "")
7454 ((".*datetime.datetime.now\\(\\)") "")
7455 (("%timeit") "# %timeit"))
7456 #t))
7457 ;; Tests can only be run after the library has been installed and not
7458 ;; within the source directory.
7459 (delete 'check)
7460 (add-after 'install 'check
7461 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7462 (if tests?
7463 (begin
7464 ;; Make installed package available for running the tests
7465 (add-installed-pythonpath inputs outputs)
7466 (setenv "HOME" "/tmp/") ;; required by a test
7467 ;; We only test the core because one of the other tests
7468 ;; tries to import ipykernel.
7469 (invoke "python" "IPython/testing/iptest.py"
7470 "-v" "IPython/core/tests"))
7471 #t)))
7472 (add-before 'check 'fix-tests
7473 (lambda* (#:key inputs #:allow-other-keys)
7474 (substitute* "./IPython/utils/_process_posix.py"
7475 (("/usr/bin/env', 'which") (which "which")))
7476 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7477 (("#!/usr/bin/env python")
7478 (string-append "#!" (which "python"))))
7479 ;; This test introduces a circular dependency on ipykernel
7480 ;; (which depends on ipython).
7481 (delete-file "IPython/core/tests/test_display.py")
7482 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7483 (delete-file "IPython/core/tests/test_interactiveshell.py")
7484 #t)))))
7485 (home-page "https://ipython.org")
7486 (synopsis "IPython is a tool for interactive computing in Python")
7487 (description
7488 "IPython provides a rich architecture for interactive computing with:
7489 Powerful interactive shells, a browser-based notebook, support for interactive
7490 data visualization, embeddable interpreters and tools for parallel
7491 computing.")
7492 (properties `((python2-variant . ,(delay python2-ipython))))
7493 (license license:bsd-3)))
7494
7495 ;; This is the latest release of the LTS version of ipython with support for
7496 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7497 ;; dropped support for Python 2.7.
7498 (define-public python2-ipython
7499 (package
7500 (name "python2-ipython")
7501 (version "5.8.0")
7502 (source
7503 (origin
7504 (method url-fetch)
7505 (uri (pypi-uri "ipython" version ".tar.gz"))
7506 (sha256
7507 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7508 (build-system python-build-system)
7509 (propagated-inputs
7510 `(("python2-backports-shutil-get-terminal-size"
7511 ,python2-backports-shutil-get-terminal-size)
7512 ("python2-pathlib2" ,python2-pathlib2)
7513 ("python2-pyzmq" ,python2-pyzmq)
7514 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7515 ("python2-terminado" ,python2-terminado)
7516 ("python2-matplotlib" ,python2-matplotlib)
7517 ("python2-numpy" ,python2-numpy)
7518 ("python2-numpydoc" ,python2-numpydoc)
7519 ("python2-jinja2" ,python2-jinja2)
7520 ("python2-mistune" ,python2-mistune)
7521 ("python2-pexpect" ,python2-pexpect)
7522 ("python2-pickleshare" ,python2-pickleshare)
7523 ("python2-simplegeneric" ,python2-simplegeneric)
7524 ("python2-jsonschema" ,python2-jsonschema)
7525 ("python2-traitlets" ,python2-traitlets)
7526 ("python2-nbformat" ,python2-nbformat)
7527 ("python2-pygments" ,python2-pygments)))
7528 (inputs
7529 `(("readline" ,readline)
7530 ("which" ,which)))
7531 (native-inputs
7532 `(("graphviz" ,graphviz)
7533 ("pkg-config" ,pkg-config)
7534 ("python2-requests" ,python2-requests) ;; for tests
7535 ("python2-testpath" ,python2-testpath)
7536 ("python2-mock" ,python2-mock)
7537 ("python2-nose" ,python2-nose)))
7538 (arguments
7539 `(#:python ,python-2
7540 #:phases
7541 (modify-phases %standard-phases
7542 (add-before 'check 'delete-broken-tests
7543 (lambda* (#:key inputs #:allow-other-keys)
7544 ;; These tests throw errors for unknown reasons.
7545 (delete-file "IPython/core/tests/test_displayhook.py")
7546 (delete-file "IPython/core/tests/test_magic_terminal.py")
7547 (delete-file "IPython/core/tests/test_profile.py")
7548 #t)))))
7549 (home-page "https://ipython.org")
7550 (synopsis "IPython is a tool for interactive computing in Python")
7551 (description
7552 "IPython provides a rich architecture for interactive computing with:
7553 Powerful interactive shells, a browser-based notebook, support for interactive
7554 data visualization, embeddable interpreters and tools for parallel
7555 computing.")
7556 (license license:bsd-3)))
7557
7558 (define-public python-ipython-documentation
7559 (package
7560 (inherit python-ipython)
7561 (name "python-ipython-documentation")
7562 (version (package-version python-ipython))
7563 (arguments
7564 `(#:phases
7565 (modify-phases %standard-phases
7566 (delete 'build)
7567 (delete 'check)
7568 (replace 'install
7569 (lambda* (#:key outputs #:allow-other-keys)
7570 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7571 (doc (string-append data "/doc/" ,name "-" ,version))
7572 (html (string-append doc "/html"))
7573 (man1 (string-append data "/man/man1"))
7574 (info (string-append data "/info"))
7575 (examples (string-append doc "/examples"))
7576 (python-arg (string-append "PYTHON=" (which "python"))))
7577 (setenv "LANG" "en_US.utf8")
7578 (with-directory-excursion "docs"
7579 ;; FIXME: pdf fails to build
7580 ;;(system* "make" "pdf" "PAPER=a4")
7581 (system* "make" python-arg "html")
7582 ;; FIXME: the generated texi file contains ^@^@, which trips
7583 ;; up the parser.
7584 ;; (system* "make" python-arg "info")
7585 )
7586 (copy-recursively "docs/man" man1)
7587 (copy-recursively "examples" examples)
7588 (copy-recursively "docs/build/html" html)
7589 ;; (copy-file "docs/build/latex/ipython.pdf"
7590 ;; (string-append doc "/ipython.pdf"))
7591 (mkdir-p info)
7592 ;; (copy-file "docs/build/texinfo/ipython.info"
7593 ;; (string-append info "/ipython.info"))
7594 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7595 #t)))))
7596 (inputs
7597 `(("python-ipython" ,python-ipython)
7598 ("python-ipykernel" ,python-ipykernel)))
7599 (native-inputs
7600 `(("python-sphinx" ,python-sphinx)
7601 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7602 ;; FIXME: It's possible that a smaller union would work just as well.
7603 ("texlive" ,(texlive-union (list texlive-amsfonts
7604 texlive-fonts-ec
7605 texlive-generic-ifxetex
7606 texlive-generic-pdftex
7607 texlive-latex-capt-of
7608 texlive-latex-cmap
7609 texlive-latex-environ
7610 texlive-latex-eqparbox
7611 texlive-latex-etoolbox
7612 texlive-latex-expdlist
7613 texlive-latex-fancyhdr
7614 texlive-latex-fancyvrb
7615 texlive-latex-fncychap
7616 texlive-latex-float
7617 texlive-latex-framed
7618 texlive-latex-geometry
7619 texlive-latex-graphics
7620 texlive-latex-hyperref
7621 texlive-latex-mdwtools
7622 texlive-latex-multirow
7623 texlive-latex-needspace
7624 texlive-latex-oberdiek
7625 texlive-latex-parskip
7626 texlive-latex-preview
7627 texlive-latex-tabulary
7628 texlive-latex-threeparttable
7629 texlive-latex-titlesec
7630 texlive-latex-trimspaces
7631 texlive-latex-ucs
7632 texlive-latex-upquote
7633 texlive-latex-url
7634 texlive-latex-varwidth
7635 texlive-latex-wrapfig)))
7636 ("texinfo" ,texinfo)))))
7637
7638 (define-public python-urwid
7639 (package
7640 (name "python-urwid")
7641 (version "2.1.0")
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "urwid" version))
7646 (sha256
7647 (base32
7648 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7649 (build-system python-build-system)
7650 (home-page "http://urwid.org")
7651 (synopsis "Console user interface library for Python")
7652 (description
7653 "Urwid is a curses-based UI/widget library for Python. It includes many
7654 features useful for text console applications.")
7655 (license license:lgpl2.1+)))
7656
7657 (define-public python2-urwid
7658 (package-with-python2 python-urwid))
7659
7660 (define-public python-urwidtrees
7661 (package
7662 (name "python-urwidtrees")
7663 (version "1.0.2")
7664 (source
7665 (origin
7666 (method git-fetch)
7667 ;; package author intends on distributing via github rather than pypi:
7668 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7669 (uri (git-reference
7670 (url "https://github.com/pazz/urwidtrees")
7671 (commit version)))
7672 (file-name (git-file-name name version))
7673 (sha256
7674 (base32
7675 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7676 (build-system python-build-system)
7677 (arguments
7678 '(#:use-setuptools? #f
7679 #:tests? #f)) ; no tests
7680 (propagated-inputs `(("python-urwid" ,python-urwid)))
7681 (home-page "https://github.com/pazz/urwidtrees")
7682 (synopsis "Tree widgets for urwid")
7683 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7684 toolkit. Use it to build trees of widgets.")
7685 (license license:gpl3+)))
7686
7687 (define-public python2-urwidtrees
7688 (package-with-python2 python-urwidtrees))
7689
7690 (define-public python-ua-parser
7691 (package
7692 (name "python-ua-parser")
7693 (version "0.8.0")
7694 (source
7695 (origin
7696 (method url-fetch)
7697 (uri (pypi-uri "ua-parser" version))
7698 (sha256
7699 (base32
7700 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7701 (build-system python-build-system)
7702 (arguments
7703 `(#:tests? #f)) ;no test suite in release
7704 (native-inputs
7705 `(("python-pyyaml" ,python-pyyaml)))
7706 (home-page "https://github.com/ua-parser/uap-python")
7707 (synopsis "User agent parser")
7708 (description
7709 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7710 (license license:asl2.0)))
7711
7712 (define-public python2-ua-parser
7713 (package-with-python2 python-ua-parser))
7714
7715 (define-public python-user-agents
7716 (package
7717 (name "python-user-agents")
7718 (version "1.1.0")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "user-agents" version))
7723 (sha256
7724 (base32
7725 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7726 (build-system python-build-system)
7727 (arguments
7728 `(#:tests? #f)) ;missing devices.json test file in release
7729 (propagated-inputs
7730 `(("python-ua-parser" ,python-ua-parser)))
7731 (home-page "https://github.com/selwin/python-user-agents")
7732 (synopsis "User Agent strings parsing library")
7733 (description
7734 "A library to identify devices (phones, tablets) and their capabilities by
7735 parsing (browser/HTTP) user agent strings.")
7736 (license license:expat)))
7737
7738 (define-public python2-user-agents
7739 (package-with-python2 python-user-agents))
7740
7741 (define-public python-dbus
7742 (package
7743 (name "python-dbus")
7744 (version "1.2.16")
7745 (source
7746 (origin
7747 (method url-fetch)
7748 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7749 "dbus-python-" version ".tar.gz"))
7750 (sha256
7751 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7752 (build-system gnu-build-system)
7753 (native-inputs
7754 `(("pkg-config" ,pkg-config)))
7755 (inputs
7756 `(("python" ,python-wrapper)
7757 ("dbus-glib" ,dbus-glib)))
7758 (synopsis "Python bindings for D-bus")
7759 (description "python-dbus provides bindings for libdbus, the reference
7760 implementation of D-Bus.")
7761 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7762 (license license:expat)))
7763
7764 (define-public python2-dbus
7765 (package (inherit python-dbus)
7766 (name "python2-dbus")
7767 (inputs `(("python" ,python-2)
7768 ,@(alist-delete "python"
7769 (package-inputs python-dbus)
7770 equal?)))))
7771
7772 (define-public python-notify2
7773 (package
7774 (name "python-notify2")
7775 (version "0.3.1")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "notify2" version))
7780 (sha256
7781 (base32
7782 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7783 (build-system python-build-system)
7784 (arguments `(#:tests? #f)) ; tests depend on system state
7785 (native-inputs
7786 `(("python-dbus" ,python-dbus)))
7787 (home-page "https://bitbucket.org/takluyver/pynotify2")
7788 (synopsis "Python interface to D-Bus notifications")
7789 (description
7790 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7791 It is a reimplementation of pynotify in pure Python, and an alternative to
7792 the GObject Introspection bindings to libnotify for non-GTK applications.")
7793 (license (list license:bsd-2
7794 license:lgpl2.1+))))
7795
7796 (define-public python2-notify2
7797 (package-with-python2 python-notify2))
7798
7799 ;; beautifulsoup4 has a totally different namespace than 3.x,
7800 ;; and pypi seems to put it under its own name, so I guess we should too
7801 (define-public python-beautifulsoup4
7802 (package
7803 (name "python-beautifulsoup4")
7804 (version "4.9.1")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "beautifulsoup4" version))
7809 (sha256
7810 (base32
7811 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7812 (build-system python-build-system)
7813 (arguments
7814 `(#:phases
7815 (modify-phases %standard-phases
7816 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7817 ;; must use this conversion script when building with Python 3. The
7818 ;; conversion script also runs the tests.
7819 ;; For more information, see the file 'convert-py3k' in the source
7820 ;; distribution.
7821 (replace 'check
7822 (lambda _ (invoke "./convert-py3k"))))))
7823 (propagated-inputs
7824 `(("python-soupsieve" ,python-soupsieve)))
7825 (home-page
7826 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7827 (synopsis
7828 "Python screen-scraping library")
7829 (description
7830 "Beautiful Soup is a Python library designed for rapidly setting up
7831 screen-scraping projects. It offers Pythonic idioms for navigating,
7832 searching, and modifying a parse tree, providing a toolkit for
7833 dissecting a document and extracting what you need. It automatically
7834 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7835 (license license:expat)
7836 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7837
7838 (define-public python2-beautifulsoup4
7839 (package
7840 (inherit (package-with-python2
7841 (strip-python2-variant python-beautifulsoup4)))
7842 (arguments `(#:python ,python-2))))
7843
7844 (define-public python-soupsieve
7845 (package
7846 (name "python-soupsieve")
7847 (version "2.0.1")
7848 (source
7849 (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "soupsieve" version))
7852 (sha256
7853 (base32
7854 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7855 (build-system python-build-system)
7856 (arguments `(#:tests? #f))
7857 ;;XXX: 2 tests fail currently despite claming they were to be
7858 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7859 ;;don't want to create a circular dependency.
7860 (home-page "https://github.com/facelessuser/soupsieve")
7861 (synopsis "CSS selector library")
7862 (description
7863 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7864 Soup 4. It aims to provide selecting, matching, and filtering using modern
7865 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7866 specifications up through the latest CSS level 4 drafts and beyond (though
7867 some are not yet implemented).")
7868 (properties `((python2-variant . ,(delay python2-soupsieve))))
7869 (license license:expat)))
7870
7871 ;; This is the last version that supports python-2
7872 (define-public python2-soupsieve
7873 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7874 (package
7875 (inherit base)
7876 (version "1.9.6")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "soupsieve" version))
7881 (sha256
7882 (base32
7883 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7884 (propagated-inputs
7885 `(("python2-backports-functools-lru-cache"
7886 ,python2-backports-functools-lru-cache)
7887 ,@(package-propagated-inputs base))))))
7888
7889 (define-public python-netifaces
7890 (package
7891 (name "python-netifaces")
7892 (version "0.10.9")
7893 (source
7894 (origin
7895 (method url-fetch)
7896 (uri (pypi-uri "netifaces" version))
7897 (sha256
7898 (base32
7899 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7900 (build-system python-build-system)
7901 (home-page "https://github.com/al45tair/netifaces")
7902 (synopsis
7903 "Python module for portable network interface information")
7904 (description
7905 "Netifaces is a Python module providing information on network
7906 interfaces in an easy and portable manner.")
7907 (license license:expat)))
7908
7909 (define-public python2-netifaces
7910 (package-with-python2 python-netifaces))
7911
7912 (define-public python-networkx
7913 (package
7914 (name "python-networkx")
7915 (version "2.5")
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "networkx" version))
7920 (sha256
7921 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7922 (build-system python-build-system)
7923 (arguments
7924 '(#:phases (modify-phases %standard-phases
7925 (replace 'check
7926 (lambda* (#:key tests? #:allow-other-keys)
7927 (if tests?
7928 (invoke "pytest" "-vv" "--pyargs" "networkx")
7929 (format #t "test suite not run~%"))
7930 #t)))))
7931 ;; python-decorator is needed at runtime.
7932 (propagated-inputs
7933 `(("python-decorator" ,python-decorator)))
7934 (native-inputs
7935 `(("python-pytest" ,python-pytest)))
7936 (home-page "https://networkx.github.io/")
7937 (synopsis "Python module for creating and manipulating graphs and networks")
7938 (description
7939 "NetworkX is a Python package for the creation, manipulation, and study
7940 of the structure, dynamics, and functions of complex networks.")
7941 (properties `((python2-variant . ,(delay python2-networkx))))
7942 (license license:bsd-3)))
7943
7944 ;; NetworkX 2.2 is the last version with support for Python 2.
7945 (define-public python2-networkx
7946 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7947 (package
7948 (inherit base)
7949 (version "2.2")
7950 (source (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "networkx" version ".zip"))
7953 (sha256
7954 (base32
7955 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7956 (arguments
7957 `(#:python ,python-2))
7958 (native-inputs
7959 `(("python-nose" ,python2-nose)
7960 ("unzip" ,unzip))))))
7961
7962 (define-public python-datrie
7963 (package
7964 (name "python-datrie")
7965 (version "0.8.2")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "datrie" version))
7970 (sha256
7971 (base32
7972 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7973 (build-system python-build-system)
7974 (native-inputs
7975 `(("python-cython" ,python-cython)
7976 ("python-hypothesis" ,python-hypothesis)
7977 ("python-pytest" ,python-pytest)
7978 ("python-pytest-runner" ,python-pytest-runner)))
7979 (home-page "https://github.com/kmike/datrie")
7980 (synopsis "Fast, efficiently stored trie for Python")
7981 (description
7982 "This package provides a fast, efficiently stored trie implementation for
7983 Python.")
7984 (license license:lgpl2.1+)))
7985
7986 (define-public python-amply
7987 (package
7988 (name "python-amply")
7989 (version "0.1.4")
7990 (source
7991 (origin
7992 (method url-fetch)
7993 (uri (pypi-uri "amply" version))
7994 (sha256
7995 (base32
7996 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
7997 (build-system python-build-system)
7998 (propagated-inputs
7999 `(("python-docutils" ,python-docutils)
8000 ("python-pyparsing" ,python-pyparsing)))
8001 (native-inputs
8002 `(("python-setuptools-scm" ,python-setuptools-scm)))
8003 (home-page "https://github.com/willu47/amply")
8004 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8005 (description
8006 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8007 structures.")
8008 (license license:epl1.0)))
8009
8010 (define-public python-pulp
8011 (package
8012 (name "python-pulp")
8013 (version "2.4")
8014 (source
8015 (origin
8016 (method url-fetch)
8017 (uri (pypi-uri "PuLP" version))
8018 (sha256
8019 (base32
8020 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8021 (build-system python-build-system)
8022 (propagated-inputs
8023 `(("python-amply" ,python-amply)))
8024 (home-page "https://github.com/coin-or/pulp")
8025 (synopsis "Linear Programming modeler")
8026 (description
8027 "PuLP is a Linear Programming modeler written in Python. PuLP can
8028 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8029 solve linear problems.")
8030 (license license:expat)))
8031
8032 (define-public snakemake
8033 (package
8034 (name "snakemake")
8035 (version "5.32.2")
8036 (source
8037 (origin
8038 (method url-fetch)
8039 (uri (pypi-uri "snakemake" version))
8040 (sha256
8041 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8042 (build-system python-build-system)
8043 (arguments
8044 ;; TODO: Package missing test dependencies.
8045 '(#:tests? #f
8046 #:phases
8047 (modify-phases %standard-phases
8048 ;; For cluster execution Snakemake will call Python. Since there is
8049 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8050 ;; this by calling the snakemake wrapper instead.
8051 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8052 (lambda* (#:key outputs #:allow-other-keys)
8053 (substitute* "snakemake/executors/__init__.py"
8054 (("\\{sys.executable\\} -m snakemake")
8055 (string-append (assoc-ref outputs "out")
8056 "/bin/snakemake")))
8057 #t)))))
8058 (propagated-inputs
8059 `(("python-appdirs" ,python-appdirs)
8060 ("python-configargparse" ,python-configargparse)
8061 ("python-datrie" ,python-datrie)
8062 ("python-docutils" ,python-docutils)
8063 ("python-gitpython" ,python-gitpython)
8064 ("python-jinja2" ,python-jinja2)
8065 ("python-jsonschema" ,python-jsonschema)
8066 ("python-networkx" ,python-networkx)
8067 ("python-psutil" ,python-psutil)
8068 ("python-pyyaml" ,python-pyyaml)
8069 ("python-ratelimiter" ,python-ratelimiter)
8070 ("python-requests" ,python-requests)
8071 ("python-wrapt" ,python-wrapt)))
8072 (home-page "https://snakemake.readthedocs.io")
8073 (synopsis "Python-based execution environment for make-like workflows")
8074 (description
8075 "Snakemake aims to reduce the complexity of creating workflows by
8076 providing a clean and modern domain specific specification language (DSL) in
8077 Python style, together with a fast and comfortable execution environment.")
8078 (license license:expat)))
8079
8080 (define-public python-pyqrcode
8081 (package
8082 (name "python-pyqrcode")
8083 (version "1.2.1")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "PyQRCode" version))
8088 (sha256
8089 (base32
8090 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8091 (build-system python-build-system)
8092 (home-page
8093 "https://github.com/mnooner256/pyqrcode")
8094 (synopsis "QR code generator")
8095 (description
8096 "Pyqrcode is a QR code generator written purely in Python with
8097 SVG, EPS, PNG and terminal output.")
8098 (license license:bsd-3)))
8099
8100 (define-public python-seaborn
8101 (package
8102 (name "python-seaborn")
8103 (version "0.10.0")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (pypi-uri "seaborn" version))
8108 (sha256
8109 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8110 (build-system python-build-system)
8111 (arguments
8112 `(#:phases
8113 (modify-phases %standard-phases
8114 (add-before 'check 'start-xserver
8115 (lambda* (#:key inputs #:allow-other-keys)
8116 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8117 ;; There must be a running X server and make check doesn't
8118 ;; start one. Therefore we must do it.
8119 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8120 (setenv "DISPLAY" ":1")
8121 #t)))
8122 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8123 (propagated-inputs
8124 `(("python-pandas" ,python-pandas)
8125 ("python-matplotlib" ,python-matplotlib)
8126 ("python-numpy" ,python-numpy)
8127 ("python-scipy" ,python-scipy)))
8128 (native-inputs
8129 `(("python-pytest" ,python-pytest)
8130 ("xorg-server" ,xorg-server-for-tests)))
8131 (home-page "https://seaborn.pydata.org/")
8132 (synopsis "Statistical data visualization")
8133 (description
8134 "Seaborn is a library for making attractive and informative statistical
8135 graphics in Python. It is built on top of matplotlib and tightly integrated
8136 with the PyData stack, including support for numpy and pandas data structures
8137 and statistical routines from scipy and statsmodels.")
8138 (properties `((python2-variant . ,(delay python2-seaborn))))
8139 (license license:bsd-3)))
8140
8141 ;; 0.9.1 is the last release with support for Python 2.
8142 (define-public python2-seaborn
8143 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8144 (package
8145 (inherit base)
8146 (version "0.9.1")
8147 (source (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "seaborn" version))
8150 (sha256
8151 (base32
8152 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8153
8154 (define-public python-mpmath
8155 (package
8156 (name "python-mpmath")
8157 (version "1.1.0")
8158 (source (origin
8159 (method url-fetch)
8160 (uri (pypi-uri "mpmath" version))
8161 (file-name (git-file-name name version))
8162 (sha256
8163 (base32
8164 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8165 (build-system python-build-system)
8166 (native-inputs
8167 `(("python-pytest" ,python-pytest)))
8168 (arguments
8169 '(#:phases
8170 (modify-phases %standard-phases
8171 (replace 'check
8172 (lambda _
8173 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8174 (home-page "https://mpmath.org")
8175 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8176 (description
8177 "@code{mpmath} can be used as an arbitrary-precision substitute for
8178 Python's float/complex types and math/cmath modules, but also does much
8179 more advanced mathematics.")
8180 (license license:bsd-3)))
8181
8182 (define-public python2-mpmath
8183 (package-with-python2 python-mpmath))
8184
8185 (define-public python-bigfloat
8186 (package
8187 (name "python-bigfloat")
8188 (version "0.3.0")
8189 (source
8190 (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "bigfloat" version))
8193 (sha256
8194 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8195 (build-system python-build-system)
8196 (inputs
8197 `(("mpfr" ,mpfr)))
8198 (home-page "https://github.com/mdickinson/bigfloat")
8199 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8200 (description
8201 "This package provides a Python interface to the MPFR library for
8202 multiprecision arithmetic.")
8203 (license license:lgpl3+)))
8204
8205 (define-public python2-bigfloat
8206 (package-with-python2 python-bigfloat))
8207
8208 (define-public python-sympy
8209 (package
8210 (name "python-sympy")
8211 (version "1.7.1")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "sympy" version))
8216 (sha256
8217 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8218 (build-system python-build-system)
8219 (arguments
8220 `(#:phases
8221 (modify-phases %standard-phases
8222 (replace 'check
8223 (lambda* (#:key outputs #:allow-other-keys)
8224 (invoke
8225 (or (which "python3") (which "python"))
8226 "-c" "import sympy; sympy.test(\"/core\")"))))))
8227 (propagated-inputs
8228 `(("python-mpmath" ,python-mpmath)))
8229 (home-page "https://www.sympy.org/")
8230 (synopsis "Python library for symbolic mathematics")
8231 (description
8232 "SymPy is a Python library for symbolic mathematics. It aims to become a
8233 full-featured computer algebra system (CAS) while keeping the code as simple
8234 as possible in order to be comprehensible and easily extensible.")
8235 (license license:bsd-3)))
8236
8237 (define-public python2-sympy
8238 (package
8239 (inherit (package-with-python2 python-sympy))
8240 (version "1.5.1") ; last release for python2
8241 (source
8242 (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "sympy" version))
8245 (sha256
8246 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8247
8248 (define-public python-q
8249 (package
8250 (name "python-q")
8251 (version "2.6")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "q" version))
8256 (sha256
8257 (base32
8258 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8259 (build-system python-build-system)
8260 (home-page "https://github.com/zestyping/q")
8261 (synopsis "Quick-and-dirty debugging output for tired programmers")
8262 (description
8263 "q is a Python module for \"print\" style of debugging Python code. It
8264 provides convenient short API for print out of values, tracebacks, and
8265 falling into the Python interpreter.")
8266 (license license:asl2.0)))
8267
8268 (define-public python2-q
8269 (package-with-python2 python-q))
8270
8271 (define-public python-xlib
8272 (package
8273 (name "python-xlib")
8274 (version "0.29")
8275 (source
8276 (origin
8277 (method git-fetch)
8278 (uri (git-reference
8279 (url "https://github.com/python-xlib/python-xlib")
8280 (commit version)))
8281 (file-name (git-file-name name version))
8282 (sha256
8283 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8284 (build-system python-build-system)
8285 (arguments
8286 `(#:phases
8287 (modify-phases %standard-phases
8288 (add-before 'check 'start-xserver
8289 (lambda* (#:key inputs #:allow-other-keys)
8290 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8291 ;; There must be a running X server and make check doesn't
8292 ;; start one. Therefore we must do it.
8293 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8294 (setenv "DISPLAY" ":1")
8295 #t))))))
8296 (native-inputs
8297 `(("python-mock" ,python-mock)
8298 ("python-setuptools-scm" ,python-setuptools-scm)
8299 ("xorg-server" ,xorg-server)))
8300 (propagated-inputs
8301 `(("python-six" ,python-six)))
8302 (home-page "https://github.com/python-xlib/python-xlib")
8303 (synopsis "Python X11 client library")
8304 (description
8305 "The Python X Library is intended to be a fully functional
8306 X client library for Python programs. It is useful to implement
8307 low-level X clients. It is written entirely in Python.")
8308 (license license:gpl2+)))
8309
8310 (define-public python2-xlib
8311 (package-with-python2 python-xlib))
8312
8313 (define-public python-singledispatch
8314 (package
8315 (name "python-singledispatch")
8316 (version "3.4.0.3")
8317 (source
8318 (origin
8319 (method url-fetch)
8320 (uri (pypi-uri "singledispatch" version))
8321 (sha256
8322 (base32
8323 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8324 (build-system python-build-system)
8325 (native-inputs
8326 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8327 (home-page
8328 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8329 (synopsis "Backport of singledispatch feature from Python 3.4")
8330 (description
8331 "This library brings functools.singledispatch from Python 3.4 to Python
8332 2.6-3.3.")
8333 (license license:expat)))
8334
8335 (define-public python2-singledispatch
8336 (package-with-python2 python-singledispatch))
8337
8338 ;; the python- version can be removed with python-3.5
8339 (define-public python-backports-abc
8340 (package
8341 (name "python-backports-abc")
8342 (version "0.5")
8343 (source
8344 (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "backports_abc" version))
8347 (sha256
8348 (base32
8349 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8350 (build-system python-build-system)
8351 (home-page "https://github.com/cython/backports_abc")
8352 (synopsis "Backport of additions to the 'collections.abc' module")
8353 (description
8354 "Python-backports-abc provides a backport of additions to the
8355 @code{collections.abc} module in Python-3.5.")
8356 (license license:psfl)))
8357
8358 (define-public python2-backports-abc
8359 (package-with-python2 python-backports-abc))
8360
8361 (define-public python-backports-csv
8362 (package
8363 (name "python-backports-csv")
8364 (version "1.0.7")
8365 (source
8366 (origin
8367 (method url-fetch)
8368 (uri (pypi-uri "backports.csv" version))
8369 (sha256
8370 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8371 (build-system python-build-system)
8372 (home-page "https://github.com/ryanhiebert/backports.csv")
8373 (synopsis "Backport of Python 3's csv module for Python 2")
8374 (description
8375 "Provides a backport of Python 3's @code{csv} module for parsing
8376 comma separated values. The API of the @code{csv} module in Python 2
8377 is drastically different from the @code{csv} module in Python 3.
8378 This is due, for the most part, to the difference between str in
8379 Python 2 and Python 3.")
8380 (license license:psfl)))
8381
8382 (define-public python2-backports-csv
8383 (package-with-python2 python-backports-csv))
8384
8385 (define-public python2-backports-shutil-get-terminal-size
8386 (package
8387 (name "python2-backports-shutil-get-terminal-size")
8388 (version "1.0.0")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8393 (sha256
8394 (base32
8395 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8396 (build-system python-build-system)
8397 (arguments
8398 `(#:python ,python-2
8399 #:phases
8400 (modify-phases %standard-phases
8401 (replace 'check
8402 (lambda _
8403 (setenv "PYTHONPATH" (string-append "./build/lib:"
8404 (getenv "PYTHONPATH")))
8405 (invoke "py.test" "-v"))))))
8406 (native-inputs
8407 `(("python2-pytest" ,python2-pytest)))
8408 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8409 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8410 (description
8411 "This package provides a backport of the @code{get_terminal_size
8412 function} from Python 3.3's @code{shutil}.
8413 Unlike the original version it is written in pure Python rather than C,
8414 so it might be a tiny bit slower.")
8415 (license license:expat)))
8416
8417 (define-public python-waf
8418 (package
8419 (name "python-waf")
8420 (version "2.0.19")
8421 (source (origin
8422 (method url-fetch)
8423 (uri (string-append "https://waf.io/"
8424 "waf-" version ".tar.bz2"))
8425 (sha256
8426 (base32
8427 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8428 (build-system python-build-system)
8429 (arguments
8430 '(#:phases
8431 (modify-phases %standard-phases
8432 (replace 'build
8433 (lambda _
8434 ;; XXX: Find a way to add all extra tools.
8435 (let ((tools '("gccdeps"
8436 "clang_compilation_database")))
8437 (invoke "python" "waf-light" "configure" "build"
8438 (string-append "--tools="
8439 (string-join tools ","))))))
8440 (replace 'check
8441 (lambda _
8442 (invoke "python" "waf" "--version")))
8443 (replace 'install
8444 (lambda* (#:key outputs #:allow-other-keys)
8445 (let ((out (assoc-ref outputs "out")))
8446 (install-file "waf" (string-append out "/bin")))
8447 #t))
8448 ;; waf breaks when it is wrapped.
8449 (delete 'wrap))))
8450 (home-page "https://waf.io/")
8451 (synopsis "Python-based build system")
8452 (description
8453 "Waf is a Python-based framework for configuring, compiling and installing
8454 applications.")
8455 (license license:bsd-3)))
8456
8457 (define-public python2-waf
8458 (package-with-python2 python-waf))
8459
8460 (define-public python-pyzmq
8461 (package
8462 (name "python-pyzmq")
8463 (version "17.1.2")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "pyzmq" version))
8468 (sha256
8469 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8470 (build-system python-build-system)
8471 (arguments
8472 `(#:configure-flags
8473 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8474 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8475 ;; --inplace' for 'python setup.py test' to work.
8476 #:tests? #f))
8477 (inputs
8478 `(("zeromq" ,zeromq)))
8479 (native-inputs
8480 `(("pkg-config" ,pkg-config)
8481 ("python-nose" ,python-nose)))
8482 (home-page "https://github.com/zeromq/pyzmq")
8483 (synopsis "Python bindings for 0MQ")
8484 (description
8485 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8486 (license license:bsd-4)))
8487
8488 (define-public python2-pyzmq
8489 (package-with-python2 python-pyzmq))
8490
8491 (define-public python-pep8
8492 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8493 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8494 ;; some dependents' test suites, and nothing more.
8495 (package
8496 (name "python-pep8")
8497 (version "1.7.0")
8498 (source
8499 (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "pep8" version))
8502 (sha256
8503 (base32
8504 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8505 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8506 (build-system python-build-system)
8507 (home-page "https://pep8.readthedocs.org/")
8508 (synopsis "Python style guide checker")
8509 (description
8510 "This tools checks Python code against some of the style conventions in
8511 PEP 8.")
8512 (license license:expat)))
8513
8514 (define-public python2-pep8
8515 (package-with-python2 python-pep8))
8516
8517 (define-public python-pep517
8518 (package
8519 (inherit python-pep517-bootstrap)
8520 (name "python-pep517")
8521 (arguments
8522 '(#:phases
8523 (modify-phases %standard-phases
8524 (replace 'check
8525 (lambda* (#:key tests? #:allow-other-keys)
8526 (delete-file "pytest.ini")
8527 ;; This test tries to connect to the internet
8528 (delete-file "tests/test_meta.py")
8529 (if tests?
8530 (invoke "pytest")
8531 #t))))))
8532 (native-inputs
8533 `(("python-mock" ,python-mock)
8534 ("python-pytest" ,python-pytest)
8535 ("python-testpath" ,python-testpath)))
8536 (properties `((python2-variant . ,(delay python2-pep517))))))
8537
8538 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8539 (define-public python2-pep517
8540 (let ((base (package-with-python2
8541 (strip-python2-variant python-pep517))))
8542 (package
8543 (inherit base)
8544 (name "python2-pep517")
8545 (arguments
8546 `(#:tests? #f
8547 ,@(package-arguments base)))
8548 (native-inputs `()))))
8549
8550 (define-public python-pyflakes
8551 (package
8552 (name "python-pyflakes")
8553 (version "2.2.0")
8554 (source
8555 (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "pyflakes" version))
8558 (sha256
8559 (base32
8560 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8561 (build-system python-build-system)
8562 (home-page
8563 "https://github.com/pyflakes/pyflakes")
8564 (synopsis "Passive checker of Python programs")
8565 (description
8566 "Pyflakes statically checks Python source code for common errors.")
8567 (license license:expat)))
8568
8569 (define-public python2-pyflakes
8570 (package-with-python2 python-pyflakes))
8571
8572 (define-public python-mccabe
8573 (package
8574 (name "python-mccabe")
8575 (version "0.6.1")
8576 (source
8577 (origin
8578 (method url-fetch)
8579 (uri (pypi-uri "mccabe" version))
8580 (sha256
8581 (base32
8582 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8583 (build-system python-build-system)
8584 (native-inputs
8585 `(("python-pytest" ,python-pytest-bootstrap)
8586 ("python-pytest-runner" ,python-pytest-runner)))
8587 (home-page "https://github.com/flintwork/mccabe")
8588 (synopsis "McCabe checker, plugin for flake8")
8589 (description
8590 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8591 complexity of Python source code.")
8592 (license license:expat)))
8593
8594 (define-public python2-mccabe
8595 (package-with-python2 python-mccabe))
8596
8597 (define-public python-flake8
8598 (package
8599 (name "python-flake8")
8600 (version "3.8.4")
8601 (source (origin
8602 (method url-fetch)
8603 (uri (pypi-uri "flake8" version))
8604 (sha256
8605 (base32
8606 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8607 (build-system python-build-system)
8608 (arguments
8609 `(#:phases
8610 (modify-phases %standard-phases
8611 (delete 'check)
8612 (add-after 'install 'check
8613 (lambda* (#:key inputs outputs #:allow-other-keys)
8614 (add-installed-pythonpath inputs outputs)
8615 (invoke "pytest" "-v")
8616 #t)))))
8617 (propagated-inputs
8618 `(("python-pycodestyle" ,python-pycodestyle)
8619 ("python-entrypoints" ,python-entrypoints)
8620 ("python-pyflakes" ,python-pyflakes)
8621 ("python-mccabe" ,python-mccabe)))
8622 (native-inputs
8623 `(("python-mock" ,python-mock)
8624 ("python-pytest" ,python-pytest-bootstrap)))
8625 (home-page "https://gitlab.com/pycqa/flake8")
8626 (synopsis
8627 "The modular source code checker: pep8, pyflakes and co")
8628 (description
8629 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8630 (properties `((python2-variant . ,(delay python2-flake8))))
8631 (license license:expat)))
8632
8633 (define-public python2-flake8
8634 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8635 (package (inherit base)
8636 (propagated-inputs
8637 `(("python2-configparser" ,python2-configparser)
8638 ("python2-enum34" ,python2-enum34)
8639 ("python2-functools32" ,python2-functools32)
8640 ("python2-typing" ,python2-typing)
8641 ,@(package-propagated-inputs base))))))
8642
8643 (define-public python-flake8-bugbear
8644 (package
8645 (name "python-flake8-bugbear")
8646 (version "20.1.4")
8647 (source
8648 (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "flake8-bugbear" version))
8651 (sha256
8652 (base32
8653 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8654 (build-system python-build-system)
8655 (arguments
8656 '(#:phases
8657 (modify-phases %standard-phases
8658 (add-before 'check 'disable-test
8659 (lambda _
8660 ;; This test fails on slow computers.
8661 (substitute* "tests/test_bugbear.py"
8662 (("def test_does_not_crash_on_any_valid_code")
8663 "def _test_does_not_crash_on_any_valid_code")))))))
8664 (native-inputs
8665 `(("python-hypothesis" ,python-hypothesis)
8666 ("python-hypothesmith" ,python-hypothesmith)))
8667 (propagated-inputs
8668 `(("python-attrs" ,python-attrs)
8669 ("python-flake8" ,python-flake8)))
8670 (home-page "https://github.com/PyCQA/flake8-bugbear")
8671 (synopsis
8672 "Flake8 plugin for finding likely bugs and design problems in your program")
8673 (description
8674 "This package contains a plugin for Flake8 finding likely bugs and
8675 design problems in your program. It contains warnings that don't belong
8676 in pyflakes and pycodestyle.")
8677 (license license:expat)))
8678
8679 (define-public python-flake8-implicit-str-concat
8680 (package
8681 (name "python-flake8-implicit-str-concat")
8682 (version "0.2.0")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "flake8_implicit_str_concat" version))
8687 (sha256
8688 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8689 (build-system python-build-system)
8690 (propagated-inputs
8691 `(("python-attrs" ,python-attrs)
8692 ("python-more-itertools" ,python-more-itertools)))
8693 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8694 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8695 (description
8696 "This is a plugin for the Python code checking tool Flake8 to encourage
8697 correct string literal concatenation.
8698
8699 It looks for style problems like implicitly concatenated string literals on
8700 the same line (which can be introduced by the code formating tool Black), or
8701 unnecessary plus operators for explicit string literal concatenation.")
8702 (license license:expat)))
8703
8704 (define-public python-flake8-polyfill
8705 (package
8706 (name "python-flake8-polyfill")
8707 (version "1.0.2")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "flake8-polyfill" version))
8712 (sha256
8713 (base32
8714 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8715 (build-system python-build-system)
8716 (arguments
8717 '(#:phases
8718 (modify-phases %standard-phases
8719 (replace 'check
8720 (lambda _
8721 ;; Be compatible with Pytest 4:
8722 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8723 (substitute* "setup.cfg"
8724 (("\\[pytest\\]")
8725 "[tool:pytest]"))
8726
8727 (setenv "PYTHONPATH"
8728 (string-append (getcwd) "/build/lib:"
8729 (getenv "PYTHONPATH")))
8730 (invoke "py.test" "-v"))))))
8731 (native-inputs
8732 `(("python-flake8" ,python-flake8)
8733 ("python-mock" ,python-mock)
8734 ("python-pep8" ,python-pep8)
8735 ("python-pycodestyle" ,python-pycodestyle)
8736 ("python-pytest" ,python-pytest)))
8737 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8738 (synopsis "Polyfill package for Flake8 plugins")
8739 (description
8740 "This package that provides some compatibility helpers for Flake8
8741 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8742 (license license:expat)))
8743
8744 (define-public python2-flake8-polyfill
8745 (package-with-python2 python-flake8-polyfill))
8746
8747 (define-public python-flake8-print
8748 (package
8749 (name "python-flake8-print")
8750 (version "4.0.0")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "flake8-print" version))
8755 (sha256
8756 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8757 (build-system python-build-system)
8758 (propagated-inputs
8759 `(("python-flake8" ,python-flake8)
8760 ("python-pycodestyle" ,python-pycodestyle)
8761 ("python-six" ,python-six)))
8762 (home-page "https://github.com/jbkahn/flake8-print")
8763 (synopsis "Print statement checker plugin for Flake8")
8764 (description
8765 "This plugin for Flake8 checks for @code{print} statements in Python
8766 files.")
8767 (license license:expat)))
8768
8769 (define-public python-flake8-pyi
8770 (package
8771 (name "python-flake8-pyi")
8772 (version "20.5.0")
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "flake8-pyi" version))
8777 (sha256
8778 (base32
8779 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8780 (build-system python-build-system)
8781 (propagated-inputs
8782 `(("python-attrs" ,python-attrs)
8783 ("python-flake8" ,python-flake8)
8784 ("python-pyflakes" ,python-pyflakes)))
8785 (home-page "https://github.com/ambv/flake8-pyi")
8786 (synopsis
8787 "Flake8 plugin that provides specializations for type hinting stub files")
8788 (description
8789 "This package contains a plugin that provides specializations for
8790 type hinting stub files, especially interesting for linting typeshed. It
8791 adds the @file{.pyi} extension to the default value of the @code{--filename}
8792 command-line argument to Flake8. This means stubs are linted by default with
8793 this plugin enabled, without needing to explicitly list every file. It
8794 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8795 expressions after the entire file has been read. This enables support for
8796 first-class forward references that stub files use.")
8797 (license license:expat)))
8798
8799 (define-public python-flake8-pie
8800 (package
8801 (name "python-flake8-pie")
8802 (version "0.5.0")
8803 (source
8804 (origin
8805 (method url-fetch)
8806 (uri (pypi-uri "flake8-pie" version))
8807 (sha256
8808 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8809 (build-system python-build-system)
8810 (home-page "https://github.com/sbdchd/flake8-pie")
8811 (synopsis "Flake8 extension that implements lints")
8812 (description
8813 "This package provides a flake8 extension that implements miscellaneous
8814 lints.")
8815 (license license:bsd-2)))
8816
8817 (define-public python-autoflake
8818 (package
8819 (name "python-autoflake")
8820 (version "1.3.1")
8821 (source
8822 (origin
8823 (method url-fetch)
8824 (uri (pypi-uri "autoflake" version))
8825 (sha256
8826 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8827 (build-system python-build-system)
8828 (propagated-inputs
8829 `(("python-pyflakes" ,python-pyflakes)))
8830 (home-page "https://github.com/myint/autoflake")
8831 (synopsis "Removes unused imports and unused variables")
8832 (description
8833 "@code{autoflake} removes unused imports and unused variables from Python
8834 code as reported by @code{pyflakes}.
8835
8836 By default, it only removes unused imports for modules that are part of the
8837 standard library. Removal of unused variables is also disabled by default.
8838 It also removes useless @code{pass} statements.")
8839 (license license:expat)))
8840
8841 (define-public python-mistune
8842 (package
8843 (name "python-mistune")
8844 (version "0.8.4")
8845 (source
8846 (origin
8847 (method url-fetch)
8848 (uri (pypi-uri "mistune" version))
8849 (sha256
8850 (base32
8851 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8852 (build-system python-build-system)
8853 (native-inputs
8854 `(("python-nose" ,python-nose)
8855 ("python-cython" ,python-cython)))
8856 (home-page "https://github.com/lepture/mistune")
8857 (synopsis "Markdown parser in pure Python")
8858 (description "This package provides a fast markdown parser in pure
8859 Python.")
8860 (license license:bsd-3)))
8861
8862 (define-public python2-mistune
8863 (package-with-python2 python-mistune))
8864
8865 (define-public python-markdown
8866 (package
8867 (name "python-markdown")
8868 (version "3.2.1")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "Markdown" version))
8873 (sha256
8874 (base32
8875 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8876 (build-system python-build-system)
8877 (native-inputs
8878 `(("python-nose" ,python-nose)
8879 ("python-pyyaml" ,python-pyyaml)))
8880 (home-page "https://python-markdown.github.io/")
8881 (synopsis "Python implementation of Markdown")
8882 (description
8883 "This package provides a Python implementation of John Gruber's
8884 Markdown. The library features international input, various Markdown
8885 extensions, and several HTML output formats. A command line wrapper
8886 markdown_py is also provided to convert Markdown files to HTML.")
8887 (properties `((python2-variant . ,(delay python2-markdown))))
8888 (license license:bsd-3)))
8889
8890 ;; Markdown 3.2 dropped support for Python 2.
8891 (define-public python2-markdown
8892 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8893 (package/inherit
8894 base
8895 (version "3.1.1")
8896 (source (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "Markdown" version))
8899 (sha256
8900 (base32
8901 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8902
8903 (define-public python-ptyprocess
8904 (package
8905 (name "python-ptyprocess")
8906 (version "0.5.2")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "ptyprocess" version))
8911 (sha256
8912 (base32
8913 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8914 (build-system python-build-system)
8915 (native-inputs
8916 `(("python-nose" ,python-nose)))
8917 (arguments
8918 `(#:phases
8919 (modify-phases %standard-phases
8920 (replace 'check
8921 (lambda _ (invoke "nosetests"))))))
8922 (home-page "https://github.com/pexpect/ptyprocess")
8923 (synopsis "Run a subprocess in a pseudo terminal")
8924 (description
8925 "This package provides a Python library used to launch a subprocess in a
8926 pseudo terminal (pty), and interact with both the process and its pty.")
8927 (license license:isc)))
8928
8929 (define-public python2-ptyprocess
8930 (package-with-python2 python-ptyprocess))
8931
8932 (define-public python-cram
8933 (package
8934 (name "python-cram")
8935 (version "0.7")
8936 (home-page "https://bitheap.org/cram/")
8937 (source (origin
8938 (method url-fetch)
8939 (uri (list (string-append home-page "cram-"
8940 version ".tar.gz")
8941 (pypi-uri "cram" version)))
8942 (sha256
8943 (base32
8944 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8945 (arguments
8946 '(#:phases
8947 (modify-phases %standard-phases
8948 (add-after 'unpack 'patch-source
8949 (lambda _
8950 (substitute* (find-files "cram" ".*\\.py$")
8951 ;; Replace default shell path.
8952 (("/bin/sh") (which "sh")))
8953 (substitute* (find-files "tests" ".*\\.t$")
8954 (("md5") "md5sum")
8955 (("/bin/bash") (which "bash"))
8956 (("/bin/sh") (which "sh")))
8957 (substitute* "cram/_test.py"
8958 ;; This hack works around a bug triggered by substituting
8959 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8960 ;; "cram -h", which breaks the output at 80 characters. This
8961 ;; causes the line showing the default shell to break into two
8962 ;; lines, but the test expects a single line...
8963 (("env\\['COLUMNS'\\] = '80'")
8964 "env['COLUMNS'] = '160'"))
8965
8966 (substitute* "Makefile"
8967 ;; Recent versions of python-coverage have caused the test
8968 ;; coverage to decrease (as of version 0.7). Allow that.
8969 (("--fail-under=100")
8970 "--fail-under=90"))
8971
8972 #t))
8973 (replace 'check
8974 ;; The test phase uses the built library and executable.
8975 (lambda* (#:key inputs outputs #:allow-other-keys)
8976 (add-installed-pythonpath inputs outputs)
8977 (setenv "PATH" (string-append (getenv "PATH") ":"
8978 (assoc-ref outputs "out") "/bin"))
8979 (invoke "make" "test"))))))
8980 (build-system python-build-system)
8981 (native-inputs
8982 `(("python-coverage" ,python-coverage)
8983 ("which" ,which)))
8984 (synopsis "Simple testing framework for command line applications")
8985 (description
8986 "Cram is a functional testing framework for command line applications.
8987 Cram tests look like snippets of interactive shell sessions. Cram runs each
8988 command and compares the command output in the test with the command’s actual
8989 output.")
8990 (license license:gpl2+)))
8991
8992 (define-public python2-cram
8993 (package-with-python2 python-cram))
8994
8995 (define-public python-crashtest
8996 (package
8997 (name "python-crashtest")
8998 (version "0.3.1")
8999 (source
9000 (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "crashtest" version))
9003 (sha256
9004 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9005 (build-system python-build-system)
9006 (home-page "https://github.com/sdispater/crashtest")
9007 (synopsis "Manage Python errors with ease")
9008 (description
9009 "Python library that makes exceptions handling and inspection easier.")
9010 (license license:expat)))
9011
9012 (define-public python-straight-plugin
9013 (package
9014 (name "python-straight-plugin")
9015 (version "1.4.1")
9016 (source
9017 (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "straight.plugin" version))
9020 (sha256
9021 (base32
9022 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9023 (build-system python-build-system)
9024 (home-page "https://github.com/ironfroggy/straight.plugin")
9025 (synopsis "Simple namespaced plugin facility")
9026 (description "Straight Plugin provides a type of plugin you can create from
9027 almost any existing Python modules, and an easy way for outside developers to
9028 add functionality and customization to your projects with their own plugins.")
9029 (license license:expat)))
9030
9031 (define-public python2-straight-plugin
9032 (package-with-python2 python-straight-plugin))
9033
9034 (define-public python-fonttools
9035 (package
9036 (name "python-fonttools")
9037 (version "4.6.0")
9038 (source (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "fonttools" version ".zip"))
9041 (sha256
9042 (base32
9043 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9044 (build-system python-build-system)
9045 (native-inputs
9046 `(("unzip" ,unzip)
9047 ("python-pytest" ,python-pytest)
9048 ("python-pytest-runner" ,python-pytest-runner)))
9049 (home-page "https://github.com/fonttools/fonttools")
9050 (synopsis "Tools to manipulate font files")
9051 (description
9052 "FontTools/TTX is a library to manipulate font files from Python. It
9053 supports reading and writing of TrueType/OpenType fonts, reading and writing
9054 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9055 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9056 from an XML-based format.")
9057 (license license:expat)))
9058
9059 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9060 (define-public python2-fonttools
9061 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9062 (package/inherit
9063 base
9064 (version "3.44.0")
9065 (source (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "fonttools" version ".zip"))
9068 (sha256
9069 (base32
9070 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9071
9072 (define-public python-ly
9073 (package
9074 (name "python-ly")
9075 (version "0.9.5")
9076 (source
9077 (origin
9078 (method url-fetch)
9079 (uri (pypi-uri name version))
9080 (sha256
9081 (base32
9082 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9083 (build-system python-build-system)
9084 (arguments
9085 ;; FIXME: Some tests need network access.
9086 '(#:tests? #f))
9087 (synopsis "Tool and library for manipulating LilyPond files")
9088 (description "This package provides a Python library to parse, manipulate
9089 or create documents in LilyPond format. A command line program ly is also
9090 provided that can be used to do various manipulations with LilyPond files.")
9091 (home-page "https://pypi.org/project/python-ly/")
9092 (license license:gpl2+)))
9093
9094 (define-public python-appdirs
9095 (package
9096 (name "python-appdirs")
9097 (version "1.4.3")
9098 (source
9099 (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "appdirs" version))
9102 (sha256
9103 (base32
9104 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9105 (build-system python-build-system)
9106 (home-page "https://github.com/ActiveState/appdirs")
9107 (synopsis
9108 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9109 (description
9110 "This module provides a portable way of finding out where user data
9111 should be stored on various operating systems.")
9112 (license license:expat)))
9113
9114 (define-public python2-appdirs
9115 (package-with-python2 python-appdirs))
9116
9117 (define-public python-gorilla
9118 (package
9119 (name "python-gorilla")
9120 (version "0.3.0")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "gorilla" version))
9124 (sha256
9125 (base32
9126 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9127 (build-system python-build-system)
9128 (home-page "https://github.com/christophercrouzet/gorilla")
9129 (synopsis "Convenient monkey patching with Python")
9130 (description
9131 "Gorilla is a Python library that provides a convenient approach to
9132 monkey patching. Monkey patching is the process of modifying module and
9133 class attributes at runtime with the purpose of replacing or extending
9134 third-party code.")
9135 (license license:expat)))
9136
9137 (define-public python-llfuse
9138 (package
9139 (name "python-llfuse")
9140 (version "1.3.8")
9141 (source (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "llfuse" version))
9144 (sha256
9145 (base32
9146 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9147 (build-system python-build-system)
9148 (inputs
9149 `(("fuse" ,fuse)
9150 ("attr" ,attr)))
9151 (native-inputs
9152 `(("pkg-config" ,pkg-config)))
9153 (synopsis "Python bindings for FUSE")
9154 (description
9155 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9156 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9157 (license license:lgpl2.0+)
9158 (properties `((python2-variant . ,(delay python2-llfuse))))))
9159
9160 (define-public python2-llfuse
9161 (package (inherit (package-with-python2
9162 (strip-python2-variant python-llfuse)))
9163 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
9164
9165 (define-public python-msgpack
9166 (package
9167 (name "python-msgpack")
9168 (version "1.0.0")
9169 (source (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "msgpack" version))
9172 (sha256
9173 (base32
9174 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9175 (build-system python-build-system)
9176 (arguments
9177 `(#:modules ((guix build utils)
9178 (guix build python-build-system)
9179 (ice-9 ftw)
9180 (srfi srfi-1)
9181 (srfi srfi-26))
9182 #:phases
9183 (modify-phases %standard-phases
9184 (replace 'check
9185 (lambda _
9186 (let ((cwd (getcwd)))
9187 (setenv "PYTHONPATH"
9188 (string-append cwd "/build/"
9189 (find (cut string-prefix? "lib" <>)
9190 (scandir (string-append cwd "/build")))
9191 ":"
9192 (getenv "PYTHONPATH")))
9193 (invoke "pytest" "-v" "test")))))))
9194 (native-inputs
9195 `(("python-pytest" ,python-pytest)))
9196 (synopsis "MessagePack (de)serializer")
9197 (description "MessagePack is a fast, compact binary serialization format,
9198 suitable for similar data to JSON. This package provides CPython bindings for
9199 reading and writing MessagePack data.")
9200 (home-page "https://pypi.org/project/msgpack/")
9201 (license license:asl2.0)))
9202
9203 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9204 ;; release 0.5. Some packages like borg still call it by the old name for now.
9205 ;; <https://bugs.gnu.org/30662>
9206 (define-public python-msgpack-transitional
9207 (package
9208 (inherit python-msgpack)
9209 (name "python-msgpack-transitional")
9210 (version "0.5.6")
9211 (source (origin
9212 (method url-fetch)
9213 (uri (pypi-uri "msgpack" version))
9214 (sha256
9215 (base32
9216 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9217 (arguments
9218 (substitute-keyword-arguments (package-arguments python-msgpack)
9219 ((#:phases phases)
9220 `(modify-phases ,phases
9221 (add-after 'unpack 'configure-transitional
9222 (lambda _
9223 ;; Keep using the old name.
9224 (substitute* "setup.py"
9225 (("TRANSITIONAL = False")
9226 "TRANSITIONAL = 1"))
9227 #t))))))))
9228
9229 (define-public python2-msgpack
9230 (package-with-python2 python-msgpack))
9231
9232 (define-public python-netaddr
9233 (package
9234 (name "python-netaddr")
9235 (version "0.7.19")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "netaddr" version))
9240 (sha256
9241 (base32
9242 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9243 (build-system python-build-system)
9244 (arguments `(#:tests? #f)) ;; No tests.
9245 (home-page "https://github.com/drkjam/netaddr/")
9246 (synopsis "Pythonic manipulation of network addresses")
9247 (description
9248 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9249 and MAC network addresses.")
9250 (license license:bsd-3)))
9251
9252 (define-public python2-netaddr
9253 (package-with-python2 python-netaddr))
9254
9255 (define-public python2-pyroute2
9256 (package
9257 (name "python2-pyroute2")
9258 (version "0.5.6")
9259 (source
9260 (origin
9261 (method url-fetch)
9262 (uri (pypi-uri "pyroute2" version))
9263 (sha256
9264 (base32
9265 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9266 (build-system python-build-system)
9267 (arguments
9268 `(#:python ,python-2)) ;Python 3.x is not supported
9269 (home-page "https://github.com/svinota/pyroute2")
9270 (synopsis "Python netlink library")
9271 (description
9272 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9273 Supported netlink families and protocols include:
9274 @itemize
9275 @item rtnl, network settings - addresses, routes, traffic controls
9276 @item nfnetlink - netfilter API: ipset, nftables, ...
9277 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9278 @item devlink - manage and monitor devlink-enabled hardware
9279 @item generic - generic netlink families
9280 @itemize
9281 @item nl80211 - wireless functions API (basic support)
9282 @item taskstats - extended process statistics
9283 @item acpi_events - ACPI events monitoring
9284 @item thermal_events - thermal events monitoring
9285 @item VFS_DQUOT - disk quota events monitoring
9286 @end itemize
9287 @end itemize")
9288 (license license:gpl2+)))
9289
9290 (define-public python-wrapt
9291 (package
9292 (name "python-wrapt")
9293 (version "1.11.2")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "wrapt" version))
9298 (sha256
9299 (base32
9300 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9301 (build-system python-build-system)
9302 (arguments
9303 ;; Tests are not included in the tarball, they are only available in the
9304 ;; git repository.
9305 `(#:tests? #f))
9306 (home-page "https://github.com/GrahamDumpleton/wrapt")
9307 (synopsis "Module for decorators, wrappers and monkey patching")
9308 (description
9309 "The aim of the wrapt module is to provide a transparent object proxy for
9310 Python, which can be used as the basis for the construction of function
9311 wrappers and decorator functions.")
9312 (license license:bsd-2)))
9313
9314 (define-public python2-wrapt
9315 (package-with-python2 python-wrapt))
9316
9317 (define-public python-commonmark
9318 (package
9319 (name "python-commonmark")
9320 (version "0.9.1")
9321 (source
9322 (origin
9323 (method url-fetch)
9324 (uri (pypi-uri "commonmark" version))
9325 (sha256
9326 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9327 (build-system python-build-system)
9328 (arguments
9329 `(#:phases
9330 (modify-phases %standard-phases
9331 (replace 'check
9332 (lambda* (#:key inputs outputs #:allow-other-keys)
9333 (add-installed-pythonpath inputs outputs)
9334 (invoke "python" "setup.py" "test"))))))
9335 (home-page "https://github.com/readthedocs/commonmark.py")
9336 (synopsis "Python parser for the CommonMark Markdown spec")
9337 (description
9338 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9339 Markdown parser and renderer for the CommonMark specification, using only
9340 native modules.")
9341 (license license:bsd-3)))
9342
9343 (define-public python-xlrd
9344 (package
9345 (name "python-xlrd")
9346 (version "1.2.0")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "xlrd" version))
9350 (sha256
9351 (base32
9352 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9353 (build-system python-build-system)
9354 (arguments
9355 `(#:phases
9356 (modify-phases %standard-phases
9357 ;; Some tests depend on writing a temporary file to the user's home
9358 ;; directory.
9359 (add-after 'unpack 'fix-tests
9360 (lambda _
9361 (delete-file "tests/test_open_workbook.py")
9362 #t)))))
9363 (home-page "http://www.python-excel.org/")
9364 (synopsis "Library for extracting data from Excel files")
9365 (description "This package provides a library to extract data from
9366 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9367 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9368 Unicode-aware. It is not intended as an end-user tool.")
9369 (license license:bsd-3)))
9370
9371 (define-public python2-xlrd
9372 (package-with-python2 python-xlrd))
9373
9374 (define-public python-immutables
9375 (package
9376 (name "python-immutables")
9377 (version "0.14")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "immutables" version))
9382 (sha256
9383 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9384 (build-system python-build-system)
9385 (home-page "https://github.com/MagicStack/immutables")
9386 (synopsis "High-performance immutable mapping type for Python")
9387 (description
9388 "An immutable mapping type for Python. The underlying datastructure is a
9389 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9390 functional languages.")
9391 (license license:asl2.0)))
9392
9393 (define-public python-prettytable
9394 (package
9395 (name "python-prettytable")
9396 (version "0.7.2")
9397 (source
9398 (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9401 (sha256
9402 (base32
9403 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9404 (build-system python-build-system)
9405 (home-page "https://code.google.com/archive/p/prettytable/")
9406 (synopsis "Display tabular data in an ASCII table format")
9407 (description
9408 "A library designed to represent tabular data in visually appealing ASCII
9409 tables. PrettyTable allows for selection of which columns are to be printed,
9410 independent alignment of columns (left or right justified or centred) and
9411 printing of sub-tables by specifying a row range.")
9412 (license license:bsd-3)))
9413
9414 (define-public python2-prettytable
9415 (package-with-python2 python-prettytable))
9416
9417 (define-public python-curio
9418 (package
9419 (name "python-curio")
9420 (version "1.2")
9421 (source
9422 (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "curio" version))
9425 (sha256
9426 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9427 (build-system python-build-system)
9428 (arguments
9429 `(#:phases
9430 (modify-phases %standard-phases
9431 (replace 'check
9432 (lambda* (#:key inputs outputs #:allow-other-keys)
9433 (add-installed-pythonpath inputs outputs)
9434 (invoke "pytest" "-vv" "-k"
9435 ;; Tries to open an outgoing connection.
9436 "not test_ssl_outgoing"))))))
9437 (native-inputs
9438 `(("python-pytest" ,python-pytest)))
9439 (home-page "https://github.com/dabeaz/curio")
9440 (synopsis "Coroutine-based library for concurrent Python")
9441 (description
9442 "Curio is a coroutine-based library for concurrent Python systems
9443 programming. It provides standard programming abstractions such as as
9444 tasks, sockets, files, locks, and queues.")
9445 (license license:bsd-3)))
9446
9447 (define-public python-tables
9448 (package
9449 (name "python-tables")
9450 (version "3.6.1")
9451 (source
9452 (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "tables" version))
9455 (sha256
9456 (base32
9457 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9458 (modules '((guix build utils)))
9459 (snippet
9460 '(begin
9461 ;; Remove pre-compiled .pyc files from source.
9462 (for-each delete-file-recursively
9463 (find-files "." "__pycache__" #:directories? #t))
9464 (for-each delete-file (find-files "." "\\.pyc$"))
9465 #t))))
9466 (build-system python-build-system)
9467 (arguments
9468 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9469 ;; or "check", so we must override the build and check phases.
9470 #:phases
9471 (modify-phases %standard-phases
9472 (add-after 'unpack 'use-gcc
9473 (lambda _
9474 (substitute* "setup.py"
9475 (("^( +)compiler = new_compiler\\(\\)" line indent)
9476 (string-append line
9477 "\n"
9478 indent
9479 "compiler.set_executables(compiler='gcc',"
9480 "compiler_so='gcc',"
9481 "linker_exe='gcc',"
9482 "linker_so='gcc -shared')")))
9483 #t))
9484 (add-after 'unpack 'disable-tuning
9485 (lambda _
9486 (substitute* "setup.py"
9487 (("cpu_flags = .*")
9488 "cpu_flags = ['sse2']\n"))
9489 #t))
9490 (replace 'build
9491 (lambda* (#:key inputs #:allow-other-keys)
9492 (invoke "python" "setup.py" "build"
9493 (string-append "--hdf5="
9494 (assoc-ref inputs "hdf5")))))
9495 (replace 'check
9496 (lambda* (#:key inputs #:allow-other-keys)
9497 (invoke "python" "setup.py" "check"
9498 (string-append "--hdf5="
9499 (assoc-ref inputs "hdf5"))))))))
9500 (propagated-inputs
9501 `(("python-numexpr" ,python-numexpr)
9502 ("python-numpy" ,python-numpy)))
9503 (native-inputs
9504 `(("python-cython" ,python-cython)
9505 ("pkg-config" ,pkg-config)))
9506 (inputs
9507 `(("hdf5" ,hdf5-1.10)
9508 ("bzip2" ,bzip2)
9509 ("zlib" ,zlib)))
9510 (home-page "https://www.pytables.org/")
9511 (synopsis "Hierarchical datasets for Python")
9512 (description "PyTables is a package for managing hierarchical datasets and
9513 designed to efficiently cope with extremely large amounts of data.")
9514 (license license:bsd-3)))
9515
9516 (define-public python2-tables
9517 (package-with-python2 python-tables))
9518
9519 (define-public python-sniffio
9520 (package
9521 (name "python-sniffio")
9522 (version "1.1.0")
9523 (source
9524 (origin
9525 (method url-fetch)
9526 (uri (pypi-uri "sniffio" version))
9527 (sha256
9528 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9529 (build-system python-build-system)
9530 (arguments
9531 `(#:phases
9532 (modify-phases %standard-phases
9533 (replace 'check
9534 (lambda _
9535 (invoke "pytest" "-vv"))))))
9536 (native-inputs
9537 `(("python-curio" ,python-curio)
9538 ("python-pytest" ,python-pytest)
9539 ("python-pytest-cov" ,python-pytest-cov)))
9540 (home-page "https://github.com/python-trio/sniffio")
9541 (synopsis "Detect which async library a program is running under")
9542 (description "This package detects which async library a program is
9543 running under. It supports multiple async I/O packages, like Trio, and
9544 asyncio.")
9545 ;; Either license applies.
9546 (license (list license:expat license:asl2.0))))
9547
9548 (define-public python-pytest-black
9549 (package
9550 (name "python-pytest-black")
9551 (version "0.3.8")
9552 (source
9553 (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "pytest-black" version))
9556 (sha256
9557 (base32
9558 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9559 (build-system python-build-system)
9560 (propagated-inputs
9561 `(("python-pytest" ,python-pytest)
9562 ("python-black" ,python-black)
9563 ("python-toml" ,python-toml)))
9564 (native-inputs
9565 `(("python-setuptools-scm" ,python-setuptools-scm)))
9566 (home-page "https://github.com/shopkeep/pytest-black")
9567 (synopsis "Pytest plugin to enable format checking with black")
9568 (description
9569 "This package provides a pytest plugin to enable format checking with the
9570 Python code formatter \"black\".")
9571 (license license:expat)))
9572
9573 (define-public python-get-version
9574 (package
9575 (name "python-get-version")
9576 (version "2.1")
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "get_version" version))
9581 (sha256
9582 (base32
9583 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9584 (build-system python-build-system)
9585 (propagated-inputs
9586 `(("python-pygments" ,python-pygments)
9587 ("python-pytest" ,python-pytest)
9588 ("python-pytest-black" ,python-pytest-black)
9589 ("python-pytest-cov" ,python-pytest-cov)
9590 ("python-setuptools" ,python-setuptools)
9591 ("python-testpath" ,python-testpath)))
9592 (home-page "https://github.com/flying-sheep/get_version")
9593 (synopsis "Version helper in the spirit of versioneer")
9594 (description
9595 "This package provides a version helper that lets you automatically use
9596 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9597 also supports getting the version from Python source distributions or, once
9598 your package is installed, via @code{pkg_resources} (part of
9599 @code{setuptools}).")
9600 (license license:gpl3+)))
9601
9602 (define-public python-legacy-api-wrap
9603 (package
9604 (name "python-legacy-api-wrap")
9605 (version "1.2")
9606 (source
9607 (origin
9608 (method url-fetch)
9609 (uri (pypi-uri "legacy-api-wrap" version))
9610 (sha256
9611 (base32
9612 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9613 (build-system python-build-system)
9614 (propagated-inputs
9615 `(("python-get-version" ,python-get-version)
9616 ("python-pytest" ,python-pytest)
9617 ("python-pytest-black" ,python-pytest-black)
9618 ("python-pytest-cov" ,python-pytest-cov)
9619 ("python-setuptools" ,python-setuptools)))
9620 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9621 (synopsis "Legacy API wrapper")
9622 (description "This module defines a decorator to wrap legacy APIs. The
9623 primary use case is APIs defined before keyword-only parameters existed.")
9624 (license license:gpl3+)))
9625
9626 (define-public python-pyasn1
9627 (package
9628 (name "python-pyasn1")
9629 (version "0.4.8")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "pyasn1" version))
9634 (sha256
9635 (base32
9636 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9637 (build-system python-build-system)
9638 (home-page "http://pyasn1.sourceforge.net/")
9639 (synopsis "ASN.1 types and codecs")
9640 (description
9641 "This is an implementation of ASN.1 types and codecs in Python. It is
9642 suitable for a wide range of protocols based on the ASN.1 specification.")
9643 (license license:bsd-2)))
9644
9645 (define-public python2-pyasn1
9646 (package-with-python2 python-pyasn1))
9647
9648 (define-public python-pyasn1-modules
9649 (package
9650 (name "python-pyasn1-modules")
9651 (version "0.2.2")
9652 (source
9653 (origin
9654 (method url-fetch)
9655 (uri (pypi-uri "pyasn1-modules" version))
9656 (sha256
9657 (base32
9658 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9659 (build-system python-build-system)
9660 (propagated-inputs
9661 `(("python-pyasn1" ,python-pyasn1)))
9662 (home-page "https://sourceforge.net/projects/pyasn1/")
9663 (synopsis "ASN.1 codec implementations")
9664 (description
9665 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9666 implementations of ASN.1-based codecs and protocols.")
9667 (license license:bsd-3)))
9668
9669 (define-public python2-pyasn1-modules
9670 (package-with-python2 python-pyasn1-modules))
9671
9672 (define-public python-ipaddress
9673 (package
9674 (name "python-ipaddress")
9675 (version "1.0.22")
9676 (source (origin
9677 (method url-fetch)
9678 (uri (pypi-uri "ipaddress" version))
9679 (sha256
9680 (base32
9681 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9682 (build-system python-build-system)
9683 (home-page "https://github.com/phihag/ipaddress")
9684 (synopsis "IP address manipulation library")
9685 (description
9686 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9687 in Python. This library is used to create, poke at, and manipulate IPv4 and
9688 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9689 module to older versions of Python.")
9690 (license license:psfl)))
9691
9692 (define-public python2-ipaddress
9693 (package-with-python2 python-ipaddress))
9694
9695 (define-public python2-ipaddr
9696 (package
9697 (name "python2-ipaddr")
9698 (version "2.1.11")
9699 (source
9700 (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "ipaddr" version))
9703 (sha256
9704 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9705 (build-system python-build-system)
9706 (arguments
9707 `(#:python ,python-2 ;version 2 only
9708 #:phases
9709 (modify-phases %standard-phases
9710 (replace 'check
9711 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9712 (home-page "https://github.com/google/ipaddr-py")
9713 (synopsis "IP address manipulation library")
9714 (description
9715 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9716 IPv6 addresses and networks.
9717
9718 For new implementations you may prefer to use the standard module
9719 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9720 versions of Python.")
9721 (license license:asl2.0)))
9722
9723 (define-public python-idna
9724 (package
9725 (name "python-idna")
9726 (version "2.10")
9727 (source
9728 (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "idna" version))
9731 (sha256
9732 (base32
9733 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9734 (build-system python-build-system)
9735 (home-page "https://github.com/kjd/idna")
9736 (synopsis "Internationalized domain names in applications")
9737 (description
9738 "This is a library to support the Internationalised Domain Names in
9739 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9740 protocol is often referred to as “IDNA2008” and can produce different results
9741 from the earlier standard from 2003. The library is also intended to act as a
9742 suitable drop-in replacement for the “encodings.idna” module that comes with
9743 the Python standard library but currently only supports the older 2003
9744 specification.")
9745 (license license:bsd-4)))
9746
9747 (define-public python-idna-2.7
9748 (package (inherit python-idna)
9749 (version "2.7")
9750 (source (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "idna" version))
9753 (sha256
9754 (base32
9755 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9756
9757
9758 (define-public python2-idna
9759 (package-with-python2 python-idna))
9760
9761 (define-public python-libsass
9762 (package
9763 (name "python-libsass")
9764 (version "0.20.1")
9765 (source
9766 (origin
9767 ;; PyPI tarball is missing some test files.
9768 (method git-fetch)
9769 (uri (git-reference
9770 (url "https://github.com/sass/libsass-python")
9771 (commit version)))
9772 (file-name (git-file-name name version))
9773 (sha256
9774 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9775 (build-system python-build-system)
9776 (arguments
9777 `(#:phases
9778 (modify-phases %standard-phases
9779 ;; Use Guix package of libsass instead of compiling from a checkout.
9780 (add-before 'build 'set-libsass
9781 (lambda _
9782 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9783 #t))
9784 (replace 'check
9785 (lambda* (#:key inputs outputs #:allow-other-keys)
9786 (add-installed-pythonpath inputs outputs)
9787 (invoke "pytest" "sasstests.py"))))))
9788 (native-inputs
9789 `(("python-pytest" ,python-pytest)
9790 ("python-werkzeug" ,python-werkzeug)))
9791 (inputs
9792 `(("libsass" ,libsass)))
9793 (propagated-inputs
9794 `(("python-six" ,python-six)))
9795 (home-page "https://sass.github.io/libsass-python/")
9796 (synopsis "Straightforward binding of libsass for Python")
9797 (description
9798 "This package provides a simple Python extension module @code{sass} which
9799 is binding LibSass.")
9800 (license license:expat)))
9801
9802 (define-public python-idna-ssl
9803 (package
9804 (name "python-idna-ssl")
9805 (version "1.0.1")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "idna-ssl" version))
9810 (sha256
9811 (base32
9812 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9813 (build-system python-build-system)
9814 (arguments
9815 `(#:tests? #f)) ;circular dependency with python-aiohttp
9816 (home-page "https://github.com/aio-libs/idna-ssl")
9817 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9818 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9819 domains support.")
9820 (license license:expat)))
9821
9822 (define-public python-pretend
9823 (package
9824 (name "python-pretend")
9825 (version "1.0.9")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (pypi-uri "pretend" version))
9830 (sha256
9831 (base32
9832 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9833 (build-system python-build-system)
9834 (home-page "https://github.com/alex/pretend")
9835 (synopsis "Library for stubbing in Python")
9836 (description
9837 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9838 technique for writing tests. You may hear the term mixed up with mocks,
9839 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9840 responses, rather than doing any computation.")
9841 (license license:bsd-3)))
9842
9843 (define-public python2-pretend
9844 (package-with-python2 python-pretend))
9845
9846 (define-public python-pip
9847 (package
9848 (name "python-pip")
9849 (version "20.2.4")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "pip" version))
9854 (sha256
9855 (base32
9856 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9857 (build-system python-build-system)
9858 (arguments
9859 '(#:tests? #f)) ; there are no tests in the pypi archive.
9860 (home-page "https://pip.pypa.io/")
9861 (synopsis "Package manager for Python software")
9862 (description
9863 "Pip is a package manager for Python software, that finds packages on the
9864 Python Package Index (PyPI).")
9865 (license license:expat)))
9866
9867 (define-public python2-pip
9868 (package-with-python2 python-pip))
9869
9870 (define-public python-tlsh
9871 (package
9872 (name "python-tlsh")
9873 (version "3.4.5")
9874 (home-page "https://github.com/trendmicro/tlsh")
9875 (source
9876 (origin
9877 (method git-fetch)
9878 (uri (git-reference
9879 (url "https://github.com/trendmicro/tlsh")
9880 (commit (string-append "v" version))))
9881 (file-name (git-file-name name version))
9882 (sha256
9883 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9884 (build-system cmake-build-system)
9885 (arguments
9886 '(#:out-of-source? #f
9887 #:phases (modify-phases %standard-phases
9888 (replace
9889 'install
9890 (lambda* (#:key outputs #:allow-other-keys)
9891 ;; Build and install the Python bindings. The underlying
9892 ;; C++ library is apparently not meant to be installed.
9893 (let ((out (assoc-ref outputs "out")))
9894 (with-directory-excursion "py_ext"
9895 (and (system* "python" "setup.py" "build")
9896 (system* "python" "setup.py" "install"
9897 (string-append "--prefix=" out))))))))))
9898 (inputs `(("python" ,python-wrapper))) ;for the bindings
9899 (synopsis "Fuzzy matching library for Python")
9900 (description
9901 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9902 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9903 value which can be used for similarity comparisons. Similar objects have
9904 similar hash values, which allows for the detection of similar objects by
9905 comparing their hash values. The byte stream should have a sufficient amount
9906 of complexity; for example, a byte stream of identical bytes will not generate
9907 a hash value.")
9908 (license license:asl2.0)))
9909
9910 (define-public python2-tlsh
9911 (package
9912 (inherit python-tlsh)
9913 (name "python2-tlsh")
9914 (inputs `(("python" ,python-2)))))
9915
9916 (define-public python-termcolor
9917 (package
9918 (name "python-termcolor")
9919 (version "1.1.0")
9920 (source
9921 (origin
9922 (method url-fetch)
9923 (uri (pypi-uri "termcolor" version))
9924 (sha256
9925 (base32
9926 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9927 (build-system python-build-system)
9928 (arguments
9929 ;; There are no tests.
9930 `(#:tests? #f))
9931 (home-page "https://pypi.org/project/termcolor/")
9932 (synopsis "ANSII Color formatting for terminal output")
9933 (description
9934 "This package provides ANSII Color formatting for output in terminals.")
9935 (license license:expat)))
9936
9937 (define-public python2-termcolor
9938 (package-with-python2 python-termcolor))
9939
9940 (define-public python-terminaltables
9941 (package
9942 (name "python-terminaltables")
9943 (version "3.1.0")
9944 (source
9945 (origin
9946 (method url-fetch)
9947 (uri (pypi-uri "terminaltables" version))
9948 (sha256
9949 (base32
9950 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9951 (build-system python-build-system)
9952 (home-page "https://github.com/Robpol86/terminaltables")
9953 (synopsis
9954 "Generate simple tables in terminals from a nested list of strings")
9955 (description
9956 "This package makes it easy to draw tables in terminal/console
9957 applications from a list of lists of strings. It supports multi-line rows.")
9958 (license license:expat)))
9959
9960 (define-public python-libarchive-c
9961 (package
9962 (name "python-libarchive-c")
9963 (version "2.9")
9964 (source (origin
9965 (method url-fetch)
9966 (uri (pypi-uri "libarchive-c" version))
9967 (sha256
9968 (base32
9969 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9970 (build-system python-build-system)
9971 (arguments
9972 '(#:phases (modify-phases %standard-phases
9973 (add-before
9974 'build 'reference-libarchive
9975 (lambda* (#:key inputs #:allow-other-keys)
9976 ;; Retain the absolute file name of libarchive.so.
9977 (let ((libarchive (assoc-ref inputs "libarchive")))
9978 (substitute* "libarchive/ffi.py"
9979 (("find_library\\('archive'\\)")
9980 (string-append "'" libarchive
9981 "/lib/libarchive.so'"))))))
9982 (replace 'check
9983 (lambda _ (invoke "pytest" "-vv"))))))
9984 (native-inputs
9985 `(("python-mock" ,python-mock)
9986 ("python-pytest" ,python-pytest)))
9987 (inputs
9988 `(("libarchive" ,libarchive)))
9989 (home-page "https://github.com/Changaco/python-libarchive-c")
9990 (synopsis "Python interface to libarchive")
9991 (description
9992 "This package provides Python bindings to libarchive, a C library to
9993 access possibly compressed archives in many different formats. It uses
9994 Python's @code{ctypes} foreign function interface (FFI).")
9995 (license license:lgpl2.0+)))
9996
9997 (define-public python2-libarchive-c
9998 (package-with-python2 python-libarchive-c))
9999
10000 (define-public python-file
10001 (package
10002 (inherit file)
10003 (name "python-file")
10004 (build-system python-build-system)
10005 (arguments
10006 '(#:tests? #f ;no tests
10007 #:configure-flags '("--single-version-externally-managed" "--root=/")
10008 #:phases (modify-phases %standard-phases
10009 (add-before 'build 'change-directory
10010 (lambda _
10011 (chdir "python")
10012 #t))
10013 (add-before 'build 'set-library-file-name
10014 (lambda* (#:key inputs #:allow-other-keys)
10015 (let ((file (assoc-ref inputs "file")))
10016 (substitute* "magic.py"
10017 (("find_library\\('magic'\\)")
10018 (string-append "'" file "/lib/libmagic.so'")))
10019 #t))))))
10020 (inputs `(("file" ,file)))
10021 (native-inputs (if (%current-target-system)
10022 `(("self" ,this-package))
10023 '()))
10024 (synopsis "Python bindings to the libmagic file type guesser")
10025 (description "This package provides Python bindings to the libmagic file
10026 type guesser.
10027
10028 Note that this module and the @code{python-magic} module both provide a
10029 @file{magic.py} file; these two modules, which are different and were
10030 developed separately, both serve the same purpose: provide Python bindings for
10031 libmagic.")))
10032
10033 (define-public python2-file
10034 (package-with-python2 python-file))
10035
10036 (define-public python-debian
10037 (package
10038 (name "python-debian")
10039 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10040 (version "0.1.36")
10041 (source
10042 (origin
10043 ;; Use git-fetch, as pypi doesn't include test suite.
10044 (method git-fetch)
10045 (uri (git-reference
10046 (url home-page)
10047 (commit version)))
10048 (file-name (git-file-name name version))
10049 (sha256
10050 (base32
10051 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10052 (build-system python-build-system)
10053 (arguments
10054 `(#:phases (modify-phases %standard-phases
10055 (add-after 'unpack 'remove-debian-specific-tests
10056 ;; python-apt, apt and dpkg are not yet available in guix,
10057 ;; and these tests heavily depend on them.
10058 (lambda _
10059 (delete-file "lib/debian/tests/test_deb822.py")
10060 (delete-file "lib/debian/tests/test_debfile.py")
10061 #t)))))
10062 (propagated-inputs
10063 `(("python-six" ,python-six)
10064 ("python-chardet" ,python-chardet)))
10065 (synopsis "Debian package related modules")
10066 (description
10067 ;; XXX: Use @enumerate instead of @itemize to work around
10068 ;; <http://bugs.gnu.org/21772>.
10069 "This package provides Python modules that abstract many formats of
10070 Debian-related files, such as:
10071
10072 @enumerate
10073 @item Debtags information;
10074 @item @file{debian/changelog} files;
10075 @item packages files, pdiffs;
10076 @item control files of single or multiple RFC822-style paragraphs---e.g.
10077 @file{debian/control}, @file{.changes}, @file{.dsc};
10078 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10079 contained files and meta-information.
10080 @end enumerate\n")
10081
10082 ;; Modules are either GPLv2+ or GPLv3+.
10083 (license license:gpl3+)))
10084
10085 (define-public python-nbformat
10086 (package
10087 (name "python-nbformat")
10088 (version "4.4.0")
10089 (source
10090 (origin
10091 (method url-fetch)
10092 (uri (pypi-uri "nbformat" version))
10093 (sha256
10094 (base32
10095 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10096 (build-system python-build-system)
10097 (arguments `(#:tests? #f)) ; no test target
10098 (propagated-inputs
10099 `(("python-ipython-genutils" ,python-ipython-genutils)
10100 ("python-jsonschema" ,python-jsonschema)
10101 ("python-jupyter-core" ,python-jupyter-core)
10102 ("python-traitlets" ,python-traitlets)))
10103 (home-page "https://jupyter.org")
10104 (synopsis "Jupyter Notebook format")
10105 (description "This package provides the reference implementation of the
10106 Jupyter Notebook format and Python APIs for working with notebooks.")
10107 (license license:bsd-3)))
10108
10109 (define-public python2-nbformat
10110 (package-with-python2 python-nbformat))
10111
10112 (define-public python-bleach
10113 (package
10114 (name "python-bleach")
10115 (version "3.1.5")
10116 (source
10117 (origin
10118 (method url-fetch)
10119 (uri (pypi-uri "bleach" version))
10120 (sha256
10121 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10122 (build-system python-build-system)
10123 (propagated-inputs
10124 `(("python-webencodings" ,python-webencodings)
10125 ("python-six" ,python-six)))
10126 (native-inputs
10127 `(("python-datrie" ,python-datrie)
10128 ("python-genshi" ,python-genshi)
10129 ("python-lxml" ,python-lxml)
10130 ("python-pytest" ,python-pytest)))
10131 (home-page "https://github.com/mozilla/bleach")
10132 (synopsis "Whitelist-based HTML-sanitizing tool")
10133 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10134 (license license:asl2.0)))
10135
10136 (define-public python2-bleach
10137 (package-with-python2 python-bleach))
10138
10139 (define-public python-entrypoints
10140 (package
10141 (name "python-entrypoints")
10142 (version "0.3")
10143 (source
10144 (origin
10145 (method url-fetch)
10146 (uri (pypi-uri "entrypoints" version))
10147 (sha256
10148 (base32
10149 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10150 (build-system python-build-system)
10151 ;; The package does not come with a setup.py file, so we have to generate
10152 ;; one ourselves.
10153 (arguments
10154 `(#:tests? #f
10155 #:phases
10156 (modify-phases %standard-phases
10157 (add-after 'unpack 'create-setup.py
10158 (lambda _
10159 (call-with-output-file "setup.py"
10160 (lambda (port)
10161 (format port "\
10162 from setuptools import setup
10163 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10164 " ,version))))))))
10165 (home-page "https://github.com/takluyver/entrypoints")
10166 (synopsis "Discover and load entry points from installed Python packages")
10167 (description "Entry points are a way for Python packages to advertise
10168 objects with some common interface. The most common examples are
10169 @code{console_scripts} entry points, which define shell commands by
10170 identifying a Python function to run. The @code{entrypoints} module contains
10171 functions to find and load entry points.")
10172 (license license:expat)))
10173
10174 (define-public python2-entrypoints
10175 (package-with-python2 python-entrypoints))
10176
10177 (define-public python-epc
10178 (package
10179 (name "python-epc")
10180 (version "0.0.5")
10181 (source
10182 (origin
10183 (method url-fetch)
10184 (uri (pypi-uri "epc" version))
10185 (sha256
10186 (base32
10187 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10188 (build-system python-build-system)
10189 (propagated-inputs
10190 `(("python-sexpdata" ,python-sexpdata)))
10191 (native-inputs
10192 `(("python-nose" ,python-nose)))
10193 (home-page "https://github.com/tkf/python-epc")
10194 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10195 (description
10196 "Python-EPC can call elisp functions from Python and Python functions
10197 from elisp.")
10198 (license license:gpl3)))
10199
10200 (define-public python-forex-python
10201 (package
10202 (name "python-forex-python")
10203 (version "1.5")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "forex-python" version))
10208 (sha256
10209 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10210 (build-system python-build-system)
10211 (arguments
10212 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10213 ;; repository require online data.
10214 `(#:tests? #f))
10215 (propagated-inputs
10216 `(("python-requests" ,python-requests)
10217 ("python-simplejson" ,python-simplejson)))
10218 (home-page "https://github.com/MicroPyramid/forex-python")
10219 (synopsis "Foreign exchange rates and currency conversion")
10220 (description
10221 "@code{python-forex-python} can be used to manipulate foreign
10222 exchange rates and to operate currency conversions.
10223
10224 Features:
10225 @itemize
10226 @item List all currency rates.
10227 @item BitCoin price for all currencies.
10228 @item Converting amount to BitCoins.
10229 @item Get historical rates for any day since 1999.
10230 @item Conversion rate for one currency(ex; USD to INR).
10231 @item Convert amount from one currency to other.('USD 10$' to INR).
10232 @item Currency symbols.
10233 @item Currency names.
10234 @end itemize")
10235 (license license:expat)))
10236
10237 (define-public python-simpleeval
10238 (package
10239 (name "python-simpleeval")
10240 (version "0.9.10")
10241 (source
10242 (origin
10243 (method url-fetch)
10244 (uri (pypi-uri "simpleeval" version))
10245 (sha256
10246 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10247 (build-system python-build-system)
10248 (home-page "https://github.com/danthedeckie/simpleeval")
10249 (synopsis "Simple, safe single expression evaluator library")
10250 (description
10251 "This package provides a quick single file library for easily adding
10252 evaluatable expressions into python projects. Say you want to allow a user
10253 to set an alarm volume, which could depend on the time of day, alarm level,
10254 how many previous alarms had gone off, and if there is music playing at the
10255 time.")
10256 (license license:expat)))
10257
10258 (define-public python-nbconvert
10259 (package
10260 (name "python-nbconvert")
10261 (version "5.0.0b1")
10262 (source
10263 (origin
10264 (method url-fetch)
10265 (uri (pypi-uri "nbconvert" version))
10266 (sha256
10267 (base32
10268 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10269 (build-system python-build-system)
10270 (arguments
10271 `(;; The "bdist_egg" target is disabled by default, causing the installation
10272 ;; to fail.
10273 #:configure-flags (list "bdist_egg")
10274 ;; FIXME: 5 failures, 40 errors.
10275 #:tests? #f))
10276 ;; #:phases
10277 ;; (modify-phases %standard-phases
10278 ;; (replace 'check
10279 ;; (lambda _
10280 ;; (zero? (system* "py.test" "-v")))))
10281 (native-inputs
10282 `(("python-pytest" ,python-pytest)))
10283 (propagated-inputs
10284 `(("python-bleach" ,python-bleach)
10285 ("python-entrypoints" ,python-entrypoints)
10286 ("python-jinja2" ,python-jinja2)
10287 ("python-jupyter-core" ,python-jupyter-core)
10288 ("python-mistune" ,python-mistune)
10289 ("python-nbformat" ,python-nbformat)
10290 ("python-pygments" ,python-pygments)
10291 ("python-traitlets" ,python-traitlets)))
10292 (home-page "https://jupyter.org")
10293 (synopsis "Converting Jupyter Notebooks")
10294 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10295 notebooks to various other formats via Jinja templates. It allows you to
10296 convert an @code{.ipynb} notebook file into various static formats including:
10297
10298 @enumerate
10299 @item HTML
10300 @item LaTeX
10301 @item PDF
10302 @item Reveal JS
10303 @item Markdown (md)
10304 @item ReStructured Text (rst)
10305 @item executable script
10306 @end enumerate\n")
10307 (license license:bsd-3)))
10308
10309 (define-public python2-nbconvert
10310 (package-with-python2 python-nbconvert))
10311
10312 (define-public python-notebook
10313 (package
10314 (name "python-notebook")
10315 (version "5.7.4")
10316 (source (origin
10317 (method url-fetch)
10318 (uri (pypi-uri "notebook" version))
10319 (sha256
10320 (base32
10321 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10322 (build-system python-build-system)
10323 (arguments
10324 `(#:phases
10325 (modify-phases %standard-phases
10326 (replace 'check
10327 (lambda _
10328 ;; These tests require a browser
10329 (delete-file-recursively "notebook/tests/selenium")
10330 ;; Some tests need HOME
10331 (setenv "HOME" "/tmp")
10332 ;; This file contains "warningfilters", which are not supported
10333 ;; by this version of nose.
10334 (delete-file "setup.cfg")
10335 (with-directory-excursion "/tmp"
10336 (invoke "nosetests" "-v"))
10337 #t)))))
10338 (propagated-inputs
10339 `(("python-jupyter-core" ,python-jupyter-core)
10340 ("python-nbformat" ,python-nbformat)
10341 ("python-nbconvert" ,python-nbconvert)
10342 ("python-prometheus-client" ,python-prometheus-client)
10343 ("python-send2trash" ,python-send2trash)
10344 ("python-terminado" ,python-terminado)))
10345 (native-inputs
10346 `(("python-nose" ,python-nose)
10347 ("python-sphinx" ,python-sphinx)
10348 ("python-requests" ,python-requests)))
10349 (home-page "https://jupyter.org/")
10350 (synopsis "Web-based notebook environment for interactive computing")
10351 (description
10352 "The Jupyter HTML notebook is a web-based notebook environment for
10353 interactive computing.")
10354 (properties `((python2-variant . ,(delay python2-notebook))))
10355 (license license:bsd-3)))
10356
10357 (define-public python2-notebook
10358 (let ((base (package-with-python2
10359 (strip-python2-variant python-notebook))))
10360 (package (inherit base)
10361 (native-inputs
10362 `(("python2-mock" ,python2-mock)
10363 ,@(package-native-inputs base)))
10364 (arguments
10365 (substitute-keyword-arguments (package-arguments base)
10366 ((#:phases phases)
10367 `(modify-phases ,phases
10368 (add-before 'check 'disable-test-case
10369 ;; The test requires network access to localhost. Curiously it
10370 ;; fails with Python 2 only. Simply make the test-case return
10371 ;; immediately.
10372 (lambda _
10373 (substitute*
10374 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10375 (("formats = self.nbconvert_api") "return #")))))))))))
10376
10377 (define-public python-widgetsnbextension
10378 (package
10379 (name "python-widgetsnbextension")
10380 (version "3.5.1")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "widgetsnbextension" version))
10385 (sha256
10386 (base32
10387 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10388 (build-system python-build-system)
10389 (propagated-inputs
10390 `(("python-ipykernel" ,python-ipykernel)
10391 ("python-notebook" ,python-notebook)))
10392 (native-inputs
10393 `(("python-certifi" ,python-certifi)
10394 ("python-nose" ,python-nose)))
10395 (home-page "https://ipython.org")
10396 (synopsis "IPython HTML widgets for Jupyter")
10397 (description "This package provides interactive HTML widgets for Jupyter
10398 notebooks.")
10399 (license license:bsd-3)))
10400
10401 (define-public python2-widgetsnbextension
10402 (package-with-python2 python-widgetsnbextension))
10403
10404 (define-public python-ipywidgets
10405 (package
10406 (name "python-ipywidgets")
10407 (version "7.5.1")
10408 (source
10409 (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "ipywidgets" version))
10412 (sha256
10413 (base32
10414 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10415 (build-system python-build-system)
10416 (propagated-inputs
10417 `(("python-ipython" ,python-ipython)
10418 ("python-traitlets" ,python-traitlets)
10419 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10420 (native-inputs
10421 `(("python-nose" ,python-nose)
10422 ("python-pytest" ,python-pytest)))
10423 (home-page "https://ipython.org")
10424 (synopsis "IPython HTML widgets for Jupyter")
10425 (description "Ipywidgets are interactive HTML widgets for Jupyter
10426 notebooks and the IPython kernel. Notebooks come alive when interactive
10427 widgets are used. Users gain control of their data and can visualize changes
10428 in the data.")
10429 (license license:bsd-3)))
10430
10431 (define-public python2-ipywidgets
10432 (package-with-python2 python-ipywidgets))
10433
10434 (define-public python-jupyter-console
10435 (package
10436 (name "python-jupyter-console")
10437 (version "6.1.0")
10438 (source
10439 (origin
10440 (method url-fetch)
10441 (uri (pypi-uri "jupyter_console" version))
10442 (sha256
10443 (base32
10444 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10445 (build-system python-build-system)
10446 (propagated-inputs
10447 `(("python-ipykernel" ,python-ipykernel)
10448 ("python-jupyter-client" ,python-jupyter-client)
10449 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10450 ("python-pygments" ,python-pygments)))
10451 (native-inputs
10452 `(("python-nose" ,python-nose)))
10453 (home-page "https://jupyter.org")
10454 (synopsis "Jupyter terminal console")
10455 (description "This package provides a terminal-based console frontend for
10456 Jupyter kernels. It also allows for console-based interaction with non-Python
10457 Jupyter kernels such as IJulia and IRKernel.")
10458 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10459 (license license:bsd-3)))
10460
10461 (define-public python2-jupyter-console
10462 (package
10463 (name "python2-jupyter-console")
10464 (version "5.2.0")
10465 (source
10466 (origin
10467 (method url-fetch)
10468 (uri (pypi-uri "jupyter_console" version))
10469 (sha256
10470 (base32
10471 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10472 (build-system python-build-system)
10473 (arguments
10474 `(#:python ,python-2
10475 #:tests? #f)) ; Tests only run in a TTY.
10476 (propagated-inputs
10477 `(("python2-ipykernel" ,python2-ipykernel)
10478 ("python2-jupyter-client" ,python2-jupyter-client)
10479 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10480 ("python2-pygments" ,python2-pygments)))
10481 (native-inputs
10482 `(("python2-nose" ,python2-nose)))
10483 (home-page "https://jupyter.org")
10484 (synopsis "Jupyter terminal console")
10485 (description "This package provides a terminal-based console frontend for
10486 Jupyter kernels. It also allows for console-based interaction with non-Python
10487 Jupyter kernels such as IJulia and IRKernel.")
10488 (license license:bsd-3)))
10489
10490 ;; The python-ipython and python-jupyter-console require each other. To get
10491 ;; the functionality in both packages working, strip down the
10492 ;; python-jupyter-console package when using it as an input to python-ipython.
10493 (define python-jupyter-console-minimal
10494 (package
10495 (inherit python-jupyter-console)
10496 (name "python-jupyter-console-minimal")
10497 (arguments
10498 (substitute-keyword-arguments
10499 (package-arguments python-jupyter-console)
10500 ((#:phases phases)
10501 `(modify-phases ,phases
10502 (add-after 'install 'delete-bin
10503 (lambda* (#:key outputs #:allow-other-keys)
10504 ;; Delete the bin files, to avoid conflicts in profiles
10505 ;; where python-ipython and python-jupyter-console are
10506 ;; both present.
10507 (delete-file-recursively
10508 (string-append
10509 (assoc-ref outputs "out") "/bin"))))))))
10510 ;; Remove the python-ipython propagated input, to avoid the cycle
10511 (propagated-inputs
10512 (alist-delete
10513 "python-ipython"
10514 (package-propagated-inputs python-jupyter-console)))))
10515
10516 (define-public python-qtconsole
10517 (package
10518 (name "python-qtconsole")
10519 (version "4.4.3")
10520 (source
10521 (origin
10522 (method url-fetch)
10523 (uri (pypi-uri "qtconsole" version))
10524 (sha256
10525 (base32
10526 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10527 (build-system python-build-system)
10528 (arguments
10529 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10530 ;; but we only have the LTS version 5.x. This means that there might be
10531 ;; runtime errors, but since this is a dependency of the Jupyter package,
10532 ;; and Jupyter can be used without the qtconsole we can overlook this for
10533 ;; now.
10534 `(#:tests? #f
10535 #:phases
10536 (modify-phases %standard-phases
10537 (add-before 'check 'pre-check
10538 (lambda _
10539 (setenv "QT_QPA_PLATFORM" "offscreen")
10540 #t)))))
10541 (propagated-inputs
10542 `(("python-ipykernel" ,python-ipykernel)
10543 ("python-ipython" ,python-ipython)))
10544 (native-inputs
10545 `(("python-pytest" ,python-pytest)))
10546 (home-page "https://jupyter.org")
10547 (synopsis "Jupyter Qt console")
10548 (description "This package provides a Qt-based console for Jupyter with
10549 support for rich media output.")
10550 (license license:bsd-3)))
10551
10552 (define-public python-jsbeautifier
10553 (package
10554 (name "python-jsbeautifier")
10555 (version "1.10.2")
10556 (home-page "https://github.com/beautify-web/js-beautify")
10557 (source (origin
10558 (method git-fetch)
10559 (uri (git-reference
10560 (url home-page)
10561 (commit (string-append "v" version))))
10562 (file-name (git-file-name name version))
10563 (sha256
10564 (base32
10565 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10566 (build-system python-build-system)
10567 (arguments
10568 `(#:phases (modify-phases %standard-phases
10569 (add-after 'unpack 'chdir
10570 (lambda _
10571 ;; The upstream Git repository contains all the code,
10572 ;; but this package only builds the python code.
10573 (chdir "python")
10574 #t))
10575 (add-after 'unpack 'patch-python-six-requirements
10576 (lambda _
10577 (substitute* "python/setup.py"
10578 (("six>=1.12.0")
10579 "six>=1.11.0"))
10580 #t)))))
10581 (propagated-inputs
10582 `(("python-editorconfig" ,python-editorconfig)
10583 ("python-six" ,python-six)))
10584 (native-inputs
10585 `(("python-pytest" ,python-pytest)))
10586 (synopsis "JavaScript unobfuscator and beautifier")
10587 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10588 popular online obfuscators.")
10589 (license license:expat)))
10590
10591 (define-public jupyter
10592 (package
10593 (name "jupyter")
10594 (version "1.0.0")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "jupyter" version))
10599 (sha256
10600 (base32
10601 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10602 (build-system python-build-system)
10603 (arguments '(#:tests? #f)) ; there are none.
10604 (propagated-inputs
10605 `(("python-ipykernel" ,python-ipykernel)
10606 ("python-ipywidgets" ,python-ipywidgets)
10607 ("python-jupyter-console" ,python-jupyter-console)
10608 ("python-nbconvert" ,python-nbconvert)
10609 ("python-notebook" ,python-notebook)
10610 ("python-qtconsole" ,python-qtconsole)))
10611 (native-search-paths
10612 (list (search-path-specification
10613 (variable "JUPYTER_PATH")
10614 (files '("share/jupyter")))))
10615 (home-page "https://jupyter.org")
10616 (synopsis "Web application for interactive documents")
10617 (description
10618 "The Jupyter Notebook is a web application that allows you to create and
10619 share documents that contain live code, equations, visualizations and
10620 explanatory text. Uses include: data cleaning and transformation, numerical
10621 simulation, statistical modeling, machine learning and much more.")
10622 (license license:bsd-3)))
10623
10624 (define-public python-chardet
10625 (package
10626 (name "python-chardet")
10627 (version "3.0.4")
10628 (source
10629 (origin
10630 (method url-fetch)
10631 (uri (pypi-uri "chardet" version))
10632 (sha256
10633 (base32
10634 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10635 (native-inputs
10636 `(("python-hypothesis" ,python-hypothesis)
10637 ("python-pytest" ,python-pytest)
10638 ("python-pytest-runner" ,python-pytest-runner)))
10639 (build-system python-build-system)
10640 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10641 (arguments `(#:tests? #f))
10642 (home-page "https://github.com/chardet/chardet")
10643 (synopsis "Universal encoding detector for Python 2 and 3")
10644 (description
10645 "This package provides @code{chardet}, a Python module that can
10646 automatically detect a wide range of file encodings.")
10647 (license license:lgpl2.1+)))
10648
10649 (define-public python2-chardet
10650 (package-with-python2 python-chardet))
10651
10652 (define-public python-docopt
10653 (package
10654 (name "python-docopt")
10655 (version "0.6.2")
10656 (source
10657 (origin
10658 (method git-fetch)
10659 ;; The release on PyPI does not include tests.
10660 (uri (git-reference
10661 (url "https://github.com/docopt/docopt")
10662 (commit version)))
10663 (file-name (git-file-name name version))
10664 (sha256
10665 (base32
10666 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10667 (build-system python-build-system)
10668 (native-inputs
10669 `(("python-pytest" ,python-pytest)))
10670 (arguments
10671 `(#:phases
10672 (modify-phases %standard-phases
10673 (replace 'check
10674 (lambda _ (invoke "py.test"))))))
10675 (home-page "http://docopt.org")
10676 (synopsis "Command-line interface description language for Python")
10677 (description "This library allows the user to define a command-line
10678 interface from a program's help message rather than specifying it
10679 programmatically with command-line parsers like @code{getopt} and
10680 @code{argparse}.")
10681 (license license:expat)))
10682
10683 (define-public python2-docopt
10684 (package-with-python2 python-docopt))
10685
10686 (define-public python-pythondialog
10687 (package
10688 (name "python-pythondialog")
10689 (version "3.4.0")
10690 (source
10691 (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "pythondialog" version))
10694 (sha256
10695 (base32
10696 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10697 (build-system python-build-system)
10698 (arguments
10699 `(#:phases
10700 (modify-phases %standard-phases
10701 (add-after 'unpack 'patch-path
10702 (lambda* (#:key inputs #:allow-other-keys)
10703 (let* ((dialog (assoc-ref inputs "dialog")))
10704 ;; Since this library really wants to grovel the search path, we
10705 ;; must hardcode dialog's store path into it.
10706 (substitute* "dialog.py"
10707 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10708 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10709 #t))))
10710 #:tests? #f)) ; no test suite
10711 (propagated-inputs
10712 `(("dialog" ,dialog)))
10713 (home-page "http://pythondialog.sourceforge.net/")
10714 (synopsis "Python interface to the UNIX dialog utility")
10715 (description "A Python wrapper for the dialog utility. Its purpose is to
10716 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10717 This allows one to make simple text-mode user interfaces on Unix-like systems")
10718 (license license:lgpl2.1)
10719 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10720
10721 (define-public python2-pythondialog
10722 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10723 (package
10724 (inherit base)
10725 (version (package-version python-pythondialog))
10726 (source (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "python2-pythondialog" version))
10729 (sha256
10730 (base32
10731 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10732
10733 (define-public python-configobj
10734 (package
10735 (name "python-configobj")
10736 (version "5.0.6")
10737 (source (origin
10738 (method url-fetch)
10739 (uri (pypi-uri "configobj" version))
10740 (sha256
10741 (base32
10742 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10743 ;; Patch setup.py so it looks for python-setuptools, which is
10744 ;; required to parse the keyword 'install_requires' in setup.py.
10745 (patches (search-patches "python-configobj-setuptools.patch"))))
10746 (build-system python-build-system)
10747 (propagated-inputs
10748 `(("python-six" ,python-six)))
10749 (synopsis "Config file reading, writing and validation")
10750 (description "ConfigObj is a simple but powerful config file reader and
10751 writer: an ini file round tripper. Its main feature is that it is very easy to
10752 use, with a straightforward programmer’s interface and a simple syntax for
10753 config files.")
10754 (home-page "https://github.com/DiffSK/configobj")
10755 (license license:bsd-3)))
10756
10757 (define-public python2-configobj
10758 (package-with-python2 python-configobj))
10759
10760 (define-public python-configargparse
10761 (package
10762 (name "python-configargparse")
10763 (version "1.2.3")
10764 (source (origin
10765 (method url-fetch)
10766 (uri (pypi-uri "ConfigArgParse" version))
10767 (sha256
10768 (base32
10769 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10770 (build-system python-build-system)
10771 (native-inputs
10772 `(("python-pyyaml" ,python-pyyaml)))
10773 (arguments
10774 `(#:phases
10775 (modify-phases %standard-phases
10776 (replace 'check
10777 (lambda _
10778 ;; Bypass setuptools-shim because one test relies on "setup.py"
10779 ;; being the first argument passed to the python call.
10780 ;;
10781 ;; NOTE: Many tests do not run because they rely on Python's
10782 ;; built-in test.test_argparse, but we remove the unit tests from
10783 ;; our Python installation.
10784 (invoke "python" "setup.py" "test"))))))
10785 (synopsis "Replacement for argparse")
10786 (description "A drop-in replacement for argparse that allows options to also
10787 be set via config files and/or environment variables.")
10788 (home-page "https://github.com/bw2/ConfigArgParse")
10789 (license license:expat)))
10790
10791 (define-public python-argparse-manpage
10792 (package
10793 (name "python-argparse-manpage")
10794 (version "1.1")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "argparse-manpage" version))
10799 (sha256
10800 (base32
10801 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10802 (build-system python-build-system)
10803 (home-page "https://github.com/praiskup/argparse-manpage")
10804 (synopsis "Build manual page from Python's ArgumentParser object")
10805 (description
10806 "This package provides tools to build manual pages from Python's
10807 @code{ArgumentParser} object.")
10808 (license license:asl2.0)))
10809
10810 (define-public python-contextlib2
10811 (package
10812 (name "python-contextlib2")
10813 (version "0.6.0.post1")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "contextlib2" version))
10818 (sha256
10819 (base32
10820 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10821 (build-system python-build-system)
10822 (home-page "https://contextlib2.readthedocs.org/")
10823 (synopsis "Tools for decorators and context managers")
10824 (description "This module is primarily a backport of the Python
10825 3.2 contextlib to earlier Python versions. Like contextlib, it
10826 provides utilities for common tasks involving decorators and context
10827 managers. It also contains additional features that are not part of
10828 the standard library.")
10829 (properties `((python2-variant . ,(delay python2-contextlib2))))
10830 (license license:psfl)))
10831
10832 (define-public python2-contextlib2
10833 (let ((base (package-with-python2
10834 (strip-python2-variant python-contextlib2))))
10835 (package
10836 (inherit base)
10837 (arguments
10838 (substitute-keyword-arguments (package-arguments base)
10839 ((#:phases phases)
10840 `(modify-phases ,phases
10841 (replace 'check
10842 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10843 (native-inputs
10844 `(("python2-unittest2" ,python2-unittest2))))))
10845
10846 ;; This package is used by python2-pytest via python2-importlib-metadata,
10847 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10848 (define-public python2-contextlib2-bootstrap
10849 (hidden-package
10850 (package/inherit
10851 python2-contextlib2
10852 (name "python2-contextlib2-bootstrap")
10853 (arguments
10854 `(#:tests? #f
10855 ,@(package-arguments python2-contextlib2)))
10856 (native-inputs '()))))
10857
10858 (define-public python-texttable
10859 (package
10860 (name "python-texttable")
10861 (version "1.6.2")
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "texttable" version))
10866 (sha256
10867 (base32
10868 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10869 (build-system python-build-system)
10870 (arguments
10871 `(#:phases
10872 (modify-phases %standard-phases
10873 (replace 'check
10874 (lambda _ (invoke "pytest" "tests.py"))))))
10875 (native-inputs
10876 `(("python-pytest" ,python-pytest)))
10877 (home-page "https://github.com/foutaise/texttable/")
10878 (synopsis "Python module for creating simple ASCII tables")
10879 (description "Texttable is a Python module for creating simple ASCII
10880 tables.")
10881 (license license:expat)))
10882
10883 (define-public python2-texttable
10884 (package-with-python2 python-texttable))
10885
10886 (define-public python-atomicwrites
10887 (package
10888 (name "python-atomicwrites")
10889 (version "1.3.0")
10890 (source (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "atomicwrites" version))
10893 (sha256
10894 (base32
10895 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10896 (build-system python-build-system)
10897 (synopsis "Atomic file writes in Python")
10898 (description "Library for atomic file writes using platform dependent tools
10899 for atomic file system operations.")
10900 (home-page "https://github.com/untitaker/python-atomicwrites")
10901 (license license:expat)))
10902
10903 (define-public python2-atomicwrites
10904 (package-with-python2 python-atomicwrites))
10905
10906 (define-public python-click-threading
10907 (package
10908 (name "python-click-threading")
10909 (version "0.4.4")
10910 (source (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "click-threading" version))
10913 (sha256
10914 (base32
10915 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10916 (build-system python-build-system)
10917 (propagated-inputs
10918 `(("python-click" ,python-click)))
10919 (synopsis "Utilities for multithreading in Click")
10920 (description "This package provides utilities for multithreading in Click
10921 applications.")
10922 (home-page "https://github.com/click-contrib/click-threading")
10923 (license license:expat)))
10924
10925 (define-public python-click-log
10926 (package
10927 (name "python-click-log")
10928 (version "0.3.2")
10929 (source (origin
10930 (method url-fetch)
10931 (uri (pypi-uri "click-log" version))
10932 (sha256
10933 (base32
10934 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10935 (build-system python-build-system)
10936 (propagated-inputs
10937 `(("python-click" ,python-click)))
10938 (synopsis "Logging for click applications")
10939 (description "This package provides a Python library for logging Click
10940 applications.")
10941 (home-page "https://github.com/click-contrib/click-log")
10942 (license license:expat)))
10943
10944 (define-public python-click-default-group
10945 (package
10946 (name "python-click-default-group")
10947 (version "1.2.2")
10948 (source (origin
10949 (method url-fetch)
10950 (uri (pypi-uri "click-default-group" version))
10951 (sha256
10952 (base32
10953 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10954 (build-system python-build-system)
10955 (arguments
10956 `(#:tests? #f)) ; no target
10957 (propagated-inputs
10958 `(("python-click" ,python-click)))
10959 (synopsis "Extends click.Group")
10960 (description "This package extends click.Group to invoke a command without
10961 explicit subcommand name.")
10962 (home-page "https://github.com/click-contrib/click-default-group")
10963 (license license:bsd-3)))
10964
10965 (define-public python-structlog
10966 (package
10967 (name "python-structlog")
10968 (version "20.2.0")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "structlog" version))
10973 (sha256
10974 (base32
10975 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10976 (build-system python-build-system)
10977 (arguments
10978 `(#:phases
10979 (modify-phases %standard-phases
10980 (replace 'check
10981 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10982 (when tests?
10983 (add-installed-pythonpath inputs outputs)
10984 (invoke "pytest"))
10985 #t)))))
10986 (native-inputs
10987 `(("python-coverage" ,python-coverage)
10988 ("python-freezegun" ,python-freezegun)
10989 ("python-pretend" ,python-pretend)
10990 ("python-pytest" ,python-pytest)
10991 ("python-pytest-asyncio" ,python-pytest-asyncio)
10992 ("python-simplejson" ,python-simplejson)
10993 ("python-twisted" ,python-twisted)))
10994 (home-page "https://www.structlog.org/")
10995 (synopsis "Structured Logging for Python")
10996 (description "@code{structlog} changes logging in Python by adding structure
10997 to your log entries.")
10998 (license (list license:asl2.0 license:expat))))
10999
11000 (define-public python-apipkg
11001 (package
11002 (name "python-apipkg")
11003 (version "1.5")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "apipkg" version))
11007 (sha256
11008 (base32
11009 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11010 (build-system python-build-system)
11011 (native-inputs
11012 `(("python-pytest" ,python-pytest)
11013 ("python-setuptools-scm" ,python-setuptools-scm)))
11014 (synopsis "Namespace control and lazy-import mechanism")
11015 (description "With apipkg you can control the exported namespace of a Python
11016 package and greatly reduce the number of imports for your users. It is a small
11017 pure Python module that works on virtually all Python versions.")
11018 (home-page "https://github.com/pytest-dev/apipkg")
11019 (license license:expat)))
11020
11021 (define-public python-execnet
11022 (package
11023 (name "python-execnet")
11024 (version "1.4.1")
11025 (source (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "execnet" version))
11028 (sha256
11029 (base32
11030 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11031 (build-system python-build-system)
11032 (arguments
11033 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11034 ;; The two test failures are caused by the lack of an `ssh` executable.
11035 ;; The test suite can be run with pytest after the 'install' phase.
11036 #:tests? #f))
11037 (native-inputs
11038 `(("python-pytest" ,python-pytest)
11039 ("python-setuptools-scm" ,python-setuptools-scm)))
11040 (propagated-inputs
11041 `(("python-apipkg" ,python-apipkg)))
11042 (synopsis "Rapid multi-Python deployment")
11043 (description "Execnet provides a share-nothing model with
11044 channel-send/receive communication for distributing execution across many
11045 Python interpreters across version, platform and network barriers. It has a
11046 minimal and fast API targeting the following uses:
11047 @enumerate
11048 @item distribute tasks to (many) local or remote CPUs
11049 @item write and deploy hybrid multi-process applications
11050 @item write scripts to administer multiple environments
11051 @end enumerate")
11052 (home-page "https://codespeak.net/execnet/")
11053 (license license:expat)))
11054
11055 (define-public python2-execnet
11056 (package-with-python2 python-execnet))
11057
11058 (define-public python-icalendar
11059 (package
11060 (name "python-icalendar")
11061 (version "4.0.5")
11062 (source (origin
11063 (method url-fetch)
11064 (uri (pypi-uri "icalendar" version))
11065 (sha256
11066 (base32
11067 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
11068 (build-system python-build-system)
11069 (propagated-inputs
11070 `(("python-dateutil" ,python-dateutil)
11071 ("python-pytz" ,python-pytz)))
11072 (synopsis "Python library for parsing iCalendar files")
11073 (description "The icalendar package is a parser/generator of iCalendar
11074 files for use with Python.")
11075 (home-page "https://github.com/collective/icalendar")
11076 (license license:bsd-2)))
11077
11078 (define-public python-args
11079 (package
11080 (name "python-args")
11081 (version "0.1.0")
11082 (source (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "args" version))
11085 (sha256
11086 (base32
11087 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11088 (build-system python-build-system)
11089 (home-page "https://github.com/kennethreitz/args")
11090 (synopsis "Command-line argument parser")
11091 (description
11092 "This library provides a Python module to parse command-line arguments.")
11093 (license license:bsd-3)))
11094
11095 (define-public python2-args
11096 (package-with-python2 python-args))
11097
11098 (define-public python-clint
11099 (package
11100 (name "python-clint")
11101 (version "0.5.1")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "clint" version))
11105 (sha256
11106 (base32
11107 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11108 (build-system python-build-system)
11109 (arguments
11110 '(#:phases
11111 (modify-phases %standard-phases
11112 (replace 'check
11113 (lambda _ (invoke "py.test" "-v"))))))
11114 (native-inputs
11115 `(("python-pytest" ,python-pytest)))
11116 (propagated-inputs
11117 `(("python-args" ,python-args)))
11118 (home-page "https://github.com/kennethreitz/clint")
11119 (synopsis "Command-line interface tools")
11120 (description
11121 "Clint is a Python module filled with a set of tools for developing
11122 command-line applications, including tools for colored and indented
11123 output, progress bar display, and pipes.")
11124 (license license:isc)))
11125
11126 (define-public python2-clint
11127 (package-with-python2 python-clint))
11128
11129 (define-public python-rply
11130 (package
11131 (name "python-rply")
11132 (version "0.7.5")
11133 (source (origin
11134 (method url-fetch)
11135 (uri (pypi-uri "rply" version))
11136 (sha256
11137 (base32
11138 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11139 (build-system python-build-system)
11140 (propagated-inputs
11141 `(("python-appdirs" ,python-appdirs)))
11142 (home-page "https://github.com/alex/rply")
11143 (synopsis "Parser generator for Python")
11144 (description
11145 "This package provides a pure Python based parser generator, that also
11146 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11147 with a new public API, and RPython support.")
11148 (license license:bsd-3)))
11149
11150 (define-public python2-rply
11151 (package-with-python2 python-rply))
11152
11153 (define-public python-hy
11154 (package
11155 (name "python-hy")
11156 (version "0.18.0")
11157 (source (origin
11158 (method url-fetch)
11159 (uri (pypi-uri "hy" version))
11160 (sha256
11161 (base32
11162 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11163 (build-system python-build-system)
11164 (arguments
11165 '(#:phases
11166 (modify-phases %standard-phases
11167 (add-before 'install 'set-HOME
11168 (lambda _
11169 (setenv "HOME" "/tmp") #t))
11170 (replace 'check
11171 (lambda _
11172 ;; Tests require write access to HOME.
11173 (setenv "HOME" "/tmp")
11174 (invoke "nosetests"))))))
11175 (native-inputs
11176 `(("python-coverage" ,python-coverage)
11177 ("python-nose" ,python-nose)))
11178 (propagated-inputs
11179 `(("python-astor" ,python-astor)
11180 ("python-colorama" ,python-colorama)
11181 ("python-rply" ,python-rply)
11182 ("python-funcparserlib"
11183 ,python-funcparserlib)))
11184 (home-page "http://hylang.org/")
11185 (synopsis "Lisp frontend to Python")
11186 (description
11187 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11188 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11189 Python at your fingertips, in Lisp form.")
11190 (license license:expat)))
11191
11192 (define-public python2-functools32
11193 (package
11194 (name "python2-functools32")
11195 (version "3.2.3-2")
11196 (source
11197 (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "functools32" version))
11200 (sha256
11201 (base32
11202 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11203 (build-system python-build-system)
11204 (arguments
11205 `(#:python ,python-2
11206 #:tests? #f)) ; no test target
11207 (home-page "https://github.com/MiCHiLU/python-functools32")
11208 (synopsis
11209 "Backport of the functools module from Python 3.2.3")
11210 (description
11211 "This package is a backport of the @code{functools} module from Python
11212 3.2.3 for use with older versions of Python and PyPy.")
11213 (license license:expat)))
11214
11215 (define-public python2-subprocess32
11216 (package
11217 (name "python2-subprocess32")
11218 (version "3.2.7")
11219 (source (origin
11220 (method url-fetch)
11221 (uri (pypi-uri "subprocess32" version))
11222 (sha256
11223 (base32
11224 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11225 (patches
11226 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11227 (build-system python-build-system)
11228 (arguments
11229 `(#:python ,python-2
11230 ;; The test suite fails with Python > 2.7.13:
11231 ;; import test.support
11232 ;; ImportError: No module named support
11233 #:tests? #f
11234 #:phases
11235 (modify-phases %standard-phases
11236 (add-after 'unpack 'patch-/bin/sh
11237 (lambda _
11238 (substitute* '("subprocess32.py"
11239 "test_subprocess32.py")
11240 (("/bin/sh") (which "sh")))
11241 #t)))))
11242 (home-page "https://github.com/google/python-subprocess32")
11243 (synopsis "Backport of the subprocess module from Python 3.2")
11244 (description
11245 "This is a backport of the @code{subprocess} standard library module
11246 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11247 new features. On POSIX systems it is guaranteed to be reliable when used
11248 in threaded applications. It includes timeout support from Python 3.3 but
11249 otherwise matches 3.2’s API.")
11250 (license license:psfl)))
11251
11252 (define-public python2-futures
11253 (package
11254 (name "python2-futures")
11255 (version "3.2.0")
11256 (source
11257 (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "futures" version))
11260 (sha256
11261 (base32
11262 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11263 (build-system python-build-system)
11264 (arguments
11265 `(#:python ,python-2
11266 #:phases
11267 (modify-phases %standard-phases
11268 (replace 'check
11269 (lambda _
11270 (invoke "python" "test_futures.py")
11271 #t)))))
11272 (home-page "https://github.com/agronholm/pythonfutures")
11273 (synopsis
11274 "Backport of the concurrent.futures package from Python 3.2")
11275 (description
11276 "The concurrent.futures module provides a high-level interface for
11277 asynchronously executing callables. This package backports the
11278 concurrent.futures package from Python 3.2")
11279 (license license:bsd-3)))
11280
11281 (define-public python-promise
11282 (package
11283 (name "python-promise")
11284 (version "0.4.2")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "promise" version))
11289 (sha256
11290 (base32
11291 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11292 (build-system python-build-system)
11293 ;; Tests wants python-futures, which is a python2 only program, and
11294 ;; can't be found by python-promise at test time.
11295 (arguments `(#:tests? #f))
11296 (home-page "https://github.com/syrusakbary/promise")
11297 (synopsis "Promises/A+ implementation for Python")
11298 (description
11299 "Promises/A+ implementation for Python")
11300 (properties `((python2-variant . ,(delay python2-promise))))
11301 (license license:expat)))
11302
11303 (define-public python2-promise
11304 (let ((promise (package-with-python2
11305 (strip-python2-variant python-promise))))
11306 (package (inherit promise)
11307 (arguments (substitute-keyword-arguments (package-arguments promise)
11308 ((#:tests? _) #t)))
11309 (native-inputs
11310 `(("python2-futures" ,python2-futures)
11311 ("python2-pytest" ,python2-pytest)
11312 ,@(package-native-inputs promise))))))
11313
11314 (define-public python-progressbar2
11315 (package
11316 (name "python-progressbar2")
11317 (version "3.51.3")
11318 (source
11319 (origin
11320 (method url-fetch)
11321 (uri (pypi-uri "progressbar2" version))
11322 (sha256
11323 (base32
11324 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11325 (build-system python-build-system)
11326 (propagated-inputs
11327 `(("python-six" ,python-six)
11328 ("python-utils" ,python-utils)))
11329 (native-inputs
11330 `(("python-flake8" ,python-flake8)
11331 ("python-freezegun" ,python-freezegun)
11332 ("python-pycodestyle" ,python-pycodestyle)
11333 ("python-pytest" ,python-pytest)
11334 ("python-pytest-cache" ,python-pytest-cache)
11335 ("python-pytest-cov" ,python-pytest-cov)
11336 ("python-pytest-flakes" ,python-pytest-flakes)
11337 ("python-pytest-pep8" ,python-pytest-pep8)
11338 ("python-sphinx" ,python-sphinx)))
11339 (home-page "https://github.com/WoLpH/python-progressbar")
11340 (synopsis "Text progress bar library for Python")
11341 (description
11342 "This package provides a Python progressbar library to provide
11343 visual (yet text based) progress to long running operations.")
11344 (license license:bsd-3)))
11345
11346 (define-public python-progressbar33
11347 (package
11348 (name "python-progressbar33")
11349 (version "2.4")
11350 (source
11351 (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "progressbar33" version))
11354 (sha256
11355 (base32
11356 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11357 (build-system python-build-system)
11358 (home-page "https://github.com/germangh/python-progressbar")
11359 (synopsis "Text progress bar library for Python")
11360 (description
11361 "This package provides a text progress bar library for Python. This
11362 version only differs from the original @code{progressbar} package in that it
11363 uses relative package imports instead of absolute imports, which is necessary
11364 for the module to work under Python 3.3.")
11365 ;; Either or both of these licenses may be selected.
11366 (license (list license:lgpl2.1+ license:bsd-3))))
11367
11368 (define-public python-colorama
11369 (package
11370 (name "python-colorama")
11371 (version "0.4.4")
11372 (source
11373 (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "colorama" version))
11376 (sha256
11377 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11378 (build-system python-build-system)
11379 (synopsis "Colored terminal text rendering for Python")
11380 (description "Colorama is a Python library for rendering colored terminal
11381 text.")
11382 (home-page "https://pypi.org/project/colorama/")
11383 (license license:bsd-3)))
11384
11385 (define-public python2-colorama
11386 (package-with-python2 python-colorama))
11387
11388 (define-public python-moto
11389 (package
11390 (name "python-moto")
11391 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11392 (version "1.3.16.dev134")
11393 (source (origin
11394 (method url-fetch)
11395 (uri (pypi-uri "moto" version))
11396 (sha256
11397 (base32
11398 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11399 (build-system python-build-system)
11400 (arguments
11401 `(#:phases (modify-phases %standard-phases
11402 (add-after 'unpack 'patch-hardcoded-executable-names
11403 (lambda _
11404 (substitute* "moto/batch/models.py"
11405 (("/bin/sh")
11406 (which "sh")))
11407 (substitute* (find-files "tests" "\\.py$")
11408 (("#!/bin/bash")
11409 (string-append "#!" (which "bash"))))
11410 #t))
11411 (replace 'check
11412 (lambda _
11413 (setenv "PYTHONPATH" (string-append "./build/lib:"
11414 (getenv "PYTHONPATH")))
11415 (invoke "pytest" "-vv" "-m" "not network"
11416 ;; These tests require Docker.
11417 "-k" "not test_terminate_job \
11418 and not test_invoke_function_from_sqs_exception"))))))
11419 (native-inputs
11420 `(("python-flask" ,python-flask)
11421 ("python-flask-cors" ,python-flask-cors)
11422 ("python-freezegun" ,python-freezegun)
11423 ("python-parameterized" ,python-parameterized)
11424 ("python-pytest" ,python-pytest)
11425 ("python-sure" ,python-sure)))
11426 (propagated-inputs
11427 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11428 ("python-boto" ,python-boto)
11429 ("python-boto3" ,python-boto3)
11430 ("python-botocore" ,python-botocore)
11431 ("python-cfn-lint" ,python-cfn-lint)
11432 ("python-cryptography" ,python-cryptography)
11433 ("python-dateutil" ,python-dateutil)
11434 ("python-docker" ,python-docker)
11435 ("python-idna" ,python-idna)
11436 ("python-jinja2" ,python-jinja2)
11437 ("python-jose" ,python-jose)
11438 ("python-jsondiff" ,python-jsondiff)
11439 ("python-mock" ,python-mock)
11440 ("python-pytz" ,python-pytz)
11441 ("python-pyyaml" ,python-pyyaml)
11442 ("python-requests" ,python-requests)
11443 ("python-responses" ,python-responses)
11444 ("python-six" ,python-six)
11445 ("python-sshpubkeys" ,python-sshpubkeys)
11446 ("python-werkzeug" ,python-werkzeug)
11447 ("python-xmltodict" ,python-xmltodict)))
11448 (home-page "https://github.com/spulec/moto")
11449 (synopsis "Mock out the boto library")
11450 (description
11451 "@code{moto} is a library designed to easily mock out the
11452 @code{boto} library.")
11453 (license license:asl2.0)))
11454
11455 (define-public python-rsa
11456 (package
11457 (name "python-rsa")
11458 (version "3.4.2")
11459 (source
11460 (origin
11461 (method url-fetch)
11462 (uri (pypi-uri "rsa" version))
11463 (sha256
11464 (base32
11465 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11466 (build-system python-build-system)
11467 (propagated-inputs
11468 `(("python-pyasn1" ,python-pyasn1)))
11469 (synopsis "Pure-Python RSA implementation")
11470 (description "Python-RSA is a pure-Python RSA implementation. It supports
11471 encryption and decryption, signing and verifying signatures, and key
11472 generation according to PKCS#1 version 1.5. It can be used as a Python
11473 library as well as on the command line.")
11474 (home-page "https://stuvel.eu/rsa")
11475 (license license:asl2.0)))
11476
11477 (define-public python2-rsa
11478 (package-with-python2 python-rsa))
11479
11480 (define-public python-pluggy
11481 (package
11482 (name "python-pluggy")
11483 (version "0.13.1")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "pluggy" version))
11488 (sha256
11489 (base32
11490 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11491 (build-system python-build-system)
11492 (native-inputs
11493 `(("python-setuptools-scm" ,python-setuptools-scm)))
11494 (synopsis "Plugin and hook calling mechanism for Python")
11495 (description "Pluggy is an extraction of the plugin manager as used by
11496 Pytest but stripped of Pytest specific details.")
11497 (home-page "https://pypi.org/project/pluggy/")
11498 (properties `((python2-variant . ,(delay python2-pluggy))))
11499 (license license:expat)))
11500
11501 (define-public python2-pluggy
11502 (let ((base (package-with-python2 (strip-python2-variant
11503 python-pluggy))))
11504 (package/inherit
11505 base
11506 (propagated-inputs
11507 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11508
11509 ;; This package requires python2-importlib-metadata, but that package
11510 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11511 ;; variant to solve the circular dependency.
11512 (define-public python2-pluggy-bootstrap
11513 (hidden-package
11514 (package/inherit
11515 python2-pluggy
11516 (name "python2-pluggy-bootstrap")
11517 (arguments
11518 `(#:tests? #f
11519 ,@(package-arguments python2-pluggy)))
11520 (propagated-inputs
11521 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11522
11523 (define-public python-tox
11524 (package
11525 (name "python-tox")
11526 (version "3.20.0")
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "tox" version))
11531 (sha256
11532 (base32
11533 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11534 (build-system python-build-system)
11535 (arguments
11536 ;; FIXME: Tests require pytest-timeout, which itself requires
11537 ;; pytest>=2.8.0 for installation.
11538 '(#:tests? #f))
11539 (propagated-inputs
11540 `(("python-filelock" ,python-filelock)
11541 ("python-packaging" ,python-packaging)
11542 ("python-pluggy" ,python-pluggy)
11543 ("python-py" ,python-py)
11544 ("python-six" ,python-six)
11545 ("python-toml" ,python-toml)
11546 ("python-virtualenv" ,python-virtualenv)))
11547 (native-inputs
11548 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11549 ("python-pytest" ,python-pytest) ; >= 2.3.5
11550 ("python-setuptools-scm" ,python-setuptools-scm)))
11551 (home-page "https://tox.readthedocs.io")
11552 (synopsis "Virtualenv-based automation of test activities")
11553 (description "Tox is a generic virtualenv management and test command line
11554 tool. It can be used to check that a package installs correctly with
11555 different Python versions and interpreters, or run tests in each type of
11556 supported environment, or act as a frontend to continuous integration
11557 servers.")
11558 (license license:expat)))
11559
11560 (define-public python-jmespath
11561 (package
11562 (name "python-jmespath")
11563 (version "0.9.4")
11564 (source
11565 (origin
11566 (method url-fetch)
11567 (uri (pypi-uri "jmespath" version))
11568 (sha256
11569 (base32
11570 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11571 (build-system python-build-system)
11572 (native-inputs
11573 `(("python-nose" ,python-nose)))
11574 (synopsis "JSON Matching Expressions")
11575 (description "JMESPath (pronounced “james path”) is a Python library that
11576 allows one to declaratively specify how to extract elements from a JSON
11577 document.")
11578 (home-page "https://github.com/jmespath/jmespath.py")
11579 (license license:expat)))
11580
11581 (define-public python2-jmespath
11582 (package-with-python2 python-jmespath))
11583
11584 (define-public python-symengine
11585 (package
11586 (name "python-symengine")
11587 (version "0.6.1")
11588 (source
11589 (origin
11590 (method url-fetch)
11591 (uri (pypi-uri "symengine" version))
11592 (sha256
11593 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11594 (build-system python-build-system)
11595 (native-inputs
11596 `(("cmake" ,cmake)
11597 ("python-cython" ,python-cython)))
11598 (inputs
11599 `(("symengine" ,symengine)))
11600 (home-page "https://github.com/symengine/symengine.py")
11601 (synopsis "Python library providing wrappers to SymEngine")
11602 (description
11603 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11604 manipulation library.")
11605 (license license:expat)))
11606
11607 (define-public python-uncertainties
11608 (package
11609 (name "python-uncertainties")
11610 (version "3.1.5")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (pypi-uri "uncertainties" version))
11615 (sha256
11616 (base32
11617 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11618 (build-system python-build-system)
11619 ;; While there are test files, there is no "tests" directory, so the tests
11620 ;; fail.
11621 (arguments '(#:tests? #false))
11622 (propagated-inputs
11623 `(("python-future" ,python-future)))
11624 (native-inputs
11625 `(("python-nose" ,python-nose)
11626 ("python-numpy" ,python-numpy)))
11627 (home-page "https://uncertainties-python-package.readthedocs.io/")
11628 (synopsis "Calculations with uncertainties")
11629 (description
11630 "The uncertainties package transparently handles calculations with
11631 numbers with uncertainties. It can also yield the derivatives of any
11632 expression.")
11633 (license license:bsd-3)))
11634
11635 (define-public python-asteval
11636 (package
11637 (name "python-asteval")
11638 (version "0.9.23")
11639 (source
11640 (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "asteval" version))
11643 (sha256
11644 (base32
11645 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11646 (build-system python-build-system)
11647 (native-inputs
11648 `(("python-pytest" ,python-pytest)))
11649 (home-page "https://github.com/newville/asteval")
11650 (synopsis "Minimalistic evaluator of Python expressions")
11651 (description
11652 "This package provides a minimalistic evaluator of Python expression
11653 using the @code{ast} module")
11654 (license license:expat)))
11655
11656 (define-public python-lmfit
11657 (package
11658 (name "python-lmfit")
11659 (version "1.0.2")
11660 (source
11661 (origin
11662 (method url-fetch)
11663 (uri (pypi-uri "lmfit" version))
11664 (sha256
11665 (base32
11666 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11667 (build-system python-build-system)
11668 (propagated-inputs
11669 `(("python-asteval" ,python-asteval)
11670 ("python-numpy" ,python-numpy)
11671 ("python-scipy" ,python-scipy)
11672 ("python-uncertainties" ,python-uncertainties)))
11673 (native-inputs
11674 `(("python-pytest" ,python-pytest)))
11675 (home-page "https://lmfit.github.io/lmfit-py/")
11676 (synopsis "Least-Squares minimization with bounds and constraints")
11677 (description
11678 "Lmfit provides a high-level interface to non-linear optimization and
11679 curve fitting problems for Python. It builds on and extends many of the
11680 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11681 named for) extending the Levenberg-Marquardt method from
11682 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11683 enhancements to optimization and data fitting problems.")
11684 (license license:bsd-3)))
11685
11686 (define-public python-boto
11687 (package
11688 (name "python-boto")
11689 (version "2.49.0")
11690 (source (origin
11691 (method url-fetch)
11692 (uri (pypi-uri "boto" version))
11693 (sha256
11694 (base32
11695 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11696 (build-system python-build-system)
11697 (arguments
11698 ;; XXX: This package is unmaintained and has problems with newer versions
11699 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11700 ;; subset of this library, so keep it around for now, but disable tests.
11701 '(#:tests? #f))
11702 (propagated-inputs
11703 `(("python-paramiko" ,python-paramiko)
11704 ("python-requests" ,python-requests)))
11705 (home-page "https://github.com/boto/boto")
11706 (synopsis "Python interfaces for Amazon Web Services")
11707 (description
11708 "This package provides various facilities for interacting with Amazon
11709 Web Services through Python.
11710
11711 This software is unmaintained, and new projects should use @code{boto3} instead.")
11712 (license license:expat)))
11713
11714 (define-public python-botocore
11715 ;; Note: When updating botocore, also make sure that boto3 and awscli
11716 ;; are compatible.
11717 (package
11718 (name "python-botocore")
11719 (version "1.19.22")
11720 (source
11721 (origin
11722 (method url-fetch)
11723 (uri (pypi-uri "botocore" version))
11724 (sha256
11725 (base32
11726 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11727 (build-system python-build-system)
11728 (arguments
11729 ;; FIXME: Many tests are failing.
11730 '(#:tests? #f))
11731 (propagated-inputs
11732 `(("python-dateutil" ,python-dateutil)
11733 ("python-jmespath" ,python-jmespath)
11734 ("python-urllib3" ,python-urllib3)))
11735 (home-page "https://github.com/boto/botocore")
11736 (synopsis "Low-level interface to AWS")
11737 (description "Botocore is a Python library that provides a low-level
11738 interface to the Amazon Web Services (AWS) API.")
11739 (license license:asl2.0)))
11740
11741 (define-public python2-botocore
11742 (package-with-python2 python-botocore))
11743
11744 (define-public python-boto3
11745 (package
11746 (name "python-boto3")
11747 (version "1.16.22")
11748 (home-page "https://github.com/boto/boto3")
11749 (source (origin
11750 (method git-fetch)
11751 (uri (git-reference (url home-page) (commit version)))
11752 (file-name (git-file-name name version))
11753 (sha256
11754 (base32
11755 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11756 (arguments
11757 `(#:phases
11758 (modify-phases %standard-phases
11759 (add-after 'unpack 'delete-network-tests
11760 ;; Deleting integration tests because they are trying to connect to AWS.
11761 (lambda _
11762 (delete-file-recursively "tests/integration")
11763 #t)))))
11764 (build-system python-build-system)
11765 (native-inputs
11766 `(("python-nose" ,python-nose)
11767 ("python-mock" ,python-mock)))
11768 (propagated-inputs
11769 `(("python-botocore" ,python-botocore)
11770 ("python-jmespath" ,python-jmespath)
11771 ("python-s3transfer" ,python-s3transfer)))
11772 (synopsis "AWS SDK for Python")
11773 (description
11774 "Boto3 is a Python library for writing programs that interact with
11775 @acronym{AWS,Amazon Web Services}.")
11776 (license license:asl2.0)))
11777
11778 (define-public python-pyfiglet
11779 (package
11780 (name "python-pyfiglet")
11781 (version "0.8.post1")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "pyfiglet" version))
11786 (sha256
11787 (base32
11788 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11789 (build-system python-build-system)
11790 (home-page "https://github.com/pwaller/pyfiglet")
11791 (synopsis "Draw ASCII art big letters in Python")
11792 (description "This module lets you draw large letter from ordinary characters
11793 in pure Python.")
11794 (license license:expat)))
11795
11796 (define-public python-xdo
11797 (package
11798 (name "python-xdo")
11799 (version "0.3")
11800 (source (origin
11801 (method url-fetch)
11802 (uri (string-append
11803 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11804 "python-xdo_" version ".orig.tar.gz"))
11805 (sha256
11806 (base32
11807 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11808 (build-system python-build-system)
11809 (arguments
11810 '(#:phases
11811 (modify-phases %standard-phases
11812 (add-before 'install 'patch-libxdo-path
11813 ;; Hardcode the path of dynamically loaded libxdo library.
11814 (lambda* (#:key inputs #:allow-other-keys)
11815 (let ((libxdo (string-append
11816 (assoc-ref inputs "xdotool")
11817 "/lib/libxdo.so")))
11818 (substitute* "xdo/_xdo.py"
11819 (("find_library\\(\"xdo\"\\)")
11820 (simple-format #f "\"~a\"" libxdo)))
11821 #t))))
11822 #:tests? #f)) ; no tests provided
11823 (propagated-inputs
11824 `(("python-six" ,python-six)))
11825 (inputs
11826 `(("xdotool" ,xdotool)
11827 ("libX11" ,libx11)))
11828 (home-page "https://tracker.debian.org/pkg/python-xdo")
11829 (synopsis "Python library for simulating X11 keyboard/mouse input")
11830 (description "Provides bindings to libxdo for manipulating X11 via simulated
11831 input. (Note that this is mostly a legacy library; you may wish to look at
11832 python-xdo for newer bindings.)")
11833 (license license:bsd-3)))
11834
11835 (define-public python2-xdo
11836 (package-with-python2 python-xdo))
11837
11838 (define-public python-mako
11839 (package
11840 (name "python-mako")
11841 (version "1.1.3")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (pypi-uri "Mako" version))
11846 (sha256
11847 (base32
11848 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11849 (build-system python-build-system)
11850 (arguments
11851 `(#:phases (modify-phases %standard-phases
11852 (replace 'check
11853 (lambda* (#:key tests? #:allow-other-keys)
11854 (if tests?
11855 (invoke "nosetests" "-v")
11856 (format #t "test suite not run~%"))
11857 #t)))))
11858 (propagated-inputs
11859 `(("python-markupsafe" ,python-markupsafe)))
11860 (native-inputs
11861 `(("python-mock" ,python-mock)
11862 ("python-nose" ,python-nose)))
11863 (home-page "https://www.makotemplates.org/")
11864 (synopsis "Templating language for Python")
11865 (description "Mako is a templating language for Python that compiles
11866 templates into Python modules.")
11867 (license license:expat)))
11868
11869 (define-public python2-mako
11870 (package-with-python2 python-mako))
11871
11872 (define-public python-waitress
11873 (package
11874 (name "python-waitress")
11875 (version "1.1.0")
11876 (source
11877 (origin
11878 (method url-fetch)
11879 (uri (pypi-uri "waitress" version))
11880 (patches (search-patches "python-waitress-fix-tests.patch"))
11881 (sha256
11882 (base32
11883 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11884 (build-system python-build-system)
11885 (home-page "https://github.com/Pylons/waitress")
11886 (synopsis "Waitress WSGI server")
11887 (description "Waitress is meant to be a production-quality pure-Python WSGI
11888 server with very acceptable performance.")
11889 (license license:zpl2.1)))
11890
11891 (define-public python2-waitress
11892 (package-with-python2 python-waitress))
11893
11894 (define-public python-whichcraft
11895 (package
11896 (name "python-whichcraft")
11897 (version "0.6.1")
11898 (source
11899 (origin
11900 (method url-fetch)
11901 (uri (pypi-uri "whichcraft" version))
11902 (sha256
11903 (base32
11904 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11905 (build-system python-build-system)
11906 (native-inputs
11907 `(("python-pytest" ,python-pytest)))
11908 (home-page "https://github.com/pydanny/whichcraft")
11909 (synopsis "Cross-platform cross-python shutil.which functionality")
11910 (description
11911 "This package provides a shim of the shutil.which function that's
11912 designed to work across multiple versions of Python.")
11913 (license license:bsd-3)))
11914
11915 (define-public python-cookiecutter
11916 (package
11917 (name "python-cookiecutter")
11918 (version "1.7.2")
11919 (source
11920 (origin
11921 (method url-fetch)
11922 (uri (pypi-uri "cookiecutter" version))
11923 (sha256
11924 (base32
11925 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11926 (build-system python-build-system)
11927 (native-inputs
11928 `(("python-freezegun" ,python-freezegun)
11929 ("python-pytest" ,python-pytest)
11930 ("python-pytest-catchlog" ,python-pytest-catchlog)
11931 ("python-pytest-cov" ,python-pytest-cov)
11932 ("python-pytest-mock" ,python-pytest-mock)))
11933 (propagated-inputs
11934 `(("python-binaryornot" ,python-binaryornot)
11935 ("python-click" ,python-click)
11936 ("python-future" ,python-future)
11937 ("python-jinja2" ,python-jinja2)
11938 ("python-jinja2-time" ,python-jinja2-time)
11939 ("python-poyo" ,python-poyo)
11940 ("python-requests" ,python-requests)
11941 ("python-slugify" ,python-slugify)
11942 ("python-text-unidecode" ,python-text-unidecode)
11943 ("python-whichcraft" ,python-whichcraft)))
11944 (home-page "https://github.com/cookiecutter/cookiecutter")
11945 (synopsis
11946 "Command-line utility that creates projects from project templates")
11947 (description
11948 "This package provides a command-line utility that creates projects from
11949 project templates, e.g. creating a Python package project from a Python package
11950 project template.")
11951 (license license:bsd-3)))
11952
11953 (define-public python-pyquery
11954 (package
11955 (name "python-pyquery")
11956 (version "1.2.17")
11957 (source
11958 (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "pyquery" version))
11961 (sha256
11962 (base32
11963 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11964 (build-system python-build-system)
11965 (native-inputs
11966 `(("python-webob" ,python-webob)
11967 ("python-webtest" ,python-webtest)))
11968 (propagated-inputs
11969 `(("python-lxml" ,python-lxml)
11970 ("python-cssselect" ,python-cssselect)))
11971 (home-page "https://github.com/gawel/pyquery")
11972 (synopsis "Make jQuery-like queries on xml documents")
11973 (description "pyquery allows you to make jQuery queries on xml documents.
11974 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11975 fast xml and html manipulation.")
11976 (license license:bsd-3)))
11977
11978 (define-public python-anyjson
11979 (package
11980 (name "python-anyjson")
11981 (version "0.3.3")
11982 (source
11983 (origin
11984 (method url-fetch)
11985 (uri (pypi-uri "anyjson" version))
11986 (sha256
11987 (base32
11988 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11989 (build-system python-build-system)
11990 (arguments
11991 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11992 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11993 ;; whatever) so this transformation needs to be done before the tests
11994 ;; can be run. Maybe we could add a build step to transform beforehand
11995 ;; but it could be annoying/difficult.
11996 ;; We can enable tests for the Python 2 version, though, and do below.
11997 #:tests? #f))
11998 (home-page "https://bitbucket.org/runeh/anyjson/")
11999 (synopsis
12000 "Wraps best available JSON implementation in a common interface")
12001 (description
12002 "Anyjson loads whichever is the fastest JSON module installed
12003 and provides a uniform API regardless of which JSON implementation is used.")
12004 (license license:bsd-3)
12005 (properties `((python2-variant . ,(delay python2-anyjson))))))
12006
12007 (define-public python2-anyjson
12008 (let ((anyjson (package-with-python2
12009 (strip-python2-variant python-anyjson))))
12010 (package
12011 (inherit anyjson)
12012 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12013 #:tests? #t
12014 ,@(package-arguments anyjson)))
12015 (native-inputs `(("python2-nose" ,python2-nose))))))
12016
12017 (define-public python-amqp
12018 (package
12019 (name "python-amqp")
12020 (version "2.3.2")
12021 (source
12022 (origin
12023 (method url-fetch)
12024 (uri (pypi-uri "amqp" version))
12025 (sha256
12026 (base32
12027 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12028 (build-system python-build-system)
12029 (native-inputs
12030 `(("python-case" ,python-case)
12031 ("python-pytest-sugar" ,python-pytest-sugar)
12032 ("python-mock" ,python-mock)))
12033 (propagated-inputs
12034 `(("python-vine" ,python-vine)))
12035 (home-page "https://github.com/celery/py-amqp")
12036 (synopsis
12037 "Low-level AMQP client for Python (fork of amqplib)")
12038 (description
12039 "This is a fork of amqplib which was originally written by Barry Pederson.
12040 It is maintained by the Celery project, and used by kombu as a pure python
12041 alternative when librabbitmq is not available.")
12042 (license license:lgpl2.1+)
12043 (properties `((python2-variant . ,(delay python2-amqp))))))
12044
12045 (define-public python2-amqp
12046 (let ((amqp (package-with-python2
12047 (strip-python2-variant python-amqp))))
12048 (package
12049 (inherit amqp)
12050 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12051 ;; unmaintained. Weirdly, does not do this on the python 3
12052 ;; version?
12053 #:tests? #f
12054 ,@(package-arguments amqp))))))
12055
12056 (define-public python-txamqp
12057 (package
12058 (name "python-txamqp")
12059 (version "0.8.2")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (pypi-uri "txAMQP" version))
12064 (sha256
12065 (base32
12066 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12067 (build-system python-build-system)
12068 (propagated-inputs
12069 `(("python-six" ,python-six)
12070 ("python-twisted" ,python-twisted)))
12071 (home-page "https://github.com/txamqp/txamqp")
12072 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12073 (description
12074 "This package provides a Python library for communicating with AMQP peers
12075 and brokers using the asynchronous networking framework Twisted. It contains
12076 all the necessary code to connect, send and receive messages to/from an
12077 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12078 also includes support for using Thrift RPC over AMQP in Twisted
12079 applications.")
12080 (license license:asl2.0)))
12081
12082 (define-public python2-txamqp
12083 (package-with-python2 python-txamqp))
12084
12085 (define-public python-kombu
12086 (package
12087 (name "python-kombu")
12088 (version "4.2.2")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "kombu" version))
12093 (sha256
12094 (base32
12095 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12096 (build-system python-build-system)
12097 (native-inputs
12098 `(("python-mock" ,python-mock)
12099 ("python-case" ,python-case)
12100 ("python-pyro4" ,python-pyro4)
12101 ("python-pytest-sugar" ,python-pytest-sugar)
12102 ("python-pytz" ,python-pytz)))
12103 (propagated-inputs
12104 `(("python-anyjson" ,python-anyjson)
12105 ("python-amqp" ,python-amqp)
12106 ("python-redis" ,python-redis)))
12107 (home-page "https://kombu.readthedocs.io")
12108 (synopsis "Message passing library for Python")
12109 (description "The aim of Kombu is to make messaging in Python as easy as
12110 possible by providing an idiomatic high-level interface for the AMQ protocol,
12111 and also provide proven and tested solutions to common messaging problems.
12112 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12113 message orientation, queuing, routing, reliability and security, for which the
12114 RabbitMQ messaging server is the most popular implementation.")
12115 (license license:bsd-3)
12116 (properties `((python2-variant . ,(delay python2-kombu))))))
12117
12118 (define-public python2-kombu
12119 (let ((kombu (package-with-python2
12120 (strip-python2-variant python-kombu))))
12121 (package
12122 (inherit kombu)
12123 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12124 ;; It works fine on the python3 variant.
12125 #:tests? #f
12126 ,@(package-arguments kombu)))
12127 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12128 ,@(package-native-inputs kombu))))))
12129
12130 (define-public python-billiard
12131 (package
12132 (name "python-billiard")
12133 (version "3.5.0.5")
12134 (source
12135 (origin
12136 (method url-fetch)
12137 (uri (pypi-uri "billiard" version))
12138 (sha256
12139 (base32
12140 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12141 (build-system python-build-system)
12142 (native-inputs
12143 `(("python-case" ,python-case)
12144 ("python-pytest" ,python-pytest)))
12145 (home-page "https://github.com/celery/billiard")
12146 (synopsis
12147 "Python multiprocessing fork with improvements and bugfixes")
12148 (description
12149 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12150 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12151 pyprocessing package. This standalone variant is intended to be compatible with
12152 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12153 (license license:bsd-3)
12154 (properties `((python2-variant . ,(delay python2-billiard))))))
12155
12156 (define-public python2-billiard
12157 (let ((billiard (package-with-python2
12158 (strip-python2-variant python-billiard))))
12159 (package
12160 (inherit billiard)
12161 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12162 ("python2-mock" ,python2-mock)
12163 ,@(package-native-inputs billiard))))))
12164
12165 (define-public python-celery
12166 (package
12167 (name "python-celery")
12168 (version "4.2.1")
12169 (source
12170 (origin
12171 (method url-fetch)
12172 (uri (pypi-uri "celery" version))
12173 (sha256
12174 (base32
12175 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12176 (build-system python-build-system)
12177 (arguments
12178 '(;; TODO The tests fail with Python 3.7
12179 ;; https://github.com/celery/celery/issues/4849
12180 #:tests? #f
12181 #:phases
12182 (modify-phases %standard-phases
12183 (add-after 'unpack 'patch-requirements
12184 (lambda _
12185 (substitute* "requirements/test.txt"
12186 (("pytest>=3\\.0,<3\\.3")
12187 "pytest>=3.0"))
12188 #t)))))
12189 (native-inputs
12190 `(("python-case" ,python-case)
12191 ("python-pytest" ,python-pytest)))
12192 (propagated-inputs
12193 `(("python-pytz" ,python-pytz)
12194 ("python-billiard" ,python-billiard)
12195 ("python-kombu" ,python-kombu)))
12196 (home-page "https://celeryproject.org")
12197 (synopsis "Distributed Task Queue")
12198 (description "Celery is an asynchronous task queue/job queue based on
12199 distributed message passing. It is focused on real-time operation, but
12200 supports scheduling as well. The execution units, called tasks, are executed
12201 concurrently on a single or more worker servers using multiprocessing,
12202 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12203 synchronously (wait until ready).")
12204 (license license:bsd-3)
12205 (properties `((python2-variant . ,(delay python2-celery))))))
12206
12207 (define-public python2-celery
12208 (let ((celery (package-with-python2
12209 (strip-python2-variant python-celery))))
12210 (package
12211 (inherit celery)
12212 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12213 ("python2-mock" ,python2-mock)
12214 ,@(package-native-inputs celery))))))
12215
12216 (define-public python-translitcodec
12217 (package
12218 (name "python-translitcodec")
12219 (version "0.4.0")
12220 (source
12221 (origin
12222 (method url-fetch)
12223 (uri (pypi-uri "translitcodec" version))
12224 (sha256
12225 (base32
12226 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12227 (build-system python-build-system)
12228 (arguments
12229 `(#:tests? #f)) ; no tests provided
12230 (home-page
12231 "https://github.com/claudep/translitcodec")
12232 (synopsis
12233 "Unicode to 8-bit charset transliteration codec")
12234 (description
12235 "This package contains codecs for transliterating ISO 10646 texts into
12236 best-effort representations using smaller coded character sets (ASCII,
12237 ISO 8859, etc.).")
12238 (license license:expat)))
12239
12240 (define-public python2-translitcodec
12241 (package-with-python2 python-translitcodec))
12242
12243 (define-public python-editor
12244 (package
12245 (name "python-editor")
12246 (version "1.0.4")
12247 (source
12248 (origin
12249 (method url-fetch)
12250 (uri (pypi-uri "python-editor" version))
12251 (sha256
12252 (base32
12253 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12254 (build-system python-build-system)
12255 (arguments
12256 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12257 (home-page "https://github.com/fmoo/python-editor")
12258 (synopsis "Programmatically open an editor, capture the result")
12259 (description
12260 "python-editor is a library that provides the editor module for
12261 programmatically interfacing with your system's $EDITOR.")
12262 (license license:asl2.0)))
12263
12264 (define-public python2-editor
12265 (package-with-python2 python-editor))
12266
12267 (define-public python-multiprocessing-logging
12268 (package
12269 (name "python-multiprocessing-logging")
12270 (version "0.3.1")
12271 (home-page "https://github.com/jruere/multiprocessing-logging")
12272 (source (origin
12273 (method git-fetch)
12274 (uri (git-reference
12275 (url home-page)
12276 (commit (string-append "v" version))))
12277 (file-name (git-file-name name version))
12278 (sha256
12279 (base32
12280 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12281 (build-system python-build-system)
12282 (synopsis "Manage logs from multiple processes")
12283 (description
12284 "This Python module implements a multiprocessing-aware @code{Handler}
12285 that, when set on the root @code{Logger}, will tunnel log records to the
12286 main process so that they are handled correctly.")
12287 (license license:lgpl3+)))
12288
12289 (define-public python-vobject
12290 (package
12291 (name "python-vobject")
12292 (version "0.9.6.1")
12293 (source (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "vobject" version))
12296 (sha256
12297 (base32
12298 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12299 (build-system python-build-system)
12300 (arguments
12301 '(;; The test suite relies on some non-portable Windows interfaces.
12302 #:tests? #f))
12303 (propagated-inputs
12304 `(("python-dateutil" ,python-dateutil)
12305 ("python-pyicu" ,python-pyicu)))
12306 (synopsis "Parse and generate vCard and vCalendar files")
12307 (description "Vobject is intended to be a full featured Python package for
12308 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12309 are supported and well tested. vCard 3.0 files are supported, and all data
12310 should be imported, but only a few components are understood in a sophisticated
12311 way.")
12312 (home-page "https://eventable.github.io/vobject/")
12313 (license license:asl2.0)))
12314
12315 (define-public python2-vobject
12316 (package-with-python2 python-vobject))
12317
12318 (define-public python-munkres
12319 (package
12320 (name "python-munkres")
12321 (version "1.0.8")
12322 (source (origin
12323 (method url-fetch)
12324 (uri (pypi-uri "munkres" version))
12325 (sha256
12326 (base32
12327 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12328 (build-system python-build-system)
12329 (arguments
12330 '(#:tests? #f)) ; no test suite
12331 (home-page "https://software.clapper.org/munkres/")
12332 (synopsis "Implementation of the Munkres algorithm")
12333 (description "The Munkres module provides an implementation of the Munkres
12334 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12335 useful for solving the Assignment Problem.")
12336 (license license:bsd-3)))
12337
12338 (define-public python2-munkres
12339 (package-with-python2 python-munkres))
12340
12341 (define-public python-whoosh
12342 (package
12343 (name "python-whoosh")
12344 (version "2.7.4")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "Whoosh" version))
12349 (sha256
12350 (base32
12351 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12352 (build-system python-build-system)
12353 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12354 (native-inputs
12355 `(("python-pytest" ,python-pytest)))
12356 (home-page "https://bitbucket.org/mchaput/whoosh")
12357 (synopsis "Full text indexing, search, and spell checking library")
12358 (description
12359 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12360 checking library.")
12361 (license license:bsd-2)))
12362
12363 (define-public python2-whoosh
12364 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12365 (package (inherit whoosh)
12366 (propagated-inputs
12367 `(("python2-backport-ssl-match-hostname"
12368 ,python2-backport-ssl-match-hostname)
12369 ,@(package-propagated-inputs whoosh))))))
12370
12371 (define-public python-pathlib
12372 (package
12373 (name "python-pathlib")
12374 (version "1.0.1")
12375 (source (origin
12376 (method url-fetch)
12377 (uri (pypi-uri "pathlib" version))
12378 (sha256
12379 (base32
12380 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12381 (build-system python-build-system)
12382 ;; The tests depend on the internal "test" module, which does not provide
12383 ;; a stable interface.
12384 (arguments `(#:tests? #f))
12385 (home-page "https://pathlib.readthedocs.org/")
12386 (synopsis "Object-oriented file system paths")
12387 (description "Pathlib offers a set of classes to handle file system paths.
12388 It offers the following advantages over using string objects:
12389
12390 @enumerate
12391 @item No more cumbersome use of os and os.path functions. Everything can
12392 be done easily through operators, attribute accesses, and method calls.
12393 @item Embodies the semantics of different path types. For example,
12394 comparing Windows paths ignores casing.
12395 @item Well-defined semantics, eliminating any inconsistencies or
12396 ambiguities (forward vs. backward slashes, etc.).
12397 @end enumerate
12398
12399 Note: In Python 3.4, pathlib is now part of the standard library. For other
12400 Python versions please consider python-pathlib2 instead, which tracks the
12401 standard library module. This module (python-pathlib) isn't maintained
12402 anymore.")
12403 (license license:expat)))
12404
12405 (define-public python2-pathlib
12406 (package-with-python2 python-pathlib))
12407
12408 (define-public python2-pathlib2
12409 (package
12410 (name "python2-pathlib2")
12411 (version "2.3.5")
12412 (source (origin
12413 (method url-fetch)
12414 (uri (pypi-uri "pathlib2" version))
12415 (sha256
12416 (base32
12417 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12418 (build-system python-build-system)
12419 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12420 ;; version is 3.4 which already includes this package as part of the
12421 ;; standard library.
12422 (arguments
12423 `(#:python ,python-2))
12424 (propagated-inputs
12425 `(("python2-scandir" ,python2-scandir)
12426 ("python2-six" ,python2-six)))
12427 (home-page "https://pypi.org/project/pathlib2/")
12428 (synopsis "Object-oriented file system paths - backport of standard
12429 pathlib module")
12430 (description "The goal of pathlib2 is to provide a backport of standard
12431 pathlib module which tracks the standard library module, so all the newest
12432 features of the standard pathlib can be used also on older Python versions.
12433
12434 Pathlib offers a set of classes to handle file system paths. It offers the
12435 following advantages over using string objects:
12436
12437 @enumerate
12438 @item No more cumbersome use of os and os.path functions. Everything can
12439 be done easily through operators, attribute accesses, and method calls.
12440 @item Embodies the semantics of different path types. For example,
12441 comparing Windows paths ignores casing.
12442 @item Well-defined semantics, eliminating any inconsistencies or
12443 ambiguities (forward vs. backward slashes, etc.).
12444 @end enumerate")
12445 (license license:expat)))
12446
12447 (define-public python2-pathlib2-bootstrap
12448 (hidden-package
12449 (package
12450 (inherit python2-pathlib2)
12451 (name "python2-pathlib2-bootstrap")
12452 (propagated-inputs
12453 `(("python2-scandir" ,python2-scandir)
12454 ("python2-six" ,python2-six-bootstrap))))))
12455
12456 (define-public python-jellyfish
12457 (package
12458 (name "python-jellyfish")
12459 (version "0.5.6")
12460 (source (origin
12461 (method url-fetch)
12462 (uri (pypi-uri "jellyfish" version))
12463 (sha256
12464 (base32
12465 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12466 (build-system python-build-system)
12467 (native-inputs
12468 `(("python-pytest" ,python-pytest)))
12469 (home-page "https://github.com/jamesturk/jellyfish")
12470 (synopsis "Approximate and phonetic matching of strings")
12471 (description "Jellyfish uses a variety of string comparison and phonetic
12472 encoding algorithms to do fuzzy string matching.")
12473 (license license:bsd-2)
12474 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12475
12476 (define-public python2-jellyfish
12477 (let ((jellyfish (package-with-python2
12478 (strip-python2-variant python-jellyfish))))
12479 (package (inherit jellyfish)
12480 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12481 ,@(package-native-inputs jellyfish))))))
12482
12483 (define-public python2-unicodecsv
12484 (package
12485 (name "python2-unicodecsv")
12486 (version "0.14.1")
12487 (source (origin
12488 (method git-fetch)
12489 ;; The test suite is not included in the PyPi release.
12490 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12491 (uri (git-reference
12492 (url "https://github.com/jdunck/python-unicodecsv")
12493 (commit version)))
12494 (file-name (git-file-name name version))
12495 (sha256
12496 (base32
12497 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12498 (build-system python-build-system)
12499 (arguments
12500 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12501 #:python ,python-2))
12502 (native-inputs
12503 `(("python2-unittest2" ,python2-unittest2)))
12504 (home-page "https://github.com/jdunck/python-unicodecsv")
12505 (synopsis "Unicode CSV module for Python 2")
12506 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12507 module, adding support for Unicode strings.")
12508 (license license:bsd-2)))
12509
12510 (define-public python-pdfminer-six
12511 (package
12512 (name "python-pdfminer-six")
12513 (version "20201018")
12514 ;; There are no tests in the PyPI tarball.
12515 (source
12516 (origin
12517 (method git-fetch)
12518 (uri (git-reference
12519 (url "https://github.com/pdfminer/pdfminer.six")
12520 (commit version)))
12521 (file-name (git-file-name name version))
12522 (sha256
12523 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12524 (build-system python-build-system)
12525 (arguments
12526 `(#:phases
12527 (modify-phases %standard-phases
12528 ;; Tests write to the source tree.
12529 (add-after 'unpack 'make-git-checkout-writable
12530 (lambda _
12531 (for-each make-file-writable (find-files "."))
12532 #t))
12533 (replace 'check
12534 (lambda _
12535 (invoke "make" "test")))
12536 (add-before 'reset-gzip-timestamps 'make-files-writable
12537 (lambda* (#:key outputs #:allow-other-keys)
12538 (let ((out (assoc-ref outputs "out")))
12539 (for-each make-file-writable
12540 (find-files out "\\.gz$"))
12541 #t))))))
12542 (propagated-inputs
12543 `(("python-chardet" ,python-chardet)
12544 ("python-cryptography" ,python-cryptography)
12545 ("python-sortedcontainers" ,python-sortedcontainers)))
12546 (native-inputs
12547 `(("python-nose" ,python-nose)
12548 ("python-tox" ,python-tox)))
12549 (home-page "https://github.com/pdfminer/pdfminer.six")
12550 (synopsis "PDF parser and analyzer")
12551 (description "@code{pdfminer.six} is a community maintained fork of
12552 the original PDFMiner. It is a tool for extracting information from PDF
12553 documents. It focuses on getting and analyzing text data. Pdfminer.six
12554 extracts the text from a page directly from the sourcecode of the PDF. It
12555 can also be used to get the exact location, font or color of the text.")
12556 (license license:expat)))
12557
12558 (define-public python-rarfile
12559 (package
12560 (name "python-rarfile")
12561 (version "2.8")
12562 (source (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "rarfile" version))
12565 (sha256
12566 (base32
12567 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12568 (build-system python-build-system)
12569 (arguments
12570 '(#:phases
12571 (modify-phases %standard-phases
12572 (replace 'check
12573 ;; Many tests fail, but the installation proceeds.
12574 (lambda _ (invoke "make" "-C" "test" "test"))))))
12575 (native-inputs
12576 `(("which" ,which))) ; required for tests
12577 (propagated-inputs
12578 `(("libarchive" ,libarchive)))
12579 (home-page "https://github.com/markokr/rarfile")
12580 (synopsis "RAR archive reader for Python")
12581 (description "This is Python module for RAR archive reading. The interface
12582 is made as zipfile like as possible.")
12583 (license license:isc)))
12584
12585 (define-public python2-rarfile
12586 (package-with-python2 python-rarfile))
12587
12588 (define-public python-magic
12589 (package
12590 (name "python-magic")
12591 (version "0.4.15")
12592 (source
12593 (origin
12594 (method url-fetch)
12595 (uri (pypi-uri "python-magic" version))
12596 (sha256
12597 (base32
12598 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12599 (file-name (string-append name "-" version "-checkout"))))
12600 (build-system python-build-system)
12601 (arguments
12602 ;; The tests are unreliable, so don't run them. The tests fail
12603 ;; under Python3 because they were written for Python2 and
12604 ;; contain import statements that do not work in Python3. One of
12605 ;; the tests fails under Python2 because its assertions are
12606 ;; overly stringent; it relies on comparing output strings which
12607 ;; are brittle and can change depending on the version of
12608 ;; libmagic being used and the system on which the test is
12609 ;; running. In my case, under GuixSD 0.10.0, only one test
12610 ;; failed, and it seems to have failed only because the version
12611 ;; of libmagic that is packaged in Guix outputs a slightly
12612 ;; different (but not wrong) string than the one that the test
12613 ;; expected.
12614 '(#:tests? #f
12615 #:phases (modify-phases %standard-phases
12616 ;; Replace a specific method call with a hard-coded
12617 ;; path to the necessary libmagic.so file in the
12618 ;; store. If we don't do this, then the method call
12619 ;; will fail to find the libmagic.so file, which in
12620 ;; turn will cause any application using
12621 ;; python-magic to fail.
12622 (add-before 'build 'hard-code-path-to-libmagic
12623 (lambda* (#:key inputs #:allow-other-keys)
12624 (let ((file (assoc-ref inputs "file")))
12625 (substitute* "magic.py"
12626 (("ctypes.util.find_library\\('magic'\\)")
12627 (string-append "'" file "/lib/libmagic.so'")))
12628 #t)))
12629 (add-before 'install 'disable-egg-compression
12630 (lambda _
12631 (let ((port (open-file "setup.cfg" "a")))
12632 (display "\n[easy_install]\nzip_ok = 0\n"
12633 port)
12634 (close-port port)
12635 #t))))))
12636 (inputs
12637 ;; python-magic needs to be able to find libmagic.so.
12638 `(("file" ,file)))
12639 (home-page
12640 "https://github.com/ahupp/python-magic")
12641 (synopsis
12642 "File type identification using libmagic")
12643 (description
12644 "This module uses ctypes to access the libmagic file type
12645 identification library. It makes use of the local magic database and
12646 supports both textual and MIME-type output. Note that this module and
12647 the python-file module both provide a \"magic.py\" file; these two
12648 modules, which are different and were developed separately, both serve
12649 the same purpose: to provide Python bindings for libmagic.")
12650 (license license:expat)))
12651
12652 (define-public python2-magic
12653 (package-with-python2 python-magic))
12654
12655 (define-public python2-s3cmd
12656 (package
12657 (name "python2-s3cmd")
12658 (version "1.6.1")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12663 "s3cmd-" version ".tar.gz"))
12664 (sha256
12665 (base32
12666 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12667 (build-system python-build-system)
12668 (arguments
12669 ;; s3cmd is written for python2 only and contains no tests.
12670 `(#:python ,python-2
12671 #:tests? #f))
12672 (propagated-inputs
12673 `(("python2-dateutil" ,python2-dateutil)
12674 ;; The python-file package also provides a magic.py module.
12675 ;; This is an unfortunate state of affairs; however, s3cmd
12676 ;; fails to install if it cannot find specifically the
12677 ;; python-magic package. Thus we include it, instead of using
12678 ;; python-file. Ironically, s3cmd sometimes works better
12679 ;; without libmagic bindings at all:
12680 ;; https://github.com/s3tools/s3cmd/issues/198
12681 ("python2-magic" ,python2-magic)))
12682 (home-page "https://s3tools.org/s3cmd")
12683 (synopsis "Command line tool for S3-compatible storage services")
12684 (description
12685 "S3cmd is a command line tool for uploading, retrieving and managing data
12686 in storage services that are compatible with the Amazon Simple Storage
12687 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12688 GnuPG encryption, and more. It also supports management of Amazon's
12689 CloudFront content delivery network.")
12690 (license license:gpl2+)))
12691
12692 (define-public python-pkgconfig
12693 (package
12694 (name "python-pkgconfig")
12695 (version "1.3.1")
12696 (source
12697 (origin
12698 (method url-fetch)
12699 (uri (pypi-uri "pkgconfig" version))
12700 (sha256
12701 (base32
12702 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12703 (build-system python-build-system)
12704 (native-inputs
12705 `(("python-nose" ,python-nose)))
12706 (inputs
12707 `(("pkg-config" ,pkg-config)))
12708 (arguments
12709 `(#:phases
12710 (modify-phases %standard-phases
12711 (add-before 'build 'patch
12712 ;; Hard-code the path to pkg-config.
12713 (lambda _
12714 (substitute* "pkgconfig/pkgconfig.py"
12715 (("cmd = 'pkg-config")
12716 (string-append "cmd = '" (which "pkg-config"))))
12717 #t))
12718 (replace 'check
12719 (lambda _
12720 (invoke "nosetests" "test.py"))))))
12721 (home-page "https://github.com/matze/pkgconfig")
12722 (synopsis "Python interface for pkg-config")
12723 (description "This module provides a Python interface to pkg-config. It
12724 can be used to find all pkg-config packages, check if a package exists,
12725 check if a package meets certain version requirements, query CFLAGS and
12726 LDFLAGS and parse the output to build extensions with setup.py.")
12727 (license license:expat)))
12728
12729 (define-public python2-pkgconfig
12730 (package-with-python2 python-pkgconfig))
12731
12732 (define-public python-bz2file
12733 (package
12734 (name "python-bz2file")
12735 (version "0.98")
12736 (source
12737 (origin
12738 (method url-fetch)
12739 (uri (pypi-uri "bz2file" version))
12740 (sha256
12741 (base32
12742 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12743 (build-system python-build-system)
12744 (arguments
12745 `(#:tests? #f)) ; Tests use deprecated python modules.
12746 (home-page "https://github.com/nvawda/bz2file")
12747 (synopsis "Read and write bzip2-compressed files")
12748 (description
12749 "Bz2file is a Python library for reading and writing bzip2-compressed
12750 files. It contains a drop-in replacement for the I/O interface in the
12751 standard library's @code{bz2} module, including features from the latest
12752 development version of CPython that are not available in older releases.")
12753 (license license:asl2.0)))
12754
12755 (define-public python2-bz2file
12756 (package-with-python2 python-bz2file))
12757
12758 (define-public python-future
12759 (package
12760 (name "python-future")
12761 (version "0.17.1")
12762 (source
12763 (origin
12764 (method url-fetch)
12765 (uri (pypi-uri "future" version))
12766 (sha256
12767 (base32
12768 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12769 (build-system python-build-system)
12770 ;; Many tests connect to the network or are otherwise flawed.
12771 ;; https://github.com/PythonCharmers/python-future/issues/210
12772 (arguments
12773 `(#:tests? #f))
12774 (home-page "https://python-future.org")
12775 (synopsis "Single-source support for Python 3 and 2")
12776 (description
12777 "@code{python-future} is the missing compatibility layer between Python 2 and
12778 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12779 to support both Python 2 and Python 3 with minimal overhead.")
12780 (license license:expat)))
12781
12782 (define-public python2-future
12783 (package-with-python2 python-future))
12784
12785 (define-public python-cysignals
12786 (package
12787 (name "python-cysignals")
12788 (version "1.9.0")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "cysignals" version))
12793 (sha256
12794 (base32
12795 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12796 (build-system python-build-system)
12797 (native-inputs
12798 `(("python-cython" ,python-cython)
12799 ("python-sphinx" ,python-sphinx)))
12800 (inputs
12801 `(("pari-gp" ,pari-gp)))
12802 (arguments
12803 `(#:modules ((guix build python-build-system)
12804 ((guix build gnu-build-system) #:prefix gnu:)
12805 (guix build utils))
12806 ;; FIXME: Tests are executed after installation and currently fail
12807 ;; when not installing into standard locations; the author is working
12808 ;; on a fix.
12809 #:tests? #f
12810 #:phases
12811 (modify-phases %standard-phases
12812 (add-before
12813 'build 'configure
12814 (assoc-ref gnu:%standard-phases 'configure)))))
12815 (home-page
12816 "https://github.com/sagemath/cysignals")
12817 (synopsis
12818 "Handling of interrupts and signals for Cython")
12819 (description
12820 "The cysignals package provides mechanisms to handle interrupts (and
12821 other signals and errors) in Cython code, using two related approaches,
12822 for mixed Cython/Python code or external C libraries and pure Cython code,
12823 respectively.")
12824 (license license:lgpl3+)))
12825
12826 (define-public python2-cysignals
12827 (package-with-python2 python-cysignals))
12828
12829 (define-public python2-shedskin
12830 (package
12831 (name "python2-shedskin")
12832 (version "0.9.4")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (string-append "https://github.com/shedskin/shedskin/"
12837 "releases/download/v" version
12838 "/shedskin-" version ".tgz"))
12839 (sha256
12840 (base32
12841 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12842 (build-system python-build-system)
12843 (arguments
12844 `(#:python ,python-2
12845 #:phases (modify-phases %standard-phases
12846 (add-after 'unpack 'fix-resulting-include-libs
12847 (lambda* (#:key inputs #:allow-other-keys)
12848 (let ((libgc (assoc-ref inputs "libgc"))
12849 (pcre (assoc-ref inputs "pcre")))
12850 (substitute* "shedskin/makefile.py"
12851 (("variable == 'CCFLAGS':[ ]*")
12852 (string-append "variable == 'CCFLAGS':\n"
12853 " line += ' -I " pcre "/include"
12854 " -I " libgc "/include'"))
12855 (("variable == 'LFLAGS':[ ]*")
12856 (string-append "variable == 'LFLAGS':\n"
12857 " line += ' -L" pcre "/lib"
12858 " -L " libgc "/lib'")))
12859 #t))))))
12860 (inputs `(("pcre" ,pcre)
12861 ("libgc" ,libgc)))
12862 (home-page "https://shedskin.github.io/")
12863 (synopsis "Experimental Python-2 to C++ Compiler")
12864 (description (string-append "This is an experimental compiler for a subset of
12865 Python. It generates C++ code and a Makefile."))
12866 (license (list license:gpl3 license:bsd-3 license:expat))))
12867
12868 (define-public python2-rope
12869 (package
12870 (name "python2-rope")
12871 (version "0.11.0")
12872 (source
12873 (origin
12874 (method url-fetch)
12875 (uri (pypi-uri "rope" version))
12876 (sha256
12877 (base32
12878 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12879 (arguments
12880 ;; Rope has only partial python3 support, see `python-rope'
12881 `(#:python ,python-2))
12882 (build-system python-build-system)
12883 (native-inputs
12884 `(("python2-unittest2" ,python2-unittest2)))
12885 (home-page "https://github.com/python-rope/rope")
12886 (synopsis "Refactoring library for Python")
12887 (description "Rope is a refactoring library for Python. It facilitates
12888 the renaming, moving and extracting of attributes, functions, modules, fields
12889 and parameters in Python 2 source code. These refactorings can also be applied
12890 to occurrences in strings and comments.")
12891 (license license:gpl2)))
12892
12893 (define-public python-rope
12894 (package
12895 (inherit python2-rope)
12896 (name "python-rope")
12897 (arguments `(#:python ,python-wrapper
12898 ;; XXX: Only partial python3 support, results in some failing
12899 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12900 #:tests? #f))
12901 (properties `((python2-variant . ,(delay python2-rope))))))
12902
12903 (define-public python-py3status
12904 (package
12905 (name "python-py3status")
12906 (version "3.21")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (pypi-uri "py3status" version))
12911 (sha256
12912 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12913 (build-system python-build-system)
12914 (inputs
12915 `(("file" ,file)))
12916 (arguments
12917 '(#:phases
12918 (modify-phases %standard-phases
12919 ;; 'file' is used for detection of configuration file encoding
12920 ;; let's make link the dependency to particular input
12921 (add-before 'build 'patch-file-path
12922 (lambda* (#:key inputs #:allow-other-keys)
12923 (let ((file-path (assoc-ref inputs "file")))
12924 (substitute* "py3status/parse_config.py"
12925 (("\\[\"file\", \"-b\"")
12926 (string-append "['" file-path "/bin/file', '-b'")))
12927 #t))))
12928 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12929 (home-page "https://github.com/ultrabug/py3status")
12930 (synopsis "Extensible i3status wrapper written in Python")
12931 (description "py3status is an i3status wrapper which extends i3status
12932 functionality in a modular way, allowing you to extend your panel with your
12933 own code, responding to click events and updating clock every second.")
12934 (license license:bsd-3)))
12935
12936 (define-public python2-selectors2
12937 (package
12938 (name "python2-selectors2")
12939 (version "2.0.1")
12940 (source (origin
12941 (method url-fetch)
12942 (uri (pypi-uri "selectors2" version))
12943 (sha256
12944 (base32
12945 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12946 (build-system python-build-system)
12947 (arguments
12948 `(#:python ,python-2))
12949 (native-inputs
12950 `(("python2-mock" ,python2-mock)
12951 ("python2-psutil" ,python2-psutil)))
12952 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12953 (synopsis "Backport of the selectors module from Python 3.5+")
12954 (description
12955 "This package provides a drop-in replacement for the @code{selectors}
12956 module in Python 3.5 and later.")
12957 (license license:expat)))
12958
12959 (define-public python-tblib
12960 (package
12961 (name "python-tblib")
12962 (version "1.6.0")
12963 (source (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "tblib" version))
12966 (sha256
12967 (base32
12968 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12969 (build-system python-build-system)
12970 (arguments
12971 `(#:phases
12972 (modify-phases %standard-phases
12973 (replace 'check
12974 (lambda _
12975 ;; Upstream runs tests after installation and the package itself
12976 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12977 ;; found.
12978 (setenv "PYTHONPATH"
12979 (string-append (getcwd) "/build/lib:"
12980 (getenv "PYTHONPATH")))
12981 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12982 (native-inputs
12983 `(("python-pytest" ,python-pytest)
12984 ("python-six" ,python-six)))
12985 (home-page "https://github.com/ionelmc/python-tblib")
12986 (synopsis "Traceback serialization library")
12987 (description
12988 "Traceback serialization allows you to:
12989
12990 @enumerate
12991 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12992 different processes. This allows better error handling when running code over
12993 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12994
12995 @item Parse traceback strings and raise with the parsed tracebacks.
12996 @end enumerate\n")
12997 (license license:bsd-3)))
12998
12999 (define-public python2-tblib
13000 (package-with-python2 python-tblib))
13001
13002 (define-public python-greenlet
13003 (package
13004 (name "python-greenlet")
13005 (version "1.0.0")
13006 (source (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "greenlet" version))
13009 (sha256
13010 (base32
13011 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13012 (build-system python-build-system)
13013 (home-page "https://greenlet.readthedocs.io/")
13014 (synopsis "Lightweight in-process concurrent programming")
13015 (description
13016 "Greenlet package is a spin-off of Stackless, a version of CPython
13017 that supports micro-threads called \"tasklets\". Tasklets run
13018 pseudo-concurrently (typically in a single or a few OS-level threads) and
13019 are synchronized with data exchanges on \"channels\".")
13020 (license (list license:psfl license:expat))))
13021
13022 (define-public python-objgraph
13023 (package
13024 (name "python-objgraph")
13025 (version "3.4.1")
13026 (source
13027 (origin
13028 (method url-fetch)
13029 (uri (pypi-uri "objgraph" version))
13030 (sha256
13031 (base32
13032 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13033 (build-system python-build-system)
13034 (propagated-inputs
13035 `(("python-graphviz" ,python-graphviz)))
13036 (native-inputs
13037 `(("python-mock" ,python-mock)
13038 ("graphviz" ,graphviz)))
13039 (home-page "https://mg.pov.lt/objgraph/")
13040 (synopsis "Draw Python object reference graphs with graphviz")
13041 (description
13042 "This package provides tools to draw Python object reference graphs with
13043 graphviz.")
13044 (license license:expat)))
13045
13046 (define-public python2-objgraph
13047 (package-with-python2 python-objgraph))
13048
13049 (define-public python-gevent
13050 (package
13051 (name "python-gevent")
13052 (version "21.1.2")
13053 (source (origin
13054 (method url-fetch)
13055 (uri (pypi-uri "gevent" version))
13056 (sha256
13057 (base32
13058 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13059 (modules '((guix build utils)))
13060 (snippet
13061 '(begin
13062 ;; unbunding libev and c-ares
13063 (delete-file-recursively "deps")))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:modules ((ice-9 ftw)
13067 (ice-9 match)
13068 (srfi srfi-26)
13069 (guix build utils)
13070 (guix build python-build-system))
13071 #:phases (modify-phases %standard-phases
13072 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13073 (lambda _
13074 (substitute* "src/gevent/subprocess.py"
13075 (("/bin/sh") (which "sh")))
13076 (for-each (lambda (file)
13077 (substitute* file
13078 (("/bin/sh") (which "sh"))
13079 (("/bin/true") (which "true"))))
13080 (find-files "src/greentest" "\\.py$"))))
13081 (add-before 'build 'do-not-use-bundled-sources
13082 (lambda _
13083 (setenv "GEVENTSETUP_EMBED" "0")
13084
13085 ;; Prevent building bundled libev.
13086 (substitute* "setup.py"
13087 (("run_make=_BUILDING")
13088 "run_make=False"))))
13089 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13090 (lambda* (#:key inputs #:allow-other-keys)
13091 (let ((greenlet (string-append
13092 (assoc-ref inputs "python-greenlet")
13093 "/include")))
13094 (match (scandir greenlet
13095 (lambda (item)
13096 (string-prefix? "python" item)))
13097 ((python)
13098 (setenv "C_INCLUDE_PATH"
13099 (string-append greenlet "/" python ":"
13100 (or (getenv "C_INCLUDE_PATH")
13101 ""))))))))
13102 (add-before 'check 'pretend-to-be-CI
13103 (lambda _
13104 ;; A few tests are skipped due to network constraints or
13105 ;; get longer timeouts when running in a CI environment.
13106 ;; Piggy-back on that, as we need the same adjustments.
13107 (setenv "TRAVIS" "1")
13108 (setenv "APPVEYOR" "1")))
13109 (add-before 'check 'adjust-tests
13110 (lambda _
13111 (let ((disabled-tests
13112 '(;; These tests relies on networking which is
13113 ;; not available in the build container.
13114 "test__getaddrinfo_import.py"
13115 "test__server_pywsgi.py"
13116 ;; XXX: These tests borrow functionality from the
13117 ;; Python builtin 'test' module, but it is not
13118 ;; installed with the Guix Python distribution.
13119 "test_smtpd.py"
13120 "test_wsgiref.py"
13121 "test_urllib2.py"
13122 "test_thread.py"
13123 "test_threading.py"
13124 "test__threading_2.py"
13125 ;; These tests rely on KeyboardInterrupts which do not
13126 ;; work inside the build container for some reason
13127 ;; (lack of controlling terminal?).
13128 "test_subprocess.py"
13129 "test__issues461_471.py"
13130 ;; TODO: Patch out the tests that use getprotobyname, etc
13131 ;; instead of disabling all the tests from these files.
13132 "test__resolver_dnspython.py"
13133 "test__doctests.py"
13134 "test__all__.py"
13135 "test___config.py"
13136 "test__execmodules.py")))
13137 (call-with-output-file "skipped_tests.txt"
13138 (lambda (port)
13139 (format port "~a~%"
13140 (string-join disabled-tests "\n")))))))
13141 (replace 'check
13142 (lambda _
13143 ;; Make sure the build directory is on PYTHONPATH.
13144 (setenv "PYTHONPATH"
13145 (string-append
13146 (getenv "PYTHONPATH") ":"
13147 (getcwd) "/build/"
13148 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13149
13150 ;; Use the build daemons configured number of workers.
13151 (setenv "NWORKERS" (number->string (parallel-job-count)))
13152
13153 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13154 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13155 (propagated-inputs
13156 `(("python-greenlet" ,python-greenlet)
13157 ("python-objgraph" ,python-objgraph)
13158 ("python-zope.event" ,python-zope-event)
13159 ("python-zope.interface" ,python-zope-interface)))
13160 (native-inputs
13161 `(("python-six" ,python-six)
13162
13163 ;; For tests.
13164 ("python-dnspython" ,python-dnspython)
13165 ("python-psutil" ,python-psutil)))
13166 (inputs
13167 `(("c-ares" ,c-ares)
13168 ("libev" ,libev)))
13169 (home-page "https://www.gevent.org/")
13170 (synopsis "Coroutine-based network library")
13171 (description
13172 "@code{gevent} is a coroutine-based Python networking library that uses
13173 @code{greenlet} to provide a high-level synchronous API on top of the
13174 @code{libev} event loop.")
13175 (license license:expat)))
13176
13177 (define-public python-fastimport
13178 (package
13179 (name "python-fastimport")
13180 (version "0.9.8")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "fastimport" version))
13185 (sha256
13186 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13187 (build-system python-build-system)
13188 (home-page "https://github.com/jelmer/python-fastimport")
13189 (synopsis "VCS fastimport parser and generator in Python")
13190 (description "This package provides a parser for and generator of the Git
13191 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13192 format.")
13193 (license license:gpl2+)))
13194
13195 (define-public python2-fastimport
13196 (package-with-python2 python-fastimport))
13197
13198 (define-public python-twisted
13199 (package
13200 (name "python-twisted")
13201 (version "19.7.0")
13202 (source (origin
13203 (method url-fetch)
13204 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13205 (sha256
13206 (base32
13207 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13208 (build-system python-build-system)
13209 (arguments
13210 '(#:tests? #f)) ; FIXME: some tests fail
13211 (propagated-inputs
13212 `(("python-zope-interface" ,python-zope-interface)
13213 ("python-pyhamcrest" ,python-pyhamcrest)
13214 ("python-incremental" ,python-incremental)
13215 ("python-hyperlink" ,python-hyperlink)
13216 ("python-constantly" ,python-constantly)
13217 ("python-automat" ,python-automat)))
13218 (home-page "https://twistedmatrix.com/")
13219 (synopsis "Asynchronous networking framework written in Python")
13220 (description
13221 "Twisted is an extensible framework for Python programming, with special
13222 focus on event-based network programming and multiprotocol integration.")
13223 (license license:expat)))
13224
13225 (define-public python2-twisted
13226 (package-with-python2 python-twisted))
13227
13228 (define-public python-pika
13229 (package
13230 (name "python-pika")
13231 (version "0.12.0")
13232 (source
13233 (origin
13234 (method url-fetch)
13235 (uri (pypi-uri "pika" version))
13236 (sha256
13237 (base32
13238 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13239 (build-system python-build-system)
13240 (native-inputs
13241 `(("python-pyev" ,python-pyev)
13242 ("python-tornado" ,python-tornado)
13243 ("python-twisted" ,python-twisted)))
13244 (home-page "https://pika.readthedocs.org")
13245 (synopsis "Pure Python AMQP Client Library")
13246 (description
13247 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13248 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13249 network support library.")
13250 (license license:bsd-3)))
13251
13252 (define-public python2-pika
13253 (package-with-python2 python-pika))
13254
13255 (define-public python-ply
13256 (package
13257 (name "python-ply")
13258 (version "3.11")
13259 (source
13260 (origin
13261 (method url-fetch)
13262 (uri (pypi-uri "ply" version))
13263 (sha256
13264 (base32
13265 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13266 (build-system python-build-system)
13267 (home-page "http://www.dabeaz.com/ply/")
13268 (synopsis "Python Lex & Yacc")
13269 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13270 It uses LR parsing and does extensive error checking.")
13271 (license license:bsd-3)))
13272
13273 (define-public python-tabulate
13274 (package
13275 (name "python-tabulate")
13276 (version "0.8.7")
13277 (source (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "tabulate" version))
13280 (sha256
13281 (base32
13282 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13283 (build-system python-build-system)
13284 (arguments
13285 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13286 ;; and the latest release is not tagged in the upstream repository.
13287 '(#:tests? #f))
13288 (home-page "https://bitbucket.org/astanin/python-tabulate")
13289 (synopsis "Pretty-print tabular data")
13290 (description
13291 "Tabulate is a library and command-line utility to pretty-print tabular
13292 data in Python.")
13293 (license license:expat)))
13294
13295 (define-public python2-tabulate
13296 (package-with-python2 python-tabulate))
13297
13298 (define-public python-kazoo
13299 (package
13300 (name "python-kazoo")
13301 (version "2.4.0")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (pypi-uri "kazoo" version))
13306 (sha256
13307 (base32
13308 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13309 (build-system python-build-system)
13310 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13311 (propagated-inputs
13312 `(("python-six" ,python-six)))
13313 (home-page "https://kazoo.readthedocs.org")
13314 (synopsis "High-level Zookeeper client library")
13315 (description
13316 "Kazoo is a Python client library for the Apache Zookeeper distributed
13317 application service. It is designed to be easy to use and to avoid common
13318 programming errors.")
13319 (license license:asl2.0)))
13320
13321 (define-public python2-kazoo
13322 (package-with-python2 python-kazoo))
13323
13324 (define-public python-pykafka
13325 (package
13326 (name "python-pykafka")
13327 (version "2.4.0")
13328 (source (origin
13329 (method url-fetch)
13330 (uri (pypi-uri "pykafka" version))
13331 (sha256
13332 (base32
13333 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13334 (build-system python-build-system)
13335 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13336 (propagated-inputs
13337 `(("python-gevent" ,python-gevent)
13338 ("python-kazoo" ,python-kazoo)
13339 ("python-tabulate" ,python-tabulate)))
13340 (inputs
13341 `(("librdkafka" ,librdkafka)))
13342 (home-page "https://pykafka.readthedocs.io/")
13343 (synopsis "Apache Kafka client for Python")
13344 (description
13345 "PyKafka is a client for the Apache Kafka distributed messaging system.
13346 It includes Python implementations of Kafka producers and consumers, which
13347 are optionally backed by a C extension built on librdkafka.")
13348 (license license:asl2.0)))
13349
13350 (define-public python-wcwidth
13351 (package
13352 (name "python-wcwidth")
13353 (version "0.1.8")
13354 (source (origin
13355 (method url-fetch)
13356 (uri (pypi-uri "wcwidth" version))
13357 (sha256
13358 (base32
13359 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13360 (build-system python-build-system)
13361 (home-page "https://github.com/jquast/wcwidth")
13362 (synopsis "Measure number of terminal column cells of wide-character codes")
13363 (description "Wcwidth measures the number of terminal column cells of
13364 wide-character codes. It is useful for those implementing a terminal emulator,
13365 or programs that carefully produce output to be interpreted by one. It is a
13366 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13367 specified in POSIX.1-2001 and POSIX.1-2008.")
13368 (license license:expat)))
13369
13370 (define-public python2-wcwidth
13371 (package-with-python2 python-wcwidth))
13372
13373 (define-public python2-jsonrpclib
13374 (package
13375 (name "python2-jsonrpclib")
13376 (version "0.1.7")
13377 (source (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "jsonrpclib" version))
13380 (sha256
13381 (base32
13382 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13383 (build-system python-build-system)
13384 (arguments
13385 `(#:tests? #f
13386 #:python ,python-2))
13387 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13388 (synopsis "Implementation of JSON-RPC specification for Python")
13389 (description
13390 "This library is an implementation of the JSON-RPC specification.
13391 It supports both the original 1.0 specification, as well as the
13392 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13393 etc.")
13394 (license license:asl2.0)))
13395
13396 (define-public python-chai
13397 (package
13398 (name "python-chai")
13399 (version "1.1.2")
13400 (source (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "chai" version))
13403 (sha256
13404 (base32
13405 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13406 (build-system python-build-system)
13407 (home-page "https://github.com/agoragames/chai")
13408 (synopsis "Mocking framework for Python")
13409 (description
13410 "Chai provides an api for mocking, stubbing and spying your python
13411 objects, patterned after the Mocha library for Ruby.")
13412 (license license:bsd-3)))
13413
13414 (define-public python2-chai
13415 (package-with-python2 python-chai))
13416
13417 (define-public python-inflection
13418 (package
13419 (name "python-inflection")
13420 (version "0.3.1")
13421 (source
13422 (origin (method url-fetch)
13423 (uri (pypi-uri "inflection" version))
13424 (sha256
13425 (base32
13426 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13427 (build-system python-build-system)
13428 (native-inputs
13429 `(("python-pytest" ,python-pytest)))
13430 (home-page "https://github.com/jpvanhal/inflection")
13431 (synopsis "Python string transformation library")
13432 (description
13433 "Inflection is a string transformation library. It singularizes
13434 and pluralizes English words, and transforms strings from CamelCase to
13435 underscored string.")
13436 (license license:expat)))
13437
13438 (define-public python2-inflection
13439 (package-with-python2 python-inflection))
13440
13441 (define-public python-pylev
13442 (package
13443 (name "python-pylev")
13444 (version "1.3.0")
13445 (source (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "pylev" version))
13448 (sha256
13449 (base32
13450 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13451 (build-system python-build-system)
13452 (home-page "https://github.com/toastdriven/pylev")
13453 (synopsis "Levenshtein distance implementation in Python")
13454 (description "Pure Python Levenshtein implementation, based off the
13455 Wikipedia code samples at
13456 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13457 (license license:bsd-3)))
13458
13459 (define-public python2-pylev
13460 (package-with-python2 python-pylev))
13461
13462 (define-public python-cleo
13463 (package
13464 (name "python-cleo")
13465 (version "0.8.1")
13466 (source (origin
13467 (method url-fetch)
13468 (uri (pypi-uri "cleo" version))
13469 (sha256
13470 (base32
13471 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13472 (build-system python-build-system)
13473 (native-inputs
13474 `( ;; For testing
13475 ("python-mock" ,python-mock)
13476 ("python-pytest-mock" ,python-pytest-mock)
13477 ("python-pytest" ,python-pytest)))
13478 (propagated-inputs
13479 `(("python-backpack" ,python-backpack)
13480 ("python-clikit" ,python-clikit)
13481 ("python-pastel" ,python-pastel)
13482 ("python-pylev" ,python-pylev)))
13483 (home-page "https://github.com/sdispater/cleo")
13484 (synopsis "Command-line arguments library for Python")
13485 (description
13486 "Cleo allows you to create command-line commands with signature in
13487 docstring and colored output.")
13488 (license license:expat)))
13489
13490 (define-public python2-cleo
13491 (package-with-python2 python-cleo))
13492
13493 (define-public python-tomlkit
13494 (package
13495 (name "python-tomlkit")
13496 (version "0.7.0")
13497 (source
13498 (origin
13499 (method url-fetch)
13500 (uri (pypi-uri "tomlkit" version))
13501 (sha256
13502 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13503 (build-system python-build-system)
13504 (native-inputs
13505 `(("python-pytest" ,python-pytest)
13506 ("python-pyyaml" ,python-pyyaml)))
13507 (home-page "https://github.com/sdispater/tomlkit")
13508 (synopsis "Style-preserving TOML library")
13509 (description
13510 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13511 preserves all comments, indentations, whitespace and internal element ordering,
13512 and makes them accessible and editable via an intuitive API. It can also
13513 create new TOML documents from scratch using the provided helpers. Part of the
13514 implementation has been adapted, improved, and fixed from Molten.")
13515 (license license:expat)))
13516
13517 (define-public python-shellingham
13518 (package
13519 (name "python-shellingham")
13520 (version "1.3.2")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "shellingham" version))
13525 (sha256
13526 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13527 (build-system python-build-system)
13528 (arguments
13529 `(#:phases
13530 (modify-phases %standard-phases
13531 (add-after 'unpack 'restore-setup.py
13532 ;; setup.py will return in the next release.
13533 ;; <https://github.com/sarugaku/shellingham/issues/33>
13534 (lambda _
13535 (with-output-to-file "setup.py"
13536 (lambda _
13537 (display "from setuptools import setup\nsetup()\n")))
13538 #t)))))
13539 (home-page "https://github.com/sarugaku/shellingham")
13540 (synopsis "Tool to detect surrounding shell")
13541 (description
13542 "Shellingham detects what shell the current Python executable is
13543 running in.")
13544 (license license:isc)))
13545
13546 (define-public python-memcached
13547 (package
13548 (name "python-memcached")
13549 (version "1.59")
13550 (source
13551 (origin
13552 (method url-fetch)
13553 (uri (pypi-uri "python-memcached" version))
13554 (sha256
13555 (base32
13556 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13557 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13558 (build-system python-build-system)
13559 (propagated-inputs `(("python-six" ,python-six)))
13560 (home-page
13561 "https://github.com/linsomniac/python-memcached")
13562 (synopsis "Pure python memcached client")
13563 (description
13564 "This software is a pure Python interface to the memcached memory cache
13565 daemon. It is the client side software which allows storing values in one or
13566 more, possibly remote, memcached servers.")
13567 (license license:psfl)))
13568
13569 (define-public python-clikit
13570 (package
13571 (name "python-clikit")
13572 (version "0.6.2")
13573 (source
13574 (origin
13575 (method url-fetch)
13576 (uri (pypi-uri "clikit" version))
13577 (sha256
13578 (base32
13579 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13580 (build-system python-build-system)
13581 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13582 (propagated-inputs
13583 `(("python-crashtest" ,python-crashtest)
13584 ("python-pastel" ,python-pastel)
13585 ("python-pylev" ,python-pylev)))
13586 (home-page "https://github.com/sdispater/clikit")
13587 (synopsis "Group of utilities to build command line interfaces")
13588 (description
13589 "CliKit is a group of utilities to build testable command line
13590 interfaces.")
13591 (properties `((python2-variant . ,(delay python2-clikit))))
13592 (license license:expat)))
13593
13594 (define-public python2-clikit
13595 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13596 (package/inherit
13597 base
13598 (propagated-inputs
13599 `(("python-enum34" ,python2-enum34)
13600 ("python-typing" ,python2-typing)
13601 ,@(package-propagated-inputs base))))))
13602
13603 (define-public python-msgpack-python
13604 (package
13605 (name "python-msgpack-python")
13606 (version "0.5.6")
13607 (source
13608 (origin
13609 (method url-fetch)
13610 (uri (pypi-uri "msgpack-python" version))
13611 (sha256
13612 (base32
13613 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13614 (build-system python-build-system)
13615 (home-page "https://msgpack.org/")
13616 (synopsis "Package to deserialize messages in MessagePack binary format")
13617 (description
13618 "MessagePack is an efficient binary serialization format. It lets you
13619 exchange data among multiple languages like JSON. But it's faster and
13620 smaller. Small integers are encoded into a single byte, and typical short
13621 strings require only one extra byte in addition to the strings themselves.")
13622 (license license:asl2.0)))
13623
13624 (define-public python-cachy
13625 (package
13626 (name "python-cachy")
13627 (version "0.3.0")
13628 (source
13629 (origin
13630 (method url-fetch)
13631 (uri (pypi-uri "cachy" version))
13632 (sha256
13633 (base32
13634 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13635 (build-system python-build-system)
13636 (arguments
13637 '(#:phases
13638 (modify-phases %standard-phases
13639 (replace 'check
13640 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13641 "pytest"))))))
13642 (native-inputs
13643 `(("memcached" ,memcached)
13644 ("python-fakeredis" ,python-fakeredis)
13645 ("python-flexmock" ,python-flexmock)
13646 ("python-pifpaf" ,python-pifpaf)
13647 ("python-pytest" ,python-pytest)))
13648 (propagated-inputs
13649 `(("python-memcached" ,python-memcached)
13650 ("python-msgpack-python" ,python-msgpack-python)
13651 ("python-redis" ,python-redis)))
13652 (home-page "https://github.com/sdispater/cachy")
13653 (synopsis "Simple yet effective caching library")
13654 (description
13655 "Cachy provides a simple yet effective caching library. A simple but
13656 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13657 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13658 (license license:expat)))
13659
13660 (define-public poetry
13661 (package
13662 (name "poetry")
13663 (version "1.1.5")
13664 ;; Poetry can only be built from source with Poetry.
13665 (source
13666 (origin
13667 (method url-fetch)
13668 (uri (pypi-uri "poetry" version))
13669 (sha256
13670 (base32
13671 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13672 (build-system python-build-system)
13673 (arguments
13674 `(#:tests? #f ;; Pypi does not have tests.
13675 #:phases
13676 (modify-phases %standard-phases
13677 (add-before 'build 'patch-setup-py
13678 (lambda _
13679 (substitute* "setup.py"
13680 ;; Allow newer versions of python-keyring.
13681 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13682 ;; TODO: remove after the next release cycle,
13683 ;; when packaging has been updated.
13684 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13685 #t)))))
13686 (propagated-inputs
13687 `(("python-cachecontrol" ,python-cachecontrol)
13688 ("python-cachy" ,python-cachy)
13689 ("python-cleo" ,python-cleo)
13690 ("python-clikit" ,python-clikit)
13691 ("python-html5lib" ,python-html5lib)
13692 ("python-keyring" ,python-keyring)
13693 ("python-msgpack-transitional" ,python-msgpack-transitional)
13694 ("python-packaging" ,python-packaging)
13695 ("python-pexpect" ,python-pexpect)
13696 ("python-pip" ,python-pip)
13697 ("python-pkginfo" ,python-pkginfo)
13698 ("python-poetry-core" ,python-poetry-core)
13699 ("python-requests" ,python-requests)
13700 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13701 ("python-shellingham" ,python-shellingham)
13702 ("python-tomlkit" ,python-tomlkit)
13703 ("python-virtualenv" ,python-virtualenv)))
13704 (home-page "https://python-poetry.org")
13705 (synopsis "Python dependency management and packaging made easy")
13706 (description "Poetry is a tool for dependency management and packaging
13707 in Python. It allows you to declare the libraries your project depends on and
13708 it will manage (install/update) them for you.")
13709 (license license:expat)))
13710
13711 (define-public python-lark-parser
13712 (package
13713 (name "python-lark-parser")
13714 (version "0.9.0")
13715 (source (origin
13716 (method url-fetch)
13717 (uri (pypi-uri "lark-parser" version))
13718 (sha256
13719 (base32
13720 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13721 (build-system python-build-system)
13722 (home-page "https://github.com/lark-parser/lark")
13723 (synopsis "Multi-language parser for Python")
13724 (description
13725 "Lark is a parser built with a focus on ergonomics, performance and
13726 resilience. Lark can parse all context-free languages. That means it is
13727 capable of parsing almost any programming language out there, and to
13728 some degree most natural languages too.")
13729 (license license:expat)))
13730
13731 (define-public python-libcst
13732 (package
13733 (name "python-libcst")
13734 (version "0.3.8")
13735 (source (origin
13736 (method url-fetch)
13737 (uri (pypi-uri "libcst" version))
13738 (sha256
13739 (base32
13740 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13741 (build-system python-build-system)
13742 (arguments
13743 `(#:phases
13744 (modify-phases %standard-phases
13745 (add-after 'unpack 'remove-failing-tests
13746 (lambda _
13747 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13748 (delete-file "libcst/tests/test_fuzz.py")
13749 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13750 (delete-file "libcst/tests/test_pyre_integration.py")
13751 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13752 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13753 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13754 #t))
13755 (add-before 'check 'generate-test-data
13756 (lambda _
13757 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13758 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13759 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13760 (replace 'check
13761 (lambda _
13762 (invoke "python" "-m" "unittest")
13763 #t)))))
13764 (native-inputs
13765 `(("python-black" ,python-black)
13766 ("python-isort" ,python-isort)))
13767 (propagated-inputs
13768 `(("python-typing-extensions" ,python-typing-extensions)
13769 ("python-typing-inspect" ,python-typing-inspect)
13770 ("python-pyyaml" ,python-pyyaml)))
13771 (home-page "https://github.com/Instagram/LibCST")
13772 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13773 (description
13774 "LibCST parses Python source code as a CST tree that keeps all
13775 formatting details (comments, whitespaces, parentheses, etc). It's useful
13776 for building automated refactoring (codemod) applications and linters.
13777 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13778 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13779 naming node types and fields, LibCST creates a lossless CST that looks and
13780 feels like an AST.")
13781 (license (list license:expat
13782 ;; Some files unde libcst/_parser/ are under Python Software
13783 ;; Foundation license (see LICENSE file for details)
13784 license:psfl
13785 ;; libcst/_add_slots.py
13786 license:asl2.0))))
13787
13788 (define-public python-typing-inspect
13789 (package
13790 (name "python-typing-inspect")
13791 (version "0.6.0")
13792 (source (origin
13793 (method url-fetch)
13794 (uri (pypi-uri "typing_inspect" version))
13795 (sha256
13796 (base32
13797 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13798 (build-system python-build-system)
13799 (propagated-inputs
13800 `(("python-mypy-extensions" ,python-mypy-extensions)
13801 ("python-typing-extensions" ,python-typing-extensions)))
13802 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13803 (synopsis "API for inspection of types in the Python @code{typing} module")
13804 (description
13805 "The @code{typing_inspect} module defines experimental API for runtime
13806 inspection of types defined in the Python standard typing module.")
13807 (license license:expat)))
13808
13809 (define-public python-lazy-object-proxy
13810 (package
13811 (name "python-lazy-object-proxy")
13812 (version "1.5.1")
13813 (source (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "lazy-object-proxy" version))
13816 (sha256
13817 (base32
13818 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13819 (native-inputs
13820 `(("python-setuptools-scm" ,python-setuptools-scm)))
13821 (build-system python-build-system)
13822 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13823 (synopsis "Lazy object proxy for python")
13824 (description
13825 "Lazy object proxy is an object that wraps a callable but defers the call
13826 until the object is actually required, and caches the result of said call.")
13827 (license license:bsd-2)))
13828
13829 (define-public python2-lazy-object-proxy
13830 (package-with-python2 python-lazy-object-proxy))
13831
13832 (define-public python-dnspython
13833 (package
13834 (name "python-dnspython")
13835 (version "2.0.0")
13836 (source (origin
13837 (method url-fetch)
13838 (uri (pypi-uri "dnspython" version ".zip"))
13839 (sha256
13840 (base32
13841 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13842 (build-system python-build-system)
13843 (native-inputs `(("unzip" ,unzip)))
13844 (arguments '(#:tests? #f)) ; XXX: requires internet access
13845 (home-page "https://www.dnspython.org")
13846 (synopsis "DNS toolkit for Python")
13847 (description
13848 "dnspython is a DNS toolkit for Python. It supports almost all record
13849 types. It can be used for queries, zone transfers, and dynamic updates.
13850 It supports TSIG authenticated messages and EDNS0.")
13851 (license license:expat)))
13852
13853 (define-public python-dnspython-1.16
13854 (package
13855 (inherit python-dnspython)
13856 (version "1.16.0")
13857 (source (origin
13858 (method url-fetch)
13859 (uri (string-append "http://www.dnspython.org/kits/"
13860 version "/dnspython-" version ".tar.gz"))
13861 (sha256
13862 (base32
13863 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13864 (native-inputs '())))
13865
13866 (define-public python2-dnspython-1.16
13867 (package-with-python2 python-dnspython-1.16))
13868
13869 (define-public python-py3dns
13870 (package
13871 (name "python-py3dns")
13872 (version "3.2.1")
13873 (source
13874 (origin
13875 (method url-fetch)
13876 (uri (pypi-uri "py3dns" version))
13877 (sha256
13878 (base32
13879 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13880 (build-system python-build-system)
13881 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13882 ;; removing functionality so we copy from Nix and "just don't build it".
13883 (arguments
13884 `(#:phases
13885 (modify-phases %standard-phases
13886 (add-after 'unpack 'patch-source
13887 (lambda _
13888 (substitute* "setup.py"
13889 (("import DNS") "")
13890 (("DNS.__version__") (string-append "\"" ,version "\"")))
13891 #t)))
13892 #:tests? #f)) ; Also skip the tests.
13893 (home-page "https://launchpad.net/py3dns")
13894 (synopsis "Python 3 DNS library")
13895 (description "This Python 3 module provides a DNS API for looking up DNS
13896 entries from within Python 3 modules and applications. This module is a
13897 simple, lightweight implementation.")
13898 (license license:psfl)))
13899
13900 (define-public python-email-validator
13901 (package
13902 (name "python-email-validator")
13903 (version "1.0.2")
13904 (source
13905 (origin (method url-fetch)
13906 (uri (pypi-uri "email_validator" version))
13907 (sha256
13908 (base32
13909 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13910 (build-system python-build-system)
13911 (arguments
13912 '(#:phases
13913 (modify-phases %standard-phases
13914 (add-before 'build 'use-dnspython
13915 (lambda _
13916 (substitute* "setup.py"
13917 (("dnspython3") "dnspython"))
13918 #t)))))
13919 (propagated-inputs
13920 `(("python-dnspython" ,python-dnspython)
13921 ("python-idna" ,python-idna)))
13922 (home-page "https://github.com/JoshData/python-email-validator")
13923 (synopsis "Email address validation library for Python")
13924 (description
13925 "This library validates email address syntax and deliverability.")
13926 (license license:cc0)))
13927
13928 (define-public python2-email-validator
13929 (package-with-python2 python-email-validator))
13930
13931 (define-public python-ukpostcodeparser
13932 (package
13933 (name "python-ukpostcodeparser")
13934 (version "1.0.3")
13935 (source (origin
13936 (method url-fetch)
13937 (uri (pypi-uri "UkPostcodeParser" version))
13938 (sha256
13939 (base32
13940 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13941 (build-system python-build-system)
13942 (home-page "https://github.com/hamstah/ukpostcodeparser")
13943 (synopsis "UK Postcode parser for Python")
13944 (description
13945 "This library provides the @code{parse_uk_postcode} function for
13946 parsing UK postcodes.")
13947 (license license:expat)))
13948
13949 (define-public python2-ukpostcodeparser
13950 (package-with-python2 python-ukpostcodeparser))
13951
13952 (define-public python-faker
13953 (package
13954 (name "python-faker")
13955 (version "4.0.2")
13956 (source (origin
13957 (method url-fetch)
13958 (uri (pypi-uri "Faker" version))
13959 (sha256
13960 (base32
13961 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13962 (build-system python-build-system)
13963 (arguments
13964 '(#:phases
13965 (modify-phases %standard-phases
13966 (replace 'check
13967 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13968 (native-inputs
13969 `(;; For testing
13970 ("python-freezegun" ,python-freezegun)
13971 ("python-pytest" ,python-pytest)
13972 ("python-random2" ,python-random2)
13973 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13974 ("python-validators" ,python-validators)))
13975 (propagated-inputs
13976 `(("python-dateutil" ,python-dateutil)
13977 ("python-text-unidecode" ,python-text-unidecode)))
13978 (home-page "https://github.com/joke2k/faker")
13979 (synopsis "Python package that generates fake data")
13980 (description
13981 "Faker is a Python package that generates fake data such as names,
13982 addresses, and phone numbers.")
13983 (license license:expat)
13984 (properties `((python2-variant . ,(delay python2-faker))))))
13985
13986 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13987 (define-public python2-faker
13988 (let ((base (package-with-python2 (strip-python2-variant
13989 python-faker))))
13990 (package
13991 (inherit base)
13992 (version "3.0.1")
13993 (source (origin
13994 (method url-fetch)
13995 (uri (pypi-uri "Faker" version))
13996 (sha256
13997 (base32
13998 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13999 (native-inputs
14000 `(("python-mock" ,python2-mock)
14001 ,@(package-native-inputs base)))
14002 (propagated-inputs
14003 `(("python2-ipaddress" ,python2-ipaddress)
14004 ("python2-six" ,python2-six)
14005 ,@(package-propagated-inputs base))))))
14006
14007 (define-public python-pyaml
14008 (package
14009 (name "python-pyaml")
14010 (version "18.11.0")
14011 (source (origin
14012 (method url-fetch)
14013 (uri (pypi-uri "pyaml" version))
14014 (sha256
14015 (base32
14016 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14017 (build-system python-build-system)
14018 (native-inputs
14019 `(("python-unidecode" ,python-unidecode)))
14020 (propagated-inputs
14021 `(("python-pyyaml" ,python-pyyaml)))
14022 (home-page "https://github.com/mk-fg/pretty-yaml")
14023 (synopsis "YAML pretty-print library for Python")
14024 (description
14025 "pyaml is a PyYAML based python module to produce pretty and readable
14026 YAML-serialized data.")
14027 (license license:wtfpl2)))
14028
14029 (define-public python2-pyaml
14030 (package-with-python2 python-pyaml))
14031
14032 (define-public python-backpack
14033 (package
14034 (name "python-backpack")
14035 (version "0.1")
14036 (source
14037 (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "backpack" version))
14040 (sha256
14041 (base32
14042 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14043 (build-system python-build-system)
14044 (native-inputs
14045 `(("python-pytest" ,python-pytest)
14046 ("python-nose" ,python-nose)))
14047 (propagated-inputs
14048 `(("python-simplejson" ,python-simplejson)))
14049 (home-page "https://github.com/sdispater/backpack")
14050 (synopsis "Utilities for working with Python collections")
14051 (description "Backpack provides some useful utilities for working with
14052 collections of data.")
14053 (license license:expat)))
14054
14055 (define-public python2-backpack
14056 (package-with-python2 python-backpack))
14057
14058 (define-public python-prompt-toolkit
14059 (package
14060 (name "python-prompt-toolkit")
14061 (version "3.0.9")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (pypi-uri "prompt_toolkit" version))
14066 (sha256
14067 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14068 (build-system python-build-system)
14069 (arguments
14070 `(#:phases
14071 (modify-phases %standard-phases
14072 (delete 'check)
14073 (add-after 'install 'post-install-check
14074 (lambda* (#:key inputs outputs #:allow-other-keys)
14075 ;; HOME is needed for the test
14076 ;; "test_pathcompleter_can_expanduser".
14077 (setenv "HOME" "/tmp")
14078 (add-installed-pythonpath inputs outputs)
14079 (invoke "py.test"))))))
14080 (propagated-inputs
14081 `(("python-wcwidth" ,python-wcwidth)))
14082 (native-inputs
14083 `(("python-pytest" ,python-pytest)))
14084 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14085 (synopsis "Library for building command line interfaces in Python")
14086 (description
14087 "Prompt-Toolkit is a library for building interactive command line
14088 interfaces in Python. It's like GNU Readline but it also features syntax
14089 highlighting while typing, out-of-the-box multi-line input editing, advanced
14090 code completion, incremental search, support for Chinese double-width
14091 characters, mouse support, and auto suggestions.")
14092 (license license:bsd-3)
14093 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14094
14095 (define-public python-prompt-toolkit-2
14096 (package (inherit python-prompt-toolkit)
14097 (name "python-prompt-toolkit")
14098 (version "2.0.7")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (pypi-uri "prompt_toolkit" version))
14103 (sha256
14104 (base32
14105 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14106 (propagated-inputs
14107 `(("python-wcwidth" ,python-wcwidth)
14108 ("python-six" ,python-six)
14109 ("python-pygments" ,python-pygments)))
14110 (properties '())))
14111
14112 (define-public python2-prompt-toolkit
14113 (package-with-python2 python-prompt-toolkit-2))
14114
14115 (define-public python-prompt-toolkit-1
14116 (package (inherit python-prompt-toolkit-2)
14117 (version "1.0.15")
14118 (source
14119 (origin
14120 (method url-fetch)
14121 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14122 (sha256
14123 (base32
14124 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14125
14126 (define-public python2-prompt-toolkit-1
14127 (package-with-python2 python-prompt-toolkit-1))
14128
14129 (define-public python-jedi
14130 (package
14131 (name "python-jedi")
14132 (version "0.17.2")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "jedi" version))
14137 (sha256
14138 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14139 (build-system python-build-system)
14140 (arguments
14141 `(#:phases
14142 (modify-phases %standard-phases
14143 (replace 'check
14144 (lambda* (#:key tests? #:allow-other-keys)
14145 (when tests?
14146 (setenv "HOME" "/tmp")
14147 (invoke "python" "-m" "pytest" "-vv"))
14148 #t)))))
14149 (native-inputs
14150 `(("python-pytest" ,python-pytest)
14151 ("python-docopt" ,python-docopt)))
14152 (propagated-inputs
14153 `(("python-parso" ,python-parso)))
14154 (home-page "https://github.com/davidhalter/jedi")
14155 (synopsis "Autocompletion and static analysis library for Python")
14156 (description
14157 "Jedi is a static analysis tool for Python that can be used in Integrated
14158 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14159 on a deeper level than many other static analysis frameworks for Python.
14160
14161 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14162 well.")
14163 (license license:expat)))
14164
14165 (define-public python2-jedi
14166 (package-with-python2 python-jedi))
14167
14168 (define-public ptpython
14169 (package
14170 (name "ptpython")
14171 (version "3.0.5")
14172 (source (origin
14173 (method url-fetch)
14174 (uri (pypi-uri "ptpython" version))
14175 (sha256
14176 (base32
14177 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14178 (build-system python-build-system)
14179 (arguments
14180 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14181 (propagated-inputs
14182 `(("python-appdirs" ,python-appdirs)
14183 ("python-jedi" ,python-jedi)
14184 ("python-prompt-toolkit" ,python-prompt-toolkit)
14185 ("python-pygments" ,python-pygments)))
14186 (home-page "https://github.com/jonathanslenders/ptpython")
14187 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14188 (description
14189 "ptpython is a Python read-eval-print loop with IDE-like features.
14190 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14191 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14192 etc.")
14193 (license license:bsd-3)
14194 (properties `((python2-variant . ,(delay ptpython-2))))))
14195
14196 (define-public ptpython-2
14197 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14198 (package
14199 (inherit base)
14200 (name "ptpython2"))))
14201
14202 (define-public python-stem
14203 (package
14204 (name "python-stem")
14205 (version "1.8.0")
14206 (source
14207 (origin
14208 (method url-fetch)
14209 (uri (pypi-uri "stem" version))
14210 (sha256
14211 (base32
14212 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14213 (build-system python-build-system)
14214 (arguments
14215 `(#:phases
14216 (modify-phases %standard-phases
14217 (replace 'check
14218 (lambda _
14219 (invoke "./run_tests.py" "--unit")
14220 #t)))))
14221 (native-inputs
14222 `(("python-mock" ,python-mock)
14223 ("python-pycodestyle" ,python-pycodestyle)
14224 ("python-pyflakes" ,python-pyflakes)))
14225 (home-page "https://stem.torproject.org/")
14226 (synopsis
14227 "Python controller library that allows applications to interact with Tor")
14228 (description
14229 "Stem is a Python controller library for Tor. With it you can use Tor's
14230 control protocol to script against the Tor process and read descriptor data
14231 relays publish about themselves.")
14232 (license license:lgpl3)))
14233
14234 (define-public python2-stem
14235 (package-with-python2 python-stem))
14236
14237 (define-public python-pyserial
14238 (package
14239 (name "python-pyserial")
14240 (version "3.4")
14241 (source
14242 (origin
14243 (method url-fetch)
14244 (uri (pypi-uri "pyserial" version))
14245 (sha256
14246 (base32
14247 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14248 (build-system python-build-system)
14249 (arguments
14250 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14251 ;; #:phases
14252 ;; (modify-phases %standard-phases
14253 ;; (replace 'check
14254 ;; (lambda _
14255 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14256 (home-page
14257 "https://github.com/pyserial/pyserial")
14258 (synopsis "Python Serial Port Bindings")
14259 (description "@code{pyserial} provide serial port bindings for Python. It
14260 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14261 and/or Xon/Xoff. The port is accessed in RAW mode.")
14262 (license license:bsd-3)))
14263
14264 (define-public python2-pyserial
14265 (package-with-python2 python-pyserial))
14266
14267 (define-public python-kivy
14268 (package
14269 (name "python-kivy")
14270 (version "1.10.1")
14271 (source
14272 (origin
14273 (method url-fetch)
14274 (uri (pypi-uri "Kivy" version))
14275 (file-name (string-append name "-" version ".tar.gz"))
14276 (sha256
14277 (base32
14278 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14279 (build-system python-build-system)
14280 (arguments
14281 `(#:tests? #f ; Tests require many optional packages
14282 #:phases
14283 (modify-phases %standard-phases
14284 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14285 (lambda* (#:key inputs #:allow-other-keys)
14286 (setenv "KIVY_SDL2_PATH"
14287 (string-append (assoc-ref inputs "sdl-union")
14288 "/include/SDL2"))
14289 #t)))))
14290 (native-inputs
14291 `(("pkg-config" ,pkg-config)
14292 ("python-cython" ,python-cython)))
14293 (inputs
14294 `(("gstreamer" ,gstreamer)
14295 ("mesa" ,mesa)
14296 ("sdl-union"
14297 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14298 (home-page "https://kivy.org")
14299 (synopsis
14300 "Multitouch application framework")
14301 (description
14302 "A software library for rapid development of
14303 hardware-accelerated multitouch applications.")
14304 (license license:expat)))
14305
14306 (define-public python2-kivy
14307 (package-with-python2 python-kivy))
14308
14309 (define-public python-binaryornot
14310 (package
14311 (name "python-binaryornot")
14312 (version "0.4.4")
14313 (source (origin
14314 (method url-fetch)
14315 (uri (pypi-uri "binaryornot" version))
14316 (sha256
14317 (base32
14318 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14319 (build-system python-build-system)
14320 (arguments
14321 `(#:phases
14322 (modify-phases %standard-phases
14323 (add-after 'unpack 'patch-tests
14324 (lambda _
14325 ;; TypeError: binary() got an unexpected keyword argument
14326 ;; 'average_size'.
14327 (substitute* "tests/test_check.py"
14328 (("average_size=512") ""))
14329 #t)))))
14330 (propagated-inputs
14331 `(("python-chardet" ,python-chardet)
14332 ("python-hypothesis" ,python-hypothesis)))
14333 (home-page "https://github.com/audreyr/binaryornot")
14334 (synopsis "Package to check if a file is binary or text")
14335 (description "Ultra-lightweight pure Python package to check if a file is
14336 binary or text.")
14337 (license license:bsd-3)
14338 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14339
14340 (define-public python2-binaryornot
14341 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14342 (package (inherit base)
14343 (propagated-inputs
14344 `(("python2-enum34" ,python2-enum34)
14345 ,@(package-propagated-inputs base))))))
14346
14347 (define-public python-binwalk
14348 (package
14349 (name "python-binwalk")
14350 (version "2.2.0")
14351 (source
14352 (origin
14353 (method git-fetch)
14354 (uri (git-reference
14355 (url "https://github.com/ReFirmLabs/binwalk")
14356 (commit (string-append "v" version))))
14357 (file-name (git-file-name name version))
14358 (sha256
14359 (base32
14360 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14361 (build-system python-build-system)
14362 (arguments
14363 `(#:phases
14364 (modify-phases %standard-phases
14365 (add-before 'check 'set-pythonpath
14366 (lambda _
14367 (setenv "PYTHONPATH"
14368 (string-append
14369 (getcwd) "/src/"
14370 ":" (getenv "PYTHONPATH")))
14371 (setenv "HOME" "")
14372 #t)))))
14373 (native-inputs
14374 `(("python-coverage" ,python-coverage)
14375 ("python-nose" ,python-nose)))
14376 (home-page "https://github.com/ReFirmLabs/binwalk")
14377 (synopsis "Firmware analysis tool")
14378 (description "Binwalk is a tool for analyzing, reverse engineering, and
14379 extracting firmware images")
14380 (license license:expat)))
14381
14382 (define-public python-nltk
14383 (package
14384 (name "python-nltk")
14385 (version "3.2.1")
14386 (source (origin
14387 (method url-fetch)
14388 (uri (pypi-uri "nltk" version))
14389 (sha256
14390 (base32
14391 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14392 (build-system python-build-system)
14393 (arguments
14394 '(;; The tests require some extra resources to be downloaded.
14395 ;; TODO Try packaging these resources.
14396 #:tests? #f))
14397 (home-page "http://nltk.org/")
14398 (synopsis "Natural Language Toolkit")
14399 (description "It provides interfaces to over 50 corpora and lexical
14400 resources such as WordNet, along with a suite of text processing libraries
14401 for classification, tokenization, stemming, tagging, parsing, and semantic
14402 reasoning, wrappers for natural language processing libraries.")
14403 (license license:asl2.0)))
14404
14405 (define-public python2-nltk
14406 (package-with-python2 python-nltk))
14407
14408 (define-public python-pymongo
14409 (package
14410 (name "python-pymongo")
14411 (version "3.7.2")
14412 (source (origin
14413 (method url-fetch)
14414 (uri (pypi-uri "pymongo" version))
14415 (sha256
14416 (base32
14417 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14418 (build-system python-build-system)
14419 (propagated-inputs
14420 `(("python-certifi" ,python-certifi)))
14421 (home-page "https://github.com/mongodb/mongo-python-driver")
14422 (synopsis "Python driver for MongoDB")
14423 (description "Python driver for MongoDB.")
14424 (license license:asl2.0)))
14425
14426 (define-public python2-pymongo
14427 (package-with-python2 python-pymongo))
14428
14429 (define-public python-consul
14430 (package
14431 (name "python-consul")
14432 (version "0.6.1")
14433 (source
14434 (origin
14435 (method url-fetch)
14436 (uri (pypi-uri "python-consul" version))
14437 (sha256
14438 (base32
14439 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14440 (build-system python-build-system)
14441 (arguments
14442 '(#:tests? #f)) ; The tests are not distributed
14443 (propagated-inputs
14444 `(("python-requests" ,python-requests)
14445 ("python-six" ,python-six)))
14446 (home-page "https://github.com/cablehead/python-consul")
14447 (synopsis "Python client for Consul")
14448 (description
14449 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14450 discovery, monitoring and configuration.")
14451 (license license:expat)))
14452
14453 (define-public python2-consul
14454 (package-with-python2 python-consul))
14455
14456 (define-public python-schematics
14457 (package
14458 (name "python-schematics")
14459 (version "1.1.1")
14460 (source
14461 (origin
14462 (method git-fetch)
14463 (uri (git-reference
14464 (url "https://github.com/schematics/schematics")
14465 (commit (string-append "v" version))))
14466 (file-name (git-file-name name version))
14467 (sha256
14468 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14469 (build-system python-build-system)
14470 (propagated-inputs
14471 `(("python-six" ,python-six)))
14472 (arguments
14473 ;; The tests require a bunch of not very nice packages with fixed
14474 ;; version requirements (e.g. python-coveralls).
14475 `(#:tests? #f))
14476 (home-page "https://github.com/schematics/schematics")
14477 (synopsis "Python Data Structures for Humans")
14478 (description "Python Data Structures for Humans.")
14479 (license license:bsd-3)))
14480
14481 (define-public python2-schematics
14482 (package-with-python2 python-schematics))
14483
14484 (define-public python-odfpy
14485 (package
14486 (name "python-odfpy")
14487 (version "1.4.1")
14488 (source (origin
14489 (method url-fetch)
14490 (uri (pypi-uri "odfpy" version))
14491 (sha256
14492 (base32
14493 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14494 (arguments
14495 `(#:phases
14496 (modify-phases %standard-phases
14497 (replace 'check
14498 (lambda _
14499 (setenv "PYTHONPATH" (string-append "./build/lib:"
14500 (getenv "PYTHONPATH")))
14501 (invoke "pytest" "-vv"))))))
14502 (build-system python-build-system)
14503 (native-inputs
14504 `(("python-pytest" ,python-pytest)))
14505 (propagated-inputs
14506 `(("python-defusedxml" ,python-defusedxml)))
14507 (home-page "https://github.com/eea/odfpy")
14508 (synopsis "Python API and tools to manipulate OpenDocument files")
14509 (description "Collection of libraries and utility programs written in
14510 Python to manipulate OpenDocument 1.2 files.")
14511 (license
14512 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14513 ;; number of files with other licenses.
14514 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14515
14516 (define-public python2-odfpy
14517 (package-with-python2 python-odfpy))
14518
14519 (define-public python-natsort
14520 (package
14521 (name "python-natsort")
14522 (version "7.0.1")
14523 (source (origin
14524 (method url-fetch)
14525 (uri (pypi-uri "natsort" version))
14526 (sha256
14527 (base32
14528 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14529 (build-system python-build-system)
14530 (arguments
14531 `(#:modules ((guix build utils)
14532 (guix build python-build-system)
14533 (srfi srfi-1)
14534 (srfi srfi-26)
14535 (ice-9 ftw))
14536 #:phases
14537 (modify-phases %standard-phases
14538 (add-before 'check 'set-cachedir
14539 ;; Tests require write access to $HOME by default
14540 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14541 (replace 'check
14542 (lambda _
14543 (let ((cwd (getcwd)))
14544 (setenv "PYTHONPATH"
14545 (string-append
14546 cwd "/build/"
14547 (find (cut string-prefix? "lib" <>)
14548 (scandir (string-append cwd "/build")))
14549 ":"
14550 (getenv "PYTHONPATH")))
14551 (invoke "pytest" "-v")))))))
14552 (native-inputs
14553 `(("python-hypothesis" ,python-hypothesis)
14554 ("python-pytest-cov" ,python-pytest-cov)
14555 ("python-pytest-mock" ,python-pytest-mock)
14556 ("python-pytest" ,python-pytest)))
14557 (propagated-inputs ; TODO: Add python-fastnumbers.
14558 `(("python-pyicu" ,python-pyicu)))
14559 (home-page "https://github.com/SethMMorton/natsort")
14560 (synopsis "Natural sorting for python and shell")
14561 (description
14562 "Natsort lets you apply natural sorting on lists instead of
14563 lexicographical. If you use the built-in @code{sorted} method in python
14564 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14565 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14566 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14567 identifies numbers and sorts them separately from strings. It can also sort
14568 version numbers, real numbers, mixed types and more, and comes with a shell
14569 command @command{natsort} that exposes this functionality in the command line.")
14570 (license license:expat)
14571 (properties `((python2-variant . ,(delay python2-natsort))))))
14572
14573 ;; Natsort 6.x are the last versions with support for Python 2.
14574 (define-public python2-natsort
14575 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14576 (package (inherit base)
14577 (version "6.2.1")
14578 (source (origin
14579 (method url-fetch)
14580 (uri (pypi-uri "natsort" version))
14581 (sha256
14582 (base32
14583 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14584 (native-inputs
14585 `(("python2-pathlib" ,python2-pathlib)
14586 ,@(package-native-inputs base))))))
14587
14588 (define-public glances
14589 (package
14590 (name "glances")
14591 (version "3.1.6")
14592 (source
14593 (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "Glances" version))
14596 (sha256
14597 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14598 (modules '((guix build utils)))
14599 (snippet
14600 '(begin
14601 ;; Glances phones PyPI for weekly update checks by default.
14602 ;; Disable these. The user can re-enable them if desired.
14603 (substitute* "glances/outdated.py"
14604 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14605 (string-append indentation
14606 "self.args.disable_check_update = True\n"
14607 line)))
14608 #t))))
14609 (build-system python-build-system)
14610 (propagated-inputs
14611 `(("python-future" ,python-future)
14612 ("python-psutil" ,python-psutil)))
14613 (home-page "https://github.com/nicolargo/glances")
14614 (synopsis "Cross-platform curses-based monitoring tool")
14615 (description
14616 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14617 Glances uses the PsUtil library to get information from your system. It
14618 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14619 (license license:lgpl3+)))
14620
14621 (define-public python-glances
14622 (deprecated-package "python-glances" glances))
14623
14624 (define-public python-graphql-core
14625 (package
14626 (name "python-graphql-core")
14627 (version "3.1.2")
14628 (source
14629 (origin
14630 (method url-fetch)
14631 (uri (pypi-uri "graphql-core" version))
14632 (sha256
14633 (base32
14634 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14635 (build-system python-build-system)
14636 (arguments
14637 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14638 #:phases
14639 (modify-phases %standard-phases
14640 (add-after 'unpack 'patch-hardcoded-version
14641 (lambda _ (substitute*
14642 "setup.py"
14643 (("'gevent==1.1rc1'") "'gevent'"))
14644 #t)))))
14645 (native-inputs
14646 `(("python-gevent" ,python-gevent)
14647 ("python-mock" ,python-mock)
14648 ("python-pytest-mock" ,python-pytest-mock)))
14649 (propagated-inputs
14650 `(("python-promise" ,python-promise)
14651 ("python-six" ,python-six)))
14652 (home-page "https://github.com/graphql-python/graphql-core")
14653 (synopsis "GraphQL implementation for Python")
14654 (description
14655 "GraphQL implementation for Python. GraphQL is a data query language and
14656 runtime designed and used to request and deliver data to mobile and web apps.
14657 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14658 to Python.")
14659 (license license:expat)))
14660
14661 (define-public python2-graphql-core
14662 (package-with-python2 python-graphql-core))
14663
14664 (define-public python-graphql-relay
14665 (package
14666 (name "python-graphql-relay")
14667 (version "0.4.5")
14668 (source
14669 (origin
14670 (method url-fetch)
14671 (uri (pypi-uri "graphql-relay" version))
14672 (sha256
14673 (base32
14674 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14675 (build-system python-build-system)
14676 (arguments
14677 '(#:tests? #f)) ; The tests are not distributed
14678 (propagated-inputs
14679 `(("python-graphql-core" ,python-graphql-core)
14680 ("python-promise" ,python-promise)
14681 ("python-six" ,python-six)))
14682 (home-page "https://github.com/graphql-python/graphql-relay-py")
14683 (synopsis "Relay implementation for Python")
14684 (description
14685 "This is a library to allow the easy creation of Relay-compliant servers
14686 using the GraphQL Python reference implementation of a GraphQL server. It
14687 should be noted that the code is a exact port of the original
14688 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14689 from Facebook.")
14690 (license license:expat)))
14691
14692 (define-public python-graphene
14693 (package
14694 (name "python-graphene")
14695 (version "0.10.2")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "graphene" version))
14700 (sha256
14701 (base32
14702 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14703 (build-system python-build-system)
14704 (propagated-inputs
14705 `(("python-graphql-core" ,python-graphql-core)
14706 ("python-graphql-relay" ,python-graphql-relay)
14707 ("python-iso8601" ,python-iso8601)
14708 ("python-promise" ,python-promise)
14709 ("python-six" ,python-six)))
14710 (arguments
14711 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14712 (home-page "https://graphene-python.org/")
14713 (synopsis "GraphQL Framework for Python")
14714 (description
14715 "Graphene is a Python library for building GraphQL schemas/types.
14716 A GraphQL schema describes your data model, and provides a GraphQL server
14717 with an associated set of resolve methods that know how to fetch data.")
14718 (license license:expat)))
14719
14720 (define-public python-nautilus
14721 (package
14722 (name "python-nautilus")
14723 (version "0.4.9")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "nautilus" version))
14728 (sha256
14729 (base32
14730 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14731 (build-system python-build-system)
14732 (arguments `(#:tests? #f)) ; fails to import test modules
14733 (propagated-inputs
14734 `(("python-bcrypt" ,python-bcrypt)
14735 ("python-click" ,python-click)
14736 ("python-consul" ,python-consul)
14737 ("python-graphene" ,python-graphene)
14738 ("python-jinja2" ,python-jinja2)
14739 ("python-peewee" ,python-peewee)
14740 ("python-pika" ,python-pika)
14741 ("python-tornado" ,python-tornado)
14742 ("python-wtforms" ,python-wtforms)))
14743 (native-inputs
14744 `(("python-nose2" ,python-nose2)))
14745 (home-page "https://github.com/AlecAivazis/nautilus")
14746 (synopsis "Library for creating microservice applications")
14747 (description
14748 "Nautilus is a framework for flux based microservices that looks to
14749 provide extendible implementations of common aspects of a cloud so that you can
14750 focus on building massively scalable web applications.")
14751 (license license:expat)))
14752
14753 (define-public python-random2
14754 (package
14755 (name "python-random2")
14756 (version "1.0.1")
14757 (source (origin
14758 (method url-fetch)
14759 (uri (pypi-uri "random2" version ".zip"))
14760 (sha256
14761 (base32
14762 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14763 (build-system python-build-system)
14764 (native-inputs `(("unzip" ,unzip)))
14765 (home-page "http://pypi.python.org/pypi/random2")
14766 (synopsis "Python 3 version of the Python 2 @code{random} module")
14767 (description
14768 "This package provides a Python 3 ported version of Python 2.7’s
14769 @code{random} module. It has also been back-ported to work in Python 2.6.
14770
14771 In Python 3, the implementation of @code{randrange()} was changed, so that
14772 even with the same seed you get different sequences in Python 2 and 3.
14773
14774 This package closes that gap, allowing stable random number generation
14775 between the different Python versions.")
14776 (license license:psfl)))
14777
14778 (define-public python2-random2
14779 (package-with-python2 python-random2))
14780
14781 (define-public python-snowballstemmer
14782 (package
14783 (name "python-snowballstemmer")
14784 (version "2.0.0")
14785 (source (origin
14786 (method url-fetch)
14787 (uri (pypi-uri "snowballstemmer" version))
14788 (sha256
14789 (base32
14790 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14791 (build-system python-build-system)
14792 (arguments
14793 `(;; No tests exist
14794 #:tests? #f))
14795 (home-page "https://github.com/shibukawa/snowball_py")
14796 (synopsis "Snowball stemming library collection for Python")
14797 (description "This package provides 16 word stemmer algorithms generated
14798 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14799 English stemmer.")
14800 (license license:bsd-3)))
14801
14802 (define-public python2-snowballstemmer
14803 (package-with-python2 python-snowballstemmer))
14804
14805 (define-public python-setproctitle
14806 (package
14807 (name "python-setproctitle")
14808 (version "1.1.10")
14809 (source
14810 (origin
14811 (method url-fetch)
14812 (uri (pypi-uri "setproctitle" version))
14813 (sha256
14814 (base32
14815 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14816 (build-system python-build-system)
14817 (arguments
14818 '(#:phases
14819 (modify-phases %standard-phases
14820 (add-before 'check 'patch-Makefile
14821 ;; Stricly this is only required for the python2 variant.
14822 ;; But adding a phase in an inherited package seems to be
14823 ;; cumbersum. So we patch even for python3.
14824 (lambda _
14825 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14826 (when nose
14827 (substitute* "Makefile"
14828 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14829 (string-append nose "/bin/nosetests "))))
14830 #t)))
14831 (replace 'check
14832 (lambda _
14833 (setenv "PYTHON" (or (which "python3") (which "python")))
14834 (setenv "PYCONFIG" (if (which "python3-config")
14835 "python3-config --embed"
14836 "python-config"))
14837 (setenv "CC" "gcc")
14838 ;; No need to extend PYTHONPATH to find the built package, since
14839 ;; the Makefile will build anyway
14840 (invoke "make" "check"))))))
14841 (native-inputs
14842 `(("procps" ,procps))) ; required for tests
14843 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14844 (synopsis
14845 "Setproctitle implementation for Python to customize the process title")
14846 (description "The library allows a process to change its title (as displayed
14847 by system tools such as ps and top).
14848
14849 Changing the title is mostly useful in multi-process systems, for
14850 example when a master process is forked: changing the children's title
14851 allows identifying the task each process is busy with. The technique
14852 is used by PostgreSQL and the OpenSSH Server for example.")
14853 (license license:bsd-3)
14854 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14855
14856 (define-public python2-setproctitle
14857 (let ((base (package-with-python2
14858 (strip-python2-variant python-setproctitle))))
14859 (package
14860 (inherit base)
14861 (native-inputs `(("python2-nose" ,python2-nose)
14862 ,@(package-native-inputs base))))))
14863
14864 (define-public python-validictory
14865 (package
14866 (name "python-validictory")
14867 (version "1.0.1")
14868 (source
14869 (origin
14870 (method url-fetch)
14871 (uri (pypi-uri "validictory" version))
14872 (sha256
14873 (base32
14874 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14875 (build-system python-build-system)
14876 (arguments
14877 '(#:phases
14878 (modify-phases %standard-phases
14879 (add-after 'unpack 'bootstrap
14880 ;; Move the tests out of the package directory to avoid
14881 ;; packaging them.
14882 (lambda* _
14883 (rename-file "validictory/tests" "tests")
14884 (delete-file "tests/__init__.py")))
14885 (replace 'check
14886 (lambda _
14887 ;; Extend PYTHONPATH so the built package will be found.
14888 (setenv "PYTHONPATH"
14889 (string-append (getcwd) "/build/lib:"
14890 (getenv "PYTHONPATH")))
14891 (invoke "py.test" "-vv" ))))))
14892 (native-inputs
14893 `(("python-pytest" ,python-pytest)))
14894 (home-page
14895 "https://github.com/jamesturk/validictory")
14896 (synopsis "General purpose Python data validator")
14897 (description "It allows validation of arbitrary Python data structures.
14898
14899 The schema format is based on the JSON Schema
14900 proposal (http://json-schema.org), so combined with json the library is also
14901 useful as a validator for JSON data.")
14902 (license license:expat)))
14903
14904 (define-public python2-validictory
14905 (package-with-python2 python-validictory))
14906
14907 (define-public python-pyelftools
14908 (package
14909 (name "python-pyelftools")
14910 (version "0.25")
14911 (source
14912 (origin
14913 (method url-fetch)
14914 (uri (pypi-uri "pyelftools" version))
14915 (sha256
14916 (base32
14917 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14918 (build-system python-build-system)
14919 (arguments
14920 `(#:phases
14921 (modify-phases %standard-phases
14922 (add-before 'check 'set-pythonpath
14923 (lambda _
14924 (setenv "PYTHONPATH"
14925 (string-append
14926 (getcwd) "/test/"
14927 ":" (getenv "PYTHONPATH")))
14928 #t)))))
14929 (home-page
14930 "https://github.com/eliben/pyelftools")
14931 (synopsis
14932 "Analyze binary and library file information")
14933 (description "This Python library provides interfaces for parsing and
14934 analyzing two binary and library file formats; the Executable and Linking
14935 Format (ELF), and debugging information in the Debugging With Attributed
14936 Record Format (DWARF).")
14937 (license license:public-domain)))
14938
14939 (define-public python-pyev
14940 (package
14941 (name "python-pyev")
14942 (version "0.9.0")
14943 (source
14944 (origin
14945 (method url-fetch)
14946 (uri (pypi-uri "pyev" version))
14947 (sha256
14948 (base32
14949 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14950 (build-system python-build-system)
14951 (arguments
14952 `(#:tests? #f ; no test suite
14953 #:phases
14954 (modify-phases %standard-phases
14955 (add-after 'unpack 'patch
14956 (lambda* (#:key inputs #:allow-other-keys)
14957 (let ((libev (string-append (assoc-ref inputs "libev")
14958 "/lib/libev.so.4")))
14959 (substitute* "setup.py"
14960 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14961 (string-append "libev_dll_name = \"" libev "\"")))))))))
14962 (inputs
14963 `(("libev" ,libev)))
14964 (home-page "https://github.com/gabrielfalcao/pyev")
14965 (synopsis "Python libev interface")
14966 (description "Pyev provides a Python interface to libev.")
14967 (license license:gpl3)))
14968
14969 (define-public python2-pyev
14970 (package-with-python2 python-pyev))
14971
14972 (define-public python-imagesize
14973 (package
14974 (name "python-imagesize")
14975 (version "1.2.0")
14976 (source
14977 (origin
14978 (method url-fetch)
14979 (uri (pypi-uri "imagesize" version))
14980 (sha256
14981 (base32
14982 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14983 (build-system python-build-system)
14984 (home-page "https://github.com/shibukawa/imagesize_py")
14985 (synopsis "Gets image size of files in various formats in Python")
14986 (description
14987 "This package allows determination of image size from
14988 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14989 (license license:expat)))
14990
14991 (define-public python2-imagesize
14992 (package-with-python2 python-imagesize))
14993
14994 (define-public python-termstyle
14995 (package
14996 (name "python-termstyle")
14997 (version "0.1.11")
14998 (source
14999 (origin
15000 (method url-fetch)
15001 (uri (pypi-uri "termstyle" version))
15002 (sha256
15003 (base32
15004 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15005 (build-system python-build-system)
15006 (arguments
15007 '(#:phases
15008 (modify-phases %standard-phases
15009 (replace 'check
15010 (lambda _
15011 (invoke "python" "test3.py"))))))
15012 (home-page "https://github.com/gfxmonk/termstyle")
15013 (synopsis "Console text coloring for Python")
15014 (description "This package provides console text coloring for Python.")
15015 (license license:bsd-3)))
15016
15017 (define-public python-argcomplete
15018 (package
15019 (name "python-argcomplete")
15020 (version "1.11.1")
15021 (source
15022 (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "argcomplete" version))
15025 (sha256
15026 (base32
15027 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15028 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15029 (build-system python-build-system)
15030 (native-inputs
15031 `(("python-coverage" ,python-coverage)
15032 ("python-flake8" ,python-flake8)
15033 ("python-pexpect" ,python-pexpect)
15034 ("python-wheel" ,python-wheel)
15035 ("tcsh" ,tcsh)
15036 ("fish" ,fish)
15037 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15038 (home-page "https://github.com/kislyuk/argcomplete")
15039 (synopsis "Shell tab completion for Python argparse")
15040 (description "argcomplete provides extensible command line tab completion
15041 of arguments and options for Python scripts using @code{argparse}. It's
15042 particularly useful for programs with many options or sub-parsers that can
15043 dynamically suggest completions; for example, when browsing resources over the
15044 network.")
15045 (license license:asl2.0)
15046 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15047
15048 (define-public python2-argcomplete
15049 (let ((variant (package-with-python2
15050 (strip-python2-variant python-argcomplete))))
15051 (package
15052 (inherit variant)
15053 (arguments
15054 (substitute-keyword-arguments (package-arguments variant)
15055 ((#:phases phases '%standard-phases)
15056 `(modify-phases ,phases
15057 (add-after 'unpack 'set-my-HOME
15058 (lambda _ (setenv "HOME" "/tmp")))))))
15059 (native-inputs
15060 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15061 ,@(package-native-inputs variant))))))
15062
15063 (define-public python-csscompressor
15064 (package
15065 (name "python-csscompressor")
15066 (version "0.9.5")
15067 (source
15068 (origin
15069 (method url-fetch)
15070 (uri (pypi-uri "csscompressor" version))
15071 (sha256
15072 (base32
15073 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15074 (build-system python-build-system)
15075 (arguments
15076 '(#:phases
15077 (modify-phases %standard-phases
15078 (replace 'check
15079 (lambda _
15080 (invoke "py.test"))))))
15081 (native-inputs
15082 `(("python-pytest" ,python-pytest)))
15083 (home-page "https://github.com/sprymix/csscompressor")
15084 (synopsis "Python port of YUI CSS Compressor")
15085 (description
15086 "This package provides a python port of YUI CSS Compressor.")
15087 (license license:bsd-3)))
15088
15089 (define-public python-rcssmin
15090 (package
15091 (name "python-rcssmin")
15092 (version "1.0.6")
15093 (source
15094 (origin
15095 (method url-fetch)
15096 (uri (pypi-uri "rcssmin" version))
15097 (sha256
15098 (base32
15099 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15100 (build-system python-build-system)
15101 (arguments
15102 '(#:phases
15103 (modify-phases %standard-phases
15104 (replace 'check
15105 (lambda _
15106 (invoke "python" "run_tests.py" "tests"))))))
15107 (home-page "http://opensource.perlig.de/rcssmin/")
15108 (synopsis "CSS Minifier")
15109 (description "The minifier is based on the semantics of the YUI compressor,
15110 which itself is based on the rule list by Isaac Schlueter.")
15111 (license license:asl2.0)))
15112
15113 (define-public python-rjsmin
15114 (package
15115 (name "python-rjsmin")
15116 (version "1.1.0")
15117 (source
15118 (origin
15119 (method url-fetch)
15120 (uri (pypi-uri "rjsmin" version))
15121 (sha256
15122 (base32
15123 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15124 (modules '((guix build utils)))
15125 (snippet
15126 '(begin
15127 (for-each delete-file (find-files "bench" "\\.js$"))
15128 #t))))
15129 (build-system python-build-system)
15130 (arguments
15131 '(#:tests? #f ; Not all test files included.
15132 #:phases
15133 (modify-phases %standard-phases
15134 (replace 'check
15135 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15136 (add-installed-pythonpath inputs outputs)
15137 (if tests?
15138 (invoke "py.test" "-vv" "tests")
15139 #t))))))
15140 (native-inputs
15141 `(("python-pytest" ,python-pytest)))
15142 (home-page "http://opensource.perlig.de/rjsmin/")
15143 (synopsis "Javascript Minifier")
15144 (description "@code{rJSmin} is a javascript minifier written in Python. The
15145 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15146 is a re-implementation aiming for speed, so it can be used at runtime (rather
15147 than during a preprocessing step).")
15148 (license license:asl2.0)))
15149
15150 (define-public python-xopen
15151 (package
15152 (name "python-xopen")
15153 (version "0.5.0")
15154 (source
15155 (origin
15156 (method url-fetch)
15157 (uri (pypi-uri "xopen" version))
15158 (sha256
15159 (base32
15160 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15161 (build-system python-build-system)
15162 (propagated-inputs
15163 `(("python-setuptools-scm" ,python-setuptools-scm)))
15164 (home-page "https://github.com/marcelm/xopen/")
15165 (synopsis "Open compressed files transparently")
15166 (description "This module provides an @code{xopen} function that works like
15167 Python's built-in @code{open} function, but can also deal with compressed files.
15168 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15169 recognized by their file extensions. The focus is on being as efficient as
15170 possible on all supported Python versions.")
15171 (license license:expat)))
15172
15173 (define-public python2-xopen
15174 (let ((base (package-with-python2
15175 (strip-python2-variant python-xopen))))
15176 (package
15177 (inherit base)
15178 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15179 ,@(package-propagated-inputs base))))))
15180
15181 (define-public python-cheetah
15182 (package
15183 (name "python-cheetah")
15184 (version "3.2.4")
15185 (source
15186 (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "Cheetah3" version))
15189 (sha256
15190 (base32
15191 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15192 (build-system python-build-system)
15193 (arguments
15194 `(#:modules ((guix build utils)
15195 (guix build python-build-system)
15196 (ice-9 ftw)
15197 (srfi srfi-1)
15198 (srfi srfi-26))
15199 #:phases (modify-phases %standard-phases
15200 (add-after 'unpack 'use-absolute-python
15201 (lambda _
15202 (substitute* "Cheetah/CheetahWrapper.py"
15203 (("#!/usr/bin/env python")
15204 (string-append "#!" (which "python"))))
15205 #t))
15206 (add-after 'unpack 'fix-tests
15207 (lambda _
15208 (substitute* "Cheetah/Tests/ImportHooks.py"
15209 (("os.path.dirname\\(__file__\\)")
15210 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15211 #t))
15212 (replace 'check
15213 (lambda _
15214 (let ((cwd (getcwd)))
15215 (setenv "PYTHONPATH"
15216 (string-append
15217 cwd "/build/"
15218 (find (cut string-prefix? "lib" <>)
15219 (scandir (string-append cwd "/build")))
15220 ":" (getenv "PYTHONPATH")))
15221 (setenv "PATH"
15222 (string-append (getenv "PATH")
15223 ":" cwd "/bin"))
15224 (setenv "TMPDIR" "/tmp")
15225
15226 (substitute* "Cheetah/Tests/Test.py"
15227 (("unittest.TextTestRunner\\(\\)")
15228 "unittest.TextTestRunner(verbosity=2)"))
15229
15230 (invoke "python" "Cheetah/Tests/Test.py")))))))
15231 (propagated-inputs
15232 `(("python-markdown" ,python-markdown))) ;optional
15233 (home-page "https://cheetahtemplate.org/")
15234 (synopsis "Template engine")
15235 (description "Cheetah is a text-based template engine and Python code
15236 generator.
15237
15238 Cheetah can be used as a standalone templating utility or referenced as
15239 a library from other Python applications. It has many potential uses,
15240 but web developers looking for a viable alternative to ASP, JSP, PHP and
15241 PSP are expected to be its principle user group.
15242
15243 Features:
15244 @enumerate
15245 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15246 text-based format.
15247 @item Cleanly separates content, graphic design, and program code.
15248 @item Blends the power and flexibility of Python with a simple template language
15249 that non-programmers can understand.
15250 @item Gives template writers full access to any Python data structure, module,
15251 function, object, or method in their templates.
15252 @item Makes code reuse easy by providing an object-orientated interface to
15253 templates that is accessible from Python code or other Cheetah templates.
15254 One template can subclass another and selectively reimplement sections of it.
15255 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15256 improve the performance of a dynamic website.
15257 @item Compiles templates into optimized, yet readable, Python code.
15258 @end enumerate")
15259 (license (license:x11-style "file://LICENSE"))))
15260
15261 (define-public python2-cheetah
15262 (package-with-python2 python-cheetah))
15263
15264 (define-public python-dulwich
15265 (package
15266 (name "python-dulwich")
15267 (version "0.19.16")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (list (string-append "https://www.dulwich.io/releases/"
15272 "dulwich-" version ".tar.gz")
15273 (pypi-uri "dulwich" version)))
15274 (sha256
15275 (base32
15276 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15277 (build-system python-build-system)
15278 (arguments
15279 `(#:phases
15280 (modify-phases %standard-phases
15281 (add-before 'check 'fix-tests
15282 (lambda* (#:key inputs #:allow-other-keys)
15283 ;; The tests use Popen with a custom environment which doesn't
15284 ;; include PATH.
15285 (substitute* "dulwich/tests/compat/utils.py"
15286 (("'git'") (string-append "'"
15287 (which "git")
15288 "'")))
15289 (substitute* '("dulwich/tests/test_repository.py"
15290 "dulwich/tests/test_hooks.py")
15291 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15292 (setenv "TEST_RUNNER" "unittest")
15293 (setenv "PYTHONHASHSEED" "random")
15294 #t)))))
15295 (propagated-inputs
15296 `(("python-fastimport" ,python-fastimport)
15297 ("python-urllib3" ,python-urllib3)))
15298 (native-inputs
15299 `(("python-mock" ,python-mock)
15300 ("python-geventhttpclient" ,python-geventhttpclient)
15301 ("git" ,git)))
15302 (home-page "https://www.dulwich.io/")
15303 (synopsis "Git implementation in Python")
15304 (description "Dulwich is an implementation of the Git file formats and
15305 protocols written in pure Python.")
15306 ;; Can be used with either license.
15307 (license (list license:asl2.0 license:gpl2+))))
15308
15309 (define-public python2-dulwich
15310 (package-with-python2 python-dulwich))
15311
15312 (define-public python-pbkdf2
15313 (package
15314 (name "python-pbkdf2")
15315 (version "1.3")
15316 (source
15317 (origin
15318 (method url-fetch)
15319 (uri (pypi-uri "pbkdf2" version))
15320 (sha256
15321 (base32
15322 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15323 (build-system python-build-system)
15324 (arguments
15325 '(#:phases
15326 (modify-phases %standard-phases
15327 (replace 'check
15328 (lambda _
15329 (setenv "PYTHONPATH"
15330 (string-append (getcwd) "/build/lib:"
15331 (getenv "PYTHONPATH")))
15332 (invoke "python" "test/test_pbkdf2.py"))))))
15333 (propagated-inputs
15334 `(("python-pycrypto" ,python-pycrypto))) ; optional
15335 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15336 (synopsis "Password-based key derivation")
15337 (description "This module implements the password-based key derivation
15338 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15339
15340 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15341 is part of the RSA Public Key Cryptography Standards series. The provided
15342 implementation takes a password or a passphrase and a salt value (and
15343 optionally a iteration count, a digest module, and a MAC module) and provides
15344 a file-like object from which an arbitrarily-sized key can be read.")
15345 (license license:expat)))
15346
15347 (define-public python2-pbkdf2
15348 (package-with-python2 python-pbkdf2))
15349
15350 (define-public python-qrcode
15351 (package
15352 (name "python-qrcode")
15353 (version "6.1")
15354 (source
15355 (origin
15356 (method url-fetch)
15357 (uri (pypi-uri "qrcode" version))
15358 (sha256
15359 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15360 (build-system python-build-system)
15361 (arguments
15362 ;; FIXME: Tests require packaging 'pymaging'.
15363 '(#:tests? #f))
15364 (propagated-inputs
15365 `(("python-lxml" ,python-lxml) ; for SVG output
15366 ("python-pillow" ,python-pillow) ; for PNG output
15367 ("python-six" ,python-six)))
15368 (home-page "https://github.com/lincolnloop/python-qrcode")
15369 (synopsis "QR Code image generator")
15370 (description "This package provides a pure Python QR Code generator
15371 module. It uses the Python Imaging Library (PIL) to allow for the generation
15372 of QR Codes.
15373
15374 In addition this package provides a command line tool to generate QR codes and
15375 either write these QR codes to a file or do the output as ascii art at the
15376 console.")
15377 (license license:bsd-3)))
15378
15379 (define-public python2-qrcode
15380 (package-with-python2 python-qrcode))
15381
15382 (define-public python-rst2ansi
15383 (package
15384 (name "python-rst2ansi")
15385 (version "0.1.5")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "rst2ansi" version))
15390 (sha256
15391 (base32
15392 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15393 (build-system python-build-system)
15394 (propagated-inputs
15395 `(("python-docutils" ,python-docutils)))
15396 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15397 (synopsis "Convert RST to ANSI-decorated console output")
15398 (description
15399 "Python module dedicated to rendering RST (reStructuredText) documents
15400 to ansi-escaped strings suitable for display in a terminal.")
15401 (license license:expat)))
15402
15403 (define-public python-ansi2html
15404 (package
15405 (name "python-ansi2html")
15406 (version "1.2.0")
15407 (source
15408 (origin
15409 (method url-fetch)
15410 (uri (pypi-uri "ansi2html" version))
15411 (sha256
15412 (base32
15413 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15414 (build-system python-build-system)
15415 (native-inputs
15416 `(("python-mock" ,python-mock)
15417 ("python-nose" ,python-nose)))
15418 (propagated-inputs
15419 `(("python-six" ,python-six)))
15420 (home-page "https://github.com/ralphbean/ansi2html")
15421 (synopsis "Convert ANSI-decorated console output to HTML")
15422 (description
15423 "@command{ansi2html} is a Python library and command line utility for
15424 converting text with ANSI color codes to HTML or LaTeX.")
15425 (license license:gpl3+)))
15426
15427 (define-public python2-ansi2html
15428 (package-with-python2 python-ansi2html))
15429
15430 (define-public python-ddt
15431 (package
15432 (name "python-ddt")
15433 (version "1.4.1")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "ddt" version))
15438 (sha256
15439 (base32
15440 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15441 (build-system python-build-system)
15442 (native-inputs
15443 `(("python-pytest" ,python-pytest)))
15444 (propagated-inputs
15445 `(("python-pyyaml" ,python-pyyaml)))
15446 (home-page "https://github.com/datadriventests/ddt")
15447 (synopsis "Data-Driven Tests")
15448 (description
15449 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15450 running it with different test data, and make it appear as multiple test
15451 cases.")
15452 (license license:expat)))
15453
15454 (define-public python-pycountry
15455 (package
15456 (name "python-pycountry")
15457 (version "18.5.26")
15458 (source
15459 (origin
15460 (method url-fetch)
15461 (uri (pypi-uri "pycountry" version))
15462 (sha256
15463 (base32
15464 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15465 (build-system python-build-system)
15466 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15467 (synopsis "ISO databases for languages, countries, currencies, etc.")
15468 (description
15469 "@code{pycountry} provides the ISO databases for the standards:
15470 @enumerate
15471 @item 639-3 (Languages)
15472 @item 3166 (Countries)
15473 @item 3166-3 (Deleted Countries)
15474 @item 3166-2 (Subdivisions of countries)
15475 @item 4217 (Currencies)
15476 @item 15924 (Scripts)
15477 @end enumerate
15478 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15479 through a Python API.")
15480 (license license:lgpl2.1+)))
15481
15482 (define-public python2-pycountry
15483 (package-with-python2 python-pycountry))
15484
15485 (define-public python-pycosat
15486 (package
15487 (name "python-pycosat")
15488 (version "0.6.3")
15489 (source
15490 (origin
15491 (method url-fetch)
15492 (uri (pypi-uri "pycosat" version ".zip"))
15493 (sha256
15494 (base32
15495 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15496 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15497 (build-system python-build-system)
15498 (native-inputs
15499 `(("unzip" ,unzip)))
15500 (home-page "https://github.com/ContinuumIO/pycosat")
15501 (synopsis "Bindings to picosat (a SAT solver)")
15502 (description
15503 "This package provides efficient Python bindings to @code{picosat} on
15504 the C level. When importing pycosat, the @code{picosat} solver becomes part
15505 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15506 Problem} (SAT) solver.")
15507 (license license:expat)))
15508
15509 (define-public python2-pycosat
15510 (package-with-python2 python-pycosat))
15511
15512 (define-public python2-ruamel.ordereddict
15513 (package
15514 (name "python2-ruamel.ordereddict")
15515 (version "0.4.9")
15516 (source
15517 (origin
15518 (method url-fetch)
15519 (uri (pypi-uri "ruamel.ordereddict" version))
15520 (sha256
15521 (base32
15522 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15523 (build-system python-build-system)
15524 (arguments
15525 `(#:python ,python-2
15526 #:phases
15527 (modify-phases %standard-phases
15528 (delete 'check)
15529 (add-after 'install 'check
15530 (lambda* (#:key inputs outputs #:allow-other-keys)
15531 (add-installed-pythonpath inputs outputs)
15532 (invoke "python" "test/testordereddict.py"))))))
15533 (home-page "https://bitbucket.org/ruamel/ordereddict")
15534 (synopsis "Version of dict that keeps keys in insertion order")
15535 (description
15536 "This is an implementation of an ordered dictionary with @dfn{Key
15537 Insertion Order} (KIO: updates of values do not affect the position of the
15538 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15539 removed and put at the back). The standard library module @code{OrderedDict},
15540 implemented later, implements a subset of @code{ordereddict} functionality.
15541 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15542 Order} (KSO, no sorting function can be specified, but a transform can be
15543 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15544 (license license:expat)))
15545
15546 (define-public python-pypeg2
15547 (package
15548 (name "python-pypeg2")
15549 (version "2.15.2")
15550 (source
15551 (origin
15552 (method url-fetch)
15553 (uri (pypi-uri "pyPEG2" version))
15554 (sha256
15555 (base32
15556 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15557 (build-system python-build-system)
15558 (propagated-inputs `(("python-lxml" ,python-lxml)))
15559 (arguments
15560 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15561 '(#:tests? #f))
15562 (home-page "https://fdik.org/pyPEG/")
15563 (synopsis "Parsering Expression Grammars in Python")
15564 (description "PyPEG is an intrinsic parser interpreter framework for
15565 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15566 parse many formal languages.")
15567 (license license:gpl2)))
15568
15569 (define-public python-incremental
15570 (package
15571 (name "python-incremental")
15572 (version "17.5.0")
15573 (source
15574 (origin
15575 (method url-fetch)
15576 (uri (pypi-uri "incremental" version))
15577 (sha256
15578 (base32
15579 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15580 (build-system python-build-system)
15581 (home-page "https://github.com/hawkowl/incremental")
15582 (synopsis "Library for versioning Python projects")
15583 (description "Incremental is a small library that versions your Python
15584 projects.")
15585 (license license:expat)))
15586
15587 (define-public python2-incremental
15588 (package-with-python2 python-incremental))
15589
15590 (define-public python-invoke
15591 (package
15592 (name "python-invoke")
15593 (home-page "https://www.pyinvoke.org/")
15594 (version "1.5.0")
15595 (source (origin
15596 (method url-fetch)
15597 (uri (pypi-uri "invoke" version))
15598 (sha256
15599 (base32
15600 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15601 (build-system python-build-system)
15602 (arguments
15603 ;; XXX: Requires many dependencies that are not yet in Guix.
15604 `(#:tests? #f
15605 #:phases
15606 (modify-phases %standard-phases
15607 (add-after 'unpack 'fix-bash-path
15608 (lambda* (#:key inputs #:allow-other-keys)
15609 (let ((bash (assoc-ref inputs "bash")))
15610 (substitute* "invoke/config.py"
15611 (("shell = \"/bin/bash\"")
15612 (string-append "shell = \"" bash "/bin/bash\""))
15613 )
15614 #t))))))
15615 (inputs
15616 `(("bash" ,bash-minimal)))
15617 (synopsis "Pythonic task execution")
15618 (description
15619 "Invoke is a Python task execution tool and library, drawing inspiration
15620 from various sources to arrive at a powerful and clean feature set. It is
15621 evolved from the Fabric project, but focuses on local and abstract concerns
15622 instead of servers and network commands.")
15623 (license license:bsd-3)))
15624
15625 (define-public python2-invoke
15626 (package-with-python2 python-invoke))
15627
15628 (define-public python-automat
15629 (package
15630 (name "python-automat")
15631 (version "20.2.0")
15632 (source (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "Automat" version))
15635 (sha256
15636 (base32
15637 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15638 (build-system python-build-system)
15639 ;; We disable the tests because they require python-twisted, while
15640 ;; python-twisted depends on python-automat. Twisted is optional, but the
15641 ;; tests fail if it is not available. Also see
15642 ;; <https://github.com/glyph/automat/issues/71>.
15643 (arguments '(#:tests? #f))
15644 (native-inputs
15645 `(("python-m2r" ,python-m2r)
15646 ("python-setuptools-scm" ,python-setuptools-scm)
15647 ("python-graphviz" ,python-graphviz)))
15648 (propagated-inputs
15649 `(("python-six" ,python-six)
15650 ("python-attrs" ,python-attrs)))
15651 (home-page "https://github.com/glyph/Automat")
15652 (synopsis "Self-service finite-state machines")
15653 (description "Automat is a library for concise, idiomatic Python
15654 expression of finite-state automata (particularly deterministic finite-state
15655 transducers).")
15656 (license license:expat)))
15657
15658 (define-public python2-automat
15659 (package-with-python2 python-automat))
15660
15661 (define-public python-m2r
15662 (package
15663 (name "python-m2r")
15664 (version "0.2.1")
15665 (source (origin
15666 (method url-fetch)
15667 (uri (pypi-uri "m2r" version))
15668 (sha256
15669 (base32
15670 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15671 (build-system python-build-system)
15672 (propagated-inputs
15673 `(("python-docutils" ,python-docutils)
15674 ("python-mistune" ,python-mistune)))
15675 (native-inputs
15676 `(("python-pygments" ,python-pygments)
15677 ("python-mock" ,python-mock)))
15678 (home-page "https://github.com/miyakogi/m2r")
15679 (synopsis "Markdown to reStructuredText converter")
15680 (description "M2R converts a markdown file including reST markups to valid
15681 reST format.")
15682 (license license:expat)))
15683
15684 (define-public python2-m2r
15685 (package-with-python2 python-m2r))
15686
15687 (define-public python-constantly
15688 (package
15689 (name "python-constantly")
15690 (version "15.1.0")
15691 (source (origin
15692 (method url-fetch)
15693 (uri (pypi-uri "constantly" version))
15694 (sha256
15695 (base32
15696 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15697 (build-system python-build-system)
15698 (home-page "https://github.com/twisted/constantly")
15699 (synopsis "Symbolic constants in Python")
15700 (description "Constantly is a Python library that provides symbolic
15701 constant support. It includes collections and constants with text, numeric,
15702 and bit flag values.")
15703 (license license:expat)))
15704
15705 (define-public python2-constantly
15706 (package-with-python2 python-constantly))
15707
15708 (define-public python-attrs
15709 (package
15710 (name "python-attrs")
15711 (version "19.3.0")
15712 (source (origin
15713 (method url-fetch)
15714 (uri (pypi-uri "attrs" version))
15715 (sha256
15716 (base32
15717 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15718 (build-system python-build-system)
15719 (arguments
15720 `(#:modules ((guix build utils)
15721 (guix build python-build-system)
15722 (ice-9 ftw)
15723 (srfi srfi-1)
15724 (srfi srfi-26))
15725 #:phases (modify-phases %standard-phases
15726 (replace 'check
15727 (lambda _
15728 (let ((cwd (getcwd)))
15729 (setenv "PYTHONPATH"
15730 (string-append
15731 cwd "/build/"
15732 (find (cut string-prefix? "lib" <>)
15733 (scandir (string-append cwd "/build")))
15734 ":"
15735 (getenv "PYTHONPATH")))
15736 (invoke "python" "-m" "pytest")))))))
15737 (native-inputs
15738 `(("python-coverage" ,python-coverage)
15739 ("python-hypothesis" ,python-hypothesis)
15740 ("python-pympler" ,python-pympler)
15741 ("python-pytest" ,python-pytest)
15742 ("python-six" ,python-six)
15743 ("python-sphinx" ,python-sphinx)
15744 ("python-zope-interface" ,python-zope-interface)))
15745 (home-page "https://github.com/python-attrs/attrs/")
15746 (synopsis "Attributes without boilerplate")
15747 (description "@code{attrs} is a Python package with class decorators that
15748 ease the chores of implementing the most common attribute-related object
15749 protocols.")
15750 (license license:expat)))
15751
15752 (define-public python2-attrs
15753 (package-with-python2 python-attrs))
15754
15755 (define-public python-attrs-bootstrap
15756 (package
15757 (inherit python-attrs)
15758 (name "python-attrs-bootstrap")
15759 (native-inputs `())
15760 (arguments `(#:tests? #f))))
15761
15762 (define-public python2-attrs-bootstrap
15763 (package-with-python2 python-attrs-bootstrap))
15764
15765 (define-public python2-cliapp
15766 (package
15767 (name "python2-cliapp")
15768 (version "1.20180812.1")
15769 (source
15770 (origin
15771 (method url-fetch)
15772 (uri (string-append
15773 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15774 version ".tar.gz"))
15775 (sha256
15776 (base32
15777 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15778 (build-system python-build-system)
15779 (arguments
15780 `(#:python ,python-2
15781 #:phases
15782 (modify-phases %standard-phases
15783 ;; check phase needs to be run before the build phase. If not,
15784 ;; coverage-test-runner looks for tests for the built source files,
15785 ;; and fails.
15786 (delete 'check)
15787 (add-before 'build 'check
15788 (lambda _
15789 ;; Disable python3 tests
15790 (substitute* "check"
15791 (("python3") "# python3"))
15792 (invoke "./check"))))))
15793 (native-inputs
15794 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15795 ("python2-pep8" ,python2-pep8)))
15796 (propagated-inputs
15797 `(("python2-pyaml" ,python2-pyaml)))
15798 (home-page "https://liw.fi/cliapp/")
15799 (synopsis "Python framework for command line programs")
15800 (description "@code{python2-cliapp} is a python framework for
15801 command line programs. It contains the typical stuff such programs
15802 need to do, such as parsing the command line for options, and
15803 iterating over input files.")
15804 (license license:gpl2+)))
15805
15806 (define-public python2-ttystatus
15807 (package
15808 (name "python2-ttystatus")
15809 (version "0.38")
15810 (source
15811 (origin
15812 (method git-fetch)
15813 (uri (git-reference
15814 (url "http://git.liw.fi/ttystatus")
15815 ;; There are no tags after ttystatus-0.36.
15816 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15817 (sha256
15818 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15819 (file-name (git-file-name name version))))
15820 (build-system python-build-system)
15821 (native-inputs
15822 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15823 ("python2-pep8" ,python2-pep8)))
15824 (arguments
15825 `(#:python ,python-2
15826 #:phases
15827 (modify-phases %standard-phases
15828 ;; check phase needs to be run before the build phase. If not,
15829 ;; coverage-test-runner looks for tests for the built source files,
15830 ;; and fails.
15831 (delete 'check)
15832 (add-before 'build 'check
15833 (lambda _ (invoke "make" "check"))))))
15834 (home-page "https://liw.fi/ttystatus/")
15835 (synopsis "Python library for showing progress reporting and
15836 status updates on terminals")
15837 (description "@code{python2-ttystatus} is a python library for
15838 showing progress reporting and status updates on terminals, for
15839 command line programs. Output is automatically adapted to the width
15840 of the terminal: truncated if it does not fit, and resized if the
15841 terminal size changes.")
15842 (license license:gpl3+)))
15843
15844 (define-public python2-tracing
15845 (package
15846 (name "python2-tracing")
15847 (version "0.10")
15848 (source
15849 (origin
15850 (method url-fetch)
15851 (uri (string-append
15852 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15853 version ".tar.gz"))
15854 (sha256
15855 (base32
15856 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15857 (build-system python-build-system)
15858 (arguments
15859 `(#:python ,python-2))
15860 (home-page "https://liw.fi/tracing/")
15861 (synopsis "Python debug logging helper")
15862 (description "@code{python2-tracing} is a python library for
15863 logging debug messages. It provides a way to turn debugging messages
15864 on and off, based on the filename they occur in. It is much faster
15865 than using @code{logging.Filter} to accomplish the same thing, which
15866 matters when code is run in production mode. The actual logging still
15867 happens using the @code{logging} library.")
15868 (license license:gpl3+)))
15869
15870 (define-public python2-larch
15871 (package
15872 (name "python2-larch")
15873 (version "1.20151025")
15874 (source
15875 (origin
15876 (method url-fetch)
15877 (uri (string-append
15878 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15879 version ".tar.gz"))
15880 (patches (search-patches
15881 "python2-larch-coverage-4.0a6-compatibility.patch"))
15882 (sha256
15883 (base32
15884 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15885 (build-system python-build-system)
15886 (arguments
15887 `(#:python ,python-2
15888 #:phases
15889 (modify-phases %standard-phases
15890 ;; check phase needs to be run before the build phase. If not,
15891 ;; coverage-test-runner looks for tests for the built source files,
15892 ;; and fails.
15893 (delete 'check)
15894 (add-before 'build 'check
15895 (lambda _ (invoke "make" "check"))))))
15896 (native-inputs
15897 `(("cmdtest" ,cmdtest)
15898 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15899 (propagated-inputs
15900 `(("python2-tracing" ,python2-tracing)))
15901 (home-page "https://liw.fi/larch/")
15902 (synopsis "Python copy-on-write B-tree library")
15903 (description "@code{python2-larch} is an implementation of
15904 particular kind of B-tree, based on research by Ohad Rodeh. See
15905 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15906 on the data structure.
15907
15908 The distinctive feature of this B-tree is that a node is never
15909 (conceptually) modified. Instead, all updates are done by
15910 copy-on-write. This makes it easy to clone a tree, and modify only the
15911 clone, while other processes access the original tree.")
15912 (license license:gpl3+)))
15913
15914 (define-public python-astroid
15915 (package
15916 (name "python-astroid")
15917 (version "2.4.2")
15918 (source
15919 (origin
15920 (method url-fetch)
15921 (uri (pypi-uri "astroid" version))
15922 (sha256
15923 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15924 (modules '((guix build utils)))
15925 (snippet
15926 '(begin
15927 ;; Check to see if the version pinning has been removed.
15928 (substitute* "astroid/__pkginfo__.py"
15929 (("==1\\.4\\.\\*") ">=1.4.0"))
15930 #t))))
15931 (build-system python-build-system)
15932 (propagated-inputs
15933 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15934 ("python-six" ,python-six)
15935 ("python-wrapt" ,python-wrapt)))
15936 (native-inputs
15937 `(("python-dateutil" ,python-dateutil)
15938 ("python-pytest" ,python-pytest)
15939 ("python-pytest-runner" ,python-pytest-runner)))
15940 (home-page "https://github.com/PyCQA/astroid")
15941 (synopsis "Common base representation of python source code for pylint and
15942 other projects")
15943 (description "@code{python-astroid} provides a common base representation
15944 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15945
15946 It provides a compatible representation which comes from the _ast module. It
15947 rebuilds the tree generated by the builtin _ast module by recursively walking
15948 down the AST and building an extended ast. The new node classes have
15949 additional methods and attributes for different usages. They include some
15950 support for static inference and local name scopes. Furthermore, astroid
15951 builds partial trees by inspecting living objects.")
15952 (license license:lgpl2.1+)
15953 (properties `((python2-variant . ,(delay python2-astroid))))))
15954
15955 (define-public python2-astroid
15956 (let ((base (package-with-python2
15957 (strip-python2-variant python-astroid))))
15958 (package (inherit base)
15959 ;; Version 2.x removes python2 support.
15960 (version "1.6.5")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (pypi-uri "astroid" version))
15965 (sha256
15966 (base32
15967 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15968 (arguments
15969 (substitute-keyword-arguments (package-arguments base)
15970 ((#:phases phases)
15971 `(modify-phases ,phases
15972 (add-after 'unpack 'remove-spurious-test
15973 (lambda _
15974 ;; https://github.com/PyCQA/astroid/issues/276
15975 (delete-file "astroid/tests/unittest_brain.py")
15976 #t))
15977 (replace 'check
15978 (lambda _
15979 (invoke"python" "-m" "unittest" "discover"
15980 "-p" "unittest*.py")))))))
15981 (native-inputs `())
15982 (propagated-inputs
15983 `(("python2-backports-functools-lru-cache"
15984 ,python2-backports-functools-lru-cache)
15985 ("python2-enum34" ,python2-enum34)
15986 ("python2-singledispatch" ,python2-singledispatch)
15987 ,@(alist-delete "python-typed-ast"
15988 (package-propagated-inputs base)))))))
15989
15990 (define-public python-isbnlib
15991 (package
15992 (name "python-isbnlib")
15993 (version "3.10.4")
15994 (source
15995 (origin
15996 (method url-fetch)
15997 (uri (pypi-uri "isbnlib" version))
15998 (sha256
15999 (base32
16000 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16001 (build-system python-build-system)
16002 (arguments '(#:tests? #f)) ; No test
16003 (home-page "https://github.com/xlcnd/isbnlib")
16004 (synopsis "Python library to work with ISBN strings")
16005 (description "@code{python-isbnlib} is a (pure) python library that provides
16006 several useful methods and functions to validate, clean, transform, hyphenate and
16007 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16008 version, is suitable to be include as a dependency in other projects.")
16009 (license license:lgpl3+)))
16010
16011 (define-public python-isort
16012 (package
16013 (name "python-isort")
16014 (version "4.3.4")
16015 (source
16016 (origin
16017 (method git-fetch)
16018 (uri (git-reference
16019 ;; Tests pass only from the Github sources
16020 (url "https://github.com/timothycrosley/isort")
16021 (commit version)))
16022 (file-name (git-file-name name version))
16023 (sha256
16024 (base32
16025 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16026 (build-system python-build-system)
16027 (native-inputs
16028 `(("python-mock" ,python-mock)
16029 ("python-pytest" ,python-pytest)))
16030 (home-page "https://github.com/timothycrosley/isort")
16031 (synopsis "Python utility/library to sort python imports")
16032 (description "@code{python-isort} is a python utility/library to sort
16033 imports alphabetically, and automatically separated into sections. It
16034 provides a command line utility, a python library and plugins for various
16035 editors.")
16036 (license license:expat)
16037 (properties `((python2-variant . ,(delay python2-isort))))))
16038
16039 (define-public python2-isort
16040 (let ((base (package-with-python2
16041 (strip-python2-variant python-isort))))
16042 (package (inherit base)
16043 (native-inputs
16044 `(("python2-futures" ,python2-futures)
16045 ,@(package-native-inputs base))))))
16046
16047 (define-public python2-backports-functools-lru-cache
16048 (package
16049 (name "python2-backports-functools-lru-cache")
16050 (version "1.6.1")
16051 (source
16052 (origin
16053 (method url-fetch)
16054 ;; only the pypi tarballs contain the necessary metadata
16055 (uri (pypi-uri "backports.functools_lru_cache" version))
16056 (sha256
16057 (base32
16058 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16059 (build-system python-build-system)
16060 (native-inputs
16061 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16062 (arguments
16063 `(#:python ,python-2))
16064 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16065 (synopsis "Backport of functools.lru_cache from Python 3.3")
16066 (description "@code{python2-backports-functools-lru-cache} is a backport
16067 of @code{functools.lru_cache} from python 3.3.")
16068 (license license:expat)))
16069
16070 (define-public python-configparser
16071 (package
16072 (name "python-configparser")
16073 (version "4.0.2")
16074 (source
16075 (origin
16076 (method url-fetch)
16077 (uri (pypi-uri "configparser" version))
16078 (sha256
16079 (base32
16080 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16081 (native-inputs
16082 `(("python-setuptools_scm" ,python-setuptools-scm)))
16083 (build-system python-build-system)
16084 (home-page "https://github.com/jaraco/configparser/")
16085 (synopsis "Backport of configparser from python 3.5")
16086 (description "@code{python-configparser} is a backport of
16087 @code{configparser} from Python 3.5 so that it can be used directly
16088 in other versions.")
16089 (license license:expat)))
16090
16091 (define-public python2-configparser
16092 (package-with-python2 python-configparser))
16093
16094 (define-public python-iniconfig
16095 (package
16096 (name "python-iniconfig")
16097 (version "1.1.1")
16098 (source
16099 (origin
16100 (method url-fetch)
16101 (uri (pypi-uri "iniconfig" version))
16102 (sha256
16103 (base32
16104 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16105 (build-system python-build-system)
16106 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16107 (synopsis "Simple INI-file parser")
16108 (description "The @code{iniconfig} package provides a small and simple
16109 INI-file parser module having a unique set of features; @code{iniconfig}
16110 @itemize
16111 @item maintains the order of sections and entries;
16112 @item supports multi-line values with or without line-continuations;
16113 @item supports \"#\" comments everywhere;
16114 @item raises errors with proper line-numbers;
16115 @item raises an error when two sections have the same name.
16116 @end itemize")
16117 (license license:expat)))
16118
16119 (define-public python-mamba
16120 (package
16121 (name "python-mamba")
16122 (version "0.11.2")
16123 (source (origin
16124 (method url-fetch)
16125 (uri (pypi-uri "mamba" version))
16126 (sha256
16127 (base32
16128 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16129 (build-system python-build-system)
16130 (arguments `(#:tests? #f)) ; No test
16131 (propagated-inputs
16132 `(("python-clint" ,python-clint)
16133 ("python-coverage" ,python-coverage)))
16134 (home-page "https://nestorsalceda.com/mamba/")
16135 (synopsis "Test runner for Python")
16136 (description
16137 "Mamba is a Behaviour-Driven Development tool for Python developers.
16138 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16139 (license license:expat)))
16140
16141 (define-public python-mando
16142 (package
16143 (name "python-mando")
16144 (version "0.6.4")
16145 (source (origin
16146 (method url-fetch)
16147 (uri (pypi-uri "mando" version))
16148 (sha256
16149 (base32
16150 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16151 (build-system python-build-system)
16152 (propagated-inputs
16153 `(("python-rst2ansi" ,python-rst2ansi)
16154 ("python-six" ,python-six)))
16155 (native-inputs
16156 `(("python-pytest" ,python-pytest)))
16157 (home-page "https://mando.readthedocs.org/")
16158 (synopsis
16159 "Wrapper around argparse, allowing creation of complete CLI applications")
16160 (description
16161 "This package is a wrapper around argparse, allowing you to write complete CLI
16162 applications in seconds while maintaining all the flexibility.")
16163 (license license:expat)))
16164
16165 (define-public python2-mando
16166 (package-with-python2 python-mando))
16167
16168 (define-public python2-argparse
16169 (package
16170 (name "python2-argparse")
16171 (version "1.4.0")
16172 (source
16173 (origin
16174 (method url-fetch)
16175 (uri (pypi-uri "argparse" version))
16176 (sha256
16177 (base32
16178 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16179 (build-system python-build-system)
16180 (arguments
16181 `(#:python ,python-2))
16182 (home-page "https://github.com/ThomasWaldmann/argparse/")
16183 (synopsis "Python command-line parsing library")
16184 (description
16185 "This package is mostly for people who want to have @code{argparse} on
16186 older Pythons because it was not part of the standard library back then.")
16187 (license license:psfl)))
16188
16189 (define-public python-fudge
16190 (package
16191 (name "python-fudge")
16192 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16193 ;; package, which is currently the only use of this package.
16194 (version "0.9.6")
16195 (source
16196 (origin
16197 (method url-fetch)
16198 (uri (pypi-uri "fudge" version))
16199 (sha256
16200 (base32
16201 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16202 (build-system python-build-system)
16203 (arguments
16204 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16205 (home-page "https://github.com/fudge-py/fudge")
16206 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16207 (description
16208 "Fudge is a Python module for using fake objects (mocks and stubs) to
16209 test real ones.
16210
16211 In readable Python code, you declare the methods available on your fake object
16212 and how they should be called. Then you inject that into your application and
16213 start testing. This declarative approach means you don’t have to record and
16214 playback actions and you don’t have to inspect your fakes after running code.
16215 If the fake object was used incorrectly then you’ll see an informative
16216 exception message with a traceback that points to the culprit.")
16217 (license license:expat)))
16218
16219 (define-public python2-fudge
16220 (package-with-python2 python-fudge))
16221
16222 (define-public python-mwclient
16223 (package
16224 (name "python-mwclient")
16225 (version "0.10.1")
16226 (source
16227 (origin
16228 (method git-fetch)
16229 ;; The PyPI version wouldn't contain tests.
16230 (uri (git-reference
16231 (url "https://github.com/mwclient/mwclient")
16232 (commit (string-append "v" version))))
16233 (file-name (git-file-name name version))
16234 (sha256
16235 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16236 (build-system python-build-system)
16237 (propagated-inputs
16238 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16239 ("python-six" ,python-six)))
16240 (native-inputs
16241 `(("python-mock" ,python-mock)
16242 ("python-pytest" ,python-pytest)
16243 ("python-pytest-cov" ,python-pytest-cov)
16244 ("python-pytest-runner" ,python-pytest-runner)
16245 ("python-responses" ,python-responses)))
16246 (home-page "https://github.com/btongminh/mwclient")
16247 (synopsis "MediaWiki API client")
16248 (description "This package provides a MediaWiki API client.")
16249 (license license:expat)))
16250
16251 (define-public python-utils
16252 (package
16253 (name "python-utils")
16254 (version "2.4.0")
16255 (source (origin
16256 (method url-fetch)
16257 (uri (pypi-uri "python-utils" version))
16258 (sha256
16259 (base32
16260 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16261 (build-system python-build-system)
16262 (arguments
16263 `(#:phases
16264 (modify-phases %standard-phases
16265 (replace 'check
16266 (lambda* (#:key inputs outputs #:allow-other-keys)
16267 (add-installed-pythonpath inputs outputs)
16268 (delete-file "pytest.ini")
16269 (invoke "pytest" "-vv"))))))
16270 (native-inputs
16271 `(("pytest-runner" ,python-pytest-runner)
16272 ("pytest" ,python-pytest)
16273 ("six" ,python-six)))
16274 (home-page "https://github.com/WoLpH/python-utils")
16275 (synopsis "Convenient utilities not included with the standard Python install")
16276 (description
16277 "Python Utils is a collection of small Python functions and classes which
16278 make common patterns shorter and easier.")
16279 (license license:bsd-2)))
16280
16281 (define-public python2-utils
16282 (package-with-python2 python-utils))
16283
16284 (define-public python-diff-match-patch
16285 (package
16286 (name "python-diff-match-patch")
16287 (version "20121119")
16288 (source
16289 (origin
16290 (method url-fetch)
16291 (uri (pypi-uri "diff-match-patch" version))
16292 (sha256
16293 (base32
16294 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16295 (build-system python-build-system)
16296 (home-page "https://code.google.com/p/google-diff-match-patch")
16297 (synopsis "Synchronize plain text")
16298 (description "Diff Match and Patch libraries offer robust algorithms to
16299 perform the operations required for synchronizing plain text.")
16300 (license license:asl2.0)))
16301
16302 (define-public python2-diff-match-patch
16303 (package-with-python2 python-diff-match-patch))
16304
16305 (define-public python-dirsync
16306 (package
16307 (name "python-dirsync")
16308 (version "2.2.5")
16309 (source
16310 (origin
16311 (method url-fetch)
16312 (uri (pypi-uri "dirsync" version))
16313 (sha256
16314 (base32
16315 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16316 (build-system python-build-system)
16317 (propagated-inputs
16318 `(("six" ,python-six)))
16319 (home-page "https://github.com/tkhyn/dirsync")
16320 (synopsis "Advanced directory tree synchronisation tool")
16321 (description "Advanced directory tree synchronisation tool.")
16322 (license license:expat)))
16323
16324 (define-public python2-dirsync
16325 (package-with-python2 python-dirsync))
16326
16327 (define-public python-levenshtein
16328 (package
16329 (name "python-levenshtein")
16330 (version "0.12.0")
16331 (source
16332 (origin
16333 (method url-fetch)
16334 (uri (pypi-uri "python-Levenshtein" version))
16335 (sha256
16336 (base32
16337 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16338 (build-system python-build-system)
16339 (home-page "https://github.com/ztane/python-Levenshtein")
16340 (synopsis "Fast computation of Levenshtein distance and string similarity")
16341 (description
16342 "The Levenshtein Python C extension module contains functions for fast computation of
16343 @enumerate
16344 @item Levenshtein (edit) distance, and edit operations
16345 @item string similarity
16346 @item approximate median strings, and generally string averaging
16347 @item string sequence and set similarity
16348 @end enumerate
16349 It supports both normal and Unicode strings.")
16350 (license license:gpl2+)))
16351
16352 (define-public python2-levenshtein
16353 (package-with-python2 python-levenshtein))
16354
16355 (define-public python-scandir
16356 (package
16357 (name "python-scandir")
16358 (version "1.10.0")
16359 (source
16360 (origin
16361 (method url-fetch)
16362 (uri (pypi-uri "scandir" version))
16363 (sha256
16364 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16365 (build-system python-build-system)
16366 (arguments
16367 `(#:phases (modify-phases %standard-phases
16368 (replace 'check
16369 (lambda _
16370 (invoke "python" "test/run_tests.py"))))))
16371 (home-page "https://github.com/benhoyt/scandir")
16372 (synopsis "Directory iteration function")
16373 (description
16374 "Directory iteration function like os.listdir(), except that instead of
16375 returning a list of bare filenames, it yields DirEntry objects that include
16376 file type and stat information along with the name. Using scandir() increases
16377 the speed of os.walk() by 2-20 times (depending on the platform and file
16378 system) by avoiding unnecessary calls to os.stat() in most cases.
16379
16380 This package is part of the Python standard library since version 3.5.")
16381 (license license:bsd-3)))
16382
16383 (define-public python2-scandir
16384 (package-with-python2 python-scandir))
16385
16386 (define-public python2-stemming
16387 (package
16388 (name "python2-stemming")
16389 (version "1.0.1")
16390 (source
16391 (origin
16392 (method url-fetch)
16393 (uri (pypi-uri "stemming" version))
16394 (sha256
16395 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16396 (build-system python-build-system)
16397 (arguments
16398 `(#:python ,python-2))
16399 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16400 (synopsis "Python implementations of various stemming algorithms")
16401 (description
16402 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16403 stemming algorithms for English. These implementations are straightforward and
16404 efficient, unlike some Python versions of the same algorithms available on the
16405 Web. This package is an extraction of the stemming code included in the Whoosh
16406 search engine.")
16407 (license license:public-domain)))
16408
16409 (define-public python-factory-boy
16410 (package
16411 (name "python-factory-boy")
16412 (version "2.8.1")
16413 (source
16414 (origin
16415 (method url-fetch)
16416 (uri (pypi-uri "factory_boy" version))
16417 (sha256
16418 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16419 (build-system python-build-system)
16420 (arguments
16421 ;; Tests are not included in the tarball.
16422 `(#:tests? #f))
16423 (propagated-inputs
16424 `(("faker" ,python-faker)))
16425 (home-page "https://github.com/benhoyt/scandir")
16426 (synopsis "Versatile test fixtures replacement")
16427 (description
16428 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16429
16430 As a fixtures replacement tool, it aims to replace static, hard to maintain
16431 fixtures with easy-to-use factories for complex object.
16432
16433 Instead of building an exhaustive test setup with every possible combination
16434 of corner cases, factory_boy allows you to use objects customized for the
16435 current test, while only declaring the test-specific fields")
16436 (license license:expat)))
16437
16438 (define-public python2-factory-boy
16439 (package-with-python2 python-factory-boy))
16440
16441 (define-public python-translate-toolkit
16442 (package
16443 (name "python-translate-toolkit")
16444 (version "2.1.0")
16445 (source
16446 (origin
16447 (method url-fetch)
16448 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16449 (sha256
16450 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16451 (build-system python-build-system)
16452 (native-inputs
16453 `(("python-pytest" ,python-pytest)
16454 ("python-sphinx" ,python-sphinx)))
16455 (propagated-inputs
16456 `(("python-babel" ,python-babel)
16457 ("python-beautifulsoup4" ,python-beautifulsoup4)
16458 ("python-chardet" ,python-chardet)
16459 ("python-diff-match-patch" ,python-diff-match-patch)
16460 ("python-levenshtein" ,python-levenshtein)
16461 ("python-lxml" ,python-lxml)
16462 ("python-six" ,python-six)
16463 ("python-vobject" ,python-vobject)
16464 ("python-pyyaml" ,python-pyyaml)))
16465 (arguments
16466 ;; TODO: tests are not run, because they end with
16467 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16468 ;; 'parse_funcs'
16469 ;; during test setup.
16470 `(#:tests? #f))
16471 (home-page "https://toolkit.translatehouse.org")
16472 (synopsis "Tools and API for translation and localization engineering")
16473 (description
16474 "Tools and API for translation and localization engineering. It contains
16475 several utilities, as well as an API for building localization tools.")
16476 (license license:gpl2+)))
16477
16478 (define-public python2-translate-toolkit
16479 (package-with-python2 python-translate-toolkit))
16480
16481 (define-public python-packaging
16482 (package
16483 (name "python-packaging")
16484 (version "20.0")
16485 (source
16486 (origin
16487 (method url-fetch)
16488 (uri (pypi-uri "packaging" version))
16489 ;; XXX: The URL in the patch file is wrong, it should be
16490 ;; <https://github.com/pypa/packaging/pull/256>.
16491 (patches (search-patches "python-packaging-test-arch.patch"))
16492 (sha256
16493 (base32
16494 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16495 (build-system python-build-system)
16496 (arguments
16497 `(#:phases (modify-phases %standard-phases
16498 (replace 'check
16499 (lambda* (#:key tests? #:allow-other-keys)
16500 (if tests?
16501 (invoke "py.test" "-vv")
16502 (format #t "test suite not run~%"))
16503 #t)))))
16504 (native-inputs
16505 `(("python-pretend" ,python-pretend)
16506 ("python-pytest" ,python-pytest)))
16507 (propagated-inputs
16508 `(("python-pyparsing" ,python-pyparsing)
16509 ("python-six" ,python-six)))
16510 (home-page "https://github.com/pypa/packaging")
16511 (synopsis "Core utilities for Python packages")
16512 (description "Packaging is a Python module for dealing with Python packages.
16513 It offers an interface for working with package versions, names, and dependency
16514 information.")
16515 ;; From 'LICENSE': This software is made available under the terms of
16516 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16517 ;; Contributions to this software is made under the terms of *both* these
16518 ;; licenses.
16519 (license (list license:asl2.0 license:bsd-2))))
16520
16521 (define-public python2-packaging
16522 (package-with-python2 python-packaging))
16523
16524 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16525 (define-public python-packaging-bootstrap
16526 (hidden-package
16527 (package/inherit
16528 python-packaging
16529 (name "python-packaging-bootstrap")
16530 (native-inputs '())
16531 (propagated-inputs
16532 `(("python-pyparsing" ,python-pyparsing)))
16533 (arguments '(#:tests? #f)))))
16534
16535 (define-public python2-packaging-bootstrap
16536 (hidden-package
16537 (package/inherit
16538 python2-packaging
16539 (name "python2-packaging-bootstrap")
16540 (native-inputs '())
16541 (propagated-inputs
16542 `(("python-pyparsing" ,python2-pyparsing)))
16543 (arguments
16544 `(#:tests? #f
16545 ,@(package-arguments python2-packaging))))))
16546
16547 (define-public python-relatorio
16548 (package
16549 (name "python-relatorio")
16550 (version "0.8.0")
16551 (source
16552 (origin
16553 (method url-fetch)
16554 (uri (pypi-uri "relatorio" version))
16555 (sha256
16556 (base32
16557 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16558 (build-system python-build-system)
16559 (propagated-inputs
16560 `(("python-lxml" ,python-lxml)
16561 ("python-genshi" ,python-genshi)))
16562 (native-inputs
16563 `(("python-magic" ,python-magic)))
16564 (home-page "https://relatorio.tryton.org/")
16565 (synopsis "Templating library able to output ODT and PDF files")
16566 (description "Relatorio is a templating library which provides a way to
16567 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16568 for more filetypes can be easily added by creating plugins for them.")
16569 (license license:gpl3+)))
16570
16571 (define-public python2-relatorio
16572 (package-with-python2 python-relatorio))
16573
16574 (define-public python-radon
16575 (package
16576 (name "python-radon")
16577 (version "4.1.0")
16578 (source
16579 (origin
16580 (method url-fetch)
16581 (uri (pypi-uri "radon" version))
16582 (sha256
16583 (base32
16584 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16585 (build-system python-build-system)
16586 (arguments
16587 `(#:phases (modify-phases %standard-phases
16588 (replace 'check
16589 (lambda _
16590 (invoke "python" "radon/tests/run.py"))))))
16591 (propagated-inputs
16592 `(("python-colorama" ,python-colorama)
16593 ("python-flake8-polyfill" ,python-flake8-polyfill)
16594 ("python-mando" ,python-mando)))
16595 (native-inputs
16596 `(("python-pytest" ,python-pytest)
16597 ("python-pytest-mock" ,python-pytest-mock)))
16598 (home-page "https://radon.readthedocs.org/")
16599 (synopsis "Code Metrics in Python")
16600 (description "Radon is a Python tool which computes various code metrics.
16601 Supported metrics are:
16602 @itemize @bullet
16603 @item raw metrics: SLOC, comment lines, blank lines, &c.
16604 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16605 @item Halstead metrics (all of them)
16606 @item the Maintainability Index (a Visual Studio metric)
16607 @end itemize")
16608 (properties `((python2-variant . ,(delay python2-radon))))
16609 (license license:expat)))
16610
16611 (define-public python2-radon
16612 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16613 (package
16614 (inherit base)
16615 (propagated-inputs
16616 `(("python-configparser" ,python2-configparser)
16617 ("python-future" ,python2-future)
16618 ,@(package-propagated-inputs base))))))
16619
16620 (define-public python-sure
16621 (package
16622 (name "python-sure")
16623 (version "1.4.11")
16624 (source
16625 (origin
16626 (method url-fetch)
16627 (uri (pypi-uri "sure" version))
16628 (sha256
16629 (base32
16630 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16631 (build-system python-build-system)
16632 (propagated-inputs
16633 `(("python-mock" ,python-mock)
16634 ("python-six" ,python-six)))
16635 (native-inputs
16636 `(("python-nose" ,python-nose)))
16637 (home-page "https://github.com/gabrielfalcao/sure")
16638 (synopsis "Automated testing library in python for python")
16639 (description
16640 "Sure is a python library that leverages a DSL for writing assertions.
16641 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16642 (license license:gpl3+)))
16643
16644 (define-public python2-sure
16645 (package-with-python2 python-sure))
16646
16647 (define-public python2-couleur
16648 ;; This package does not seem to support python3 at all, hence,
16649 ;; only the python2 variant definition is provided.
16650 (package
16651 (name "python2-couleur")
16652 (version "0.6.2")
16653 (source
16654 (origin
16655 (method url-fetch)
16656 (uri (pypi-uri "couleur" version))
16657 (sha256
16658 (base32
16659 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16660 (build-system python-build-system)
16661 (arguments
16662 `(#:python ,python-2))
16663 (home-page "https://github.com/gabrielfalcao/couleur")
16664 (synopsis
16665 "ANSI terminal tool for python, colored shell and other handy fancy features")
16666 (description
16667 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16668 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16669 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16670 ;; https://github.com/gabrielfalcao/couleur/issues/11
16671 (license license:lgpl3+)))
16672
16673 (define-public python-misaka
16674 (package
16675 (name "python-misaka")
16676 (version "2.1.1")
16677 (source
16678 (origin
16679 (method url-fetch)
16680 (uri (pypi-uri "misaka" version))
16681 (sha256
16682 (base32
16683 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16684 (build-system python-build-system)
16685 (arguments
16686 `(;; Line 37 of setup.py calls self.run_command('develop')
16687 ;; in the 'check' phase. This command seems to be trying
16688 ;; to write to
16689 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16690 ;; for which it does not have the permission to write.
16691 #:tests? #f))
16692 (propagated-inputs
16693 `(("python-cffi" ,python-cffi)))
16694 (home-page "https://github.com/FSX/misaka")
16695 (synopsis "Python binding for Hoedown")
16696 (description
16697 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16698 library written in C. It features a fast HTML renderer and functionality to make custom
16699 renderers (e.g. man pages or LaTeX).")
16700 (license license:expat)))
16701
16702 (define-public python2-misaka
16703 (package-with-python2 python-misaka))
16704
16705 (define-public python2-steadymark
16706 ;; This is forced into being a python2 only variant
16707 ;; due to its dependence on couleur that has no support
16708 ;; for python3
16709 (package
16710 (name "python2-steadymark")
16711 (version "0.7.3")
16712 (source
16713 (origin
16714 (method url-fetch)
16715 (uri (pypi-uri "steadymark" version))
16716 (sha256
16717 (base32
16718 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16719 (build-system python-build-system)
16720 (native-inputs
16721 `(("python-couleur" ,python2-couleur)
16722 ("python-sure" ,python2-sure)
16723 ("python-misaka" ,python2-misaka)))
16724 (arguments
16725 `(#:python ,python-2
16726 #:phases
16727 (modify-phases %standard-phases
16728 (add-before 'build 'patch-setup-py
16729 (lambda _
16730 ;; Update requirements from dependency==version
16731 ;; to dependency>=version
16732 (substitute* "setup.py"
16733 (("==") ">="))
16734 #t)))))
16735 (home-page "https://github.com/gabrielfalcao/steadymark")
16736 (synopsis "Markdown-based test runner for python")
16737 (description
16738 "@code{Steadymark} allows documentation to be written in github-flavoured
16739 markdown. The documentation may contain snippets of code surrounded by python
16740 code blocks and @code{Steadymark} will find these snippets and run them, making
16741 sure that there are no old malfunctional examples in the documentation examples.")
16742 (license license:expat)))
16743
16744 (define-public python-jsonpointer
16745 (package
16746 (name "python-jsonpointer")
16747 (version "1.10")
16748 (source
16749 (origin
16750 (method url-fetch)
16751 (uri (pypi-uri "jsonpointer" version))
16752 (sha256
16753 (base32
16754 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16755 (build-system python-build-system)
16756 (home-page "https://github.com/stefankoegl/python-json-pointer")
16757 (synopsis "Identify specific nodes in a JSON document")
16758 (description "@code{jsonpointer} allows you to access specific nodes
16759 by path in a JSON document (see RFC 6901).")
16760 (license license:bsd-3)))
16761
16762 (define-public python2-jsonpointer
16763 (package-with-python2 python-jsonpointer))
16764
16765 (define-public python-jsonpatch
16766 (package
16767 (name "python-jsonpatch")
16768 (version "1.16")
16769 (source
16770 (origin
16771 (method git-fetch)
16772 ;; pypi version lacks tests.js
16773 (uri (git-reference
16774 (url "https://github.com/stefankoegl/python-json-patch")
16775 (commit (string-append "v" version))))
16776 (file-name (git-file-name name version))
16777 (sha256
16778 (base32
16779 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16780 (build-system python-build-system)
16781 (propagated-inputs
16782 `(("python-jsonpointer" ,python-jsonpointer)))
16783 (home-page "https://github.com/stefankoegl/python-json-patch")
16784 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16785 (description "@code{jsonpatch} is a library and program that allows
16786 applying JSON Patches according to RFC 6902.")
16787 (license license:bsd-3)))
16788
16789 (define-public python2-jsonpatch
16790 (package-with-python2 python-jsonpatch))
16791
16792 (define-public python-jsonpatch-0.4
16793 (package (inherit python-jsonpatch)
16794 (name "python-jsonpatch")
16795 (version "0.4")
16796 (source
16797 (origin
16798 (method git-fetch)
16799 (uri (git-reference
16800 (url "https://github.com/stefankoegl/python-json-patch")
16801 (commit (string-append "v" version))))
16802 (file-name (git-file-name name version))
16803 (sha256
16804 (base32
16805 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16806
16807 (define-public python2-jsonpatch-0.4
16808 (package-with-python2 python-jsonpatch-0.4))
16809
16810 (define-public python-rfc3986
16811 (package
16812 (name "python-rfc3986")
16813 (version "1.4.0")
16814 (source (origin
16815 (method url-fetch)
16816 (uri (pypi-uri "rfc3986" version))
16817 (sha256
16818 (base32
16819 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16820 (build-system python-build-system)
16821 (arguments
16822 `(#:modules ((guix build utils)
16823 (guix build python-build-system)
16824 (ice-9 ftw)
16825 (srfi srfi-1)
16826 (srfi srfi-26))
16827 #:phases
16828 (modify-phases %standard-phases
16829 (replace 'check
16830 (lambda _
16831 (let ((cwd (getcwd)))
16832 (setenv "PYTHONPATH"
16833 (string-append cwd "/build/"
16834 (find (cut string-prefix? "lib" <>)
16835 (scandir (string-append cwd "/build")))
16836 ":"
16837 (getenv "PYTHONPATH")))
16838 (invoke "pytest" "-v")))))))
16839 (native-inputs
16840 `(("python-pytest" ,python-pytest)))
16841 (home-page "https://rfc3986.readthedocs.io/")
16842 (synopsis "Parse and validate URI references")
16843 (description
16844 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16845 validation and authority parsing. This module also supports RFC@tie{}6874
16846 which adds support for zone identifiers to IPv6 addresses.")
16847 (license license:asl2.0)))
16848
16849 (define-public python2-rfc3986
16850 (package-with-python2 python-rfc3986))
16851
16852 (define-public python-rfc3987
16853 (package
16854 (name "python-rfc3987")
16855 (version "1.3.7")
16856 (source
16857 (origin
16858 (method url-fetch)
16859 (uri (pypi-uri "rfc3987" version))
16860 (sha256
16861 (base32
16862 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16863 (build-system python-build-system)
16864 (home-page "https://pypi.org/project/rfc3987/")
16865 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16866 (description "@code{rfc3987} provides routines for parsing and
16867 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16868 (license license:gpl3+)))
16869
16870 (define-public python2-rfc3987
16871 (package-with-python2 python-rfc3987))
16872
16873 ;; The latest commit contains fixes for building with both python3 and python2.
16874 (define-public python-rfc6555
16875 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16876 (revision "1"))
16877 (package
16878 (name "python-rfc6555")
16879 (version (git-version "0.0.0" revision commit))
16880 (source (origin
16881 (method git-fetch)
16882 (uri (git-reference
16883 (url "https://github.com/sethmlarson/rfc6555")
16884 (commit commit)))
16885 (file-name (git-file-name name version))
16886 (sha256
16887 (base32
16888 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16889 (build-system python-build-system)
16890 (arguments
16891 '(#:phases
16892 (modify-phases %standard-phases
16893 (replace 'check
16894 (lambda* (#:key tests? #:allow-other-keys)
16895 (if tests?
16896 ;; Other tests require network access.
16897 (invoke "pytest" "tests/test_ipv6.py")
16898 #t))))))
16899 (native-inputs
16900 `(("python-pytest" ,python-pytest)))
16901 (home-page "https://pypi.org/project/rfc6555/")
16902 (synopsis "Python implementation of RFC 6555")
16903 (description
16904 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16905 6555. Provided with a single file and dead-simple API to allow easy vendoring
16906 and integration into other projects.")
16907 (properties `((python2-variant . ,(delay python2-rfc6555))))
16908 (license license:asl2.0))))
16909
16910 (define-public python2-rfc6555
16911 (let ((base (package-with-python2
16912 (strip-python2-variant python-rfc6555))))
16913 (package
16914 (inherit base)
16915 (propagated-inputs
16916 `(("python2-selectors2" ,python2-selectors2))))))
16917
16918 (define-public python-bagit
16919 (package
16920 (name "python-bagit")
16921 (version "1.7.0")
16922 (source
16923 (origin
16924 (method url-fetch)
16925 (uri (pypi-uri "bagit" version))
16926 (sha256
16927 (base32
16928 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16929 (build-system python-build-system)
16930 (native-inputs
16931 `(("python-setuptools-scm" ,python-setuptools-scm)
16932 ("python-coverage" ,python-coverage)
16933 ("python-mock" ,python-mock)))
16934 (home-page "https://libraryofcongress.github.io/bagit-python/")
16935 (synopsis "Create and validate BagIt packages")
16936 (description "Bagit is a Python library and command line utility for working
16937 with BagIt style packages. BagIt is a minimalist packaging format for digital
16938 preservation.")
16939 (license license:cc0)))
16940
16941 (define-public python-prov
16942 (package
16943 (name "python-prov")
16944 (version "2.0.0")
16945 (source
16946 (origin
16947 (method url-fetch)
16948 (uri (pypi-uri "prov" version))
16949 (sha256
16950 (base32
16951 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16952 (build-system python-build-system)
16953 (propagated-inputs
16954 `(("python-dateutil" ,python-dateutil)
16955 ("python-lxml" ,python-lxml)
16956 ("python-networkx" ,python-networkx)
16957 ("python-rdflib" ,python-rdflib)))
16958 (native-inputs
16959 `(("graphviz" ,graphviz)
16960 ("python-pydot" ,python-pydot)))
16961 (home-page "https://github.com/trungdong/prov")
16962 (synopsis
16963 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16964 (description
16965 "This package provides a library for W3C Provenance Data Model supporting
16966 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16967 (license license:expat)))
16968
16969 (define-public python-arcp
16970 (package
16971 (name "python-arcp")
16972 (version "0.2.1")
16973 (source
16974 (origin
16975 (method url-fetch)
16976 (uri (pypi-uri "arcp" version))
16977 (sha256
16978 (base32
16979 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16980 (build-system python-build-system)
16981 (native-inputs
16982 `(("python-pytest" ,python-pytest)))
16983 (home-page "http://arcp.readthedocs.io/")
16984 (synopsis
16985 "Archive and Package URI parser and generator")
16986 (description
16987 "@acronym{arcp, Archive and Package} provides functions for creating
16988 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16989 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16990 consume or reference hypermedia resources bundled inside a file archive or an
16991 application package, as well as to resolve URIs for archive resources within a
16992 programmatic framework. This URI scheme provides mechanisms to generate a
16993 unique base URI to represent the root of the archive, so that relative URI
16994 references in a bundled resource can be resolved within the archive without
16995 having to extract the archive content on the local file system. An arcp URI can
16996 be used for purposes of isolation (e.g. when consuming multiple archives),
16997 security constraints (avoiding \"climb out\" from the archive), or for
16998 externally identiyfing sub-resources referenced by hypermedia formats.")
16999 (license license:asl2.0)))
17000
17001 (define-public python-shellescape
17002 (package
17003 (name "python-shellescape")
17004 (version "3.8.1")
17005 (source
17006 (origin
17007 (method git-fetch)
17008 (uri (git-reference
17009 (url "https://github.com/chrissimpkins/shellescape")
17010 (commit (string-append "v" version))))
17011 (file-name (git-file-name name version))
17012 (sha256
17013 (base32
17014 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17015 (build-system python-build-system)
17016 (arguments
17017 '(#:phases
17018 (modify-phases %standard-phases
17019 (replace 'check
17020 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17021 (when tests?
17022 (add-installed-pythonpath inputs outputs)
17023 (invoke "python" "tests/test_shellescape.py"))
17024 #t)))))
17025 (native-inputs
17026 `(("python-pytest" ,python-pytest)))
17027 (home-page "https://github.com/chrissimpkins/shellescape")
17028 (synopsis
17029 "Shell escape a string to safely use it as a token in a shell command")
17030 (description
17031 "The shellescape Python module defines the @code{shellescape.quote()}
17032 function that returns a shell-escaped version of a Python string. This is a
17033 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17034 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17035 (license license:expat)))
17036
17037 (define-public python-validators
17038 (package
17039 (name "python-validators")
17040 (version "0.14.2")
17041 (source (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "validators" version))
17044 (sha256
17045 (base32
17046 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17047 (build-system python-build-system)
17048 (arguments
17049 '(#:phases (modify-phases %standard-phases
17050 (replace 'check
17051 (lambda _
17052 (invoke "pytest" "-vv"))))))
17053 (propagated-inputs
17054 `(("python-decorator" ,python-decorator)
17055 ("python-six" ,python-six)))
17056 (native-inputs
17057 `(("python-flake8" ,python-flake8)
17058 ("python-isort" ,python-isort)
17059 ("python-pytest" ,python-pytest)))
17060 (home-page "https://github.com/kvesteri/validators")
17061 (synopsis "Data validation library")
17062 (description
17063 "This package contains validators for different things such as email
17064 addresses, IP addresses, URLs, hashes and more. It has been designed to
17065 be easy to use and not require defining a schema or form just to validate
17066 some input.")
17067 (license license:expat)))
17068
17069 (define-public python2-validators
17070 (package-with-python2 python-validators))
17071
17072 (define-public python-validate-email
17073 (package
17074 (name "python-validate-email")
17075 (version "1.3")
17076 (source
17077 (origin
17078 (method url-fetch)
17079 (uri (pypi-uri "validate_email" version))
17080 (sha256
17081 (base32
17082 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17083 (build-system python-build-system)
17084 (home-page "https://github.com/syrusakbary/validate_email")
17085 (synopsis "Verifies if an email address is valid and really exists")
17086 (description "@code{validate_email} can be used to verify if an email
17087 address is valid and really exists.")
17088 (license license:lgpl3+)))
17089
17090 (define-public python2-validate-email
17091 (package-with-python2 python-validate-email))
17092
17093 (define-public python-flex
17094 (package
17095 (name "python-flex")
17096 (version "6.10.0")
17097 (source
17098 (origin
17099 (method url-fetch)
17100 (uri (pypi-uri "flex" version))
17101 (sha256
17102 (base32
17103 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17104 (build-system python-build-system)
17105 (propagated-inputs
17106 `(("python-click" ,python-click)
17107 ("python-iso8601" ,python-iso8601)
17108 ("python-jsonpointer" ,python-jsonpointer)
17109 ("python-pyyaml" ,python-pyyaml)
17110 ("python-requests" ,python-requests)
17111 ("python-rfc3987" ,python-rfc3987)
17112 ("python-six" ,python-six)
17113 ("python-validate-email" ,python-validate-email)))
17114 (home-page "https://github.com/pipermerriam/flex")
17115 (synopsis "Validates Swagger schemata")
17116 (description "@code{flex} can be used to validate Swagger schemata.")
17117 (license license:bsd-3)))
17118
17119 (define-public python2-flex
17120 (package-with-python2 python-flex))
17121
17122 (define-public python-marshmallow
17123 (package
17124 (name "python-marshmallow")
17125 (version "3.9.1")
17126 (source
17127 (origin
17128 (method url-fetch)
17129 (uri (pypi-uri "marshmallow" version))
17130 (sha256
17131 (base32
17132 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17133 (build-system python-build-system)
17134 (propagated-inputs
17135 `(("python-dateutil" ,python-dateutil)
17136 ("python-simplejson" ,python-simplejson)))
17137 (native-inputs
17138 `(("python-pytest" ,python-pytest)
17139 ("python-pytz" ,python-pytz)))
17140 (home-page "https://github.com/marshmallow-code/marshmallow")
17141 (synopsis "Convert complex datatypes to and from native
17142 Python datatypes.")
17143 (description "@code{marshmallow} provides a library for converting
17144 complex datatypes to and from native Python datatypes.")
17145 (license license:expat)))
17146
17147 (define-public python-apispec
17148 (package
17149 (name "python-apispec")
17150 (version "4.0.0")
17151 (source
17152 (origin
17153 (method url-fetch)
17154 (uri (pypi-uri "apispec" version))
17155 (sha256
17156 (base32
17157 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17158 (build-system python-build-system)
17159 (arguments
17160 '(#:phases (modify-phases %standard-phases
17161 (add-after 'unpack 'disable-prance-tests
17162 (lambda _
17163 ;; Disable validation tests since they require the
17164 ;; optional 'prance' library which is not yet in Guix.
17165 (substitute* "tests/test_ext_marshmallow_openapi.py"
17166 (("def test_openapi_tools_validate.*" all)
17167 (string-append "@pytest.mark.xfail\n" all)))))
17168 (replace 'check
17169 (lambda _
17170 (setenv "PYTHONPATH"
17171 (string-append "./build/lib:"
17172 (getenv "PYTHONPATH")))
17173 (invoke "pytest" "-vv"))))))
17174 (propagated-inputs
17175 `(("python-pyyaml" ,python-pyyaml)))
17176 (native-inputs
17177 `(("python-pytest" ,python-pytest)
17178 ("python-marshmallow" ,python-marshmallow)))
17179 (home-page "https://github.com/marshmallow-code/apispec")
17180 (synopsis "Swagger/OpenAPI specification generator")
17181 (description "@code{python-apispec} is a pluggable API specification
17182 generator. It currently supports the OpenAPI specification, formerly known
17183 as Swagger.")
17184 (license license:expat)))
17185
17186 (define-public python-flasgger
17187 (package
17188 (name "python-flasgger")
17189 (version "0.6.3")
17190 (source
17191 (origin
17192 (method git-fetch)
17193 (uri (git-reference
17194 (url "https://github.com/rochacbruno/flasgger")
17195 (commit version)))
17196 (file-name (git-file-name name version))
17197 (sha256
17198 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17199 (build-system python-build-system)
17200 (arguments
17201 `(#:phases
17202 (modify-phases %standard-phases
17203 (replace 'check
17204 (lambda* (#:key inputs outputs #:allow-other-keys)
17205 (substitute* "Makefile"
17206 (("flake8 flasgger --ignore=F403")
17207 "flake8 flasgger --ignore=E731,F403"))
17208 (setenv "PYTHONPATH" (string-append (getcwd)
17209 ":"
17210 (getenv "PYTHONPATH")))
17211 (invoke "py.test"))))))
17212 (propagated-inputs
17213 `(("python-flask" ,python-flask)
17214 ("python-pyyaml" ,python-pyyaml)
17215 ("python-jsonschema" ,python-jsonschema)
17216 ("python-mistune" ,python-mistune)
17217 ("python-six" ,python-six)))
17218 (native-inputs
17219 `(("python-decorator" ,python-decorator)
17220 ("python-flake8" ,python-flake8)
17221 ("python-flask-restful" ,python-flask-restful)
17222 ("python-flex" ,python-flex)
17223 ("python-pytest" ,python-pytest)
17224 ("python-pytest-cov" ,python-pytest-cov)
17225 ("python-marshmallow" ,python-marshmallow)
17226 ("python-apispec" ,python-apispec)))
17227 (home-page "https://github.com/rochacbruno/flasgger/")
17228 (synopsis "Extract Swagger specs from your Flask project")
17229 (description "@code{python-flasgger} allows extracting Swagger specs
17230 from your Flask project. It is a fork of Flask-Swagger.")
17231 (license license:expat)))
17232
17233 (define-public python-swagger-spec-validator
17234 (package
17235 (name "python-swagger-spec-validator")
17236 (version "2.4.3")
17237 (source
17238 (origin
17239 (method url-fetch)
17240 (uri (pypi-uri "swagger-spec-validator" version))
17241 (sha256
17242 (base32
17243 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17244 (build-system python-build-system)
17245 (propagated-inputs
17246 `(("python-jsonschema" ,python-jsonschema)
17247 ("python-pyyaml" ,python-pyyaml)
17248 ("python-six" ,python-six)))
17249 (home-page
17250 "https://github.com/Yelp/swagger_spec_validator")
17251 (synopsis "Validation of Swagger specifications")
17252 (description "@code{swagger_spec_validator} provides a library for
17253 validating Swagger API specifications.")
17254 (license license:asl2.0)))
17255
17256 (define-public python2-swagger-spec-validator
17257 (package-with-python2 python-swagger-spec-validator))
17258
17259 (define-public python-apache-libcloud
17260 (package
17261 (name "python-apache-libcloud")
17262 (version "3.1.0")
17263 (source
17264 (origin
17265 (method url-fetch)
17266 (uri (pypi-uri "apache-libcloud" version))
17267 (sha256
17268 (base32
17269 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17270 (build-system python-build-system)
17271 (arguments
17272 `(#:phases
17273 (modify-phases %standard-phases
17274 (add-after 'unpack 'patch-ssh
17275 (lambda* (#:key inputs #:allow-other-keys)
17276 (substitute* "libcloud/compute/ssh.py"
17277 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17278 "/bin/ssh" "'")))
17279 #t))
17280 (add-after 'unpack 'patch-tests
17281 (lambda _
17282 (substitute* "libcloud/test/compute/test_ssh_client.py"
17283 (("class ShellOutSSHClientTests")
17284 "@unittest.skip(\"Guix container doesn't have ssh service\")
17285 class ShellOutSSHClientTests"))
17286 #t))
17287 (add-before 'check 'copy-secret
17288 (lambda _
17289 (copy-file "libcloud/test/secrets.py-dist"
17290 "libcloud/test/secrets.py")
17291 #t)))))
17292 (inputs
17293 `(("openssh" ,openssh)))
17294 (propagated-inputs
17295 `(("python-paramiko" ,python-paramiko)
17296 ("python-requests" ,python-requests)))
17297 (native-inputs
17298 `(("python-lockfile" ,python-lockfile)
17299 ("python-mock" ,python-mock)
17300 ("python-pytest" ,python-pytest)
17301 ("python-pytest-runner" ,python-pytest-runner)
17302 ("python-requests-mock" ,python-requests-mock)))
17303 (home-page "https://libcloud.apache.org/")
17304 (synopsis "Unified Cloud API")
17305 (description "@code{libcloud} is a Python library for interacting with
17306 many of the popular cloud service providers using a unified API.")
17307 (license license:asl2.0)))
17308
17309 (define-public python-smmap
17310 (package
17311 (name "python-smmap")
17312 (version "3.0.1")
17313 (source
17314 (origin
17315 (method url-fetch)
17316 (uri (pypi-uri "smmap" version))
17317 (sha256
17318 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17319 (build-system python-build-system)
17320 (native-inputs
17321 `(("python-nosexcover" ,python-nosexcover)))
17322 (home-page "https://github.com/Byron/smmap")
17323 (synopsis "Python sliding window memory map manager")
17324 (description "@code{smmap} is a pure Python implementation of a sliding
17325 window memory map manager.")
17326 (license license:bsd-3)))
17327
17328 (define-public python-smmap2
17329 (deprecated-package "python-smmap2" python-smmap))
17330
17331 (define-public python2-smmap
17332 (package-with-python2 python-smmap))
17333
17334 (define-public python2-smmap2
17335 (deprecated-package "python2-smmap2" python2-smmap))
17336
17337 (define-public python-regex
17338 (package
17339 (name "python-regex")
17340 (version "2020.6.8")
17341 (source (origin
17342 (method url-fetch)
17343 (uri (pypi-uri "regex" version))
17344 (sha256
17345 (base32
17346 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17347 (build-system python-build-system)
17348 (arguments
17349 '(#:phases
17350 (modify-phases %standard-phases
17351 (replace 'check
17352 (lambda* (#:key inputs outputs #:allow-other-keys)
17353 (add-installed-pythonpath inputs outputs)
17354 (invoke "python" "-c"
17355 "from regex.test_regex import test_main; test_main()"))))))
17356 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17357 (synopsis "Alternative regular expression module")
17358 (description "This regular expression implementation is backwards-
17359 compatible with the standard @code{re} module, but offers additional
17360 functionality like full case-folding for case-insensitive matches in Unicode.")
17361 (license license:psfl)))
17362
17363 (define-public python2-regex
17364 (package-with-python2 python-regex))
17365
17366 (define-public python-pyopengl
17367 (package
17368 (name "python-pyopengl")
17369 (version "3.1.5")
17370 (source
17371 (origin
17372 (method url-fetch)
17373 (uri (pypi-uri "PyOpenGL" version))
17374 (sha256
17375 (base32
17376 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17377 (build-system python-build-system)
17378 (inputs
17379 `(("mesa" ,mesa)
17380 ("freeglut" ,freeglut)
17381 ("glu" ,glu)))
17382 (arguments
17383 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17384 ;attribute 'OSMesa'
17385 #:phases
17386 (modify-phases %standard-phases
17387 (add-before 'build 'fix-paths
17388 (lambda* (#:key inputs outputs #:allow-other-keys)
17389 (substitute* '("OpenGL/platform/ctypesloader.py")
17390 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17391 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17392 (("'GL'")
17393 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17394 (("'GLU'")
17395 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17396 (("'glut',")
17397 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17398 (("'GLESv1_CM'")
17399 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17400 (("'GLESv2'")
17401 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17402 ;; Not providing libgle. It seems to be very old.
17403 #t)))))
17404 (home-page "http://pyopengl.sourceforge.net")
17405 (synopsis "Standard OpenGL bindings for Python")
17406 (description
17407 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17408 related APIs. The binding is created using the standard @code{ctypes}
17409 library.")
17410 (license license:bsd-3)))
17411
17412 (define-public python-pyopengl-accelerate
17413 (package
17414 (inherit python-pyopengl)
17415 (name "python-pyopengl-accelerate")
17416 (version "3.1.5")
17417 (source
17418 (origin
17419 (method url-fetch)
17420 (uri (pypi-uri "PyOpenGL-accelerate" version))
17421 (sha256
17422 (base32
17423 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17424 (inputs
17425 `(("mesa" ,mesa)
17426 ("python-numpy" ,python-numpy))) ; for cython module
17427 ; numpy_formathandler, thus not propagated
17428 (arguments
17429 `(#:tests? #f
17430 #:phases
17431 (modify-phases %standard-phases
17432 (delete 'fix-paths))))
17433 (synopsis "Acceleration code for PyOpenGL")
17434 (description
17435 "This is the Cython-coded accelerator module for PyOpenGL.")))
17436
17437 (define-public python-rencode
17438 (package
17439 (name "python-rencode")
17440 (version "1.0.5")
17441 (source
17442 (origin
17443 (method url-fetch)
17444 (uri (pypi-uri "rencode" version))
17445 (sha256
17446 (base32
17447 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17448 (build-system python-build-system)
17449 (arguments
17450 `(#:phases
17451 (modify-phases %standard-phases
17452 (add-before 'check 'delete-bogus-test
17453 ;; This test requires /home/aresch/Downloads, which is not provided by
17454 ;; the build environment.
17455 (lambda _
17456 (delete-file "rencode/t.py")
17457 #t)))))
17458 (native-inputs `(("pkg-config" ,pkg-config)
17459 ("python-cython" ,python-cython)))
17460 (home-page "https://github.com/aresch/rencode")
17461 (synopsis "Serialization of heterogeneous data structures")
17462 (description
17463 "The @code{rencode} module is a data structure serialization library,
17464 similar to @code{bencode} from the BitTorrent project. For complex,
17465 heterogeneous data structures with many small elements, r-encoding stake up
17466 significantly less space than b-encodings. This version of rencode is a
17467 complete rewrite in Cython to attempt to increase the performance over the
17468 pure Python module.")
17469 (license license:bsd-3)))
17470
17471 (define-public python2-rencode
17472 (package-with-python2 python-rencode))
17473
17474 (define-public python-xenon
17475 (package
17476 (name "python-xenon")
17477 (version "0.7.0")
17478 (source
17479 (origin
17480 (method url-fetch)
17481 (uri (pypi-uri "xenon" version))
17482 (sha256
17483 (base32
17484 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17485 (build-system python-build-system)
17486 (native-inputs
17487 `(("python-pyyaml" ,python-pyyaml)
17488 ("python-radon" ,python-radon)
17489 ("python-requests" ,python-requests)
17490 ("python-flake8" ,python-flake8)
17491 ("python-tox" ,python-tox)))
17492 (arguments
17493 `(#:tests? #f ;test suite not shipped with the PyPI archive
17494 #:phases
17495 (modify-phases %standard-phases
17496 (add-before 'build 'patch-test-requirements
17497 (lambda _
17498 ;; Remove httpretty dependency for tests.
17499 (substitute* "setup.py"
17500 (("httpretty") ""))
17501 #t)))))
17502 (home-page "https://xenon.readthedocs.org/")
17503 (synopsis "Monitor code metrics for Python on your CI server")
17504 (description
17505 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17506 Ideally, @code{xenon} is run every time code is committed. Through command
17507 line options, various thresholds can be set for the complexity of code. It
17508 will fail (i.e. it will exit with a non-zero exit code) when any of these
17509 requirements is not met.")
17510 (license license:expat)))
17511
17512 (define-public python-pysocks
17513 (package
17514 (name "python-pysocks")
17515 (version "1.7.1")
17516 (source
17517 (origin
17518 (method url-fetch)
17519 (uri (pypi-uri "PySocks" version))
17520 (sha256
17521 (base32
17522 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17523 (build-system python-build-system)
17524 (arguments `(#:tests? #f))
17525 (home-page "https://github.com/Anorov/PySocks")
17526 (synopsis "SOCKS client module")
17527 (description "@code{pysocks} is an updated and semi-actively maintained
17528 version of @code{SocksiPy} with bug fixes and extra features.")
17529 (license license:bsd-3)))
17530
17531 (define-public python2-pysocks
17532 (package-with-python2 python-pysocks))
17533
17534 (define-public python-pydiff
17535 (package
17536 (name "python-pydiff")
17537 (version "0.2")
17538 (source
17539 (origin
17540 (method url-fetch)
17541 (uri (pypi-uri "pydiff" version))
17542 (sha256
17543 (base32
17544 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17545 (build-system python-build-system)
17546 (home-page "https://github.com/myint/pydiff")
17547 (synopsis "Library to diff two Python files at the bytecode level")
17548 (description
17549 "@code{pydiff} makes it easy to look for actual code changes while
17550 ignoring formatting changes.")
17551 (license license:expat)))
17552
17553 (define-public python2-pydiff
17554 (package-with-python2 python-pydiff))
17555
17556 (define-public python-pydub
17557 (package
17558 (name "python-pydub")
17559 (version "0.24.1")
17560 (source
17561 (origin
17562 (method url-fetch)
17563 (uri (pypi-uri "pydub" version))
17564 (sha256
17565 (base32
17566 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17567 (build-system python-build-system)
17568 (arguments
17569 `(#:phases
17570 (modify-phases %standard-phases
17571 (add-after 'unpack 'fix-ffmpeg-path
17572 (lambda* (#:key inputs #:allow-other-keys)
17573 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17574 (substitute* '("pydub/utils.py")
17575 (("return \"ffmpeg\"")
17576 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17577 (("return \"ffplay\"")
17578 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17579 (("return \"ffprobe\"")
17580 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17581 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17582 #t))))))
17583 (home-page "https://pydub.com")
17584 (inputs
17585 `(("ffmpeg" ,ffmpeg)))
17586 (propagated-inputs
17587 `(("python-scipy" ,python-scipy)))
17588 (synopsis "Manipulate audio with a high level interface in Python")
17589 (description
17590 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17591 @code{ffmpeg} to open various audio formats.")
17592 (license license:expat))) ; MIT license
17593
17594 (define-public python-tqdm
17595 (package
17596 (name "python-tqdm")
17597 (version "4.43.0")
17598 (source
17599 (origin
17600 (method url-fetch)
17601 (uri (pypi-uri "tqdm" version))
17602 (sha256
17603 (base32
17604 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17605 (build-system python-build-system)
17606 (arguments
17607 '(#:phases (modify-phases %standard-phases
17608 (replace 'check
17609 (lambda* (#:key inputs outputs #:allow-other-keys)
17610 (add-installed-pythonpath inputs outputs)
17611 ;; This invokation is taken from tox.ini.
17612 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17613 "-d" "-v" "tqdm/"))))))
17614 (native-inputs
17615 `(("python-nose" ,python-nose)))
17616 (home-page "https://github.com/tqdm/tqdm")
17617 (synopsis "Fast, extensible progress meter")
17618 (description
17619 "Make loops show a progress bar on the console by just wrapping any
17620 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17621 design and layout.")
17622 (license (list license:mpl2.0 license:expat))))
17623
17624 (define-public python2-tqdm
17625 (package-with-python2 python-tqdm))
17626
17627 (define-public python-pkginfo
17628 (package
17629 (name "python-pkginfo")
17630 (version "1.7.0")
17631 (source
17632 (origin
17633 (method url-fetch)
17634 (uri (pypi-uri "pkginfo" version))
17635 (sha256
17636 (base32
17637 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17638 (build-system python-build-system)
17639 (arguments
17640 `(#:phases
17641 (modify-phases %standard-phases
17642 (add-before 'check 'patch-tests
17643 (lambda _
17644 (substitute* "pkginfo/tests/test_installed.py"
17645 (("test_ctor_w_package_no_PKG_INFO")
17646 "_test_ctor_w_package_no_PKG_INFO"))
17647 #t)))))
17648 (home-page
17649 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17650 (synopsis
17651 "Query metadatdata from sdists, bdists, and installed packages")
17652 (description
17653 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17654 source distriubtion (an sdist) or a binary distribution (e.g., created by
17655 running bdist_egg). It can also query the EGG-INFO directory of an installed
17656 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17657 created by running @code{python setup.py develop}).")
17658 (license license:expat)))
17659
17660 (define-public python2-pkginfo
17661 (package-with-python2 python-pkginfo))
17662
17663 (define-public python-twine
17664 (package
17665 (name "python-twine")
17666 (version "1.15.0")
17667 (source
17668 (origin
17669 (method url-fetch)
17670 (uri (pypi-uri "twine" version))
17671 (sha256
17672 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17673 (build-system python-build-system)
17674 (propagated-inputs
17675 `(("python-tqdm" ,python-tqdm)
17676 ("python-packaging" ,python-packaging)
17677 ("python-pkginfo" ,python-pkginfo)
17678 ("python-readme-renderer" ,python-readme-renderer)
17679 ("python-requests" ,python-requests)
17680 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17681 (home-page "https://github.com/pypa/twine")
17682 (synopsis "Collection of utilities for interacting with PyPI")
17683 (description
17684 "@code{twine} currently supports registering projects and uploading
17685 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17686 their files and supports any packaging format (including wheels).")
17687 (license license:asl2.0)))
17688
17689 (define-public python2-twine
17690 (package-with-python2 python-twine))
17691
17692 (define-public python-linecache2
17693 (package
17694 (name "python-linecache2")
17695 (version "1.0.0")
17696 (source
17697 (origin
17698 (method url-fetch)
17699 (uri (pypi-uri "linecache2" version))
17700 (sha256
17701 (base32
17702 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17703 (build-system python-build-system)
17704 (arguments
17705 `(;; The tests depend on unittest2, and our version is a bit too old.
17706 #:tests? #f))
17707 (native-inputs
17708 `(("python-pbr" ,python-pbr-minimal)))
17709 (home-page
17710 "https://github.com/testing-cabal/linecache2")
17711 (synopsis "Backports of the linecache module")
17712 (description
17713 "The linecache module allows one to get any line from any file, while
17714 attempting to optimize internally, using a cache, the common case where many
17715 lines are read from a single file.")
17716 (license license:psfl)))
17717
17718 (define-public python2-linecache2
17719 (package-with-python2 python-linecache2))
17720
17721 (define-public python-traceback2
17722 (package
17723 (name "python-traceback2")
17724 (version "1.4.0")
17725 (source
17726 (origin
17727 (method url-fetch)
17728 (uri (pypi-uri "traceback2" version))
17729 (sha256
17730 (base32
17731 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17732 (build-system python-build-system)
17733 (arguments
17734 `(;; python-traceback2 and python-unittest2 depend on one another.
17735 #:tests? #f))
17736 (native-inputs
17737 `(("python-pbr" ,python-pbr-minimal)))
17738 (propagated-inputs
17739 `(("python-linecache2" ,python-linecache2)))
17740 (home-page
17741 "https://github.com/testing-cabal/traceback2")
17742 (synopsis "Backports of the traceback module")
17743 (description
17744 "This module provides a standard interface to extract, format and print
17745 stack traces of Python programs. It exactly mimics the behavior of the Python
17746 interpreter when it prints a stack trace.")
17747 (license license:psfl)))
17748
17749 (define-public python2-traceback2
17750 (package-with-python2 python-traceback2))
17751
17752 (define-public python-ratelimiter
17753 (package
17754 (name "python-ratelimiter")
17755 (version "1.2.0")
17756 (source
17757 (origin
17758 (method url-fetch)
17759 (uri (pypi-uri "ratelimiter" version))
17760 (sha256
17761 (base32
17762 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17763 (build-system python-build-system)
17764 (arguments
17765 '(#:tests? #f)) ; There are no tests in the pypi archive.
17766 (home-page "https://github.com/RazerM/ratelimiter")
17767 (synopsis "Simple rate limiting object")
17768 (description
17769 "The @code{ratelimiter} module ensures that an operation will not be
17770 executed more than a given number of times during a given period.")
17771 (license license:asl2.0)))
17772
17773 (define-public python2-ratelimiter
17774 (package-with-python2 python-ratelimiter))
17775
17776 (define-public python-dukpy
17777 (package
17778 (name "python-dukpy")
17779 (version "0.3")
17780 (source
17781 (origin
17782 (method git-fetch)
17783 (uri (git-reference
17784 (url "https://github.com/kovidgoyal/dukpy")
17785 (commit (string-append "v" version))))
17786 (file-name (git-file-name name version))
17787 (sha256
17788 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17789 (build-system python-build-system)
17790 (home-page "https://github.com/kovidgoyal/dukpy")
17791 (synopsis "Run JavaScript in python")
17792 (description
17793 "dukpy is a JavaScript runtime environment for Python using the duktape
17794 embeddable JavaScript engine.")
17795 ;; Dukpy is licensed under MIT like the embedded duktape library,
17796 ;; with 'errors.c' as GPL3.
17797 (license (list license:expat license:gpl3))))
17798
17799 (define-public python2-dukpy
17800 (package-with-python2 python-dukpy))
17801
17802 (define-public python-jsonrpclib-pelix
17803 (package
17804 (name "python-jsonrpclib-pelix")
17805 (version "0.3.2")
17806 (source
17807 (origin
17808 (method url-fetch)
17809 (uri (pypi-uri "jsonrpclib-pelix" version))
17810 (sha256
17811 (base32
17812 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17813 (build-system python-build-system)
17814 (arguments
17815 `(#:tests? #f)) ; no tests in PyPI tarball
17816 (home-page "https://github.com/tcalmant/jsonrpclib/")
17817 (synopsis "JSON-RPC 2.0 client library for Python")
17818 (description
17819 "This library implements the JSON-RPC v2.0
17820 specification (backwards-compatible) as a client library for Python. This
17821 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17822 services.")
17823 (license license:asl2.0)))
17824
17825 (define-public python2-jsonrpclib-pelix
17826 (package-with-python2 python-jsonrpclib-pelix))
17827
17828 (define-public python-setuptools-scm-git-archive
17829 (package
17830 (name "python-setuptools-scm-git-archive")
17831 (version "1.0")
17832 (source
17833 (origin
17834 (method url-fetch)
17835 (uri (pypi-uri "setuptools_scm_git_archive" version))
17836 (sha256
17837 (base32
17838 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17839 (build-system python-build-system)
17840 (native-inputs
17841 `(("python-pytest" ,python-pytest)))
17842 (propagated-inputs
17843 `(("python-setuptools-scm" ,python-setuptools-scm)))
17844 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17845 (synopsis "Setuptools_scm plugin for git archives")
17846 (description
17847 "The setuptools_scm_git_archive package is a plugin to
17848 setuptools_scm, which supports obtaining versions from git archives that
17849 belong to tagged versions.")
17850 (license license:expat)))
17851
17852 (define-public python2-setuptools-scm-git-archive
17853 (package-with-python2 python-setuptools-scm-git-archive))
17854
17855 (define-public python-setuptools-git
17856 (package
17857 (name "python-setuptools-git")
17858 (version "1.2")
17859 (source
17860 (origin
17861 (method url-fetch)
17862 (uri (pypi-uri "setuptools-git" version))
17863 (sha256
17864 (base32
17865 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17866 (build-system python-build-system)
17867 (arguments
17868 `(#:phases
17869 (modify-phases %standard-phases
17870 ;; This is needed for tests.
17871 (add-after 'unpack 'configure-git
17872 (lambda _
17873 (setenv "HOME" "/tmp")
17874 (invoke "git" "config" "--global" "user.email" "guix")
17875 (invoke "git" "config" "--global" "user.name" "guix")
17876 #t)))))
17877 (native-inputs
17878 `(("git" ,git-minimal)))
17879 (home-page "https://github.com/msabramo/setuptools-git")
17880 (synopsis "Setuptools revision control system plugin for Git")
17881 (description
17882 "This package provides a plugin for Setuptools for revision control with
17883 Git.")
17884 (license license:bsd-3)))
17885
17886 (define-public python-pyclipper
17887 (package
17888 (name "python-pyclipper")
17889 (version "1.1.0.post3")
17890 (source
17891 (origin
17892 (method url-fetch)
17893 (uri (pypi-uri "pyclipper" version ".zip"))
17894 (sha256
17895 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17896 (modules '((guix build utils)))
17897 (snippet
17898 '(begin
17899 ;; This file is generated by Cython.
17900 (delete-file "pyclipper/pyclipper.cpp") #t))))
17901 (build-system python-build-system)
17902 (arguments
17903 `(#:phases
17904 (modify-phases %standard-phases
17905 (add-before 'build 'cythonize-sources
17906 (lambda _
17907 (with-directory-excursion "pyclipper"
17908 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17909 (propagated-inputs
17910 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17911 (native-inputs
17912 `(("python-cython" ,python-cython)
17913 ("python-pytest" ,python-pytest)
17914 ("python-pytest-runner" ,python-pytest-runner)
17915 ("python-unittest2" ,python-unittest2)
17916 ("unzip" ,unzip)))
17917 (home-page "https://github.com/greginvm/pyclipper")
17918 (synopsis "Wrapper for Angus Johnson's Clipper library")
17919 (description
17920 "Pyclipper is a Cython wrapper for the C++ translation of the
17921 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17922 (license license:expat)))
17923
17924 (define-public python2-pyclipper
17925 (package-with-python2 python-pyclipper))
17926
17927 (define-public python2-booleanoperations
17928 (package
17929 (name "python2-booleanoperations")
17930 (version "0.7.1")
17931 (source
17932 (origin
17933 (method url-fetch)
17934 (uri (pypi-uri "booleanOperations" version ".zip"))
17935 (sha256
17936 (base32
17937 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17938 (build-system python-build-system)
17939 (arguments
17940 `(#:python ,python-2))
17941 (native-inputs
17942 `(("unzip" ,unzip)
17943 ("python2-pytest" ,python2-pytest)
17944 ("python2-pytest-runner" ,python2-pytest-runner)))
17945 (propagated-inputs
17946 `(("python-fonttools" ,python2-fonttools)
17947 ("python-pyclipper" ,python2-pyclipper)
17948 ("python-ufolib" ,python2-ufolib)))
17949 (home-page "https://github.com/typemytype/booleanOperations")
17950 (synopsis "Boolean operations on paths")
17951 (description
17952 "BooleanOperations provides a Python library that enables
17953 boolean operations on paths.")
17954 (license license:expat)))
17955
17956 (define-public python-tempdir
17957 (package
17958 (name "python-tempdir")
17959 (version "0.7.1")
17960 (source
17961 (origin
17962 (method url-fetch)
17963 (uri (pypi-uri "tempdir" version))
17964 (sha256
17965 (base32
17966 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17967 (build-system python-build-system)
17968 (home-page "https://pypi.org/project/tempdir/")
17969 (arguments
17970 ;; the package has no tests
17971 '(#:tests? #f))
17972 (synopsis "Python library for managing temporary directories")
17973 (description
17974 "This library manages temporary directories that are automatically
17975 deleted with all their contents when they are no longer needed. It is
17976 particularly convenient for use in tests.")
17977 (license license:expat)))
17978
17979 (define-public python2-tempdir
17980 (package-with-python2 python-tempdir))
17981
17982 (define-public python-activepapers
17983 (package
17984 (name "python-activepapers")
17985 (version "0.2.2")
17986 (source
17987 (origin
17988 (method url-fetch)
17989 (uri (pypi-uri "ActivePapers.Py" version))
17990 (sha256
17991 (base32
17992 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17993 (build-system python-build-system)
17994 (arguments
17995 `(#:modules ((ice-9 ftw)
17996 (srfi srfi-1)
17997 (guix build utils)
17998 (guix build python-build-system))
17999
18000 #:phases
18001 (modify-phases %standard-phases
18002 (add-after 'unpack 'delete-python2-code
18003 (lambda _
18004 (for-each delete-file
18005 '("lib/activepapers/builtins2.py"
18006 "lib/activepapers/standardlib2.py"
18007 "lib/activepapers/utility2.py"))))
18008 (replace 'check
18009 (lambda _
18010 ;; Deactivate the test cases that download files
18011 (setenv "NO_NETWORK_ACCESS" "1")
18012 ;; For some strange reason, some tests fail if nosetests runs all
18013 ;; test modules in a single execution. They pass if each test
18014 ;; module is run individually.
18015 (for-each (lambda (filename)
18016 (invoke "nosetests"
18017 (string-append "tests/" filename)))
18018 (scandir "tests"
18019 (lambda (filename)
18020 (string-suffix? ".py" filename)))))))))
18021 (native-inputs
18022 `(("python-tempdir" ,python-tempdir)
18023 ("python-nose" ,python-nose)))
18024 (propagated-inputs
18025 `(("python-h5py" ,python-h5py)))
18026 (home-page "https://www.activepapers.org/")
18027 (synopsis "Executable papers for scientific computing")
18028 (description
18029 "ActivePapers is a tool for working with executable papers, which
18030 combine data, code, and documentation in single-file packages,
18031 suitable for publication as supplementary material or on repositories
18032 such as figshare or Zenodo.")
18033 (properties `((python2-variant . ,(delay python2-activepapers))))
18034 (license license:bsd-3)))
18035
18036 (define-public python2-activepapers
18037 (let ((base (package-with-python2
18038 (strip-python2-variant python-activepapers))))
18039 (package
18040 (inherit base)
18041 (arguments
18042 (substitute-keyword-arguments (package-arguments base)
18043 ((#:phases phases)
18044 `(modify-phases ,phases
18045 (delete 'delete-python2-code)
18046 (add-after 'unpack 'delete-python3-code
18047 (lambda _
18048 (for-each delete-file
18049 '("lib/activepapers/builtins3.py"
18050 "lib/activepapers/standardlib3.py"
18051 "lib/activepapers/utility3.py")))))))))))
18052
18053 (define-public python-semver
18054 (package
18055 (name "python-semver")
18056 (version "2.9.0")
18057 (source
18058 (origin
18059 (method url-fetch)
18060 (uri (pypi-uri "semver" version))
18061 (sha256
18062 (base32
18063 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18064 (build-system python-build-system)
18065 (arguments
18066 `(#:phases (modify-phases %standard-phases
18067 (replace 'check
18068 (lambda _
18069 (delete-file "setup.cfg")
18070 (invoke "py.test"))))))
18071 (native-inputs
18072 `(("python-pytest" ,python-pytest)))
18073 (home-page "https://github.com/k-bx/python-semver")
18074 (synopsis "Python helper for Semantic Versioning")
18075 (description "This package provides a Python library for
18076 @url{Semantic Versioning, http://semver.org/}.")
18077 (license license:bsd-3)))
18078
18079 (define-public python2-semver
18080 (package-with-python2 python-semver))
18081
18082 (define-public python-pyro4
18083 (package
18084 (name "python-pyro4")
18085 (version "4.77")
18086 (source
18087 (origin
18088 (method url-fetch)
18089 (uri (pypi-uri "Pyro4" version))
18090 (sha256
18091 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18092 (build-system python-build-system)
18093 (arguments
18094 '(#:tests? #f)) ;FIXME: Some tests require network access.
18095 (native-inputs
18096 `(("python-cloudpickle" ,python-cloudpickle)
18097 ("python-dill" ,python-dill)
18098 ("python-msgpack" ,python-msgpack)))
18099 (propagated-inputs
18100 `(("python-serpent" ,python-serpent)))
18101 (home-page "https://pyro4.readthedocs.io")
18102 (synopsis "Distributed object middleware for Python")
18103 (description
18104 "Pyro enables you to build applications in which objects can talk to each
18105 other over the network. You can just use normal Python method calls to call
18106 objects on other machines, also known as remote procedure calls (RPC).")
18107 (license license:expat)))
18108
18109 (define-public python2-pyro
18110 (package
18111 (name "python2-pyro")
18112 (version "3.16")
18113 (source
18114 (origin
18115 (method url-fetch)
18116 (uri (pypi-uri "Pyro" version))
18117 (file-name (string-append "Pyro-" version ".tar.gz"))
18118 (sha256
18119 (base32
18120 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18121 (build-system python-build-system)
18122 (arguments
18123 ;; Pyro is not compatible with Python 3
18124 `(#:python ,python-2
18125 ;; Pyro has no test cases for automatic execution
18126 #:tests? #f))
18127 (home-page "https://pythonhosted.org/Pyro/")
18128 (synopsis "Distributed object manager for Python")
18129 (description "Pyro is a Distributed Object Technology system
18130 written in Python that is designed to be easy to use. It resembles
18131 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18132 which is a system and language independent Distributed Object Technology
18133 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18134 longer maintained. New projects should use Pyro4 instead, which
18135 is the new Pyro version that is actively developed.")
18136 (license license:expat)))
18137
18138 (define-public python2-scientific
18139 (package
18140 (name "python2-scientific")
18141 (version "2.9.4")
18142 (source
18143 (origin
18144 (method git-fetch)
18145 (uri (git-reference
18146 (url "https://github.com/khinsen/ScientificPython")
18147 (commit (string-append "rel" version))))
18148 (file-name (git-file-name name version))
18149 (sha256
18150 (base32
18151 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18152 (build-system python-build-system)
18153 (inputs
18154 `(("netcdf" ,netcdf)))
18155 (propagated-inputs
18156 `(("python-numpy" ,python2-numpy-1.8)
18157 ("python-pyro" ,python2-pyro)))
18158 (arguments
18159 ;; ScientificPython is not compatible with Python 3
18160 `(#:python ,python-2
18161 #:tests? #f ; No test suite
18162 #:phases
18163 (modify-phases %standard-phases
18164 (replace 'build
18165 (lambda* (#:key inputs #:allow-other-keys)
18166 (invoke "python" "setup.py" "build"
18167 (string-append "--netcdf_prefix="
18168 (assoc-ref inputs "netcdf"))))))))
18169 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18170 (synopsis "Python modules for scientific computing")
18171 (description "ScientificPython is a collection of Python modules that are
18172 useful for scientific computing. Most modules are rather general (Geometry,
18173 physical units, automatic derivatives, ...) whereas others are more
18174 domain-specific (e.g. netCDF and PDB support). The library is currently
18175 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18176 (license license:cecill-c)))
18177
18178 (define-public python2-mmtk
18179 (package
18180 (name "python2-mmtk")
18181 (version "2.7.12")
18182 (source
18183 (origin
18184 (method git-fetch)
18185 (uri (git-reference
18186 (url "https://github.com/khinsen/MMTK")
18187 (commit (string-append "rel" version))))
18188 (file-name (git-file-name name version))
18189 (sha256
18190 (base32
18191 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18192 (build-system python-build-system)
18193 (native-inputs
18194 `(("netcdf" ,netcdf)))
18195 (propagated-inputs
18196 `(("python-scientific" ,python2-scientific)
18197 ("python-tkinter" ,python-2 "tk")))
18198 (arguments
18199 `(#:python ,python-2
18200 #:tests? #f
18201 #:phases
18202 (modify-phases %standard-phases
18203 (add-before 'build 'includes-from-scientific
18204 (lambda* (#:key inputs #:allow-other-keys)
18205 (mkdir-p "Include/Scientific")
18206 (copy-recursively
18207 (string-append
18208 (assoc-ref inputs "python-scientific")
18209 "/include/python2.7/Scientific")
18210 "Include/Scientific"))))))
18211 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18212 (synopsis "Python library for molecular simulation")
18213 (description "MMTK is a library for molecular simulations with an emphasis
18214 on biomolecules. It provides widely used methods such as Molecular Dynamics
18215 and normal mode analysis, but also basic routines for implementing new methods
18216 for simulation and analysis. The library is currently not actively maintained
18217 and works only with Python 2 and NumPy < 1.9.")
18218 (license license:cecill-c)))
18219
18220 (define-public python-phonenumbers
18221 (package
18222 (name "python-phonenumbers")
18223 (version "8.9.1")
18224 (source
18225 (origin
18226 (method url-fetch)
18227 (uri (pypi-uri "phonenumbers" version))
18228 (sha256
18229 (base32
18230 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18231 (build-system python-build-system)
18232 (home-page
18233 "https://github.com/daviddrysdale/python-phonenumbers")
18234 (synopsis
18235 "Python library for dealing with international phone numbers")
18236 (description
18237 "This package provides a Python port of Google's libphonenumber library.")
18238 (license license:asl2.0)))
18239
18240 (define-public python2-phonenumbers
18241 (package-with-python2 python-phonenumbers))
18242
18243 (define-public python-send2trash
18244 (package
18245 (name "python-send2trash")
18246 (version "1.5.0")
18247 (source
18248 (origin (method git-fetch)
18249 ;; Source tarball on PyPI doesn't include tests.
18250 (uri (git-reference
18251 (url "https://github.com/hsoft/send2trash")
18252 (commit version)))
18253 (file-name (git-file-name name version))
18254 (sha256
18255 (base32
18256 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18257 (build-system python-build-system)
18258 (arguments
18259 '(#:phases
18260 (modify-phases %standard-phases
18261 (add-before 'check 'pre-check
18262 (lambda _
18263 (mkdir-p "/tmp/foo")
18264 (setenv "HOME" "/tmp/foo")
18265 #t)))))
18266 (home-page "https://github.com/hsoft/send2trash")
18267 (synopsis "Send files to the user's @file{~/Trash} directory")
18268 (description "This package provides a Python library to send files to the
18269 user's @file{~/Trash} directory.")
18270 (properties `((python2-variant . ,(delay python2-send2trash))))
18271 (license license:bsd-3)))
18272
18273 (define-public python2-send2trash
18274 (package
18275 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
18276 (arguments
18277 (substitute-keyword-arguments (package-arguments python-send2trash)
18278 ((#:phases phases)
18279 `(modify-phases ,phases
18280 (add-before 'check 'setenv
18281 (lambda _
18282 (setenv "PYTHONPATH"
18283 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18284 #t))))))))
18285
18286 (define-public python-pyfavicon
18287 (package
18288 (name "python-pyfavicon")
18289 (version "0.1.1")
18290 (source
18291 (origin
18292 (method url-fetch)
18293 (uri (pypi-uri "pyfavicon" version))
18294 (sha256
18295 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18296 (build-system python-build-system)
18297 (arguments
18298 ;; There are no tests in the PyPI tarball and the tests from the
18299 ;; repository require online data.
18300 '(#:tests? #f))
18301 (propagated-inputs
18302 `(("python-aiohttp" ,python-aiohttp)
18303 ("python-beautifulsoup4" ,python-beautifulsoup4)
18304 ("python-pillow" ,python-pillow)))
18305 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18306 (synopsis "Async favicon fetcher")
18307 (description
18308 "@code{pyfavicon} is an async favicon fetcher.")
18309 (license license:expat)))
18310
18311 (define-public python-yamllint
18312 (package
18313 (name "python-yamllint")
18314 (version "1.26.0")
18315 (source
18316 (origin
18317 (method url-fetch)
18318 (uri (pypi-uri "yamllint" version))
18319 (sha256
18320 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18321 (build-system python-build-system)
18322 (propagated-inputs
18323 `(("python-pathspec" ,python-pathspec)
18324 ("python-pyyaml" ,python-pyyaml)
18325 ("python-setuptools" ,python-setuptools)))
18326 (home-page "https://github.com/adrienverge/yamllint")
18327 (synopsis "Linter for YAML files")
18328 (description
18329 "Yamllint is a linter for YAML files. yamllint does not only check for
18330 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18331 such as lines length, trailing spaces, indentation, etc.")
18332 (license license:gpl3+)))
18333
18334 (define-public python-yapf
18335 (package
18336 (name "python-yapf")
18337 (version "0.29.0")
18338 (source
18339 (origin
18340 (method url-fetch)
18341 (uri (pypi-uri "yapf" version))
18342 (sha256
18343 (base32
18344 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18345 (build-system python-build-system)
18346 (home-page "https://github.com/google/yapf")
18347 (synopsis "Formatter for Python code")
18348 (description "YAPF is a formatter for Python code. It's based off of
18349 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18350 takes the code and reformats it to the best formatting that conforms to the
18351 style guide, even if the original code didn't violate the style guide.")
18352 (license license:asl2.0)))
18353
18354 (define-public python2-yapf
18355 (package-with-python2 python-yapf))
18356
18357 (define-public python-yq
18358 (package
18359 (name "python-yq")
18360 (version "2.11.1")
18361 (source
18362 (origin
18363 (method url-fetch)
18364 (uri (pypi-uri "yq" version))
18365 (sha256
18366 (base32
18367 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18368 (build-system python-build-system)
18369 (arguments
18370 '(#:phases
18371 (modify-phases %standard-phases
18372 (add-after 'unpack 'patch
18373 (lambda* (#:key inputs #:allow-other-keys)
18374 (substitute* "yq/__init__.py"
18375 (("Popen\\(\\[\"jq")
18376 (string-append
18377 "Popen([\""
18378 (assoc-ref inputs "jq")
18379 "/bin/jq")))
18380 #t)))))
18381 (inputs
18382 `(("python-argcomplete" ,python-argcomplete)
18383 ("python-pyyaml" ,python-pyyaml)
18384 ("python-xmltodict" ,python-xmltodict)
18385 ("jq" ,jq)))
18386 (native-inputs
18387 `(("python-coverage" ,python-coverage)
18388 ("python-flake8" ,python-flake8)
18389 ("python-wheel" ,python-wheel)))
18390 (home-page "https://github.com/kislyuk/yq")
18391 (synopsis "Command-line YAML/XML processor")
18392 (description
18393 "This package provides @command{yq} and @command{xq} for processing YAML
18394 and XML respectively. The processing is done through @command{jq}, @command{jq}
18395 filters can be used to process the data as it passes through.")
18396 (license license:asl2.0)))
18397
18398 (define-public python-gyp
18399 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18400 (revision "0"))
18401 (package
18402 (name "python-gyp")
18403 ;; Google does not release versions,
18404 ;; based on second most recent commit date.
18405 (version (git-version "0.0.0" revision commit))
18406 (source
18407 (origin
18408 ;; Google does not release tarballs,
18409 ;; git checkout is needed.
18410 (method git-fetch)
18411 (uri (git-reference
18412 (url "https://chromium.googlesource.com/external/gyp")
18413 (commit commit)))
18414 (file-name (git-file-name name version))
18415 (sha256
18416 (base32
18417 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18418 (build-system python-build-system)
18419 (home-page "https://gyp.gsrc.io/")
18420 (synopsis "GYP is a Meta-Build system")
18421 (description
18422 "GYP builds build systems for large, cross platform applications.
18423 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18424 files, and Makefiles.")
18425 (license license:bsd-3))))
18426
18427 (define-public python2-gyp
18428 (package-with-python2 python-gyp))
18429
18430 (define-public python-whatever
18431 (package
18432 (name "python-whatever")
18433 (version "0.6")
18434 (source
18435 (origin
18436 (method git-fetch)
18437 (uri (git-reference
18438 (url "https://github.com/Suor/whatever")
18439 (commit version)))
18440 (file-name (git-file-name name version))
18441 (sha256
18442 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18443 (build-system python-build-system)
18444 (arguments
18445 `(#:phases
18446 (modify-phases %standard-phases
18447 (replace 'check
18448 (lambda _
18449 (invoke "py.test"))))))
18450 (native-inputs
18451 `(("python-pytest" ,python-pytest)))
18452 (home-page "https://github.com/Suor/whatever")
18453 (synopsis "Make anonymous functions by partial application of operators")
18454 (description "@code{whatever} provides an easy way to make anonymous
18455 functions by partial application of operators.")
18456 (license license:bsd-3)))
18457
18458 (define-public python2-whatever
18459 (package-with-python2 python-whatever))
18460
18461 (define-public python-funcy
18462 (package
18463 (name "python-funcy")
18464 (version "1.11")
18465 (source
18466 (origin
18467 (method git-fetch)
18468 (uri (git-reference
18469 (url "https://github.com/Suor/funcy")
18470 (commit version)))
18471 (sha256
18472 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18473 (file-name (git-file-name name version))))
18474 (build-system python-build-system)
18475 (arguments
18476 `(#:phases
18477 (modify-phases %standard-phases
18478 (replace 'check
18479 (lambda _
18480 (invoke "py.test"))))))
18481 (native-inputs
18482 `(("python-pytest" ,python-pytest)
18483 ("python-whatever" ,python-whatever)))
18484 (home-page "https://github.com/Suor/funcy")
18485 (synopsis "Functional tools")
18486 (description "@code{funcy} is a library that provides functional tools.
18487 Examples are:
18488 @enumerate
18489 @item merge - Merges collections of the same type
18490 @item walk - Type-preserving map
18491 @item select - Selects a part of a collection
18492 @item take - Takes the first n items of a collection
18493 @item first - Takes the first item of a collection
18494 @item remove - Predicated-removes items of a collection
18495 @item concat - Concatenates two collections
18496 @item flatten - Flattens a collection with subcollections
18497 @item distinct - Returns only distinct items
18498 @item split - Predicated-splits a collection
18499 @item split_at - Splits a collection at a given item
18500 @item group_by - Groups items by group
18501 @item pairwise - Pairs off adjacent items
18502 @item partial - Partially-applies a function
18503 @item curry - Curries a function
18504 @item compose - Composes functions
18505 @item complement - Complements a predicate
18506 @item all_fn - \"all\" with predicate
18507 @end enumerate")
18508 (license license:bsd-3)))
18509
18510 (define-public python2-funcy
18511 (package-with-python2 python-funcy))
18512
18513 (define-public python-isoweek
18514 (package
18515 (name "python-isoweek")
18516 (version "1.3.3")
18517 (source
18518 (origin
18519 (method url-fetch)
18520 (uri (pypi-uri "isoweek" version))
18521 (sha256
18522 (base32
18523 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18524 (build-system python-build-system)
18525 (home-page "https://github.com/gisle/isoweek")
18526 (synopsis "Objects representing a week")
18527 (description "The @code{isoweek} module provide the class Week that
18528 implements the week definition of ISO 8601. This standard also defines
18529 a notation for identifying weeks; yyyyWww (where the W is a literal).
18530 Week instances stringify to this form.")
18531 (license license:bsd-3)))
18532
18533 (define-public python2-isoweek
18534 (package-with-python2 python-isoweek))
18535
18536 (define-public python-pyzbar
18537 (package
18538 (name "python-pyzbar")
18539 (version "0.1.8")
18540 (source
18541 (origin
18542 ;; There's no source tarball on PyPI.
18543 (method git-fetch)
18544 (uri (git-reference
18545 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18546 (commit (string-append "v" version))))
18547 (file-name (git-file-name name version))
18548 (sha256
18549 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18550 (build-system python-build-system)
18551 (arguments
18552 `(#:phases
18553 (modify-phases %standard-phases
18554 (add-after 'unpack 'remove-failing-test
18555 (lambda _
18556 ;; This tests if find_library was called once, but we remove
18557 ;; the call in the stage below to make the library find libzbar.
18558 (delete-file "pyzbar/tests/test_zbar_library.py")
18559 #t))
18560 (add-before 'build 'set-library-file-name
18561 (lambda* (#:key inputs #:allow-other-keys)
18562 (let ((libzbar (assoc-ref inputs "zbar")))
18563 (substitute* "pyzbar/zbar_library.py"
18564 (("find_library\\('zbar'\\)")
18565 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18566 #t))))))
18567 (native-inputs
18568 `(("pkg-config" ,pkg-config)
18569 ("python-numpy" ,python-numpy)
18570 ("python-pillow" ,python-pillow)))
18571 (inputs
18572 `(("zbar" ,zbar)))
18573 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18574 (synopsis "Read one-dimensional barcodes and QR codes")
18575 (description
18576 "Read one-dimensional barcodes and QR codes using the zbar library.
18577
18578 Features:
18579
18580 @itemize
18581 @item Pure python
18582 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18583 @item Decodes locations of barcodes
18584 @item No dependencies, other than the zbar library itself
18585 @end itemize")
18586 (license license:expat)))
18587
18588 (define-public python-tokenize-rt
18589 (package
18590 (name "python-tokenize-rt")
18591 (version "2.0.1")
18592 (source
18593 (origin
18594 (method url-fetch)
18595 (uri (pypi-uri "tokenize-rt" version))
18596 (sha256
18597 (base32
18598 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18599 (build-system python-build-system)
18600 (home-page "https://github.com/asottile/tokenize-rt")
18601 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18602 (description
18603 "This Python library is a wrapper around @code{tokenize} from the Python
18604 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18605 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18606 and @code{tokens_to_src} to roundtrip.")
18607 (license license:expat)))
18608
18609 (define-public python-future-fstrings
18610 (package
18611 (name "python-future-fstrings")
18612 (version "0.4.1")
18613 (source
18614 (origin
18615 (method url-fetch)
18616 (uri (pypi-uri "future_fstrings" version))
18617 (sha256
18618 (base32
18619 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18620 (build-system python-build-system)
18621 (propagated-inputs
18622 `(("python-tokenize-rt" ,python-tokenize-rt)))
18623 (home-page "https://github.com/asottile/future-fstrings")
18624 (synopsis "Backport of fstrings to Python < 3.6")
18625 (description
18626 "This package provides a UTF-8 compatible encoding
18627 @code{future_fstrings}, which performs source manipulation. It decodes the
18628 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18629 @code{f} strings.")
18630 (license license:expat)))
18631
18632 (define-public python-typed-ast
18633 (package
18634 (name "python-typed-ast")
18635 (version "1.4.0")
18636 (source
18637 (origin
18638 (method git-fetch)
18639 (uri (git-reference
18640 (url "https://github.com/python/typed_ast")
18641 (commit version)))
18642 (sha256
18643 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18644 (file-name (git-file-name name version))))
18645 (build-system python-build-system)
18646 (arguments
18647 `(#:modules ((guix build utils)
18648 (guix build python-build-system)
18649 (ice-9 ftw)
18650 (srfi srfi-1)
18651 (srfi srfi-26))
18652 #:phases
18653 (modify-phases %standard-phases
18654 (replace 'check
18655 (lambda _
18656 (let ((cwd (getcwd)))
18657 (setenv "PYTHONPATH"
18658 (string-append cwd "/build/"
18659 (find (cut string-prefix? "lib" <>)
18660 (scandir (string-append cwd "/build")))
18661 ":"
18662 (getenv "PYTHONPATH"))))
18663 (invoke "pytest")
18664 #t)))))
18665 (native-inputs `(("python-pytest" ,python-pytest)))
18666 (home-page "https://github.com/python/typed_ast")
18667 (synopsis "Fork of Python @code{ast} modules with type comment support")
18668 (description "This package provides a parser similar to the standard
18669 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18670 include PEP 484 type comments and are independent of the version of Python
18671 under which they are run. The @code{typed_ast} parsers produce the standard
18672 Python AST (plus type comments), and are both fast and correct, as they are
18673 based on the CPython 2.7 and 3.7 parsers.")
18674 ;; See the file "LICENSE" for the details.
18675 (license (list license:psfl
18676 license:asl2.0
18677 license:expat)))) ;ast27/Parser/spark.py
18678
18679 (define-public python-typer
18680 (package
18681 (name "python-typer")
18682 (version "0.3.2")
18683 (source
18684 (origin
18685 ;; Building `python-typer` from the git repository requires the `flit-core`
18686 ;; Python package that is not installed by `python-flit`.
18687 (method url-fetch)
18688 (uri (pypi-uri "typer" version))
18689 (sha256
18690 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18691 (build-system python-build-system)
18692 (arguments
18693 `(#:phases
18694 (modify-phases %standard-phases
18695 (add-before 'check 'disable-failing-tests
18696 (lambda _
18697 (substitute* "tests/test_completion/test_completion.py"
18698 (("def test_show_completion")
18699 "def _test_show_completion")
18700 (("def test_install_completion")
18701 "def _test_install_completion"))
18702 (substitute* "tests/test_completion/test_completion_install.py"
18703 (("def test_completion_install_bash")
18704 "def _test_completion_install_bash")
18705 (("def test_completion_install_zsh")
18706 "def _test_completion_install_zsh")
18707 (("def test_completion_install_fish")
18708 "def _test_completion_install_fish")
18709 (("def test_completion_install_powershell")
18710 "def _test_completion_install_powershell"))
18711 #t))
18712 (replace 'check
18713 (lambda _
18714 (setenv "PYTHONPATH"
18715 (string-append (getcwd) ":"
18716 (getenv "PYTHONPATH")))
18717 (invoke "python" "-m" "pytest" "tests/")
18718 #t)))))
18719 (propagated-inputs
18720 `(("python-click" ,python-click)))
18721 (native-inputs
18722 `(("python-coverage" ,python-coverage)
18723 ("python-pytest" ,python-pytest)
18724 ("python-shellingham" ,python-shellingham)))
18725 (home-page "https://github.com/tiangolo/typer")
18726 (synopsis
18727 "Typer builds CLI based on Python type hints")
18728 (description
18729 "Typer is a library for building CLI applications. It's based on
18730 Python 3.6+ type hints.")
18731 ;; MIT license
18732 (license license:expat)))
18733
18734 (define-public python-typing
18735 (package
18736 (name "python-typing")
18737 (version "3.7.4.3")
18738 (source
18739 (origin
18740 (method url-fetch)
18741 (uri (pypi-uri "typing" version))
18742 (sha256
18743 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18744 (build-system python-build-system)
18745 (home-page "https://docs.python.org/3/library/typing.html")
18746 (synopsis "Type hints for Python")
18747 (description "This is a backport of the standard library @code{typing}
18748 module to Python versions older than 3.5. Typing defines a standard notation
18749 for Python function and variable type annotations. The notation can be used
18750 for documenting code in a concise, standard format, and it has been designed
18751 to also be used by static and runtime type checkers, static analyzers, IDEs
18752 and other tools.")
18753 (license license:psfl)))
18754
18755 (define-public python2-typing
18756 (package-with-python2 python-typing))
18757
18758 (define-public python-typing-extensions
18759 (package
18760 (name "python-typing-extensions")
18761 (version "3.7.4.3")
18762 (source
18763 (origin
18764 (method url-fetch)
18765 (uri (pypi-uri "typing_extensions" version))
18766 (sha256
18767 (base32
18768 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18769 (build-system python-build-system)
18770 (home-page
18771 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18772 (synopsis "Experimental type hints for Python")
18773 (description
18774 "The typing_extensions module contains additional @code{typing} hints not
18775 yet present in the of the @code{typing} standard library.
18776 Included are implementations of:
18777 @enumerate
18778 @item ClassVar
18779 @item ContextManager
18780 @item Counter
18781 @item DefaultDict
18782 @item Deque
18783 @item NewType
18784 @item NoReturn
18785 @item overload
18786 @item Protocol
18787 @item runtime
18788 @item Text
18789 @item Type
18790 @item TYPE_CHECKING
18791 @item AsyncGenerator
18792 @end enumerate\n")
18793 (license license:psfl)))
18794
18795 (define-public bpython
18796 (package
18797 (name "bpython")
18798 (version "0.20.1")
18799 (source
18800 (origin
18801 (method url-fetch)
18802 (uri (pypi-uri "bpython" version))
18803 (sha256
18804 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18805 (build-system python-build-system)
18806 (arguments
18807 `(#:phases
18808 (modify-phases %standard-phases
18809 (add-after 'unpack 'remove-failing-test
18810 (lambda _
18811 ;; Remove failing test. FIXME: make it pass
18812 (delete-file "bpython/test/test_args.py")
18813 #t))
18814 (add-after 'wrap 'add-aliases
18815 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18816 (lambda* (#:key outputs #:allow-other-keys)
18817 (let ((out (assoc-ref outputs "out")))
18818 (for-each
18819 (lambda (old new)
18820 (symlink old (string-append out "/bin/" new)))
18821 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18822 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18823 #t)))))
18824 (propagated-inputs
18825 `(("python-pygments" ,python-pygments)
18826 ("python-requests" ,python-requests)
18827 ("python-curtsies" ,python-curtsies)
18828 ("python-greenlet" ,python-greenlet)
18829 ("python-six" ,python-six)
18830 ("python-wcwidth" ,python-wcwidth)
18831 ;; optional dependencies
18832 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18833 ("python-watchdog" ,python-watchdog)
18834 ("python-jedi" ,python-jedi)))
18835 (native-inputs
18836 `(("python-sphinx" ,python-sphinx)
18837 ("python-mock" ,python-mock)))
18838 (home-page "https://bpython-interpreter.org/")
18839 (synopsis "Fancy interface to the Python interpreter")
18840 (description "Bpython is a fancy interface to the Python
18841 interpreter. bpython's main features are
18842
18843 @enumerate
18844 @item in-line syntax highlighting,
18845 @item readline-like autocomplete with suggestions displayed as you type,
18846 @item expected parameter list for any Python function,
18847 @item \"rewind\" function to pop the last line of code from memory and
18848 re-evaluate,
18849 @item send the code you've entered off to a pastebin,
18850 @item save the code you've entered to a file, and
18851 @item auto-indentation.
18852 @end enumerate")
18853 (license license:expat)))
18854
18855 (define-public python-pyinotify
18856 (package
18857 (name "python-pyinotify")
18858 (version "0.9.6")
18859 (source (origin
18860 (method url-fetch)
18861 (uri (pypi-uri "pyinotify" version))
18862 (sha256
18863 (base32
18864 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18865 (build-system python-build-system)
18866 (arguments `(#:tests? #f)) ;no tests
18867 (home-page "https://github.com/seb-m/pyinotify")
18868 (synopsis "Python library for monitoring inotify events")
18869 (description
18870 "@code{pyinotify} provides a Python interface for monitoring
18871 file system events on Linux.")
18872 (license license:expat)))
18873
18874 (define-public python2-pyinotify
18875 (package-with-python2 python-pyinotify))
18876
18877 ;; Ada parser uses this version.
18878 (define-public python2-quex-0.67.3
18879 (package
18880 (name "python2-quex")
18881 (version "0.67.3")
18882 (source
18883 (origin
18884 (method url-fetch)
18885 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18886 (version-major+minor version)
18887 "/quex-" version ".zip"))
18888 (sha256
18889 (base32
18890 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18891 (build-system python-build-system)
18892 (native-inputs
18893 `(("unzip" ,unzip)))
18894 (arguments
18895 `(#:python ,python-2
18896 #:tests? #f
18897 #:phases
18898 (modify-phases %standard-phases
18899 (delete 'configure)
18900 (delete 'build)
18901 (replace 'install
18902 (lambda* (#:key outputs #:allow-other-keys)
18903 (let* ((out (assoc-ref outputs "out"))
18904 (share/quex (string-append out "/share/quex"))
18905 (bin (string-append out "/bin")))
18906 (copy-recursively "." share/quex)
18907 (mkdir-p bin)
18908 (symlink (string-append share/quex "/quex-exe.py")
18909 (string-append bin "/quex"))
18910 #t))))))
18911 (native-search-paths
18912 (list (search-path-specification
18913 (variable "QUEX_PATH")
18914 (files '("share/quex")))))
18915 (home-page "http://quex.sourceforge.net/")
18916 (synopsis "Lexical analyzer generator in Python")
18917 (description "@code{quex} is a lexical analyzer generator in Python.")
18918 (license license:lgpl2.1+))) ; Non-military
18919
18920 (define-public python2-quex
18921 (package (inherit python2-quex-0.67.3)
18922 (name "python2-quex")
18923 (version "0.68.1")
18924 (source
18925 (origin
18926 (method url-fetch)
18927 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18928 (sha256
18929 (base32
18930 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18931 (file-name (string-append name "-" version ".tar.gz"))))))
18932
18933 (define-public python-more-itertools
18934 (package
18935 (name "python-more-itertools")
18936 (version "8.2.0")
18937 (source
18938 (origin
18939 (method url-fetch)
18940 (uri (pypi-uri "more-itertools" version))
18941 (sha256
18942 (base32
18943 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18944 (build-system python-build-system)
18945 (home-page "https://github.com/erikrose/more-itertools")
18946 (synopsis "More routines for operating on iterables, beyond itertools")
18947 (description "Python's built-in @code{itertools} module implements a
18948 number of iterator building blocks inspired by constructs from APL, Haskell,
18949 and SML. @code{more-itertools} includes additional building blocks for
18950 working with iterables.")
18951 (properties `((python2-variant . ,(delay python2-more-itertools))))
18952 (license license:expat)))
18953
18954 ;; The 5.x series are the last versions supporting Python 2.7.
18955 (define-public python2-more-itertools
18956 (package
18957 (inherit python-more-itertools)
18958 (name "python2-more-itertools")
18959 (version "5.0.0")
18960 (source (origin
18961 (method url-fetch)
18962 (uri (pypi-uri "more-itertools" version))
18963 (sha256
18964 (base32
18965 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18966 (arguments
18967 `(#:python ,python-2))
18968 (propagated-inputs
18969 `(("python2-six" ,python2-six-bootstrap)))))
18970
18971 (define-public python-latexcodec
18972 (package
18973 (name "python-latexcodec")
18974 (version "1.0.7")
18975 (source
18976 (origin
18977 (method url-fetch)
18978 (uri (pypi-uri "latexcodec" version))
18979 (sha256
18980 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18981 (build-system python-build-system)
18982 (inputs
18983 `(("python-six" ,python-six)))
18984 (home-page "https://readthedocs.org/projects/latexcodec/")
18985 (synopsis "Work with LaTeX code in Python")
18986 (description "Lexer and codec to work with LaTeX code in Python.")
18987 (license license:expat)))
18988
18989 (define-public python-pybtex
18990 (package
18991 (name "python-pybtex")
18992 (version "0.22.2")
18993 (source
18994 (origin
18995 (method url-fetch)
18996 (uri (pypi-uri "pybtex" version))
18997 (sha256
18998 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18999 (build-system python-build-system)
19000 (native-inputs
19001 `(("python-nose" ,python-nose)))
19002 (inputs
19003 `(("python-latexcodec" ,python-latexcodec)
19004 ("python-pyyaml" ,python-pyyaml)
19005 ("python-six" ,python-six)))
19006 (arguments
19007 `(#:test-target "nosetests"))
19008 (home-page "https://pybtex.org/")
19009 (synopsis "BibTeX-compatible bibliography processor")
19010 (description "Pybtex is a BibTeX-compatible bibliography processor written
19011 in Python. You can simply type pybtex instead of bibtex.")
19012 (license license:expat)))
19013
19014 (define-public python-onetimepass
19015 (package
19016 (name "python-onetimepass")
19017 (version "1.0.1")
19018 (source
19019 (origin
19020 (method url-fetch)
19021 (uri (pypi-uri "onetimepass" version))
19022 (sha256
19023 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19024 (build-system python-build-system)
19025 (propagated-inputs `(("python-six" ,python-six)))
19026 (home-page "https://github.com/tadeck/onetimepass/")
19027 (synopsis "One-time password library")
19028 (description "Python one-time password library for HMAC-based (HOTP) and
19029 time-based (TOTP) passwords.")
19030 (license license:expat)))
19031
19032 (define-public python-parso
19033 (package
19034 (name "python-parso")
19035 (version "0.7.1")
19036 (source
19037 (origin
19038 (method url-fetch)
19039 (uri (pypi-uri "parso" version))
19040 (sha256
19041 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19042 (native-inputs
19043 `(("python-pytest" ,python-pytest)))
19044 (build-system python-build-system)
19045 (arguments
19046 `(#:phases (modify-phases %standard-phases
19047 (replace 'check
19048 (lambda _ (invoke "pytest" "-vv"))))))
19049 (home-page "https://github.com/davidhalter/parso")
19050 (synopsis "Python Parser")
19051 (description "Parso is a Python parser that supports error recovery and
19052 round-trip parsing for different Python versions (in multiple Python versions).
19053 Parso is also able to list multiple syntax errors in your Python file.")
19054 (license license:expat)))
19055
19056 (define-public python2-parso
19057 (package-with-python2 python-parso))
19058
19059 (define-public python-async-generator
19060 (package
19061 (name "python-async-generator")
19062 (version "1.10")
19063 (source
19064 (origin
19065 (method url-fetch)
19066 (uri (pypi-uri "async_generator" version))
19067 (sha256
19068 (base32
19069 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19070 (build-system python-build-system)
19071 (native-inputs
19072 `(("python-pytest" ,python-pytest)))
19073 (home-page "https://github.com/python-trio/async_generator")
19074 (synopsis "Async generators and context managers for Python 3.5+")
19075 (description "@code{async_generator} back-ports Python 3.6's native async
19076 generators and Python 3.7's context managers into Python 3.5.")
19077 ;; Dual licensed.
19078 (license (list license:expat license:asl2.0))))
19079
19080 (define-public python-async-timeout
19081 (package
19082 (name "python-async-timeout")
19083 (version "3.0.1")
19084 (source
19085 (origin
19086 (method url-fetch)
19087 (uri (pypi-uri "async-timeout" version))
19088 (sha256
19089 (base32
19090 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19091 (build-system python-build-system)
19092 (home-page "https://github.com/aio-libs/async_timeout/")
19093 (synopsis "Timeout context manager for asyncio programs")
19094 (description "@code{async-timeout} provides a timeout timeout context
19095 manager compatible with @code{asyncio}.")
19096 (license license:asl2.0)))
19097
19098 (define-public python-glob2
19099 (package
19100 (name "python-glob2")
19101 (version "0.7")
19102 (source
19103 (origin
19104 (method git-fetch)
19105 (uri (git-reference
19106 (url "https://github.com/miracle2k/python-glob2")
19107 (commit (string-append "v" version))))
19108 (file-name (git-file-name name version))
19109 (sha256
19110 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19111 (build-system python-build-system)
19112 (home-page "https://github.com/miracle2k/python-glob2/")
19113 (synopsis "Extended Version of the python buildin glob module")
19114 (description "This is an extended version of the Python
19115 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19116 adds:
19117
19118 @itemize
19119 @item The ability to capture the text matched by glob patterns, and return
19120 those matches alongside the file names.
19121 @item A recursive @code{**} globbing syntax, akin for example to the
19122 @code{globstar} option of Bash.
19123 @item The ability to replace the file system functions used, in order to glob
19124 on virtual file systems.
19125 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19126 @end itemize
19127
19128 Glob2 currently based on the glob code from Python 3.3.1.")
19129 (license license:bsd-2)))
19130
19131 (define-public python2-glob2
19132 (package-with-python2 python-glob2))
19133
19134 (define-public python-gipc
19135 (package
19136 (name "python-gipc")
19137 (version "0.6.0")
19138 (source
19139 (origin
19140 (method url-fetch)
19141 (uri (pypi-uri "gipc" version ".zip"))
19142 (sha256
19143 (base32
19144 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19145 (build-system python-build-system)
19146 (native-inputs
19147 `(("unzip" ,unzip)))
19148 (propagated-inputs
19149 `(("python-gevent" ,python-gevent)))
19150 (home-page "https://gehrcke.de/gipc/")
19151 (synopsis "Child process management in the context of gevent")
19152 (description "Usage of Python's multiprocessing package in a
19153 gevent-powered application may raise problems. With @code{gipc},
19154 process-based child processes can safely be created anywhere within a
19155 gevent-powered application.")
19156 (license license:expat)))
19157
19158 (define-public python-beautifultable
19159 (package
19160 (name "python-beautifultable")
19161 (version "1.0.0")
19162 (source
19163 (origin
19164 (method url-fetch)
19165 (uri (pypi-uri "beautifultable" version))
19166 (sha256
19167 (base32
19168 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19169 (build-system python-build-system)
19170 (propagated-inputs
19171 `(("python-wcwidth" ,python-wcwidth)))
19172 (arguments
19173 `(#:phases
19174 (modify-phases %standard-phases
19175 (add-after 'unpack 'patch-setup.py
19176 (lambda _
19177 (substitute* "setup.py"
19178 (("setup\\(")
19179 "setup(\n test_suite=\"test\",")))))))
19180 (home-page "https://github.com/pri22296/beautifultable")
19181 (synopsis "Print ASCII tables for terminals")
19182 (description "@code{python-beautifultable} provides a class for easily
19183 printing tabular data in a visually appealing ASCII format to a terminal.
19184
19185 Features include, but are not limited to:
19186 @itemize
19187 @item Full customization of the look and feel of the table
19188 @item Row and column accessors.
19189 @item Full support for colors using ANSI sequences or any library.
19190 @item Plenty of predefined styles and option to create custom ones.
19191 @item Support for Unicode characters.
19192 @item Supports streaming table when data is slow to retrieve.
19193 @end itemize")
19194 (license license:expat)))
19195
19196 (define-public python-globber
19197 (package
19198 (name "python-globber")
19199 (version "0.2.1")
19200 (source
19201 (origin
19202 (method git-fetch)
19203 (uri (git-reference
19204 (url "https://github.com/asharov/globber")
19205 (commit version)))
19206 (file-name (git-file-name name version))
19207 (sha256
19208 (base32
19209 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19210 (build-system python-build-system)
19211 (home-page "https://github.com/asharov/globber")
19212 (synopsis "Library for string matching with glob patterns")
19213 (description
19214 "Globber is a Python library for matching file names against glob patterns.
19215 In contrast to other glob-matching libraries, it matches arbitrary strings and
19216 doesn't require the matched names to be existing files. In addition, it
19217 supports the globstar @code{**} operator to match an arbitrary number of
19218 path components.")
19219 (license license:asl2.0)))
19220
19221 (define-public python-git-hammer
19222 (package
19223 (name "python-git-hammer")
19224 (version "0.3.1")
19225 (source
19226 (origin
19227 (method git-fetch)
19228 (uri (git-reference
19229 (url "https://github.com/asharov/git-hammer")
19230 (commit version)))
19231 (file-name (git-file-name name version))
19232 (sha256
19233 (base32
19234 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19235 (build-system python-build-system)
19236 (arguments
19237 `(#:phases
19238 (modify-phases %standard-phases
19239 (add-after 'unpack 'patch-setup.py
19240 (lambda _
19241 (substitute* "setup.py"
19242 (("setup\\(")
19243 "setup(\n test_suite=\"test\",")))))))
19244 (propagated-inputs
19245 `(("python-beautifultable" ,python-beautifultable)
19246 ("python-dateutil" ,python-dateutil)
19247 ("python-gitpython" ,python-gitpython)
19248 ("python-globber" ,python-globber)
19249 ("python-matplotlib" ,python-matplotlib)
19250 ("python-sqlalchemy" ,python-sqlalchemy)
19251 ("python-sqlalchemy-utils"
19252 ,python-sqlalchemy-utils)))
19253 (home-page "https://github.com/asharov/git-hammer")
19254 (synopsis "Provide statistics for git repositories")
19255 (description
19256 "Git Hammer is a statistics tool for projects in git repositories.
19257 Its major feature is tracking the number of lines authored by each person for every
19258 commit, but it also includes some other useful statistics.")
19259 (license license:asl2.0)))
19260
19261 (define-public python-fusepy
19262 (package
19263 (name "python-fusepy")
19264 (version "2.0.4")
19265 (source
19266 (origin
19267 (method url-fetch)
19268 (uri (pypi-uri "fusepy" version))
19269 (sha256
19270 (base32
19271 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19272 (build-system python-build-system)
19273 (arguments
19274 `(#:phases
19275 (modify-phases %standard-phases
19276 (add-before 'build 'set-library-file-name
19277 (lambda* (#:key inputs #:allow-other-keys)
19278 (let ((fuse (assoc-ref inputs "fuse")))
19279 (substitute* "fuse.py"
19280 (("find_library\\('fuse'\\)")
19281 (string-append "'" fuse "/lib/libfuse.so'")))
19282 #t))))))
19283 (propagated-inputs
19284 `(("fuse" ,fuse)))
19285 (home-page "https://github.com/fusepy/fusepy")
19286 (synopsis "Simple ctypes bindings for FUSE")
19287 (description "Python module that provides a simple interface to FUSE and
19288 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19289 (license license:isc)))
19290
19291 (define-public python2-fusepy
19292 (package-with-python2 python-fusepy))
19293
19294 (define-public python-fusepyng
19295 (package
19296 (name "python-fusepyng")
19297 (version "1.0.7")
19298 (source
19299 (origin
19300 (method url-fetch)
19301 (uri (pypi-uri "fusepyng" version))
19302 (sha256
19303 (base32
19304 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19305 (build-system python-build-system)
19306 (arguments
19307 '(#:phases
19308 (modify-phases %standard-phases
19309 (add-after 'unpack 'set-libfuse-path
19310 (lambda* (#:key inputs #:allow-other-keys)
19311 (let ((fuse (assoc-ref inputs "fuse")))
19312 (substitute* "fusepyng.py"
19313 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19314 (string-append "\"" fuse "/lib/libfuse.so\""))))
19315 #t)))))
19316 (inputs
19317 `(("fuse" ,fuse)))
19318 (propagated-inputs
19319 `(("python-paramiko" ,python-paramiko)))
19320 (home-page "https://github.com/rianhunter/fusepyng")
19321 (synopsis "Simple ctypes bindings for FUSE")
19322 (description "@code{fusepyng} is a Python module that provides a simple
19323 interface to FUSE on various operating systems. It's just one file and is
19324 implemented using @code{ctypes}.")
19325 (license license:isc)))
19326
19327 (define-public python-userspacefs
19328 (package
19329 (name "python-userspacefs")
19330 (version "2.0.3")
19331 (source
19332 (origin
19333 (method url-fetch)
19334 (uri (pypi-uri "userspacefs" version))
19335 (sha256
19336 (base32
19337 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19338 (build-system python-build-system)
19339 (propagated-inputs
19340 `(("python-fusepyng" ,python-fusepyng)))
19341 (home-page "https://github.com/rianhunter/userspacefs")
19342 (synopsis "User-space file systems for Python")
19343 (description
19344 "@code{userspacefs} is a library that allows you to easily write
19345 user-space file systems in Python.")
19346 (license license:gpl3+)))
19347
19348 (define-public python-stone
19349 (package
19350 (name "python-stone")
19351 (version "3.2.1")
19352 (source
19353 (origin
19354 (method url-fetch)
19355 (uri (pypi-uri "stone" version))
19356 (sha256
19357 (base32
19358 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19359 (build-system python-build-system)
19360 (arguments
19361 `(#:phases
19362 (modify-phases %standard-phases
19363 (add-after 'unpack 'change-version-requirements
19364 (lambda _
19365 ;; Match the requirement in test/requirements.txt
19366 (substitute* "setup.py"
19367 (("pytest < 5") "pytest < 7"))
19368 ;; We don't care about a coverage report.
19369 (substitute* "test/requirements.txt"
19370 (("coverage.*") "coverage\n"))
19371 #t))
19372 (replace 'check
19373 (lambda* (#:key tests? #:allow-other-keys)
19374 (when tests?
19375 ;; These tests don't import currectly.
19376 (delete-file "test/test_js_client.py")
19377 (delete-file "test/test_tsd_types.py")
19378 (delete-file "test/test_python_gen.py")
19379 (setenv "PYTHONPATH"
19380 (string-append (getcwd) ":"
19381 (getenv "PYTHONPATH")))
19382 (invoke "pytest"))
19383 #t)))))
19384 (propagated-inputs
19385 `(("python-ply" ,python-ply)
19386 ("python-six" ,python-six)))
19387 (native-inputs
19388 `(("python-coverage" ,python-coverage)
19389 ("python-mock" ,python-mock)
19390 ("python-pytest" ,python-pytest)
19391 ("python-pytest-runner" ,python-pytest-runner)))
19392 (home-page "https://github.com/dropbox/stone")
19393 (synopsis "Official Api Spec Language for Dropbox")
19394 (description
19395 "Stone is an interface description language (IDL) for APIs.")
19396 (license license:expat)))
19397
19398 (define-public pybind11
19399 (package
19400 (name "pybind11")
19401 (version "2.6.1")
19402 (source (origin
19403 (method git-fetch)
19404 (uri (git-reference
19405 (url "https://github.com/pybind/pybind11")
19406 (commit (string-append "v" version))))
19407 (sha256
19408 (base32
19409 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19410 (file-name (git-file-name name version))))
19411 (build-system cmake-build-system)
19412 (native-inputs
19413 `(("python" ,python-wrapper)
19414
19415 ;; The following dependencies are used for tests.
19416 ("python-pytest" ,python-pytest)
19417 ("catch" ,catch-framework2-1)
19418 ("eigen" ,eigen)))
19419 (arguments
19420 `(#:configure-flags
19421 (list (string-append "-DCATCH_INCLUDE_DIR="
19422 (assoc-ref %build-inputs "catch")
19423 "/include/catch"))
19424
19425 #:phases (modify-phases %standard-phases
19426 (add-after 'install 'install-python
19427 (lambda* (#:key outputs #:allow-other-keys)
19428 (let ((out (assoc-ref outputs "out")))
19429 (with-directory-excursion "../source"
19430 (setenv "PYBIND11_USE_CMAKE" "yes")
19431 (invoke "python" "setup.py" "install"
19432 "--single-version-externally-managed"
19433 "--root=/"
19434 (string-append "--prefix=" out)))))))
19435
19436 #:test-target "check"))
19437 (home-page "https://github.com/pybind/pybind11/")
19438 (synopsis "Seamless operability between C++11 and Python")
19439 (description
19440 "@code{pybind11} is a lightweight header-only library that exposes C++
19441 types in Python and vice versa, mainly to create Python bindings of existing
19442 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19443 library: to minimize boilerplate code in traditional extension modules by
19444 inferring type information using compile-time introspection.")
19445 (license license:bsd-3)))
19446
19447 (define-public python-pooch
19448 (package
19449 (name "python-pooch")
19450 (version "1.3.0")
19451 (source
19452 (origin
19453 (method url-fetch)
19454 (uri (pypi-uri "pooch" version))
19455 (sha256
19456 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19457 (build-system python-build-system)
19458 (arguments
19459 `(#:tests? #f)) ;requires online data
19460 (propagated-inputs
19461 `(("python-appdirs" ,python-appdirs)
19462 ("python-packaging" ,python-packaging)
19463 ("python-requests" ,python-requests)))
19464 (home-page "https://github.com/fatiando/pooch")
19465 (synopsis "Manage your Python library's sample data files")
19466 (description
19467 "Pooch manages your Python library's sample data files: it automatically
19468 downloads and stores them in a local directory, with support for versioning
19469 and corruption checks.")
19470 (license license:bsd-3)))
19471
19472 (define-public python-fasteners
19473 (package
19474 (name "python-fasteners")
19475 (version "0.15")
19476 (source
19477 (origin
19478 (method url-fetch)
19479 (uri (pypi-uri "fasteners" version))
19480 (sha256
19481 (base32
19482 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19483 (build-system python-build-system)
19484 (propagated-inputs
19485 `(("python-monotonic" ,python-monotonic)
19486 ("python-six" ,python-six)))
19487 (native-inputs
19488 `(("python-testtools" ,python-testtools)))
19489 (home-page "https://github.com/harlowja/fasteners")
19490 (synopsis "Python package that provides useful locks")
19491 (description
19492 "This package provides a Python program that provides following locks:
19493
19494 @itemize
19495 @item Locking decorator
19496 @item Reader-writer locks
19497 @item Inter-process locks
19498 @item Generic helpers
19499 @end itemize\n")
19500 (license license:asl2.0)))
19501
19502 (define-public python-requests-file
19503 (package
19504 (name "python-requests-file")
19505 (version "1.4.3")
19506 (source
19507 (origin
19508 (method url-fetch)
19509 (uri (pypi-uri "requests-file" version))
19510 (sha256
19511 (base32
19512 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19513 (build-system python-build-system)
19514 (propagated-inputs
19515 `(("python-requests" ,python-requests)
19516 ("python-six" ,python-six)))
19517 (home-page
19518 "https://github.com/dashea/requests-file")
19519 (synopsis "File transport adapter for Requests")
19520 (description
19521 "Requests-File is a transport adapter for use with the Requests Python
19522 library to allow local file system access via @code{file://} URLs.")
19523 (license license:asl2.0)))
19524
19525 (define-public python2-requests-file
19526 (package-with-python2 python-requests-file))
19527
19528 (define-public python-identify
19529 (package
19530 (name "python-identify")
19531 (version "1.4.25")
19532 (source
19533 (origin
19534 ;; There are no tests in the PyPI tarball.
19535 (method git-fetch)
19536 (uri (git-reference
19537 (url "https://github.com/chriskuehl/identify")
19538 (commit (string-append "v" version))))
19539 (file-name (git-file-name name version))
19540 (sha256
19541 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19542 (build-system python-build-system)
19543 (arguments
19544 `(#:phases
19545 (modify-phases %standard-phases
19546 (replace 'check
19547 (lambda _
19548 (invoke "pytest" "-vv"))))))
19549 (native-inputs
19550 `(("python-coverage" ,python-coverage)
19551 ("python-pytest" ,python-pytest)))
19552 (propagated-inputs
19553 `(("python-editdistance" ,python-editdistance)))
19554 (home-page "https://github.com/chriskuehl/identify")
19555 (synopsis "File identification library for Python")
19556 (description
19557 "@code{identify} is a file identification library for Python. Given
19558 a file (or some information about a file), return a set of standardized tags
19559 identifying what the file is.")
19560 (license license:expat)))
19561
19562 (define-public python-tldextract
19563 (package
19564 (name "python-tldextract")
19565 (version "2.2.0")
19566 (source
19567 (origin
19568 (method url-fetch)
19569 (uri (pypi-uri "tldextract" version))
19570 (sha256
19571 (base32
19572 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19573 (build-system python-build-system)
19574 (native-inputs
19575 `(("python-pytest" ,python-pytest)
19576 ("python-responses" ,python-responses)))
19577 (propagated-inputs
19578 `(("python-idna" ,python-idna)
19579 ("python-requests" ,python-requests)
19580 ("python-requests-file" ,python-requests-file)))
19581 (home-page
19582 "https://github.com/john-kurkowski/tldextract")
19583 (synopsis
19584 "Separate the TLD from the registered domain and subdomains of a URL")
19585 (description
19586 "TLDExtract accurately separates the TLD from the registered domain and
19587 subdomains of a URL, using the Public Suffix List. By default, this includes
19588 the public ICANN TLDs and their exceptions. It can optionally support the
19589 Public Suffix List's private domains as well.")
19590 (license license:bsd-3)))
19591
19592 (define-public python2-tldextract
19593 (package-with-python2 python-tldextract))
19594
19595 (define-public python-nodeenv
19596 (package
19597 (name "python-nodeenv")
19598 (version "1.4.0")
19599 (source
19600 (origin
19601 ;; There's no tarball in PyPI.
19602 (method git-fetch)
19603 (uri (git-reference
19604 (url "https://github.com/ekalinin/nodeenv")
19605 (commit version)))
19606 (file-name (git-file-name name version))
19607 (sha256
19608 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19609 (build-system python-build-system)
19610 (arguments
19611 `(#:phases
19612 (modify-phases %standard-phases
19613 (replace 'check
19614 (lambda _
19615 ;; This test fails. It tries to open a network socket.
19616 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19617 (native-inputs
19618 `(("python-coverage" ,python-coverage)
19619 ("python-mock" ,python-mock)
19620 ("python-pytest" ,python-pytest)))
19621 (home-page "https://ekalinin.github.io/nodeenv/")
19622 (synopsis "Create isolated node.js environments")
19623 (description
19624 "Nodeenv (node.js virtual environment) is a tool to create isolated
19625 node.js environments. It creates an environment that has its own installation
19626 directories, that doesn't share libraries with other node.js virtual
19627 environments.")
19628 (license license:bsd-3)))
19629
19630 (define-public python-pynamecheap
19631 (package
19632 (name "python-pynamecheap")
19633 (version "0.0.3")
19634 (source
19635 (origin
19636 (method url-fetch)
19637 (uri (pypi-uri "PyNamecheap" version))
19638 (sha256
19639 (base32
19640 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19641 (build-system python-build-system)
19642 (propagated-inputs
19643 `(("python-requests" ,python-requests)))
19644 (home-page
19645 "https://github.com/Bemmu/PyNamecheap")
19646 (synopsis
19647 "Namecheap API client in Python")
19648 (description
19649 "PyNamecheap is a Namecheap API client in Python.")
19650 (license license:expat)))
19651
19652 (define-public python2-pynamecheap
19653 (package-with-python2 python-pynamecheap))
19654
19655 (define-public python-dns-lexicon
19656 (package
19657 (name "python-dns-lexicon")
19658 (version "2.4.0")
19659 (source
19660 (origin
19661 (method url-fetch)
19662 (uri (pypi-uri "dns-lexicon" version))
19663 (sha256
19664 (base32
19665 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19666 (build-system python-build-system)
19667 (arguments
19668 `(#:tests? #f)) ;requires internet access
19669 (propagated-inputs
19670 `(("python-future" ,python-future)
19671 ("python-pynamecheap" ,python-pynamecheap)
19672 ("python-requests" ,python-requests)
19673 ("python-tldextract" ,python-tldextract)
19674 ("python-urllib3" ,python-urllib3)))
19675 (home-page "https://github.com/AnalogJ/lexicon")
19676 (synopsis
19677 "Manipulate DNS records on various DNS providers")
19678 (description
19679 "Lexicon provides a way to manipulate DNS records on multiple DNS
19680 providers in a standardized way. It has a CLI but it can also be used as a
19681 Python library. It was designed to be used in automation, specifically with
19682 Let's Encrypt.")
19683 (license license:expat)))
19684
19685 (define-public python2-dns-lexicon
19686 (package-with-python2 python-dns-lexicon))
19687
19688 (define-public python-cfgv
19689 (package
19690 (name "python-cfgv")
19691 (version "3.1.0")
19692 (source
19693 (origin
19694 ;; There are no tests in the PyPI tarball.
19695 (method git-fetch)
19696 (uri (git-reference
19697 (url "https://github.com/asottile/cfgv")
19698 (commit (string-append "v" version))))
19699 (file-name (git-file-name name version))
19700 (sha256
19701 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19702 (build-system python-build-system)
19703 (arguments
19704 `(#:phases
19705 (modify-phases %standard-phases
19706 (replace 'check
19707 (lambda _
19708 (invoke "pytest" "-vv"))))))
19709 (native-inputs
19710 `(("python-covdefaults" ,python-covdefaults)
19711 ("python-coverage" ,python-coverage)
19712 ("python-pytest" ,python-pytest)))
19713 (home-page "https://github.com/asottile/cfgv")
19714 (synopsis "Configuration validation library")
19715 (description
19716 "This library helps to validate configuration files and produce human
19717 readable error messages.")
19718 (license license:expat)))
19719
19720 (define-public python-commandlines
19721 (package
19722 (name "python-commandlines")
19723 (version "0.4.1")
19724 (source
19725 (origin
19726 (method url-fetch)
19727 (uri (pypi-uri "commandlines" version))
19728 (sha256
19729 (base32
19730 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19731 (build-system python-build-system)
19732 (home-page "https://github.com/chrissimpkins/commandlines")
19733 (synopsis "Command line argument to object parsing library")
19734 (description
19735 "@code{Commandlines} is a Python library for command line application
19736 development that supports command line argument parsing, command string
19737 validation testing and application logic.")
19738 (license license:expat)))
19739
19740 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19741 ;; python-numba. They have a very unflexible relationship.
19742 (define-public python-numba
19743 (package
19744 (name "python-numba")
19745 (version "0.51.2")
19746 (source
19747 (origin
19748 (method url-fetch)
19749 (uri (pypi-uri "numba" version))
19750 (sha256
19751 (base32
19752 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19753 (build-system python-build-system)
19754 (arguments
19755 `(#:phases
19756 (modify-phases %standard-phases
19757 (add-after 'unpack 'disable-proprietary-features
19758 (lambda _
19759 (setenv "NUMBA_DISABLE_HSA" "1")
19760 (setenv "NUMBA_DISABLE_CUDA" "1")
19761 #t))
19762 (replace 'check
19763 (lambda* (#:key inputs outputs #:allow-other-keys)
19764 (add-installed-pythonpath inputs outputs)
19765 ;; Something is wrong with the PYTHONPATH when running the
19766 ;; tests from the build directory, as it complains about not being
19767 ;; able to import certain modules.
19768 (with-directory-excursion "/tmp"
19769 (setenv "HOME" (getcwd))
19770 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19771 (propagated-inputs
19772 `(("python-llvmlite" ,python-llvmlite)
19773 ("python-numpy" ,python-numpy)
19774 ("python-singledispatch" ,python-singledispatch)))
19775 (native-inputs ;for tests
19776 `(("python-jinja2" ,python-jinja2)
19777 ("python-pygments" ,python-pygments)))
19778 (home-page "https://numba.pydata.org")
19779 (synopsis "Compile Python code using LLVM")
19780 (description "Numba gives you the power to speed up your applications with
19781 high performance functions written directly in Python. With a few
19782 annotations, array-oriented and math-heavy Python code can be just-in-time
19783 compiled to native machine instructions, similar in performance to C, C++ and
19784 Fortran, without having to switch languages or Python interpreters.
19785
19786 Numba works by generating optimized machine code using the LLVM compiler
19787 infrastructure at import time, runtime, or statically (using the included pycc
19788 tool).")
19789 (license license:bsd-3)))
19790
19791 (define-public python-numcodecs
19792 (package
19793 (name "python-numcodecs")
19794 (version "0.6.4")
19795 (source
19796 (origin
19797 (method url-fetch)
19798 (uri (pypi-uri "numcodecs" version))
19799 (sha256
19800 (base32
19801 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19802 (build-system python-build-system)
19803 (propagated-inputs
19804 `(("python-numpy" ,python-numpy)
19805 ("python-msgpack" ,python-msgpack)))
19806 (native-inputs
19807 `(("python-pytest" ,python-pytest)
19808 ("python-setuptools-scm" ,python-setuptools-scm)))
19809 (home-page "https://github.com/zarr-developers/numcodecs")
19810 (synopsis "Buffer compression and transformation codecs")
19811 (description
19812 "This Python package provides buffer compression and transformation
19813 codecs for use in data storage and communication applications.")
19814 (license license:expat)))
19815
19816 (define-public python-asciitree
19817 (package
19818 (name "python-asciitree")
19819 (version "0.3.3")
19820 (source
19821 (origin
19822 (method url-fetch)
19823 (uri (pypi-uri "asciitree" version))
19824 (sha256
19825 (base32
19826 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19827 (build-system python-build-system)
19828 (home-page "https://github.com/mbr/asciitree")
19829 (synopsis "Draws ASCII trees")
19830 (description "This package draws tree structures using characters.")
19831 (license license:expat)))
19832
19833 (define-public python-zarr
19834 (package
19835 (name "python-zarr")
19836 (version "2.4.0")
19837 (source
19838 (origin
19839 (method url-fetch)
19840 (uri (pypi-uri "zarr" version))
19841 (sha256
19842 (base32
19843 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19844 (build-system python-build-system)
19845 (arguments
19846 `(#:phases
19847 (modify-phases %standard-phases
19848 (add-after 'unpack 'disable-service-tests
19849 (lambda _
19850 (setenv "ZARR_TEST_ABS" "0")
19851 (setenv "ZARR_TEST_MONGO" "0")
19852 (setenv "ZARR_TEST_REDIS" "0")
19853 #t))
19854 (replace 'check
19855 (lambda _
19856 (invoke "pytest" "-vv" "-k" "not lmdb")
19857 #t)))))
19858 (propagated-inputs
19859 `(("python-asciitree" ,python-asciitree)
19860 ("python-fasteners" ,python-fasteners)
19861 ("python-numcodecs" ,python-numcodecs)
19862 ("python-numpy" ,python-numpy)))
19863 (native-inputs
19864 `(("python-pytest" ,python-pytest)
19865 ("python-setuptools-scm" ,python-setuptools-scm)))
19866 (home-page "https://github.com/zarr-developers/zarr-python")
19867 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19868 (description
19869 "This package provides an implementation of chunked, compressed,
19870 N-dimensional arrays for Python.")
19871 (license license:expat)))
19872
19873 (define-public python-anndata
19874 (package
19875 (name "python-anndata")
19876 (version "0.7.1")
19877 (source
19878 (origin
19879 (method url-fetch)
19880 (uri (pypi-uri "anndata" version))
19881 (sha256
19882 (base32
19883 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19884 (build-system python-build-system)
19885 (arguments
19886 `(#:phases
19887 (modify-phases %standard-phases
19888 (add-after 'unpack 'delete-inconvenient-tests
19889 (lambda _
19890 ;; This test depends on python-scikit-learn.
19891 (delete-file "anndata/tests/test_inplace_subset.py")
19892 #t))
19893 (delete 'check)
19894 (add-after 'install 'check
19895 (lambda* (#:key inputs outputs #:allow-other-keys)
19896 (add-installed-pythonpath inputs outputs)
19897 (invoke "pytest" "-vv"))))))
19898 (propagated-inputs
19899 `(("python-h5py" ,python-h5py)
19900 ("python-importlib-metadata" ,python-importlib-metadata)
19901 ("python-natsort" ,python-natsort)
19902 ("python-numcodecs" ,python-numcodecs)
19903 ("python-packaging" ,python-packaging)
19904 ("python-pandas" ,python-pandas)
19905 ("python-scipy" ,python-scipy)
19906 ("python-zarr" ,python-zarr)))
19907 (native-inputs
19908 `(("python-joblib" ,python-joblib)
19909 ("python-pytest" ,python-pytest)
19910 ("python-setuptools-scm" ,python-setuptools-scm)))
19911 (home-page "https://github.com/theislab/anndata")
19912 (synopsis "Annotated data for data analysis pipelines")
19913 (description "Anndata is a package for simple (functional) high-level APIs
19914 for data analysis pipelines. In this context, it provides an efficient,
19915 scalable way of keeping track of data together with learned annotations and
19916 reduces the code overhead typically encountered when using a mostly
19917 object-oriented library such as @code{scikit-learn}.")
19918 (license license:bsd-3)))
19919
19920 (define-public python-dill
19921 (package
19922 (name "python-dill")
19923 (version "0.3.1.1")
19924 (source
19925 (origin
19926 (method url-fetch)
19927 (uri (pypi-uri "dill" version))
19928 (sha256
19929 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19930 (build-system python-build-system)
19931 (arguments
19932 `(#:phases
19933 (modify-phases %standard-phases
19934 (replace 'check
19935 (lambda _
19936 (with-directory-excursion "/tmp"
19937 (invoke "nosetests" "-v"))
19938 #t)))))
19939 (native-inputs
19940 `(("python-nose" ,python-nose)))
19941 (home-page "https://pypi.org/project/dill/")
19942 (synopsis "Serialize all of Python")
19943 (description "Dill extends Python's @code{pickle} module for serializing
19944 and de-serializing Python objects to the majority of the built-in Python
19945 types. Dill provides the user the same interface as the @code{pickle} module,
19946 and also includes some additional features. In addition to pickling Python
19947 objects, @code{dill} provides the ability to save the state of an interpreter
19948 session in a single command. Hence, it would be feasible to save a
19949 interpreter session, close the interpreter, ship the pickled file to another
19950 computer, open a new interpreter, unpickle the session and thus continue from
19951 the saved state of the original interpreter session.")
19952 (license license:bsd-3)))
19953
19954 (define-public python-multiprocess
19955 (package
19956 (name "python-multiprocess")
19957 (version "0.70.9")
19958 (source
19959 (origin
19960 (method url-fetch)
19961 (uri (pypi-uri "multiprocess" version))
19962 (sha256
19963 (base32
19964 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19965 (build-system python-build-system)
19966 (arguments
19967 `(#:phases
19968 (modify-phases %standard-phases
19969 (add-after 'unpack 'disable-broken-tests
19970 (lambda _
19971 ;; This test is broken as there is no keyboard interrupt.
19972 (substitute* "py3.7/multiprocess/tests/__init__.py"
19973 (("^(.*)def test_wait_result"
19974 line indent)
19975 (string-append indent
19976 "@unittest.skip(\"Disabled by Guix\")\n"
19977 line)))
19978 #t))
19979 ;; Tests must be run after installation.
19980 (delete 'check)
19981 (add-after 'install 'check
19982 (lambda* (#:key inputs outputs #:allow-other-keys)
19983 (add-installed-pythonpath inputs outputs)
19984 (invoke "python" "-m" "multiprocess.tests")
19985 #t)))))
19986 (propagated-inputs
19987 `(("python-dill" ,python-dill)))
19988 (home-page "https://pypi.org/project/multiprocess/")
19989 (synopsis "Multiprocessing and multithreading in Python")
19990 (description
19991 "This package is a fork of the multiprocessing Python package, a package
19992 which supports the spawning of processes using the API of the standard
19993 library's @code{threading} module.")
19994 (license license:bsd-3)))
19995
19996 (define-public python-toolz
19997 (package
19998 (name "python-toolz")
19999 (version "0.9.0")
20000 (source
20001 (origin
20002 (method url-fetch)
20003 (uri (pypi-uri "toolz" version))
20004 (sha256
20005 (base32
20006 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20007 (build-system python-build-system)
20008 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20009 ;; unregistered loader type"
20010 (arguments '(#:tests? #f))
20011 (home-page "https://github.com/pytoolz/toolz/")
20012 (synopsis "List processing tools and functional utilities")
20013 (description
20014 "This package provides a set of utility functions for iterators,
20015 functions, and dictionaries.")
20016 (license license:bsd-3)))
20017
20018 (define-public python2-toolz
20019 (package-with-python2 python-toolz))
20020
20021 (define-public python-cytoolz
20022 (package
20023 (name "python-cytoolz")
20024 (version "0.9.0.1")
20025 (source
20026 (origin
20027 (method url-fetch)
20028 (uri (pypi-uri "cytoolz" version))
20029 (sha256
20030 (base32
20031 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20032 (build-system python-build-system)
20033 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20034 ;; 'exceptions'"
20035 (arguments '(#:tests? #f))
20036 (propagated-inputs
20037 `(("python-toolz" ,python-toolz)))
20038 (native-inputs
20039 `(("python-cython" ,python-cython)))
20040 (home-page "https://github.com/pytoolz/cytoolz")
20041 (synopsis "High performance functional utilities")
20042 (description
20043 "The cytoolz package implements the same API as provided by toolz. The
20044 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20045 that is accessible to other projects developed in Cython.")
20046 (license license:bsd-3)))
20047
20048 (define-public python-sortedcollections
20049 (package
20050 (name "python-sortedcollections")
20051 (version "2.1.0")
20052 (source
20053 (origin
20054 (method url-fetch)
20055 (uri (pypi-uri "sortedcollections" version))
20056 (sha256
20057 (base32
20058 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20059 (build-system python-build-system)
20060 (propagated-inputs
20061 `(("python-sortedcontainers" ,python-sortedcontainers)))
20062 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20063 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20064 (synopsis "Python Sorted Collections")
20065 (description "Sorted Collections is a Python sorted collections library.")
20066 (license license:asl2.0)))
20067
20068 (define-public python-sortedcontainers
20069 (package
20070 (name "python-sortedcontainers")
20071 (version "2.1.0")
20072 (source
20073 (origin
20074 (method url-fetch)
20075 (uri (pypi-uri "sortedcontainers" version))
20076 (sha256
20077 (base32
20078 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20079 (build-system python-build-system)
20080 (arguments
20081 ;; FIXME: Tests require many extra dependencies, and would introduce
20082 ;; a circular dependency on hypothesis, which uses this package.
20083 '(#:tests? #f))
20084 (propagated-inputs
20085 `(("python-appdirs" ,python-appdirs)
20086 ("python-distlib" ,python-distlib)
20087 ("python-filelock" ,python-filelock)
20088 ("python-six" ,python-six-bootstrap)))
20089 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20090 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20091 (description
20092 "This package provides a sorted collections library, written in
20093 pure-Python.")
20094 (license license:asl2.0)))
20095
20096 (define-public python2-sortedcontainers
20097 (package-with-python2 python-sortedcontainers))
20098
20099 (define-public python-cloudpickle
20100 (package
20101 (name "python-cloudpickle")
20102 (version "1.3.0")
20103 (source
20104 (origin
20105 (method url-fetch)
20106 (uri (pypi-uri "cloudpickle" version))
20107 (sha256
20108 (base32
20109 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20110 (build-system python-build-system)
20111 (arguments
20112 '(#:phases (modify-phases %standard-phases
20113 (add-before 'check 'do-not-override-PYTHONPATH
20114 (lambda _
20115 ;; Append to PYTHONPATH instead of overriding it so
20116 ;; that dependencies from Guix can be found.
20117 (substitute* "tests/testutils.py"
20118 (("env\\['PYTHONPATH'\\] = pythonpath")
20119 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20120 #t))
20121 (replace 'check
20122 (lambda* (#:key tests? #:allow-other-keys)
20123 (if tests?
20124 (invoke "pytest" "-s" "-vv")
20125 (format #t "test suite not run~%"))
20126 #t)))))
20127 (native-inputs
20128 `(;; For tests.
20129 ("python-psutil" ,python-psutil)
20130 ("python-pytest" ,python-pytest)
20131 ("python-tornado" ,python-tornado)))
20132 (home-page "https://github.com/cloudpipe/cloudpickle")
20133 (synopsis "Extended pickling support for Python objects")
20134 (description
20135 "Cloudpickle makes it possible to serialize Python constructs not
20136 supported by the default pickle module from the Python standard library. It
20137 is especially useful for cluster computing where Python expressions are
20138 shipped over the network to execute on remote hosts, possibly close to the
20139 data.")
20140 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20141 (license license:bsd-3)))
20142
20143 (define-public python2-cloudpickle
20144 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20145 (package
20146 (inherit base)
20147 (native-inputs
20148 `(("python-mock" ,python2-mock)
20149 ,@(package-native-inputs base)))
20150 (propagated-inputs
20151 `(("python-futures" ,python2-futures)
20152 ,@(package-propagated-inputs base))))))
20153
20154 (define-public python-locket
20155 (package
20156 (name "python-locket")
20157 (version "0.2.0")
20158 (source
20159 (origin
20160 (method url-fetch)
20161 (uri (pypi-uri "locket" version))
20162 (sha256
20163 (base32
20164 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20165 (build-system python-build-system)
20166 (home-page "https://github.com/mwilliamson/locket.py")
20167 (synopsis "File-based locks for Python")
20168 (description
20169 "Locket implements a lock that can be used by multiple processes provided
20170 they use the same path.")
20171 (license license:bsd-2)))
20172
20173 (define-public python2-locket
20174 (package-with-python2 python-locket))
20175
20176 (define-public python-blosc
20177 (package
20178 (name "python-blosc")
20179 (version "1.5.1")
20180 (source
20181 (origin
20182 (method url-fetch)
20183 (uri (pypi-uri "blosc" version))
20184 (sha256
20185 (base32
20186 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20187 (build-system python-build-system)
20188 ;; FIXME: all tests pass, but then this error is printed:
20189 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20190 (arguments '(#:tests? #f))
20191 (propagated-inputs
20192 `(("python-numpy" ,python-numpy)))
20193 (home-page "https://github.com/blosc/python-blosc")
20194 (synopsis "Python wrapper for the Blosc data compressor library")
20195 (description "Blosc is a high performance compressor optimized for binary
20196 data. It has been designed to transmit data to the processor cache faster
20197 than the traditional, non-compressed, direct memory fetch approach via a
20198 @code{memcpy()} system call.
20199
20200 Blosc works well for compressing numerical arrays that contains data with
20201 relatively low entropy, like sparse data, time series, grids with
20202 regular-spaced values, etc.
20203
20204 This Python package wraps the Blosc library.")
20205 (license license:bsd-3)))
20206
20207 (define-public python2-blosc
20208 (package-with-python2 python-blosc))
20209
20210 (define-public python-partd
20211 (package
20212 (name "python-partd")
20213 (version "0.3.9")
20214 (source
20215 (origin
20216 (method url-fetch)
20217 (uri (pypi-uri "partd" version))
20218 (sha256
20219 (base32
20220 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20221 (build-system python-build-system)
20222 (propagated-inputs
20223 `(("python-blosc" ,python-blosc)
20224 ("python-locket" ,python-locket)
20225 ("python-numpy" ,python-numpy)
20226 ("python-pandas" ,python-pandas)
20227 ("python-pyzmq" ,python-pyzmq)
20228 ("python-toolz" ,python-toolz)))
20229 (home-page "https://github.com/dask/partd/")
20230 (synopsis "Appendable key-value storage")
20231 (description "Partd stores key-value pairs. Values are raw bytes. We
20232 append on old values. Partd excels at shuffling operations.")
20233 (license license:bsd-3)))
20234
20235 (define-public python2-partd
20236 (package-with-python2 python-partd))
20237
20238 (define-public python-fsspec
20239 (package
20240 (name "python-fsspec")
20241 (version "0.6.1")
20242 (source
20243 (origin
20244 (method url-fetch)
20245 (uri (pypi-uri "fsspec" version))
20246 (sha256
20247 (base32
20248 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20249 (build-system python-build-system)
20250 (arguments '(#:tests? #f)) ; there are none
20251 (home-page "https://github.com/intake/filesystem_spec")
20252 (synopsis "File-system specification")
20253 (description "The purpose of this package is to produce a template or
20254 specification for a file-system interface, that specific implementations
20255 should follow, so that applications making use of them can rely on a common
20256 behavior and not have to worry about the specific internal implementation
20257 decisions with any given backend.")
20258 (license license:bsd-3)))
20259
20260 (define-public python-dask
20261 (package
20262 (name "python-dask")
20263 (version "2.14.0")
20264 (source
20265 (origin
20266 (method url-fetch)
20267 (uri (pypi-uri "dask" version))
20268 (sha256
20269 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20270 (build-system python-build-system)
20271 (arguments
20272 `(#:phases
20273 (modify-phases %standard-phases
20274 (add-after 'unpack 'disable-broken-tests
20275 (lambda _
20276 ;; This test is marked as xfail when pytest-xdist is used.
20277 (substitute* "dask/tests/test_threaded.py"
20278 (("def test_interrupt\\(\\)" m)
20279 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20280 m)))
20281 ;; This one fails with a type error:
20282 ;; TypeError: Already tz-aware, use tz_convert to convert.
20283 (substitute* "dask/dataframe/tests/test_shuffle.py"
20284 (("def test_set_index_timestamp\\(\\)" m)
20285 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20286 m)))
20287 #t))
20288 (replace 'check
20289 (lambda _ (invoke "pytest" "-vv"))))))
20290 (propagated-inputs
20291 `(("python-cloudpickle" ,python-cloudpickle)
20292 ("python-fsspec" ,python-fsspec)
20293 ("python-numpy" ,python-numpy)
20294 ("python-packaging" ,python-packaging)
20295 ("python-pandas" ,python-pandas)
20296 ("python-partd" ,python-partd)
20297 ("python-toolz" ,python-toolz)
20298 ("python-pyyaml" ,python-pyyaml)))
20299 (native-inputs
20300 `(("python-pytest" ,python-pytest)
20301 ("python-pytest-runner" ,python-pytest-runner)))
20302 (home-page "https://github.com/dask/dask/")
20303 (synopsis "Parallel computing with task scheduling")
20304 (description
20305 "Dask is a flexible parallel computing library for analytics. It
20306 consists of two components: dynamic task scheduling optimized for computation,
20307 and large data collections like parallel arrays, dataframes, and lists that
20308 extend common interfaces like NumPy, Pandas, or Python iterators to
20309 larger-than-memory or distributed environments. These parallel collections
20310 run on top of the dynamic task schedulers. ")
20311 (license license:bsd-3)))
20312
20313 (define-public python-ilinkedlist
20314 (package
20315 (name "python-ilinkedlist")
20316 (version "0.4.0")
20317 (source
20318 (origin
20319 (method url-fetch)
20320 (uri (pypi-uri "ilinkedlist" version))
20321 (sha256
20322 (base32
20323 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20324 (build-system python-build-system)
20325 (native-inputs `(("python-pytest" ,python-pytest)))
20326 (inputs `(("python" ,python)))
20327 (home-page "https://github.com/luther9/ilinkedlist-py")
20328 (synopsis "Immutable linked list library")
20329 (description
20330 "This is a implementation of immutable linked lists for Python. It
20331 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20332 Since a linked list is treated as immutable, it is hashable, and its length
20333 can be retrieved in constant time. Some of the terminology is inspired by
20334 LISP. It is possible to create an improper list by creating a @code{Pair}
20335 with a non-list @code{cdr}.")
20336 (license license:gpl3+)))
20337
20338 (define-public python-readlike
20339 (package
20340 (name "python-readlike")
20341 (version "0.1.3")
20342 (source
20343 (origin
20344 (method url-fetch)
20345 (uri (pypi-uri "readlike" version))
20346 (sha256
20347 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20348 (build-system python-build-system)
20349 (home-page "https://github.com/jangler/readlike")
20350 (synopsis "GNU Readline-like line editing module")
20351 (description
20352 "This Python module provides line editing functions similar to the default
20353 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20354 @code{readline} package, this one allows access to those capabilities in settings
20355 outside of a standard command-line interface. It is especially well-suited to
20356 interfacing with Urwid, due to a shared syntax for describing key inputs.
20357
20358 Currently, all stateless Readline commands are implemented. Yanking and history
20359 are not supported.")
20360 (license license:expat)))
20361
20362 (define-public python2-readlike
20363 (package-with-python2 python-readlike))
20364
20365 (define-public python-reparser
20366 (package
20367 (name "python-reparser")
20368 (version "1.4.3")
20369 (source
20370 (origin
20371 (method url-fetch)
20372 (uri (pypi-uri "ReParser" version))
20373 (sha256
20374 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20375 (build-system python-build-system)
20376 (home-page "https://github.com/xmikos/reparser")
20377 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20378 (description
20379 "This Python library provides a simple lexer/parser for inline markup based
20380 on regular expressions.")
20381 (license license:expat)))
20382
20383 (define-public python2-reparser
20384 (let ((reparser (package-with-python2
20385 (strip-python2-variant python-reparser))))
20386 (package (inherit reparser)
20387 (propagated-inputs
20388 `(("python2-enum34" ,python2-enum34)
20389 ,@(package-propagated-inputs reparser))))))
20390
20391 (define-public python-retrying
20392 (package
20393 (name "python-retrying")
20394 (version "1.3.3")
20395 (source
20396 (origin
20397 (method git-fetch)
20398 (uri (git-reference
20399 (url "https://github.com/rholder/retrying")
20400 (commit (string-append "v" version))))
20401 (file-name (git-file-name name version))
20402 (sha256
20403 (base32
20404 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20405 (build-system python-build-system)
20406 (propagated-inputs
20407 `(("python-six" ,python-six)))
20408 (home-page "https://github.com/rholder/retrying")
20409 (synopsis "Library for adding retry behavior")
20410 (description "Retrying is a general-purpose retrying library to simplify
20411 the task of adding retry behavior to just about anything.
20412
20413 Features:
20414
20415 @itemize
20416 @item Generic Decorator API.
20417 @item Specify stop condition (i.e. limit by number of attempts).
20418 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20419 @item Customize retrying on Exceptions.
20420 @item Customize retrying on expected returned result.
20421 @end itemize")
20422 (license license:asl2.0)))
20423
20424 (define-public python-pre-commit
20425 (package
20426 (name "python-pre-commit")
20427 (version "2.10.0")
20428 (source
20429 (origin
20430 (method url-fetch)
20431 (uri (pypi-uri "pre_commit" version))
20432 (sha256
20433 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20434 (build-system python-build-system)
20435 (arguments
20436 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20437 ;; attribute 'empty_template_setup'".
20438 `(#:tests? #false))
20439 (propagated-inputs
20440 `(("python-cfgv" ,python-cfgv)
20441 ("python-identify" ,python-identify)
20442 ("python-importlib-metadata" ,python-importlib-metadata)
20443 ("python-importlib-resources" ,python-importlib-resources)
20444 ("python-nodeenv" ,python-nodeenv)
20445 ("python-pyyaml" ,python-pyyaml)
20446 ("python-toml" ,python-toml)
20447 ("python-virtualenv" ,python-virtualenv)))
20448 (home-page "https://github.com/pre-commit/pre-commit")
20449 (synopsis "Framework for managing multi-language pre-commit hooks")
20450 (description
20451 "This package provides a framework for managing and maintaining
20452 multi-language pre-commit hooks.")
20453 (license license:expat)))
20454
20455 (define-public python-precis-i18n
20456 (package
20457 (name "python-precis-i18n")
20458 (version "1.0.0")
20459 (source
20460 (origin
20461 (method url-fetch)
20462 (uri (pypi-uri "precis_i18n" version))
20463 (sha256
20464 (base32
20465 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20466 (build-system python-build-system)
20467 (home-page "https://github.com/byllyfish/precis_i18n")
20468 (synopsis "Implementation of the PRECIS framework")
20469 (description
20470 "This module implements the PRECIS Framework as described in RFC 8264,
20471 RFC 8265 and RFC 8266.")
20472 (license license:expat)))
20473
20474 (define-public python-absl-py
20475 (package
20476 (name "python-absl-py")
20477 (version "0.6.1")
20478 (source
20479 (origin
20480 (method url-fetch)
20481 (uri (pypi-uri "absl-py" version))
20482 (sha256
20483 (base32
20484 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20485 (build-system python-build-system)
20486 (propagated-inputs
20487 `(("python-six" ,python-six)))
20488 (home-page "https://github.com/abseil/abseil-py")
20489 (synopsis "Abseil Python common libraries")
20490 (description
20491 "This package provides the Abseil Python Common Libraries, a collection
20492 of Python libraries for building Python applications.")
20493 (license license:asl2.0)))
20494
20495 (define-public python-astor
20496 (package
20497 (name "python-astor")
20498 (version "0.7.1")
20499 (source
20500 (origin
20501 (method url-fetch)
20502 (uri (pypi-uri "astor" version))
20503 (sha256
20504 (base32
20505 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20506 (build-system python-build-system)
20507 ;; FIXME: There are two errors and two test failures.
20508 (arguments `(#:tests? #f))
20509 (home-page "https://github.com/berkerpeksag/astor")
20510 (synopsis "Read and write Python ASTs")
20511 (description "Astor is designed to allow easy manipulation of Python
20512 source via the Abstract Syntax Tree.")
20513 (license license:bsd-3)))
20514
20515 (define-public python2-astor
20516 (package-with-python2 python-astor))
20517
20518 (define-public python-astunparse
20519 (package
20520 (name "python-astunparse")
20521 (version "1.6.2")
20522 (source
20523 (origin
20524 (method url-fetch)
20525 (uri (pypi-uri "astunparse" version))
20526 (sha256
20527 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20528 (build-system python-build-system)
20529 (arguments '(#:tests? #f)) ; there are none
20530 (propagated-inputs
20531 `(("python-six" ,python-six)
20532 ("python-wheel" ,python-wheel)))
20533 (home-page "https://github.com/simonpercivall/astunparse")
20534 (synopsis "AST unparser for Python")
20535 (description "This package provides an AST unparser for Python. It is a
20536 factored out version of @code{unparse} found in the Python source
20537 distribution.")
20538 (license license:bsd-3)))
20539
20540 (define-public python-gast
20541 (package
20542 (name "python-gast")
20543 (version "0.3.3")
20544 (source
20545 (origin
20546 (method url-fetch)
20547 (uri (pypi-uri "gast" version))
20548 (sha256
20549 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20550 (build-system python-build-system)
20551 (propagated-inputs
20552 `(("python-astunparse" ,python-astunparse)))
20553 (home-page "https://pypi.org/project/gast/")
20554 (synopsis "Generic Python AST that abstracts the underlying Python version")
20555 (description
20556 "GAST provides a compatibility layer between the AST of various Python
20557 versions, as produced by @code{ast.parse} from the standard @code{ast}
20558 module.")
20559 (license license:bsd-3)))
20560
20561 (define-public python-wikidata
20562 (package
20563 (name "python-wikidata")
20564 (version "0.6.1")
20565 (source
20566 (origin
20567 (method url-fetch)
20568 (uri (pypi-uri "Wikidata" version))
20569 (sha256
20570 (base32
20571 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20572 (build-system python-build-system)
20573 (propagated-inputs
20574 `(("python-babel" ,python-babel)))
20575 (home-page "https://github.com/dahlia/wikidata")
20576 (synopsis "Wikidata client library")
20577 (description
20578 "This package provides a Python interface to
20579 @url{https://www.wikidata.org/, Wikidata}.")
20580 (properties '((upstream-name . "Wikidata")))
20581 (license license:gpl3+)))
20582
20583 (define-public python-doctest-ignore-unicode
20584 (package
20585 (name "python-doctest-ignore-unicode")
20586 (version "0.1.2")
20587 (source
20588 (origin
20589 (method url-fetch)
20590 (uri (pypi-uri "doctest-ignore-unicode" version))
20591 (sha256
20592 (base32
20593 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20594 (build-system python-build-system)
20595 (native-inputs
20596 `(("python-nose" ,python-nose)))
20597 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20598 (synopsis "Ignore Unicode literal prefixes in doctests")
20599 (description
20600 "This package adds support for a flag to ignore Unicode literal prefixes
20601 in doctests.")
20602 (license license:asl2.0)))
20603
20604 (define-public python-attr
20605 (package
20606 (name "python-attr")
20607 (version "0.3.1")
20608 (source
20609 (origin
20610 (method url-fetch)
20611 (uri (pypi-uri "attr" version))
20612 (sha256
20613 (base32
20614 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20615 (build-system python-build-system)
20616 (home-page "https://github.com/denis-ryzhkov/attr")
20617 (synopsis "Decorator for attributes of target function or class")
20618 (description "Simple decorator to set attributes of target function or
20619 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20620 (license license:expat)))
20621
20622 (define-public python-construct
20623 (package
20624 (name "python-construct")
20625 (version "2.10.56")
20626 (source
20627 (origin
20628 (method url-fetch)
20629 (uri (pypi-uri "construct" version))
20630 (sha256
20631 (base32
20632 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20633 (build-system python-build-system)
20634 (arguments
20635 `(#:tests? #f)) ; No tests exist.
20636 (propagated-inputs
20637 `(("python-extras" ,python-extras)
20638 ("python-arrow" ,python-arrow)
20639 ("python-numpy" ,python-numpy)
20640 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20641 (home-page "https://construct.readthedocs.io")
20642 (synopsis "Declarative and symmetrical parser and builder for binary data")
20643 (description
20644 "This package provides both simple, atomic constructs (such as
20645 integers of various sizes), as well as composite ones which allow you
20646 form hierarchical and sequential structures of increasing complexity.
20647 It features bit and byte granularity, easy debugging and testing, an
20648 easy-to-extend subclass system, and lots of primitive constructs to
20649 make your work easier.")
20650 (license license:expat)))
20651
20652 (define-public python-outcome
20653 (package
20654 (name "python-outcome")
20655 (version "1.0.1")
20656 (source
20657 (origin
20658 (method url-fetch)
20659 (uri (pypi-uri "outcome" version))
20660 (sha256
20661 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20662 (build-system python-build-system)
20663 (arguments
20664 `(#:phases
20665 (modify-phases %standard-phases
20666 (replace 'check
20667 (lambda* (#:key inputs outputs #:allow-other-keys)
20668 (add-installed-pythonpath inputs outputs)
20669 (invoke "pytest" "-vv"))))))
20670 (native-inputs
20671 `(("python-pytest" ,python-pytest)
20672 ("python-pytest-cov" ,python-pytest-cov)
20673 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20674 (propagated-inputs
20675 `(("python-async-generator" ,python-async-generator)
20676 ("python-attrs" ,python-attrs)))
20677 (home-page "https://github.com/python-trio/outcome")
20678 (synopsis "Capture the outcome of Python function calls")
20679 (description
20680 "Capture the outcome of Python function calls. Extracted from the Trio
20681 project.")
20682 ;; Either license applies.
20683 (license (list license:expat license:asl2.0))))
20684
20685 (define-public python-trio
20686 (package
20687 (name "python-trio")
20688 (version "0.17.0")
20689 (source
20690 (origin
20691 (method url-fetch)
20692 (uri (pypi-uri "trio" version))
20693 (sha256
20694 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20695 (build-system python-build-system)
20696 (arguments
20697 `(#:phases
20698 (modify-phases %standard-phases
20699 (add-before 'check 'change-home
20700 (lambda _
20701 ;; Tests require a writable home.
20702 (setenv "HOME" "/tmp")
20703 #t))
20704 (replace 'check
20705 (lambda _
20706 (invoke "pytest" "-vv" "-k"
20707 (string-append
20708 ;; This test times out.
20709 "not test_ki_protection_works"
20710 ;; Assertion errors.
20711 " and not test_guest_mode_ki"
20712 " and not test_run_in_trio_thread_ki"
20713 ;; These try to raise KeyboardInterrupt which does not work
20714 ;; in the build environment.
20715 " and not test_ki_self"
20716 " and not test_ki_wakes_us_up"
20717 ;; Failure in name resolution.
20718 " and not test_getnameinfo"
20719 " and not test_SocketType_resolve"
20720 ;; OSError: protocol not found.
20721 " and not test_getprotobyname")))))))
20722 (native-inputs
20723 `(("python-astor" ,python-astor)
20724 ("python-ipython" ,python-ipython)
20725 ("python-jedi" ,python-jedi)
20726 ("python-pylint" ,python-pylint)
20727 ("python-pyopenssl" ,python-pyopenssl)
20728 ("python-pytest" ,python-pytest)
20729 ("python-pytest-cov" ,python-pytest-cov)
20730 ("python-trustme" ,python-trustme)))
20731 (propagated-inputs
20732 `(("python-attrs" ,python-attrs)
20733 ("python-idna" ,python-idna)
20734 ("python-outcome" ,python-outcome)
20735 ("python-sniffio" ,python-sniffio)
20736 ("python-sortedcontainers"
20737 ,python-sortedcontainers)))
20738 (home-page "https://github.com/python-trio/trio")
20739 (synopsis "Friendly Python library for async concurrency and I/O")
20740 (description
20741 "Trio strives to be a production-quality, async/await-native I/O library
20742 for Python. Like all async libraries, its main purpose is to help you write
20743 programs that do multiple things at the same time with parallelized I/O.")
20744 ;; Either license applies.
20745 (license (list license:expat license:asl2.0))))
20746
20747 (define-public python-trio-typing
20748 (package
20749 (name "python-trio-typing")
20750 (version "0.5.0")
20751 (source
20752 (origin
20753 (method url-fetch)
20754 (uri (pypi-uri "trio-typing" version))
20755 (sha256
20756 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20757 (build-system python-build-system)
20758 (arguments
20759 `(#:phases
20760 (modify-phases %standard-phases
20761 (replace 'check
20762 (lambda _
20763 (invoke "pytest" "-vv"))))))
20764 (native-inputs
20765 `(("python-attrs" ,python-attrs)
20766 ("python-pytest" ,python-pytest)))
20767 (propagated-inputs
20768 `(("python-mypy" ,python-mypy)
20769 ("python-mypy-extensions"
20770 ,python-mypy-extensions)
20771 ("python-trio" ,python-trio)
20772 ("python-typing-extensions"
20773 ,python-typing-extensions)))
20774 (home-page "https://github.com/python-trio/trio-typing")
20775 (synopsis "Static type checking support for Trio and related projects")
20776 (description
20777 "This package provides:
20778
20779 @itemize
20780 @item PEP 561 typing stubs packages for the Trio project packages:
20781
20782 @itemize
20783 @item trio (@code{trio-stubs})
20784 @item outcome (@code{outcome-stubs})
20785 @item async_generator (@code{async_generator-stubs})
20786 @end itemize
20787
20788 @item A package @code{trio_typing} containing types that Trio programs often
20789 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20790 a mypy plugin that smooths over some limitations in the basic type hints.
20791 @end itemize")
20792 ;; Either license applies.
20793 (license (list license:expat license:asl2.0))))
20794
20795 (define-public python-humanize
20796 (package
20797 (name "python-humanize")
20798 (version "0.5.1")
20799 (source
20800 (origin
20801 (method url-fetch)
20802 (uri (pypi-uri "humanize" version))
20803 (sha256
20804 (base32
20805 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20806 (arguments
20807 '(#:tests? #f)) ; tests not in pypi archive
20808 (build-system python-build-system)
20809 (home-page "https://github.com/jmoiron/humanize")
20810 (synopsis "Print numerical information in a human-readable form")
20811 (description "This package provides a Python module that displays numbers
20812 and dates in \"human readable\" forms. For example, it would display
20813 \"12345591313\" as \"12.3 billion\".")
20814 (license license:expat)))
20815
20816 (define-public python-txaio
20817 (package
20818 (name "python-txaio")
20819 (version "18.8.1")
20820 (source
20821 (origin
20822 (method url-fetch)
20823 (uri (pypi-uri "txaio" version))
20824 (sha256
20825 (base32
20826 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20827 (build-system python-build-system)
20828 (propagated-inputs
20829 `(("python-twisted" ,python-twisted)
20830 ("python-six" ,python-six)))
20831 (home-page "https://github.com/crossbario/txaio")
20832 (synopsis "Compatibility layer between Python asyncio and Twisted")
20833 (description "Txaio provides a compatibility layer between the Python
20834 @code{asyncio} module and @code{Twisted}.")
20835 (license license:expat)))
20836
20837 (define-public python-toolshed
20838 (package
20839 (name "python-toolshed")
20840 (version "0.4.6")
20841 (source
20842 (origin
20843 (method url-fetch)
20844 (uri (pypi-uri "toolshed" version))
20845 (sha256
20846 (base32
20847 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20848 (build-system python-build-system)
20849 (native-inputs
20850 `(("python-nose" ,python-nose)))
20851 (home-page "https://github.com/brentp/toolshed/")
20852 (synopsis "Collection of modules and functions for working with data")
20853 (description "This is a collection of well-tested, simple modules and
20854 functions that aim to reduce boilerplate when working with data.")
20855 (license license:bsd-2)))
20856
20857 (define-public python-annoy
20858 (package
20859 (name "python-annoy")
20860 (version "1.15.1")
20861 (source
20862 (origin
20863 (method url-fetch)
20864 (uri (pypi-uri "annoy" version))
20865 (sha256
20866 (base32
20867 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20868 (build-system python-build-system)
20869 (native-inputs
20870 `(("python-nose" ,python-nose)))
20871 (home-page "https://github.com/spotify/annoy/")
20872 (synopsis "Approximate nearest neighbors library")
20873 (description
20874 "Annoy is a C++ library with Python bindings to search for points in
20875 space that are close to a given query point. It also creates large read-only
20876 file-based data structures that are @code{mmap}ped into memory so that many
20877 processes may share the same data.")
20878 (license license:asl2.0)))
20879
20880 (define-public python-croniter
20881 (package
20882 (name "python-croniter")
20883 (version "0.3.34")
20884 (source (origin
20885 (method url-fetch)
20886 (uri (pypi-uri "croniter" version))
20887 (sha256
20888 (base32
20889 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20890 (build-system python-build-system)
20891 (propagated-inputs
20892 `(("python-dateutil" ,python-dateutil)
20893 ("python-natsort" ,python-natsort)))
20894 (home-page "https://github.com/kiorky/croniter")
20895 (synopsis "Iterate datetime objects with cron-like syntax")
20896 (description
20897 "@code{croniter} provides iteration for datetime object with cron-like
20898 format.")
20899 (license license:expat)))
20900
20901 (define-public python-pylzma
20902 (package
20903 (name "python-pylzma")
20904 (version "0.5.0")
20905 (source
20906 (origin
20907 (method url-fetch)
20908 (uri (pypi-uri "pylzma" version))
20909 (sha256
20910 (base32
20911 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20912 (build-system python-build-system)
20913 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20914 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20915 (description "This package provides Python bindings for the LZMA library
20916 by Igor Pavlov.")
20917 (license license:lgpl2.1+)))
20918
20919 (define-public python2-pylzma
20920 (package-with-python2 python-pylzma))
20921
20922 (define-public python2-zeroconf
20923 (package
20924 (name "python2-zeroconf")
20925
20926 ;; This is the last version that supports Python 2.x.
20927 (version "0.19.1")
20928 (source
20929 (origin
20930 (method url-fetch)
20931 (uri (pypi-uri "zeroconf" version))
20932 (sha256
20933 (base32
20934 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20935 (build-system python-build-system)
20936 (arguments
20937 `(#:python ,python-2
20938 #:phases
20939 (modify-phases %standard-phases
20940 (add-after 'unpack 'patch-requires
20941 (lambda* (#:key inputs #:allow-other-keys)
20942 (substitute* "setup.py"
20943 (("enum-compat")
20944 "enum34"))
20945 #t)))))
20946 (native-inputs
20947 `(("python2-six" ,python2-six)
20948 ("python2-enum32" ,python2-enum34)
20949 ("python2-netifaces" ,python2-netifaces)
20950 ("python2-typing" ,python2-typing)))
20951 (home-page "https://github.com/jstasiak/python-zeroconf")
20952 (synopsis "Pure Python mDNS service discovery")
20953 (description
20954 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20955 compatible).")
20956 (license license:lgpl2.1+)))
20957
20958 (define-public python-bsddb3
20959 (package
20960 (name "python-bsddb3")
20961 (version "6.2.6")
20962 (source
20963 (origin
20964 (method url-fetch)
20965 (uri (pypi-uri "bsddb3" version))
20966 (sha256
20967 (base32
20968 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20969 (build-system python-build-system)
20970 (inputs
20971 `(("bdb" ,bdb)))
20972 (arguments
20973 '(#:phases
20974 (modify-phases %standard-phases
20975 (add-after 'unpack 'configure-locations
20976 (lambda* (#:key inputs #:allow-other-keys)
20977 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20978 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20979 #t))
20980 (replace 'check
20981 (lambda _
20982 (invoke "python3" "test3.py" "-v"))))))
20983 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20984 (synopsis "Python bindings for Oracle Berkeley DB")
20985 (description
20986 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20987 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20988 Transaction objects, and each of these is exposed as a Python type in the
20989 bsddb3.db module. The database objects can use various access methods: btree,
20990 hash, recno, and queue. Complete support of Berkeley DB distributed
20991 transactions. Complete support for Berkeley DB Replication Manager.
20992 Complete support for Berkeley DB Base Replication. Support for RPC.")
20993 (license license:bsd-3)))
20994
20995 (define-public python-dbfread
20996 (package
20997 (name "python-dbfread")
20998 (version "2.0.7")
20999 (source (origin
21000 (method url-fetch)
21001 (uri (pypi-uri "dbfread" version))
21002 (sha256
21003 (base32
21004 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21005 (build-system python-build-system)
21006 (native-inputs
21007 `(("python-pytest" ,python-pytest)))
21008 (home-page "https://dbfread.readthedocs.io")
21009 (synopsis "Read DBF Files with Python")
21010 (description
21011 "This library reads DBF files and returns the data as native Python data
21012 types for further processing. It is primarily intended for batch jobs and
21013 one-off scripts.")
21014 (license license:expat)))
21015
21016 (define-public python-cached-property
21017 (package
21018 (name "python-cached-property")
21019 (version "1.5.1")
21020 (source
21021 (origin
21022 (method url-fetch)
21023 (uri (pypi-uri "cached-property" version))
21024 (sha256
21025 (base32
21026 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21027 (build-system python-build-system)
21028 (arguments
21029 `(#:phases
21030 (modify-phases %standard-phases
21031 ;; https://github.com/pydanny/cached-property/issues/131
21032 ;; recent versions of freezegun break one test
21033 (add-after 'unpack 'disable-broken-test
21034 (lambda _
21035 (substitute* "tests/test_cached_property.py"
21036 (("def test_threads_ttl_expiry\\(self\\)" m)
21037 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21038 " " m)))
21039 #t)))))
21040 (native-inputs
21041 `(("python-freezegun" ,python-freezegun)))
21042 (home-page
21043 "https://github.com/pydanny/cached-property")
21044 (synopsis
21045 "Decorator for caching properties in classes")
21046 (description
21047 "This package provides a decorator which makes caching
21048 time-or-computationally-expensive properties quick and easy and works in Python
21049 2 or 3.")
21050 (license license:bsd-3)))
21051
21052 (define-public python-folium
21053 (package
21054 (name "python-folium")
21055 (version "0.12.1")
21056 (source
21057 (origin
21058 ;; PyPI has a ".whl" file but not a proper source release.
21059 ;; Thus, fetch code from Git.
21060 (method git-fetch)
21061 (uri (git-reference
21062 (url "https://github.com/python-visualization/folium")
21063 (commit (string-append "v" version))))
21064 (file-name (git-file-name name version))
21065 (sha256
21066 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21067 (build-system python-build-system)
21068 (propagated-inputs
21069 `(("python-branca" ,python-branca)
21070 ("python-jinja2" ,python-jinja2)
21071 ("python-numpy" ,python-numpy)
21072 ("python-requests" ,python-requests)))
21073 (native-inputs
21074 `(("python-pytest" ,python-pytest)))
21075 (home-page "https://github.com/python-visualization/folium")
21076 (synopsis "Make beautiful maps with Leaflet.js & Python")
21077 (description "@code{folium} makes it easy to visualize data that’s been
21078 manipulated in Python on an interactive leaflet map. It enables both the
21079 binding of data to a map for @code{choropleth} visualizations as well as
21080 passing rich vector/raster/HTML visualizations as markers on the map.
21081
21082 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21083 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21084 supports Image, Video, GeoJSON and TopoJSON overlays.")
21085 (license license:expat)))
21086
21087 (define-public jube
21088 (package
21089 ;; This is a command-line tool, so no "python-" prefix.
21090 (name "jube")
21091 (version "2.2.2")
21092 (source (origin
21093 (method url-fetch)
21094 (uri (string-append
21095 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21096 version))
21097 (sha256
21098 (base32
21099 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21100 (file-name (string-append "jube-" version ".tar.gz"))))
21101 (build-system python-build-system)
21102 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21103 (synopsis "Benchmarking environment")
21104 (description
21105 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21106 benchmarked application, benchmark data is stored in a format that allows JUBE
21107 to deduct the desired information. This data can be parsed by automatic pre-
21108 and post-processing scripts that draw information and store it more densely
21109 for manual interpretation.")
21110 (license license:gpl3+)))
21111
21112 (define-public python-pyroutelib3
21113 (package
21114 (name "python-pyroutelib3")
21115 (version "1.3.post1")
21116 (source
21117 (origin
21118 (method url-fetch)
21119 (uri (pypi-uri "pyroutelib3" version))
21120 (sha256
21121 (base32
21122 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21123 (build-system python-build-system)
21124 (propagated-inputs
21125 `(("python-dateutil" ,python-dateutil)))
21126 (home-page "https://github.com/MKuranowski/pyroutelib3")
21127 (synopsis "Library for simple routing on OSM data")
21128 (description "Library for simple routing on OSM data")
21129 (license license:gpl3+)))
21130
21131 (define-public python-bibtexparser
21132 (package
21133 (name "python-bibtexparser")
21134 (version "1.1.0")
21135 (source
21136 (origin
21137 (method url-fetch)
21138 (uri (pypi-uri "bibtexparser" version))
21139 (sha256
21140 (base32
21141 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21142 (build-system python-build-system)
21143 (propagated-inputs
21144 `(("python-pyparsing" ,python-pyparsing)))
21145 (native-inputs
21146 `(("python-future" ,python-future)))
21147 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21148 (synopsis "Python library to parse BibTeX files")
21149 (description "BibtexParser is a Python library to parse BibTeX files.")
21150 (license (list license:bsd-3 license:lgpl3))))
21151
21152 (define-public python-distro
21153 (package
21154 (name "python-distro")
21155 (version "1.4.0")
21156 (source
21157 (origin
21158 (method url-fetch)
21159 (uri (pypi-uri "distro" version))
21160 (sha256
21161 (base32
21162 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21163 (build-system python-build-system)
21164 (native-inputs
21165 `(("python-pytest" ,python-pytest)))
21166 (home-page "https://github.com/nir0s/distro")
21167 (synopsis
21168 "OS platform information API")
21169 (description
21170 "@code{distro} provides information about the OS distribution it runs on,
21171 such as a reliable machine-readable ID, or version information.
21172
21173 It is the recommended replacement for Python's original
21174 `platform.linux_distribution` function (which will be removed in Python 3.8).
21175 @code{distro} also provides a command-line interface to output the platform
21176 information in various formats.")
21177 (license license:asl2.0)))
21178
21179 (define-public python-cairosvg
21180 (package
21181 (name "python-cairosvg")
21182 (version "2.5.0")
21183 (source
21184 (origin
21185 (method url-fetch)
21186 (uri (pypi-uri "CairoSVG" version))
21187 (sha256
21188 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21189 (build-system python-build-system)
21190 (arguments
21191 `(#:phases
21192 (modify-phases %standard-phases
21193 (replace 'check
21194 (lambda _ (invoke "pytest"))))))
21195 (propagated-inputs
21196 `(("python-cairocffi" ,python-cairocffi)
21197 ("python-cssselect2" ,python-cssselect2)
21198 ("python-defusedxml" ,python-defusedxml)
21199 ("python-pillow" ,python-pillow)
21200 ("python-tinycss2" ,python-tinycss2)))
21201 (native-inputs
21202 `(("python-pytest-flake8" ,python-pytest-flake8)
21203 ("python-pytest-isort" ,python-pytest-isort)
21204 ("python-pytest-runner" ,python-pytest-runner)))
21205 (home-page "https://cairosvg.org/")
21206 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21207 (description "CairoSVG is a SVG converter based on Cairo. It can export
21208 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21209 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21210 parsed, the result is drawn to a Cairo surface that can be exported to
21211 qvarious formats: PDF, PostScript, PNG and even SVG.")
21212 (license license:lgpl3+)))
21213
21214 (define-public python-pyphen
21215 (package
21216 (name "python-pyphen")
21217 (version "0.10.0")
21218 (source
21219 (origin
21220 (method url-fetch)
21221 (uri (pypi-uri "Pyphen" version))
21222 (sha256
21223 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21224 (build-system python-build-system)
21225 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21226 ;; embedded set provided by upstream - like Debian does.
21227 (home-page "https://github.com/Kozea/Pyphen")
21228 (synopsis "Pure Python module to hyphenate text")
21229 (description "Pyphen is a pure Python module to hyphenate text using
21230 existing Hunspell hyphenation dictionaries.")
21231 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21232
21233 (define-public python-intelhex
21234 (package
21235 (name "python-intelhex")
21236 (version "2.2.1")
21237 (source
21238 (origin
21239 (method url-fetch)
21240 (uri (pypi-uri "intelhex" version))
21241 (sha256
21242 (base32
21243 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21244 (build-system python-build-system)
21245 (arguments '(#:tests? #f)) ;issue with version
21246 (home-page "https://pypi.org/project/IntelHex/")
21247 (synopsis "Python library for Intel HEX files manipulations")
21248 (description "The Intel HEX file format is widely used in microprocessors
21249 and microcontrollers area (embedded systems etc.) as the de facto standard for
21250 representation of code to be programmed into microelectronic devices. This
21251 package provides an intelhex Python library to read, write, create from
21252 scratch and manipulate data from Intel HEX file format. It also includes
21253 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21254 converters and more, those based on the library itself.")
21255 (license license:bsd-3)))
21256
21257 (define-public python-pykwalify
21258 (package
21259 (name "python-pykwalify")
21260 (version "1.7.0")
21261 (source
21262 (origin
21263 (method url-fetch)
21264 (uri (pypi-uri "pykwalify" version))
21265 (sha256
21266 (base32
21267 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21268 (build-system python-build-system)
21269 (arguments '(#:tests? #f)) ;missing dependencies
21270 (propagated-inputs
21271 `(("python-dateutil" ,python-dateutil)
21272 ("python-docopt" ,python-docopt)
21273 ("python-pyyaml" ,python-pyyaml)))
21274 (home-page "https://github.com/grokzen/pykwalify")
21275 (synopsis
21276 "Python lib/cli for JSON/YAML schema validation")
21277 (description
21278 "This package provides a parser, schema validator, and data binding tool
21279 for YAML and JSON.")
21280 (license license:expat)))
21281
21282 (define-public python-dbusmock
21283 (package
21284 (name "python-dbusmock")
21285 (version "0.18.3")
21286 (source
21287 (origin
21288 (method url-fetch)
21289 (uri (pypi-uri "python-dbusmock" version))
21290 (sha256
21291 (base32
21292 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21293 (build-system python-build-system)
21294 (arguments
21295 '(#:phases
21296 (modify-phases %standard-phases
21297 (add-after 'unpack 'patch-shell-path
21298 (lambda _
21299 (substitute* "tests/test_code.py"
21300 (("/bin/bash") (which "bash")))
21301 #t)))))
21302 (native-inputs
21303 `(;; For tests.
21304 ("dbus" ,dbus) ; for dbus-daemon
21305 ("python-nose" ,python-nose)
21306 ("which" ,which)))
21307 (propagated-inputs
21308 `(("python-dbus" ,python-dbus)
21309 ("python-pygobject" ,python-pygobject)))
21310 (home-page "https://github.com/martinpitt/python-dbusmock")
21311 (synopsis "Python library for mock D-Bus objects")
21312 (description "python-dbusmock allows for the easy creation of mock objects on
21313 D-Bus. This is useful for writing tests for software which talks to D-Bus
21314 services such as upower, systemd, logind, gnome-session or others, and it is
21315 hard (or impossible without root privileges) to set the state of the real
21316 services to what you expect in your tests.")
21317 (license license:lgpl3+)))
21318
21319 (define-public python-jsonplus
21320 (package
21321 (name "python-jsonplus")
21322 (version "0.8.0")
21323 (home-page "https://github.com/randomir/jsonplus")
21324 (source (origin
21325 (method url-fetch)
21326 (uri (pypi-uri "jsonplus" version))
21327 (sha256
21328 (base32
21329 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21330 (build-system python-build-system)
21331 ;; XXX: No tests on PyPI, and the repository has no tags.
21332 (arguments '(#:tests? #f))
21333 (propagated-inputs
21334 `(("python-dateutil" ,python-dateutil)
21335 ("python-simplejson" ,python-simplejson)
21336 ("python-sortedcontainers" ,python-sortedcontainers)))
21337 (synopsis "Serialize Python types to/from JSON")
21338 (description
21339 "This package provides functionality to serialize arbitrary data types
21340 to and from JSON. Common data types are implemented and it is easy to
21341 register custom encoders and decoders.")
21342 (license license:expat)))
21343
21344 (define-public python-ujson
21345 (package
21346 (name "python-ujson")
21347 (version "4.0.2")
21348 (source
21349 (origin
21350 (method url-fetch)
21351 (uri (pypi-uri "ujson" version))
21352 (sha256
21353 (base32
21354 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21355 (modules '((guix build utils)))
21356 (snippet
21357 '(begin (delete-file-recursively "deps") #t))))
21358 (build-system python-build-system)
21359 (arguments
21360 `(#:phases
21361 (modify-phases %standard-phases
21362 (add-after 'unpack 'link-to-system-double-conversion
21363 (lambda* (#:key inputs #:allow-other-keys)
21364 (let ((d-c (assoc-ref inputs "double-conversion")))
21365 (substitute* "setup.py"
21366 (("./deps/double-conversion/double-conversion\"")
21367 (string-append d-c "/include/double-conversion\""))
21368 (("-lstdc++" stdc)
21369 (string-append "-L" d-c "/lib\","
21370 " \"-ldouble-conversion\","
21371 " \"" stdc)))
21372 #t)))
21373 (replace 'check
21374 (lambda* (#:key inputs outputs #:allow-other-keys)
21375 (add-installed-pythonpath inputs outputs)
21376 (invoke "pytest"))))))
21377 (native-inputs
21378 `(("double-conversion" ,double-conversion)
21379 ("python-setuptools-scm" ,python-setuptools-scm)
21380 ("python-pytest" ,python-pytest)))
21381 (home-page "https://github.com/ultrajson/ultrajson")
21382 (synopsis "Ultra fast JSON encoder and decoder for Python")
21383 (description
21384 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21385 bindings for Python 3.")
21386 (license license:bsd-3)))
21387
21388 (define-public python-iocapture
21389 ;; The latest release is more than a year older than this commit.
21390 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21391 (revision "1"))
21392 (package
21393 (name "python-iocapture")
21394 (version "0.1.2")
21395 (source
21396 (origin
21397 (method git-fetch)
21398 (uri (git-reference
21399 (url "https://github.com/oinume/iocapture")
21400 (commit commit)))
21401 (file-name (git-file-name name version))
21402 (sha256
21403 (base32
21404 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21405 (build-system python-build-system)
21406 (arguments
21407 `(#:phases
21408 (modify-phases %standard-phases
21409 (delete 'check)
21410 (add-after 'install 'check
21411 (lambda* (#:key inputs outputs #:allow-other-keys)
21412 (add-installed-pythonpath inputs outputs)
21413 (invoke "py.test" "-v" "tests")
21414 #t)))))
21415 (propagated-inputs
21416 `(("python-flexmock" ,python-flexmock)
21417 ("python-pytest" ,python-pytest)
21418 ("python-pytest-cov" ,python-pytest-cov)
21419 ("python-six" ,python-six)))
21420 (home-page "https://github.com/oinume/iocapture")
21421 (synopsis "Python capturing tool for stdout and stderr")
21422 (description
21423 "This package helps you to capture the standard out (stdout) and the
21424 standard error channel (stderr) in your program.")
21425 (license license:expat))))
21426
21427 (define-public python-argh
21428 ;; There are 21 commits since the latest release containing important
21429 ;; improvements.
21430 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21431 (revision "1"))
21432 (package
21433 (name "python-argh")
21434 (version (git-version "0.26.2" revision commit))
21435 (source
21436 (origin
21437 (method git-fetch)
21438 (uri (git-reference
21439 (url "https://github.com/neithere/argh")
21440 (commit commit)))
21441 (file-name (git-file-name name version))
21442 (sha256
21443 (base32
21444 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21445 (build-system python-build-system)
21446 (propagated-inputs
21447 `(("python-iocapture" ,python-iocapture)
21448 ("python-mock" ,python-mock)
21449 ("python-pytest" ,python-pytest)
21450 ("python-pytest-cov" ,python-pytest-cov)
21451 ("python-pytest-xdist" ,python-pytest-xdist)
21452 ("python-tox" ,python-tox)))
21453 (home-page "https://github.com/neithere/argh/")
21454 (synopsis "Argparse wrapper with natural syntax")
21455 (description
21456 "python-argh is a small library that provides several layers of
21457 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21458 always possible to declare a command with the highest possible (and least
21459 flexible) layer and then tune the behaviour with any of the lower layers
21460 including the native API of @code{python-argparse}.")
21461 (license license:lgpl3+))))
21462
21463 (define-public python-ppft
21464 (package
21465 (name "python-ppft")
21466 (version "1.6.6.1")
21467 (source
21468 (origin
21469 (method url-fetch)
21470 (uri (pypi-uri "ppft" version))
21471 (sha256
21472 (base32
21473 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21474 (build-system python-build-system)
21475 (arguments '(#:tests? #f)) ; there are none
21476 (propagated-inputs
21477 `(("python-six" ,python-six)))
21478 (home-page "https://pypi.org/project/ppft/")
21479 (synopsis "Fork of Parallel Python")
21480 (description
21481 "This package is a fork of Parallel Python. The Parallel Python
21482 module (@code{pp}) provides an easy and efficient way to create
21483 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21484 computers and clusters. It features cross-platform portability and dynamic
21485 load balancing.")
21486 (license license:bsd-3)))
21487
21488 (define-public python-pox
21489 (package
21490 (name "python-pox")
21491 (version "0.2.7")
21492 (source
21493 (origin
21494 (method url-fetch)
21495 (uri (pypi-uri "pox" version))
21496 (sha256
21497 (base32
21498 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21499 (build-system python-build-system)
21500 (arguments
21501 `(#:phases
21502 (modify-phases %standard-phases
21503 (replace 'check
21504 (lambda _
21505 (mkdir-p "/tmp/guix")
21506 (setenv "SHELL" "bash")
21507 (setenv "USERNAME" "guix")
21508 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21509 (invoke "py.test" "-vv")
21510 #t)))))
21511 (native-inputs
21512 `(("python-pytest" ,python-pytest)
21513 ("which" ,which)))
21514 (home-page "https://pypi.org/project/pox/")
21515 (synopsis "Python utilities for file system exploration and automated builds")
21516 (description
21517 "Pox provides a collection of utilities for navigating and manipulating
21518 file systems. This module is designed to facilitate some of the low-level
21519 operating system interactions that are useful when exploring a file system on a
21520 remote host. Pox provides Python equivalents of several shell commands such
21521 as @command{which} and @command{find}. These commands allow automated
21522 discovery of what has been installed on an operating system, and where the
21523 essential tools are located.")
21524 (license license:bsd-3)))
21525
21526 (define-public python-pathos
21527 (package
21528 (name "python-pathos")
21529 (version "0.2.5")
21530 (source
21531 (origin
21532 (method url-fetch)
21533 (uri (pypi-uri "pathos" version))
21534 (sha256
21535 (base32
21536 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21537 (build-system python-build-system)
21538 (arguments
21539 '(#:phases
21540 (modify-phases %standard-phases
21541 (replace 'check
21542 (lambda _
21543 (setenv "PYTHONPATH"
21544 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21545 (invoke "python" "./tests/__main__.py"))))))
21546 (propagated-inputs
21547 `(("python-dill" ,python-dill)
21548 ("python-multiprocess" ,python-multiprocess)
21549 ("python-pox" ,python-pox)
21550 ("python-ppft" ,python-ppft)))
21551 (native-inputs
21552 `(("python-pytest" ,python-pytest)))
21553 (home-page "https://pypi.org/project/pathos/")
21554 (synopsis
21555 "Parallel graph management and execution in heterogeneous computing")
21556 (description
21557 "Python-pathos is a framework for heterogeneous computing. It provides a
21558 consistent high-level interface for configuring and launching parallel
21559 computations across heterogeneous resources. Python-pathos provides configurable
21560 launchers for parallel and distributed computing, where each launcher contains
21561 the syntactic logic to configure and launch jobs in an execution environment.")
21562 (license license:bsd-3)))
21563
21564 (define-public python-flit
21565 (package
21566 (name "python-flit")
21567 (version "3.0.0")
21568 (source
21569 (origin
21570 (method url-fetch)
21571 (uri (pypi-uri "flit" version))
21572 (sha256
21573 (base32
21574 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21575 (build-system python-build-system)
21576 (arguments
21577 `(#:tests? #f)) ; XXX: Check requires network access.
21578 (home-page "https://flit.readthedocs.io/")
21579 (synopsis
21580 "Simple packaging tool for simple packages")
21581 (description
21582 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21583 packages a single importable module or package at a time, using the import
21584 name as the name on PyPI. All subpackages and data files within a package
21585 are included automatically.")
21586 (license license:bsd-3)))
21587
21588 (define-public python-pathtools
21589 (package
21590 (name "python-pathtools")
21591 (version "0.1.2")
21592 (source
21593 (origin
21594 (method url-fetch)
21595 (uri (pypi-uri "pathtools" version))
21596 (sha256
21597 (base32
21598 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21599 (build-system python-build-system)
21600 (home-page
21601 "https://github.com/gorakhargosh/pathtools")
21602 (synopsis "Path utilities for Python")
21603 (description "Pattern matching and various utilities for file systems
21604 paths.")
21605 (license license:expat)))
21606
21607 (define-public python-fastentrypoints
21608 (package
21609 (name "python-fastentrypoints")
21610 (version "0.12")
21611 (source
21612 (origin
21613 (method url-fetch)
21614 (uri (pypi-uri "fastentrypoints" version))
21615 (sha256
21616 (base32
21617 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21618 (build-system python-build-system)
21619 (home-page
21620 "https://github.com/ninjaaron/fast-entry_points")
21621 (synopsis
21622 "Makes entry_points specified in setup.py load more quickly")
21623 (description
21624 "Using entry_points in your setup.py makes scripts that start really
21625 slowly because it imports pkg_resources. This package allows such setup
21626 scripts to load entry points more quickly.")
21627 (license license:bsd-3)))
21628
21629 (define-public python-funcparserlib
21630 (package
21631 (name "python-funcparserlib")
21632 (version "0.3.6")
21633 (source
21634 (origin
21635 (method url-fetch)
21636 (uri (pypi-uri "funcparserlib" version))
21637 (sha256
21638 (base32
21639 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21640 (native-inputs
21641 `(("python-tox" ,python-tox)))
21642 (arguments
21643 `(#:phases
21644 (modify-phases %standard-phases
21645 (replace 'check
21646 (lambda _
21647 (invoke "tox"))))))
21648 (build-system python-build-system)
21649 (home-page
21650 "https://github.com/vlasovskikh/funcparserlib")
21651 (synopsis
21652 "Recursive descent parsing library based on functional combinators")
21653 (description
21654 "This package is a recursive descent parsing library for Python based on
21655 functional combinators. Parser combinators are just higher-order functions
21656 that take parsers as their arguments and return them as result values.")
21657 (license license:expat)))
21658
21659 (define-public python-speg
21660 (package
21661 (name "python-speg")
21662 (version "0.3")
21663 (source
21664 (origin
21665 (method url-fetch)
21666 (uri (pypi-uri "speg" version ".zip"))
21667 (sha256
21668 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21669 (arguments
21670 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21671 (native-inputs
21672 `(("unzip" ,unzip)))
21673 (build-system python-build-system)
21674 (home-page "https://github.com/avakar/speg")
21675 (synopsis "PEG-based parser interpreter with memoization")
21676 (description "This package is a PEG-based parser and interpreter with
21677 memoization.")
21678 (license license:expat)))
21679
21680 (define-public python-cson
21681 (package
21682 (name "python-cson")
21683 (version "0.8")
21684 (source
21685 (origin
21686 (method url-fetch)
21687 (uri (pypi-uri "cson" version))
21688 (sha256
21689 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21690 (build-system python-build-system)
21691 (propagated-inputs
21692 `(("python-speg" ,python-speg)))
21693 (home-page "https://github.com/avakar/pycson")
21694 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21695 (description "This package is a parser for Coffeescript Object
21696 Notation (CSON).")
21697 (license license:expat)))
21698
21699 (define-public python-asynctest
21700 (package
21701 (name "python-asynctest")
21702 (version "0.13.0")
21703 (source
21704 (origin
21705 (method url-fetch)
21706 (uri (pypi-uri "asynctest" version))
21707 (sha256
21708 (base32
21709 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21710 (build-system python-build-system)
21711 (arguments
21712 '(#:phases
21713 (modify-phases %standard-phases
21714 (replace 'check
21715 (lambda _
21716 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21717 (add-after 'unpack 'disable-tests
21718 (lambda* _
21719 ;; XXX: 7 tests fail out of 220. Disable them for now.
21720 (substitute* (list "test/test_selector.py"
21721 "test/test_mock.py")
21722 (("def test_events_watched_outside_test_are_ignored")
21723 "@unittest.skip('disabled by guix')
21724 def test_events_watched_outside_test_are_ignored")
21725 (("def test_awaited_from_autospec_mock.*" line)
21726 (string-append line " return True\n"))
21727 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21728 (string-append line " return True\n"))
21729 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21730 (string-append line " return True\n"))
21731 (("def test_multiple_patches_on_coroutine.*" line)
21732 (string-append line " return True\n"))
21733 (("def test_patch_coroutine_only_when_running.*" line)
21734 (string-append line " return True\n")))
21735 #t)))))
21736 (home-page "https://github.com/Martiusweb/asynctest")
21737 (synopsis "Extension of unittest for testing asyncio libraries")
21738 (description
21739 "The package asynctest is built on top of the standard unittest module
21740 and cuts down boilerplate code when testing libraries for asyncio.")
21741 (license license:asl2.0)))
21742
21743 (define-public python-aionotify
21744 (package
21745 (name "python-aionotify")
21746 (version "0.2.0")
21747 (source
21748 (origin
21749 ;; Source tarball on PyPi lacks tests
21750 (method git-fetch)
21751 (uri (git-reference
21752 (url "https://github.com/rbarrois/aionotify")
21753 (commit (string-append "v" version))))
21754 (file-name (git-file-name name version))
21755 (sha256
21756 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21757 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21758 (build-system python-build-system)
21759 (home-page "https://github.com/rbarrois/aionotify")
21760 (synopsis "Asyncio-powered inotify library")
21761 (description
21762 "@code{aionotify} is a simple, asyncio-based inotify library.")
21763 (license license:bsd-3)))
21764
21765 (define-public python-forbiddenfruit
21766 (package
21767 (name "python-forbiddenfruit")
21768 (version "0.1.3")
21769 (source
21770 (origin
21771 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21772 (method git-fetch)
21773 (uri (git-reference
21774 (url "https://github.com/clarete/forbiddenfruit")
21775 (commit version)))
21776 (file-name (git-file-name name version))
21777 (sha256
21778 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21779 (build-system python-build-system)
21780 (arguments
21781 '(#:phases
21782 (modify-phases %standard-phases
21783 (replace 'check
21784 (lambda _
21785 (invoke "make" "SKIP_DEPS=1"))))))
21786 (native-inputs
21787 `(("python-nose" ,python-nose)
21788 ("python-coverage" ,python-coverage)))
21789 (home-page "https://github.com/clarete/forbiddenfruit")
21790 (synopsis "Patch python built-in objects")
21791 (description "This project allows Python code to extend built-in types.")
21792 (license (list license:gpl3+ license:expat))))
21793
21794 (define-public python-k5test
21795 (package
21796 (name "python-k5test")
21797 (version "0.9.2")
21798 (source
21799 (origin
21800 (method url-fetch)
21801 (uri (pypi-uri "k5test" version))
21802 (sha256
21803 (base32
21804 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21805 (build-system python-build-system)
21806 (propagated-inputs
21807 `(("python-six" ,python-six)
21808 ;; `which`, `kadmin.local` binaries called inside library
21809 ("which" ,which)
21810 ("mit-krb5" ,mit-krb5)))
21811 (native-inputs `(("mit-krb5" ,mit-krb5)))
21812 (arguments
21813 '(#:phases
21814 (modify-phases %standard-phases
21815 (add-after 'unpack 'patch-paths
21816 (lambda* _
21817 (substitute* "k5test/realm.py"
21818 (("'kadmin_local'") "'kadmin.local'")))))))
21819 (home-page "https://github.com/pythongssapi/k5test")
21820 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21821 (description
21822 "@code{k5test} is a library for setting up self-contained Kerberos 5
21823 environments, and running Python unit tests inside those environments. It is
21824 based on the file of the same name found alongside the MIT Kerberos 5 unit
21825 tests.")
21826 (license license:isc)))
21827
21828 (define-public python-gssapi
21829 (package
21830 (name "python-gssapi")
21831 (version "1.6.12")
21832 (source
21833 (origin
21834 (method url-fetch)
21835 (uri (pypi-uri "gssapi" version))
21836 (sha256
21837 (base32
21838 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21839 (build-system python-build-system)
21840 (propagated-inputs
21841 `(("python-decorator" ,python-decorator)
21842 ("python-six" ,python-six)))
21843 (inputs
21844 `(("mit-krb5" ,mit-krb5)))
21845 ;; for tests
21846 (native-inputs
21847 `(("python-parameterized" ,python-parameterized)
21848 ("python-k5test" ,python-k5test)
21849 ("python-nose" ,python-nose)))
21850 (home-page "https://github.com/pythongssapi/python-gssapi")
21851 (synopsis "Python GSSAPI Wrapper")
21852 (description
21853 "Python-GSSAPI provides both low-level and high level wrappers around the
21854 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21855 also be usable with other GSSAPI mechanisms.")
21856 (license license:isc)))
21857
21858 (define-public python-check-manifest
21859 (package
21860 (name "python-check-manifest")
21861 (version "0.37")
21862 (source
21863 (origin
21864 (method url-fetch)
21865 (uri (pypi-uri "check-manifest" version))
21866 (sha256
21867 (base32
21868 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21869 (build-system python-build-system)
21870 (native-inputs
21871 `(("python-mock" ,python-mock)
21872 ("git" ,git)))
21873 (home-page "https://github.com/mgedmin/check-manifest")
21874 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21875 (description "Python package can include a MANIFEST.in file to help with
21876 sending package files to the Python Package Index. This package checks that
21877 file to ensure it completely and accurately describes your project.")
21878 (license license:expat)))
21879
21880 (define-public python-android-stringslib
21881 (package
21882 (name "python-android-stringslib")
21883 (version "0.1.2")
21884 (source
21885 (origin
21886 (method git-fetch)
21887 (uri (git-reference
21888 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21889 (commit (string-append "v" version))))
21890 (file-name (git-file-name name version))
21891 (sha256
21892 (base32
21893 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21894 (build-system python-build-system)
21895 (arguments
21896 `(#:tests? #f))
21897 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21898 (synopsis "Android strings.xml support")
21899 (description "Android Strings Lib provides support for android's strings.xml
21900 files. These files are used to translate strings in android apps.")
21901 (license license:expat)))
21902
21903 (define-public python-watchdog
21904 (package
21905 (name "python-watchdog")
21906 (version "0.9.0")
21907 (source
21908 (origin
21909 (method url-fetch)
21910 (uri (pypi-uri "watchdog" version))
21911 (sha256
21912 (base32
21913 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21914 (build-system python-build-system)
21915 (arguments
21916 `(#:phases
21917 (modify-phases %standard-phases
21918 (add-before 'check 'remove-failing
21919 (lambda _
21920 (delete-file "tests/test_inotify_buffer.py")
21921 (delete-file "tests/test_snapshot_diff.py")
21922 #t)))))
21923 (propagated-inputs
21924 `(("python-argh" ,python-argh)
21925 ("python-pathtools" ,python-pathtools)
21926 ("python-pyyaml" ,python-pyyaml)))
21927 (native-inputs
21928 `(("python-pytest-cov" ,python-pytest-cov)
21929 ("python-pytest-timeout" ,python-pytest-timeout)))
21930 (home-page "https://github.com/gorakhargosh/watchdog")
21931 (synopsis "File system events monitoring")
21932 (description "This package provides a way to monitor file system events
21933 such as a file modification and trigger an action. This is similar to inotify,
21934 but portable.")
21935 (license license:asl2.0)))
21936
21937 (define-public python-watchgod
21938 (package
21939 (name "python-watchgod")
21940 (version "0.6")
21941 (source
21942 (origin
21943 ;; There are no tests in the PyPI tarball.
21944 (method git-fetch)
21945 (uri (git-reference
21946 (url "https://github.com/samuelcolvin/watchgod")
21947 (commit (string-append "v" version))))
21948 (file-name (git-file-name name version))
21949 (sha256
21950 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21951 (build-system python-build-system)
21952 (arguments
21953 `(#:phases
21954 (modify-phases %standard-phases
21955 (replace 'check
21956 (lambda _
21957 (invoke "pytest" "-vv"))))))
21958 (native-inputs
21959 `(("python-coverage" ,python-coverage)
21960 ("python-docutils" ,python-docutils)
21961 ("python-flake8" ,python-flake8)
21962 ("python-isort" ,python-isort)
21963 ("python-pycodestyle" ,python-pycodestyle)
21964 ("python-pyflakes" ,python-pyflakes)
21965 ("python-pygments" ,python-pygments)
21966 ("python-pytest" ,python-pytest)
21967 ("python-pytest-cov" ,python-pytest-cov)
21968 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21969 ("python-pytest-mock" ,python-pytest-mock)
21970 ("python-pytest-sugar" ,python-pytest-sugar)
21971 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21972 (home-page "https://github.com/samuelcolvin/watchgod")
21973 (synopsis "Simple, modern file watching and code reload in Python")
21974 (description
21975 "Simple, modern file watching and code reload in Python inspired by
21976 @code{watchdog}. Among the differences are a unified approach for each
21977 operating systems and an elegant approach to concurrency using threading.")
21978 (license license:expat)))
21979
21980 (define-public python-wget
21981 (package
21982 (name "python-wget")
21983 (version "3.2")
21984 (source
21985 (origin
21986 (method url-fetch)
21987 (uri (pypi-uri "wget" version ".zip"))
21988 (sha256
21989 (base32
21990 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21991 (build-system python-build-system)
21992 (native-inputs `(("unzip" ,unzip)))
21993 (home-page "https://bitbucket.org/techtonik/python-wget/")
21994 (synopsis "Pure Python download utility")
21995 (description "The python-wget library provides an API to download files
21996 with features similar to the @command{wget} utility.")
21997 (license license:unlicense)))
21998
21999 (define-public offlate
22000 (package
22001 (name "offlate")
22002 (version "0.5")
22003 (source
22004 (origin
22005 (method git-fetch)
22006 (uri (git-reference
22007 (url "https://framagit.org/tyreunom/offlate")
22008 (commit version)))
22009 (file-name (git-file-name name version))
22010 (sha256
22011 (base32
22012 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22013 (build-system python-build-system)
22014 (arguments
22015 ;; No tests
22016 `(#:tests? #f))
22017 (propagated-inputs
22018 `(("python-android-stringslib" ,python-android-stringslib)
22019 ("python-dateutil" ,python-dateutil)
22020 ("python-gitlab" ,python-gitlab)
22021 ("python-lxml" ,python-lxml)
22022 ("python-polib" ,python-polib)
22023 ("python-pyenchant" ,python-pyenchant)
22024 ("python-pygit2" ,python-pygit2)
22025 ("python-pygithub" ,python-pygithub)
22026 ("python-pyqt" ,python-pyqt)
22027 ("python-requests" ,python-requests)
22028 ("python-ruamel.yaml" ,python-ruamel.yaml)
22029 ("python-translation-finder" ,python-translation-finder)
22030 ("python-watchdog" ,python-watchdog)))
22031 (native-inputs
22032 `(("qttools" ,qttools)))
22033 (home-page "https://framagit.org/tyreunom/offlate")
22034 (synopsis "Offline translation interface for online translation tools")
22035 (description "Offlate offers a unified interface for different translation
22036 file formats, as well as many different online translation platforms. You can
22037 use it to get work from online platforms, specialized such as the Translation
22038 Project, or not such a gitlab instance when your upstream doesn't use any
22039 dedicated platform. The tool proposes a unified interface for any format and
22040 an upload option to send your work back to the platform.")
22041 (license license:gpl3+)))
22042
22043 (define-public python-titlecase
22044 (package
22045 (name "python-titlecase")
22046 (version "0.12.0")
22047 (source
22048 (origin
22049 (method url-fetch)
22050 (uri (pypi-uri "titlecase" version))
22051 (sha256
22052 (base32
22053 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22054 (build-system python-build-system)
22055 (native-inputs
22056 `(("python-nose" ,python-nose)))
22057 (home-page "https://github.com/ppannuto/python-titlecase")
22058 (synopsis "Capitalize strings similar to book titles")
22059 (description
22060 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22061 It capitalizes (predominantly English) strings in a way that is similar to
22062 book titles, using the New York Times Manual of Style to leave certain words
22063 lowercase.")
22064 (license license:expat)))
22065
22066 (define-public python-pypng
22067 (package
22068 (name "python-pypng")
22069 (version "0.0.20")
22070 (source
22071 (origin
22072 (method url-fetch)
22073 (uri (pypi-uri "pypng" version))
22074 (sha256
22075 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22076 (build-system python-build-system)
22077 (home-page "https://github.com/drj11/pypng")
22078 (synopsis "Pure Python PNG image encoder/decoder")
22079 (description
22080 "The PyPNG module implements support for PNG images. It reads and writes
22081 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22082 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22083 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22084 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22085 A number of optional chunks can be specified (when writing) and
22086 understood (when reading): tRNS, bKGD, gAMA.
22087
22088 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22089 aim at being a replacement or competitor. Its strength lies in fine-grained
22090 extensive support of PNG features. It can also read and write Netpbm PAM
22091 files, with a focus on its use as an intermediate format for implementing
22092 custom PNG processing.")
22093 (license license:expat)))
22094
22095 (define-public python-fuzzywuzzy
22096 (package
22097 (name "python-fuzzywuzzy")
22098 (version "0.18.0")
22099 (source
22100 (origin
22101 (method url-fetch)
22102 (uri (pypi-uri "fuzzywuzzy" version))
22103 (sha256
22104 (base32
22105 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22106 (build-system python-build-system)
22107 (native-inputs
22108 `(("python-hypothesis" ,python-hypothesis)
22109 ("python-pycodestyle" ,python-pycodestyle)
22110 ("python-pytest" ,python-pytest)))
22111 (propagated-inputs
22112 `(("python-levenshtein" ,python-levenshtein)))
22113 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22114 (synopsis "Fuzzy string matching in Python")
22115 (description "Approximate string matching using
22116 @emph{Levenshtein Distance} to calculate the differences between
22117 sequences.")
22118 (license license:gpl2)))
22119
22120 (define-public python2-fuzzywuzzy
22121 (package-with-python2 python-fuzzywuzzy))
22122
22123 (define-public python-block-tracing
22124 (package
22125 (name "python-block-tracing")
22126 (version "1.0.1")
22127 (source
22128 (origin
22129 (method url-fetch)
22130 (uri (pypi-uri "block_tracing" version))
22131 (sha256
22132 (base32
22133 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22134 (build-system python-build-system)
22135 (arguments '(#:tests? #f)) ; no tests
22136 (home-page "https://github.com/rianhunter/block_tracing")
22137 (synopsis "Protect process memory")
22138 (description
22139 "@code{block_tracing} is a tiny Python library that can be used to
22140 prevent debuggers and other applications from inspecting the memory within
22141 your process.")
22142 (license license:expat)))
22143
22144 (define-public python-gcovr
22145 (package
22146 (name "python-gcovr")
22147 (version "4.2")
22148 (source
22149 (origin
22150 (method url-fetch)
22151 (uri (pypi-uri "gcovr" version))
22152 (sha256
22153 (base32
22154 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22155 (build-system python-build-system)
22156 (propagated-inputs
22157 `(("python-lxml" ,python-lxml)
22158 ("python-jinja2" ,python-jinja2)))
22159 (home-page "https://gcovr.com/")
22160 (synopsis "Utility for generating code coverage results")
22161 (description
22162 "Gcovr provides a utility for managing the use of the GNU gcov
22163 utility and generating summarized code coverage results. It is inspired
22164 by the Python coverage.py package, which provides a similar utility for
22165 Python.")
22166 (license license:bsd-3)))
22167
22168 (define-public python-owslib
22169 (package
22170 (name "python-owslib")
22171 (version "0.19.2")
22172 (source
22173 (origin
22174 (method url-fetch)
22175 (uri (pypi-uri "OWSLib" version))
22176 (sha256
22177 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22178 (build-system python-build-system)
22179 (arguments
22180 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22181 (synopsis "Interface for Open Geospatial Consortium web service")
22182 (description
22183 "OWSLib is a Python package for client programming with Open Geospatial
22184 Consortium (OGC) web service (hence OWS) interface standards, and their related
22185 content models.")
22186 (home-page "https://geopython.github.io/OWSLib/")
22187 (license license:bsd-3)))
22188
22189 (define-public python-docusign-esign
22190 (package
22191 (name "python-docusign-esign")
22192 (version "3.1.0")
22193 (source (origin
22194 (method url-fetch)
22195 (uri (pypi-uri "docusign_esign" version))
22196 (sha256
22197 (base32
22198 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22199 (build-system python-build-system)
22200 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22201 (arguments `(#:tests? #f))
22202 (propagated-inputs
22203 `(("python-certifi" ,python-certifi)
22204 ("python-six" ,python-six)
22205 ("python-dateutil" ,python-dateutil)
22206 ("python-urllib3" ,python-urllib3)
22207 ("python-pyjwt" ,python-pyjwt)
22208 ("python-cryptography" ,python-cryptography)
22209 ("python-nose" ,python-nose)))
22210 (synopsis "DocuSign Python Client")
22211 (description "The Official DocuSign Python Client Library used to interact
22212 with the eSign REST API. Send, sign, and approve documents using this client.")
22213 (home-page "https://www.docusign.com/devcenter")
22214 (license license:expat)))
22215
22216 (define-public python-xattr
22217 (package
22218 (name "python-xattr")
22219 (version "0.9.7")
22220 (source
22221 (origin
22222 (method url-fetch)
22223 (uri (pypi-uri "xattr" version))
22224 (sha256
22225 (base32
22226 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22227 (build-system python-build-system)
22228 (propagated-inputs
22229 `(("python-cffi" ,python-cffi)))
22230 (home-page "https://github.com/xattr/xattr")
22231 (synopsis
22232 "Python wrapper for extended file system attributes")
22233 (description "This package provides a Python wrapper for using extended
22234 file system attributes. Extended attributes extend the basic attributes of files
22235 and directories in the file system. They are stored as name:data pairs
22236 associated with file system objects (files, directories, symlinks, etc).")
22237 (license license:expat)))
22238
22239 (define-public python-json-logger
22240 (package
22241 (name "python-json-logger")
22242 (version "0.1.11")
22243 (source
22244 (origin
22245 (method url-fetch)
22246 (uri (pypi-uri "python-json-logger" version))
22247 (sha256
22248 (base32
22249 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22250 (build-system python-build-system)
22251 (home-page
22252 "https://github.com/madzak/python-json-logger")
22253 (synopsis "JSON log formatter in Python")
22254 (description "This library allows standard Python logging to output log data
22255 as JSON objects. With JSON we can make our logs more readable by machines and
22256 we can stop writing custom parsers for syslog-type records.")
22257 (license license:bsd-3)))
22258
22259 (define-public python-daiquiri
22260 (package
22261 (name "python-daiquiri")
22262 (version "2.1.1")
22263 (source
22264 (origin
22265 (method url-fetch)
22266 (uri (pypi-uri "daiquiri" version))
22267 (sha256
22268 (base32
22269 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22270 (build-system python-build-system)
22271 (propagated-inputs
22272 `(("python-json-logger" ,python-json-logger)))
22273 (native-inputs
22274 `(("python-mock" ,python-mock)
22275 ("python-pytest" ,python-pytest)
22276 ("python-setuptools-scm" ,python-setuptools-scm)
22277 ("python-six" ,python-six)))
22278 (home-page "https://github.com/jd/daiquiri")
22279 (synopsis
22280 "Library to configure Python logging easily")
22281 (description "The daiquiri library provides an easy way to configure
22282 logging in Python. It also provides some custom formatters and handlers.")
22283 (license license:asl2.0)))
22284
22285 (define-public python-pifpaf
22286 (package
22287 (name "python-pifpaf")
22288 (version "2.5.0")
22289 (source
22290 (origin
22291 (method url-fetch)
22292 (uri (pypi-uri "pifpaf" version))
22293 (sha256
22294 (base32
22295 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22296 (build-system python-build-system)
22297 (arguments
22298 '(#:phases
22299 (modify-phases %standard-phases
22300 (replace 'check
22301 (lambda _
22302 (invoke "python" "setup.py" "testr" "--slowest"
22303 "--testr-args=until-failure"))))))
22304 (propagated-inputs
22305 `(("python-click" ,python-click)
22306 ("python-daiquiri" ,python-daiquiri)
22307 ("python-fixtures" ,python-fixtures)
22308 ("python-jinja2" ,python-jinja2)
22309 ("python-pbr" ,python-pbr)
22310 ("python-psutil" ,python-psutil)
22311 ("python-six" ,python-six)
22312 ("python-xattr" ,python-xattr)))
22313 (native-inputs
22314 `(("python-mock" ,python-mock)
22315 ("python-os-testr" ,python-os-testr)
22316 ("python-requests" ,python-requests)
22317 ("python-testrepository" ,python-testrepository)
22318 ("python-testtools" ,python-testtools)))
22319 (home-page "https://github.com/jd/pifpaf")
22320 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22321 (description "Pifpaf is a suite of fixtures and a command-line tool that
22322 starts and stops daemons for a quick throw-away usage. This is typically
22323 useful when needing these daemons to run integration testing. It originally
22324 evolved from its precursor @code{overtest}.")
22325 (license license:asl2.0)))
22326
22327 (define-public python-pytest-check-links
22328 (package
22329 (name "python-pytest-check-links")
22330 (version "0.3.0")
22331 (source
22332 (origin
22333 (method url-fetch)
22334 ;; URI uses underscores
22335 (uri (pypi-uri "pytest_check_links" version))
22336 (sha256
22337 (base32
22338 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22339 (build-system python-build-system)
22340 (propagated-inputs
22341 `(("python-docutils" ,python-docutils)
22342 ("python-html5lib" ,python-html5lib)
22343 ("python-nbconvert" ,python-nbconvert)
22344 ("python-nbformat" ,python-nbformat)
22345 ("python-pytest" ,python-pytest)
22346 ("python-six" ,python-six)))
22347 (native-inputs
22348 `(("python-pbr-minimal" ,python-pbr-minimal)))
22349 (home-page "https://github.com/minrk/pytest-check-links")
22350 (synopsis "Check links in files")
22351 (description "This package provides a pytest plugin that checks URLs for
22352 HTML-containing files.")
22353 (license license:bsd-3)))
22354
22355 (define-public python-json5
22356 (package
22357 (name "python-json5")
22358 (version "0.8.5")
22359 (source
22360 (origin
22361 ;; sample.json5 is missing from PyPi source tarball
22362 (method git-fetch)
22363 (uri (git-reference
22364 (url "https://github.com/dpranke/pyjson5")
22365 (commit (string-append "v" version))))
22366 (file-name (git-file-name name version))
22367 (sha256
22368 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22369 (build-system python-build-system)
22370 (home-page "https://github.com/dpranke/pyjson5")
22371 (synopsis
22372 "Python implementation of the JSON5 data format")
22373 (description
22374 "JSON5 extends the JSON data interchange format to make it slightly more
22375 usable as a configuration language. This Python package implements parsing and
22376 dumping of JSON5 data structures.")
22377 (license license:asl2.0)))
22378
22379 (define-public python-frozendict
22380 (package
22381 (name "python-frozendict")
22382 (version "1.2")
22383 (source
22384 (origin
22385 (method url-fetch)
22386 (uri (pypi-uri "frozendict" version))
22387 (sha256
22388 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22389 (build-system python-build-system)
22390 (home-page "https://github.com/slezica/python-frozendict")
22391 (synopsis "Simple immutable mapping for Python")
22392 (description
22393 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22394 implements the complete mapping interface. It can be used as a drop-in
22395 replacement for dictionaries where immutability is desired.")
22396 (license license:expat)))
22397
22398 (define-public python-unpaddedbase64
22399 (package
22400 (name "python-unpaddedbase64")
22401 (version "1.1.0")
22402 (source
22403 (origin
22404 (method git-fetch)
22405 (uri (git-reference
22406 (url "https://github.com/matrix-org/python-unpaddedbase64")
22407 (commit (string-append "v" version))))
22408 (file-name (git-file-name name version))
22409 (sha256
22410 (base32
22411 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22412 (build-system python-build-system)
22413 (home-page "https://pypi.org/project/unpaddedbase64/")
22414 (synopsis "Encode and decode Base64 without “=” padding")
22415 (description
22416 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22417 using “=” characters. However this conveys no benefit so many protocols
22418 choose to use Base64 without the “=” padding.")
22419 (license license:asl2.0)))
22420
22421 (define-public python-py-cpuinfo
22422 (package
22423 (name "python-py-cpuinfo")
22424 (version "5.0.0")
22425 (source
22426 (origin
22427 (method url-fetch)
22428 (uri (pypi-uri "py-cpuinfo" version))
22429 (sha256
22430 (base32
22431 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22432 (build-system python-build-system)
22433 (home-page "https://github.com/workhorsy/py-cpuinfo")
22434 (synopsis "Get CPU info with Python")
22435 (description
22436 "This Python module returns the CPU info by using the best sources of
22437 information for your operating system.")
22438 (license license:expat)))
22439
22440 (define-public python-canonicaljson
22441 (package
22442 (name "python-canonicaljson")
22443 (version "1.4.0")
22444 (source
22445 (origin
22446 (method url-fetch)
22447 (uri (pypi-uri "canonicaljson" version))
22448 (sha256
22449 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22450 (build-system python-build-system)
22451 (propagated-inputs
22452 `(("python-six" ,python-six)
22453 ("python-frozendict" ,python-frozendict)
22454 ("python-simplejson" ,python-simplejson)))
22455 (home-page "https://github.com/matrix-org/python-canonicaljson")
22456 (synopsis "Canonical JSON")
22457 (description
22458 "Deterministically encode JSON.
22459
22460 @itemize
22461 @item Encodes objects and arrays as RFC 7159 JSON.
22462 @item Sorts object keys so that you get the same result each time.
22463 @item Has no insignificant whitespace to make the output as small as possible.
22464 @item Escapes only the characters that must be escaped, U+0000 to
22465 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22466 @item Uses the shortest escape sequence for each escaped character.
22467 @item Encodes the JSON as UTF-8.
22468 @item Can encode frozendict immutable dictionaries.
22469 @end itemize")
22470 (license license:asl2.0)))
22471
22472 (define-public python-signedjson
22473 (package
22474 (name "python-signedjson")
22475 (version "1.1.1")
22476 (source
22477 (origin
22478 (method url-fetch)
22479 (uri (pypi-uri "signedjson" version))
22480 (sha256
22481 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22482 (build-system python-build-system)
22483 (propagated-inputs
22484 `(("python-canonicaljson" ,python-canonicaljson)
22485 ("python-importlib-metadata" ,python-importlib-metadata)
22486 ("python-pynacl" ,python-pynacl)
22487 ("python-typing-extensions" ,python-typing-extensions)
22488 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22489 (native-inputs
22490 `(("python-setuptools-scm" ,python-setuptools-scm)))
22491 (home-page "https://github.com/matrix-org/python-signedjson")
22492 (synopsis "Sign JSON objects with ED25519 signatures")
22493 (description
22494 "Sign JSON objects with ED25519 signatures.
22495
22496 @itemize
22497 @item More than one entity can sign the same object.
22498 @item Each entity can sign the object with more than one key making it easier to
22499 rotate keys
22500 @item ED25519 can be replaced with a different algorithm.
22501 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22502 key.
22503 @end itemize")
22504 (license license:asl2.0)))
22505
22506 (define-public python-daemonize
22507 (package
22508 (name "python-daemonize")
22509 (version "2.5.0")
22510 (source
22511 (origin
22512 (method url-fetch)
22513 (uri (pypi-uri "daemonize" version))
22514 (sha256
22515 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22516 (build-system python-build-system)
22517 (home-page "https://github.com/thesharp/daemonize")
22518 (synopsis "Library for writing system daemons in Python")
22519 (description "Daemonize is a library for writing system daemons in Python.")
22520 (license license:expat)))
22521
22522 (define-public python-pymacaroons
22523 (package
22524 (name "python-pymacaroons")
22525 (version "0.13.0")
22526 (source
22527 (origin
22528 (method url-fetch)
22529 (uri (pypi-uri "pymacaroons" version))
22530 (sha256
22531 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22532 (build-system python-build-system)
22533 (propagated-inputs
22534 `(("python-six" ,python-six)
22535 ("python-pynacl" ,python-pynacl)))
22536 (home-page "https://github.com/ecordell/pymacaroons")
22537 (synopsis "Python Macaroon Library")
22538 (description
22539 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22540 tokens, macaroons embed caveats that define specific authorization
22541 requirements for the target service, the service that issued the root macaroon
22542 and which is capable of verifying the integrity of macaroons it receives.
22543
22544 Macaroons allow for delegation and attenuation of authorization. They are
22545 simple and fast to verify, and decouple authorization policy from the
22546 enforcement of that policy.")
22547 (license license:expat)))
22548
22549 (define-public python-ldap3
22550 (package
22551 (name "python-ldap3")
22552 (version "2.7")
22553 (home-page "https://github.com/cannatag/ldap3")
22554 (source
22555 (origin
22556 (method git-fetch)
22557 (uri (git-reference (url home-page)
22558 (commit (string-append "v" version))))
22559 (file-name (git-file-name name version))
22560 (sha256
22561 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22562 (build-system python-build-system)
22563 (arguments
22564 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22565 #:phases (modify-phases %standard-phases
22566 (replace 'check
22567 (lambda* (#:key tests? #:allow-other-keys)
22568 (when tests?
22569 (invoke "nosetests" "-s" "test"))
22570 #t)))))
22571 (native-inputs
22572 `(("python-nose" ,python-nose)))
22573 (propagated-inputs
22574 `(("python-gssapi" ,python-gssapi)
22575 ("python-pyasn1" ,python-pyasn1)))
22576 (synopsis "Python LDAP client")
22577 (description
22578 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22579 library.")
22580 (license license:lgpl3+)))
22581
22582 (define-public python-boltons
22583 (package
22584 (name "python-boltons")
22585 (version "20.0.0")
22586 (source
22587 (origin
22588 (method url-fetch)
22589 (uri (pypi-uri "boltons" version))
22590 (sha256
22591 (base32
22592 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22593 (build-system python-build-system)
22594 (home-page "https://github.com/mahmoud/boltons")
22595 (synopsis "Extensions to the Python standard library")
22596 (description
22597 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22598 as — and yet conspicuously missing from — the standard library, including:
22599
22600 @itemize
22601 @item Atomic file saving, bolted on with fileutils
22602 @item A highly-optimized OrderedMultiDict, in dictutils
22603 @item Two types of PriorityQueue, in queueutils
22604 @item Chunked and windowed iteration, in iterutils
22605 @item Recursive data structure iteration and merging, with iterutils.remap
22606 @item Exponential backoff functionality, including jitter, through
22607 iterutils.backoff
22608 @item A full-featured TracebackInfo type, for representing stack traces, in
22609 tbutils
22610 @end itemize")
22611 (license license:bsd-3)))
22612
22613 (define-public python-eliot
22614 (package
22615 (name "python-eliot")
22616 (version "1.12.0")
22617 (source
22618 (origin
22619 (method url-fetch)
22620 (uri (pypi-uri "eliot" version))
22621 (sha256
22622 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22623 (build-system python-build-system)
22624 (arguments
22625 `(#:phases
22626 (modify-phases %standard-phases
22627 (add-after 'unpack 'remove-journald-support
22628 (lambda _
22629 (for-each delete-file
22630 '("eliot/tests/test_journald.py"
22631 "eliot/journald.py"))
22632 #t))
22633 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22634 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22635 ;; be installed and these tests should pass.
22636 (lambda _
22637 (delete-file "eliot/tests/test_prettyprint.py")
22638 #t)))))
22639 (propagated-inputs
22640 `(("python-boltons" ,python-boltons)
22641 ("python-pyrsistent" ,python-pyrsistent)
22642 ("python-six" ,python-six)
22643 ("python-zope-interface" ,python-zope-interface)))
22644 (native-inputs
22645 `(("python-black" ,python-black)
22646 ("python-coverage" ,python-coverage)
22647 ("python-dask" ,python-dask)
22648 ("python-flake8" ,python-flake8)
22649 ("python-hypothesis" ,python-hypothesis)
22650 ("python-pytest" ,python-pytest)
22651 ("python-setuptools" ,python-setuptools)
22652 ("python-sphinx" ,python-sphinx)
22653 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22654 ("python-testtools" ,python-testtools)
22655 ("python-twine" ,python-twine)
22656 ("python-twisted" ,python-twisted)))
22657 (home-page "https://github.com/itamarst/eliot/")
22658 (synopsis "Eliot: the logging system that tells you why it happened")
22659 (description
22660 "@dfn{eliot} is a Python logging system that outputs causal chains of
22661 actions: actions can spawn other actions, and eventually they either succeed
22662 or fail. The resulting logs tell you the story of what your software did: what
22663 happened, and what caused it.")
22664 (license license:asl2.0)))
22665
22666 (define-public python-pem
22667 (package
22668 (name "python-pem")
22669 (version "20.1.0")
22670 (source
22671 (origin
22672 (method url-fetch)
22673 (uri (pypi-uri "pem" version))
22674 (sha256
22675 (base32
22676 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22677 (build-system python-build-system)
22678 (native-inputs
22679 `(("python-certifi" ,python-certifi)
22680 ("python-coverage" ,python-coverage)
22681 ("python-pretend" ,python-pretend)
22682 ("python-pyopenssl" ,python-pyopenssl)
22683 ("python-pytest" ,python-pytest)
22684 ("python-sphinx" ,python-sphinx)
22685 ("python-twisted" ,python-twisted)))
22686 (home-page "https://pem.readthedocs.io/")
22687 (synopsis "Easy PEM file parsing in Python")
22688 (description
22689 "This package provides a Python module for parsing and splitting PEM files.")
22690 (license license:expat)))
22691
22692 (define-public python-txsni
22693 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22694 ;; Python and OpenSSL.
22695 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22696 (revision "0"))
22697 (package
22698 (name "python-txsni")
22699 (version (git-version "0.1.9" revision commit))
22700 (home-page "https://github.com/glyph/txsni")
22701 (source
22702 (origin
22703 (method git-fetch)
22704 (uri (git-reference (url home-page) (commit commit)))
22705 (file-name (git-file-name name version))
22706 (sha256
22707 (base32
22708 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22709 (build-system python-build-system)
22710 (propagated-inputs
22711 `(("python-pyopenssl" ,python-pyopenssl)
22712 ("python-service-identity" ,python-service-identity)
22713 ("python-twisted" ,python-twisted)))
22714 (synopsis "Run TLS servers with Twisted")
22715 (description
22716 "This package provides an easy-to-use SNI endpoint for use
22717 with the Twisted web framework.")
22718 (license license:expat))))
22719
22720 (define-public python-txacme
22721 (package
22722 (name "python-txacme")
22723 (version "0.9.2")
22724 (source
22725 (origin
22726 (method url-fetch)
22727 (uri (pypi-uri "txacme" version))
22728 (sha256
22729 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22730 (build-system python-build-system)
22731 (propagated-inputs
22732 `(("python-acme" ,python-acme)
22733 ("python-attrs" ,python-attrs)
22734 ("python-eliot" ,python-eliot)
22735 ("python-josepy" ,python-josepy)
22736 ("python-pem" ,python-pem)
22737 ("python-treq" ,python-treq)
22738 ("python-twisted" ,python-twisted)
22739 ("python-txsni" ,python-txsni)))
22740 (native-inputs
22741 `(("python-fixtures" ,python-fixtures)
22742 ("python-hypothesis" ,python-hypothesis)
22743 ("python-mock" ,python-mock)
22744 ("python-service-identity"
22745 ,python-service-identity)
22746 ("python-testrepository" ,python-testrepository)
22747 ("python-testscenarios" ,python-testscenarios)
22748 ("python-testtools" ,python-testtools)))
22749 (home-page "https://github.com/twisted/txacme")
22750 (synopsis "Twisted implexmentation of the ACME protocol")
22751 (description
22752 "ACME is Automatic Certificate Management Environment, a protocol that
22753 allows clients and certificate authorities to automate verification and
22754 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22755 Certificate Authority.
22756
22757 txacme is an implementation of the protocol for Twisted, the event-driven
22758 networking engine for Python.")
22759 (license license:expat)))
22760
22761 (define-public python-pysaml2
22762 (package
22763 (name "python-pysaml2")
22764 (version "6.5.1")
22765 (source
22766 (origin
22767 (method url-fetch)
22768 (uri (pypi-uri "pysaml2" version))
22769 (sha256
22770 (base32
22771 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22772 (build-system python-build-system)
22773 (propagated-inputs
22774 `(("python-cryptography" ,python-cryptography)
22775 ("python-dateutil" ,python-dateutil)
22776 ("python-defusedxml" ,python-defusedxml)
22777 ("python-importlib-resources"
22778 ,python-importlib-resources)
22779 ("python-pyopenssl" ,python-pyopenssl)
22780 ("python-pytz" ,python-pytz)
22781 ("python-requests" ,python-requests)
22782 ("python-six" ,python-six)
22783 ("python-xmlschema" ,python-xmlschema)))
22784 (home-page "https://idpy.org")
22785 (synopsis "Python implementation of SAML Version 2 Standard")
22786 (description
22787 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22788 It contains all necessary pieces for building a SAML2 service provider or
22789 an identity provider. The distribution contains examples of both.
22790
22791 This package was originally written to work in a WSGI environment, but
22792 there are extensions that allow you to use it with other frameworks.")
22793 (license license:asl2.0)))
22794
22795 (define-public python-click-plugins
22796 (package
22797 (name "python-click-plugins")
22798 (version "1.1.1")
22799 (source
22800 (origin
22801 (method url-fetch)
22802 (uri (pypi-uri "click-plugins" version))
22803 (sha256
22804 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22805 (build-system python-build-system)
22806 (native-inputs
22807 `(("python-pytest" ,python-pytest)))
22808 (propagated-inputs
22809 `(("python-click" ,python-click)))
22810 (synopsis "Extension for Click to register external CLI commands")
22811 (description "This package provides n extension module for Click to
22812 register external CLI commands via setuptools entry-points.")
22813 (home-page "https://github.com/click-contrib/click-plugins")
22814 (license license:bsd-3)))
22815
22816 (define-public python-diceware
22817 (package
22818 (name "python-diceware")
22819 (version "0.9.6")
22820 (source
22821 (origin
22822 (method url-fetch)
22823 (uri (pypi-uri "diceware" version))
22824 (sha256
22825 (base32
22826 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22827 (build-system python-build-system)
22828 (native-inputs
22829 `(("python-coverage" ,python-coverage)
22830 ("python-pytest" ,python-pytest)
22831 ("python-pytest-runner" ,python-pytest-runner)))
22832 (home-page "https://github.com/ulif/diceware/")
22833 (synopsis "Generates memorable passphrases")
22834 (description "This package generates passphrases by concatenating words
22835 randomly picked from wordlists. It supports several sources of
22836 randomness (including real life dice) and different wordlists (including
22837 cryptographically signed ones).")
22838 (license license:gpl3+)))
22839
22840 (define-public python-dictdiffer
22841 (package
22842 (name "python-dictdiffer")
22843 (version "0.8.1")
22844 (source (origin
22845 (method url-fetch)
22846 (uri (pypi-uri "dictdiffer" version))
22847 (sha256
22848 (base32
22849 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22850 (build-system python-build-system)
22851 (native-inputs
22852 `(("python-check-manifest" ,python-check-manifest)
22853 ("python-coverage" ,python-coverage)
22854 ("python-isort" ,python-isort)
22855 ("python-mock" ,python-mock)
22856 ("python-pydoctstyle" ,python-pydocstyle)
22857 ("python-pytest-cache" ,python-pytest-cache)
22858 ("python-pytest-cov" ,python-pytest-cov)
22859 ("python-pytest-pep8" ,python-pytest-pep8)
22860 ("python-pytest-runner" ,python-pytest-runner)
22861 ("python-pytest" ,python-pytest)
22862 ("python-setuptools-scm" ,python-setuptools-scm)
22863 ("python-tox" ,python-tox)))
22864 (home-page "https://github.com/inveniosoftware/dictdiffer")
22865 (synopsis "Diff and patch Python dictionary objects")
22866 (description
22867 "Dictdiffer is a Python module that helps you to diff and patch
22868 dictionaries.")
22869 (license license:expat)))
22870
22871 (define-public pyzo
22872 (package
22873 (name "pyzo")
22874 (version "4.11.2")
22875 (source
22876 (origin
22877 (method url-fetch)
22878 (uri (pypi-uri "pyzo" version))
22879 (sha256
22880 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22881 (build-system python-build-system)
22882 (arguments
22883 `(#:phases
22884 (modify-phases %standard-phases
22885 (add-before 'check 'fix-home-directory
22886 (lambda _
22887 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22888 (setenv "HOME" "/tmp")
22889 #t)))
22890 ;; Tests fail with "Uncaught Python exception: python: undefined
22891 ;; symbol: objc_getClass".
22892 #:tests? #f))
22893 (propagated-inputs
22894 `(("python-pyqt" ,python-pyqt)))
22895 (home-page "https://pyzo.org")
22896 (synopsis
22897 "Python IDE for scientific computing")
22898 (description
22899 "Pyzo is a Python IDE focused on interactivity and introspection,
22900 which makes it very suitable for scientific computing. Its practical
22901 design is aimed at simplicity and efficiency.
22902
22903 It consists of two main components, the editor and the shell, and uses
22904 a set of pluggable tools to help the programmer in various ways. Some
22905 example tools are source structure, project manager, interactive help,
22906 workspace...")
22907 (license license:bsd-2)))
22908
22909 (define-public python-osc
22910 (package
22911 (name "python-osc")
22912 (version "1.7.4")
22913 (source
22914 (origin
22915 (method url-fetch)
22916 (uri (pypi-uri "python-osc" version))
22917 (sha256
22918 (base32
22919 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22920 (build-system python-build-system)
22921 (home-page "https://github.com/attwad/python-osc")
22922 (synopsis "Open Sound Control server and client implementations")
22923 (description
22924 "@code{python-osc} is a pure Python library with no external
22925 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22926 Open Sound Control 1.0} specification.")
22927 (license license:unlicense)))
22928
22929 (define-public python-voluptuous
22930 (package
22931 (name "python-voluptuous")
22932 (version "0.11.7")
22933 (source
22934 (origin
22935 (method url-fetch)
22936 (uri (pypi-uri "voluptuous" version))
22937 (sha256
22938 (base32
22939 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22940 (build-system python-build-system)
22941 (native-inputs
22942 `(("python-nose" ,python-nose)))
22943 (home-page "https://github.com/alecthomas/voluptuous")
22944 (synopsis "Python data validation library")
22945 (description
22946 "Voluptuous is a Python data validation library. It is primarily
22947 intended for validating data coming into Python as JSON, YAML, etc.")
22948 (license license:bsd-3)))
22949
22950 (define-public python-cmd2
22951 (package
22952 (name "python-cmd2")
22953 (version "1.0.2")
22954 (source
22955 (origin
22956 (method url-fetch)
22957 (uri (pypi-uri "cmd2" version))
22958 (sha256
22959 (base32
22960 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22961 (build-system python-build-system)
22962 (propagated-inputs
22963 `(("python-attrs" ,python-attrs)
22964 ("python-colorama" ,python-colorama)
22965 ("python-pyperclip" ,python-pyperclip)
22966 ("python-wcwidth" ,python-wcwidth)))
22967 (native-inputs
22968 `(("python-codecov" ,python-codecov)
22969 ("python-coverage" ,python-coverage)
22970 ("python-doc8" ,python-doc8)
22971 ("python-flake8" ,python-flake8)
22972 ("python-invoke" ,python-invoke)
22973 ("python-mock" ,python-mock)
22974 ("python-pytest" ,python-pytest)
22975 ("python-pytest-cov" ,python-pytest-cov)
22976 ("python-pytest-mock" ,python-pytest-mock)
22977 ("python-setuptools-scm" ,python-setuptools-scm)
22978 ("python-sphinx" ,python-sphinx)
22979 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22980 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22981 ("python-tox" ,python-tox)
22982 ("python-twine" ,python-twine)
22983 ("which" ,which)))
22984 (home-page "https://github.com/python-cmd2/cmd2")
22985 (synopsis "Tool for building interactive command line applications")
22986 (description
22987 "Cmd2 is a tool for building interactive command line applications in
22988 Python. Its goal is to make it quick and easy for developers to build
22989 feature-rich and user-friendly interactive command line applications. It
22990 provides a simple API which is an extension of Python's built-in @code{cmd}
22991 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22992 make your life easier and eliminates much of the boilerplate code which would
22993 be necessary when using @code{cmd}.")
22994 (license license:expat)))
22995
22996 (define-public python-pytidylib
22997 (package
22998 (name "python-pytidylib")
22999 (version "0.3.2")
23000 (source (origin
23001 (method url-fetch)
23002 (uri (pypi-uri "pytidylib" version))
23003 (sha256
23004 (base32
23005 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23006 (build-system python-build-system)
23007 (arguments
23008 '(#:phases
23009 (modify-phases %standard-phases
23010 (add-before 'build 'qualify-libtidy
23011 (lambda* (#:key inputs #:allow-other-keys)
23012 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23013 "/lib/libtidy.so")))
23014 (substitute* "tidylib/tidy.py"
23015 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23016 (format #f "'~a'" libtidy)))
23017 #t))))))
23018 (inputs `(("tidy" ,tidy)))
23019 (home-page "https://github.com/countergram/pytidylib")
23020 (synopsis "Python wrapper for HTML Tidy library")
23021 (description
23022 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23023 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23024 (license license:expat)))
23025
23026 (define-public python2-pytidylib
23027 (package-with-python2 python-pytidylib))
23028
23029 (define-public python-mujson
23030 (package
23031 (name "python-mujson")
23032 (version "1.4")
23033 (source
23034 (origin
23035 (method url-fetch)
23036 (uri (pypi-uri "mujson" version))
23037 (sha256
23038 (base32
23039 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23040 (build-system python-build-system)
23041 (home-page "https://github.com/mattgiles/mujson")
23042 (synopsis "Use the fastest JSON functions available at import time")
23043 (description "This package selects the fastest JSON functions available
23044 at import time.")
23045 (license license:expat)))
23046
23047 (define-public python-bashlex
23048 (package
23049 (name "python-bashlex")
23050 (version "0.14")
23051 (source
23052 (origin
23053 (method url-fetch)
23054 (uri (pypi-uri "bashlex" version))
23055 (sha256
23056 (base32
23057 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23058 (build-system python-build-system)
23059 (arguments
23060 `(#:phases
23061 (modify-phases %standard-phases
23062 (add-before 'build 'pregenerate-yacc-tables
23063 (lambda _
23064 ;; parser.py caches tables, which attempts to write to site lib
23065 ;; see https://github.com/idank/bashlex/issues/51
23066 (invoke "python" "-c" "import bashlex"))))))
23067 (home-page
23068 "https://github.com/idank/bashlex")
23069 (synopsis "Python parser for bash")
23070 (description "@code{bashlex} is a Python port of the parser used
23071 internally by GNU bash.
23072
23073 For the most part it's transliterated from C, the major differences are:
23074
23075 @itemize
23076 @item it does not execute anything
23077 @item it is reentrant
23078 @item it generates a complete AST
23079 @end itemize
23080 ")
23081 (license license:gpl3+)))
23082
23083 (define-public python-jinxed
23084 (package
23085 (name "python-jinxed")
23086 (version "1.0.0")
23087 (source
23088 (origin
23089 (method url-fetch)
23090 (uri (pypi-uri "jinxed" version))
23091 (sha256
23092 (base32
23093 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23094 (build-system python-build-system)
23095 (arguments
23096 '(#:phases
23097 (modify-phases %standard-phases
23098 (add-before 'check 'set-environment-variables
23099 (lambda* (#:key inputs #:allow-other-keys)
23100 (let ((ncurses (assoc-ref inputs "ncurses")))
23101 (setenv "TERM" "LINUX")
23102 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23103 #t))))
23104 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23105 (native-inputs
23106 `(("ncurses" ,ncurses)))
23107 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23108 (synopsis "Jinxed Terminal Library")
23109 (description
23110 "Jinxed is an implementation of a subset of the Python curses library.")
23111 (license license:mpl2.0)))
23112
23113 (define-public python-blessed
23114 (package
23115 (name "python-blessed")
23116 (version "1.17.8")
23117 (source
23118 (origin
23119 (method url-fetch)
23120 (uri (pypi-uri "blessed" version))
23121 (sha256
23122 (base32
23123 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23124 (modules '((guix build utils)))
23125 (snippet
23126 '(begin
23127 ;; Don't get hung up on Windows test failures.
23128 (delete-file "blessed/win_terminal.py") #t))))
23129 (build-system python-build-system)
23130 (propagated-inputs
23131 `(("python-jinxed" ,python-jinxed)
23132 ("python-six" ,python-six)
23133 ("python-wcwidth" ,python-wcwidth)))
23134 (native-inputs
23135 `(("python-mock" ,python-mock)
23136 ("python-pytest" ,python-pytest)))
23137 (home-page "https://github.com/jquast/blessed")
23138 (synopsis "Wrapper around terminal capabilities")
23139 (description
23140 "Blessed is a thin, practical wrapper around terminal styling, screen
23141 positioning, and keyboard input.")
23142 (license license:expat)))
23143
23144 (define-public python-readme-renderer
23145 (package
23146 (name "python-readme-renderer")
23147 (version "26.0")
23148 (source
23149 (origin
23150 (method url-fetch)
23151 (uri (pypi-uri "readme_renderer" version))
23152 (sha256
23153 (base32
23154 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23155 (build-system python-build-system)
23156 (propagated-inputs
23157 `(("python-bleach" ,python-bleach)
23158 ("python-docutils" ,python-docutils)
23159 ("python-pygments" ,python-pygments)
23160 ("python-six" ,python-six)))
23161 (native-inputs
23162 `(("python-mock" ,python-mock)
23163 ("python-pytest" ,python-pytest)))
23164 (home-page "https://github.com/pypa/readme_renderer")
23165 (synopsis "Render README files in Warehouse")
23166 (description
23167 "Readme Renderer is a library that will safely render arbitrary README
23168 files into HTML. It is designed to be used in Warehouse to render the
23169 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23170 and plain text.")
23171 (license license:asl2.0)))
23172
23173 (define-public python-lazr-delegates
23174 (package
23175 (name "python-lazr-delegates")
23176 (version "2.0.4")
23177 (source
23178 (origin
23179 (method url-fetch)
23180 (uri (pypi-uri "lazr.delegates" version))
23181 (sha256
23182 (base32
23183 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23184 (build-system python-build-system)
23185 (arguments
23186 '(#:phases
23187 (modify-phases %standard-phases
23188 (replace 'check
23189 (lambda _
23190 (invoke "python" "setup.py" "nosetests"))))))
23191 (native-inputs
23192 `(("python-nose" ,python-nose)))
23193 (propagated-inputs
23194 `(("python-zope-interface" ,python-zope-interface)))
23195 (home-page "https://launchpad.net/lazr.delegates")
23196 (synopsis "Easily write objects that delegate behavior")
23197 (description
23198 "The @code{lazr.delegates} package makes it easy to write objects that
23199 delegate behavior to another object. The new object adds some property or
23200 behavior on to the other object, while still providing the underlying interface,
23201 and delegating behavior.")
23202 (license license:lgpl3)))
23203
23204 (define-public python-lazr-config
23205 (package
23206 (name "python-lazr-config")
23207 (version "2.2.2")
23208 (source
23209 (origin
23210 (method url-fetch)
23211 (uri (pypi-uri "lazr.config" version))
23212 (sha256
23213 (base32
23214 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23215 (build-system python-build-system)
23216 (arguments
23217 '(#:phases
23218 (modify-phases %standard-phases
23219 (replace 'check
23220 (lambda _
23221 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23222 (native-inputs
23223 `(("python-nose" ,python-nose)))
23224 (propagated-inputs
23225 `(("python-lazr-delegates" ,python-lazr-delegates)
23226 ("python-zope-interface" ,python-zope-interface)))
23227 (home-page "https://launchpad.net/lazr.config")
23228 (synopsis "Create configuration schemas and process and validate configurations")
23229 (description
23230 "The LAZR config system is typically used to manage process configuration.
23231 Process configuration is for saying how things change when we run systems on
23232 different machines, or under different circumstances. This system uses ini-like
23233 file format of section, keys, and values. The config file supports inheritance
23234 to minimize duplication of information across files. The format supports schema
23235 validation.")
23236 (license license:lgpl3)))
23237
23238 (define-public python-flufl-bounce
23239 (package
23240 (name "python-flufl-bounce")
23241 (version "3.0.1")
23242 (source
23243 (origin
23244 (method url-fetch)
23245 (uri (pypi-uri "flufl.bounce" version))
23246 (sha256
23247 (base32
23248 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23249 (build-system python-build-system)
23250 (propagated-inputs
23251 `(("python-atpublic" ,python-atpublic)
23252 ("python-zope-interface" ,python-zope-interface)))
23253 (native-inputs
23254 `(("python-nose2" ,python-nose2)))
23255 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23256 (synopsis "Email bounce detectors")
23257 (description "The @code{flufl.bounce} library provides a set of heuristics
23258 and an API for detecting the original bouncing email addresses from a bounce
23259 message. Many formats found in the wild are supported, as are VERP and
23260 RFC 3464.")
23261 (license (list license:asl2.0
23262 license:lgpl3)))) ; only for setup_headers.py
23263
23264 (define-public python-flufl-i18n
23265 (package
23266 (name "python-flufl-i18n")
23267 (version "3.0")
23268 (source
23269 (origin
23270 (method url-fetch)
23271 (uri (pypi-uri "flufl.i18n" version))
23272 (sha256
23273 (base32
23274 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23275 (build-system python-build-system)
23276 (propagated-inputs
23277 `(("python-atpublic" ,python-atpublic)))
23278 (home-page "https://flufli18n.readthedocs.io")
23279 (synopsis "API for Python internationalization")
23280 (description
23281 "This package provides a high-level, convenient API for managing
23282 internationalization/translation contexts in Python applications. There is a
23283 simple API for single-context applications, such as command line scripts which
23284 only need to translate into one language during the entire course of their
23285 execution. There is a more flexible, but still convenient API for multi-context
23286 applications, such as servers, which may need to switch language contexts for
23287 different tasks.")
23288 (license license:asl2.0)))
23289
23290 (define-public python-flufl-lock
23291 (package
23292 (name "python-flufl-lock")
23293 (version "4.0")
23294 (source
23295 (origin
23296 (method url-fetch)
23297 (uri (pypi-uri "flufl.lock" version))
23298 (sha256
23299 (base32
23300 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23301 (build-system python-build-system)
23302 (propagated-inputs
23303 `(("python-atpublic" ,python-atpublic)
23304 ("python-psutil" ,python-psutil)))
23305 (home-page "https://flufllock.readthedocs.io")
23306 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23307 (description
23308 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23309 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23310 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23311 and have a maximum lifetime built-in.")
23312 (license (list license:asl2.0
23313 license:lgpl3)))) ; only for setup_helpers.py
23314
23315 (define-public python-flufl-testing
23316 (package
23317 (name "python-flufl-testing")
23318 (version "0.8")
23319 (source
23320 (origin
23321 (method url-fetch)
23322 (uri (pypi-uri "flufl.testing" version))
23323 (sha256
23324 (base32
23325 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23326 (build-system python-build-system)
23327 (native-inputs
23328 `(("python-nose2" ,python-nose2)))
23329 (home-page "https://gitlab.com/warsaw/flufl.testing")
23330 (synopsis "Collection of test tool plugins")
23331 (description
23332 "This package contains a small collection of test tool plugins for
23333 @code{nose2} and @code{flake8}.")
23334 (license license:asl2.0)))
23335
23336 (define-public python-devtools
23337 (package
23338 (name "python-devtools")
23339 (version "0.6")
23340 (source
23341 (origin
23342 (method git-fetch)
23343 (uri (git-reference
23344 (url "https://github.com/samuelcolvin/python-devtools")
23345 (commit (string-append "v" version))))
23346 (file-name (git-file-name name version))
23347 (sha256
23348 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23349 (build-system python-build-system)
23350 (native-inputs
23351 `(("python-pytest" ,python-pytest)
23352 ("python-pytest-mock" ,python-pytest-mock)))
23353 (propagated-inputs
23354 `(("python-pygments" ,python-pygments)))
23355 (arguments
23356 `(#:phases (modify-phases %standard-phases
23357 (replace 'check
23358 (lambda _
23359 (invoke "pytest")
23360 #t)))))
23361 (home-page "https://github.com/samuelcolvin/python-devtools")
23362 (synopsis "Debug command and development tools")
23363 (description
23364 "This package provides a debug print command and other development tools.
23365 It adds a simple and readable way to print stuff during development.")
23366 (license license:expat)))
23367
23368 (define-public python-dateparser
23369 (package
23370 (name "python-dateparser")
23371 (version "0.7.6")
23372 (source
23373 (origin
23374 (method url-fetch)
23375 (uri (pypi-uri "dateparser" version))
23376 (sha256
23377 (base32
23378 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23379 (build-system python-build-system)
23380 (propagated-inputs
23381 `(("python-dateutil" ,python-dateutil)
23382 ("python-pytz" ,python-pytz)
23383 ("python-regex" ,python-regex)
23384 ("python-ruamel.yaml" ,python-ruamel.yaml)
23385 ("python-tzlocal" ,python-tzlocal)))
23386 (native-inputs
23387 `(("python-mock" ,python-mock)
23388 ("python-parameterized" ,python-parameterized)
23389 ("tzdata" ,tzdata-for-tests)))
23390 (arguments
23391 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23392 #:tests? #f
23393 #:phases
23394 (modify-phases %standard-phases
23395 (add-before 'check 'set-check-environment
23396 (lambda* (#:key inputs #:allow-other-keys)
23397 (setenv "TZ" "UTC")
23398 (setenv "TZDIR"
23399 (string-append (assoc-ref inputs "tzdata")
23400 "/share/zoneinfo"))
23401 #t)))))
23402 (home-page "https://github.com/scrapinghub/dateparser")
23403 (synopsis
23404 "Date parsing library designed to parse dates from HTML pages")
23405 (description
23406 "@code{python-dateparser} provides modules to easily parse localized
23407 dates in almost any string formats commonly found on web pages.")
23408 (license license:bsd-3)))
23409
23410 (define-public python-dparse
23411 (package
23412 (name "python-dparse")
23413 (version "0.5.1")
23414 (source
23415 (origin
23416 (method url-fetch)
23417 (uri (pypi-uri "dparse" version))
23418 (sha256
23419 (base32
23420 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23421 (build-system python-build-system)
23422 (native-inputs
23423 `(("python-pytest" ,python-pytest)))
23424 (propagated-inputs
23425 `(("python-packaging" ,python-packaging)
23426 ("python-pyyaml" ,python-pyyaml)
23427 ("python-toml" ,python-toml)))
23428 (home-page "https://github.com/pyupio/dparse")
23429 (synopsis "Parser for Python dependency files")
23430 (description "This package provides a parser for Python dependency files.")
23431 (license license:expat)))
23432
23433 (define-public python-dpath
23434 (package
23435 (name "python-dpath")
23436 (version "2.0.1")
23437 (source
23438 (origin
23439 (method url-fetch)
23440 (uri (pypi-uri "dpath" version))
23441 (sha256
23442 (base32
23443 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23444 (build-system python-build-system)
23445 (native-inputs
23446 `(("python-hypothesis" ,python-hypothesis)
23447 ("python-mock" ,python-mock)
23448 ("python-nose" ,python-nose)))
23449 (arguments
23450 '(#:phases
23451 (modify-phases %standard-phases
23452 (replace 'check
23453 (lambda* (#:key inputs outputs #:allow-other-keys)
23454 (add-installed-pythonpath inputs outputs)
23455 ;; This invokation is taken from tox.ini.
23456 (invoke "nosetests" "-d" "-v" "tests/"))))))
23457 (home-page "https://github.com/akesterson/dpath-python")
23458 (synopsis "Filesystem-like pathing and searching for dictionaries")
23459 (description
23460 "@code{python-dpath} is a library for accessing and searching
23461 dictionaries via /slashed/paths ala xpath.
23462
23463 Basically it lets you glob over a dictionary as if it were a filesystem. It
23464 allows you to specify globs (ala the bash eglob syntax, through some advanced
23465 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23466 facility for filtering those results.")
23467 (license license:expat)))
23468
23469 (define-public python-safety
23470 (package
23471 (name "python-safety")
23472 (version "1.9.0")
23473 (source
23474 (origin
23475 (method url-fetch)
23476 (uri (pypi-uri "safety" version))
23477 (sha256
23478 (base32
23479 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23480 (build-system python-build-system)
23481 (arguments
23482 `(#:phases
23483 (modify-phases %standard-phases
23484 (add-after 'unpack 'disable-tests
23485 (lambda _
23486 (substitute* "tests/test_safety.py"
23487 ;; requires network
23488 (("def test_check_live") "def _test_check_live"))
23489 #t)))))
23490 (propagated-inputs
23491 `(("python-click" ,python-click)
23492 ("python-dparse" ,python-dparse)
23493 ("python-packaging" ,python-packaging)
23494 ("python-requests" ,python-requests)))
23495 (home-page "https://github.com/pyupio/safety")
23496 (synopsis "Check installed dependencies for known vulnerabilities")
23497 (description "Safety checks installed dependencies for known vulnerabilities.
23498 By default it uses the open Python vulnerability database Safety DB.")
23499 (license license:expat)))
23500
23501 (define-public python-pypandoc
23502 (package
23503 (name "python-pypandoc")
23504 (version "1.5")
23505 (source
23506 (origin
23507 (method url-fetch)
23508 (uri (pypi-uri "pypandoc" version))
23509 (sha256
23510 (base32
23511 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23512 (build-system python-build-system)
23513 (inputs
23514 `(("pandoc" ,pandoc)
23515 ("pandoc-citeproc" ,pandoc-citeproc)))
23516 (propagated-inputs
23517 `(("wheel" ,python-wheel)))
23518 (native-inputs
23519 `(("texlive" ,(texlive-union (list texlive-amsfonts
23520 texlive-fonts-ec
23521 texlive-latex-hyperref
23522 texlive-latex-oberdiek
23523 texlive-lm
23524 texlive-xcolor)))))
23525 (arguments
23526 `(#:phases
23527 (modify-phases %standard-phases
23528 (add-before 'check 'disable-tests
23529 (lambda _
23530 ;; Disable test requiring network access
23531 (substitute* "tests.py"
23532 (("test_basic_conversion_from_http_url")
23533 "skip_test_basic_conversion_from_http_url"))
23534 ;; Needed by texlive-union to generate fonts
23535 (setenv "HOME" "/tmp")
23536 #t)))))
23537 (home-page "https://github.com/bebraw/pypandoc")
23538 (synopsis "Python wrapper for pandoc")
23539 (description "pypandoc is a thin Python wrapper around pandoc
23540 and pandoc-citeproc.")
23541 (license license:expat)))
23542
23543 (define-public python-rnc2rng
23544 (package
23545 (name "python-rnc2rng")
23546 (version "2.6.4")
23547 (source
23548 (origin
23549 (method url-fetch)
23550 (uri (pypi-uri "rnc2rng" version))
23551 (sha256
23552 (base32
23553 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23554 (build-system python-build-system)
23555 (propagated-inputs
23556 `(("python-rply" ,python-rply)))
23557 (arguments
23558 `(#:phases (modify-phases %standard-phases
23559 (replace 'check
23560 (lambda _
23561 (invoke "python" "test.py"))))))
23562 (home-page "https://github.com/djc/rnc2rng")
23563 (synopsis "Convert RELAX NG Compact to regular syntax")
23564 (description
23565 "This package provides the @command{rnc2rng} command-line tool as well as
23566 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23567 equivalent schemata in the XML-based default RELAX NG syntax.")
23568 (license license:expat)))
23569
23570 (define-public python-telethon
23571 (package
23572 (name "python-telethon")
23573 (version "1.17.5")
23574 (source
23575 (origin
23576 (method git-fetch)
23577 (uri (git-reference
23578 (url "https://github.com/LonamiWebs/Telethon")
23579 (commit (string-append "v" version))))
23580 (file-name (git-file-name name version))
23581 (sha256
23582 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23583 (build-system python-build-system)
23584 (arguments
23585 '(#:phases
23586 (modify-phases %standard-phases
23587 (replace 'check
23588 (lambda* (#:key tests? #:allow-other-keys)
23589 (when tests?
23590 (invoke "py.test" "-v"))
23591 #t)))))
23592 (propagated-inputs
23593 `(("python-rsa" ,python-rsa)
23594 ("python-pyaes" ,python-pyaes)))
23595 (native-inputs
23596 `(("python-pytest" ,python-pytest)
23597 ("python-pytest-asyncio" ,python-pytest-asyncio)
23598 ("python-pytest-trio" ,python-pytest-trio)))
23599 (home-page "https://docs.telethon.dev")
23600 (synopsis "Full-featured Telegram client library for Python 3")
23601 (description "This library is designed to make it easy to write Python
23602 programs that can interact with Telegram.")
23603 (license license:expat)))
23604
23605 (define-public python-citeproc-py
23606 (package
23607 (name "python-citeproc-py")
23608 (version "0.5.1")
23609 (source
23610 (origin
23611 (method url-fetch)
23612 (uri (pypi-uri "citeproc-py" version))
23613 (sha256
23614 (base32
23615 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23616 (build-system python-build-system)
23617 (propagated-inputs
23618 `(("python-lxml" ,python-lxml)
23619 ("python-rnc2rng" ,python-rnc2rng)))
23620 (home-page
23621 "https://github.com/brechtm/citeproc-py")
23622 (synopsis "Citations and bibliography formatter")
23623 (description
23624 "Citeproc-py is a CSL processor for Python. It aims to implement the
23625 CSL 1.0.1 specification. citeproc-py can output styled citations and
23626 bibliographies in a number of different output formats. Currently supported
23627 are plain text, reStructuredText and HTML.")
23628 (license license:bsd-2)))
23629
23630 (define-public python-inform
23631 (package
23632 (name "python-inform")
23633 (version "1.23.0")
23634 (source
23635 (origin
23636 (method url-fetch)
23637 (uri (pypi-uri "inform" version))
23638 (sha256
23639 (base32
23640 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23641 (build-system python-build-system)
23642 (arguments
23643 `(#:tests? #f)) ; PyPI tarball lacks tests
23644 (native-inputs
23645 `(("python-hypothesis" ,python-hypothesis)
23646 ("python-pytest-cov" ,python-pytest-cov)
23647 ("python-pytest-runner" ,python-pytest-runner)))
23648 (propagated-inputs
23649 `(("python-arrow" ,python-arrow)
23650 ("python-six" ,python-six)))
23651 (home-page "https://inform.readthedocs.io")
23652 (synopsis "Print & logging utilities for communicating with user")
23653 (description
23654 "Inform is designed to display messages from programs that are typically run from
23655 a console. It provides a collection of ‘print’ functions that allow you to simply and
23656 cleanly print different types of messages.")
23657 (license license:gpl3+)))
23658
23659 (define-public python-nestedtext
23660 (package
23661 (name "python-nestedtext")
23662 (version "1.0.0")
23663 (source
23664 (origin
23665 (method url-fetch)
23666 (uri (pypi-uri "nestedtext" version))
23667 (sha256
23668 (base32
23669 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23670 (build-system python-build-system)
23671 (arguments
23672 `(#:tests? #f)) ; PyPI tarball lacks tests
23673 (propagated-inputs
23674 `(("python-inform" ,python-inform)))
23675 (home-page "https://nestedtext.org")
23676 (synopsis "Human readable and writable data interchange format")
23677 (description
23678 "NestedText is a file format for holding data that is to be entered, edited, or
23679 viewed by people. It allows data to be organized into a nested collection of
23680 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23681 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23682 NestedText is both simple and natural. Only a small number of concepts and rules must
23683 be kept in mind when creating it. It is easily created, modified, or viewed with
23684 a text editor and easily understood and used by both programmers and non-programmers.")
23685 (license license:expat))) ; MIT license
23686
23687 (define-public python-parallel
23688 (package
23689 (name "python-parallel")
23690 (version "1.6.4.4")
23691 (source
23692 (origin
23693 (method url-fetch)
23694 (uri (string-append
23695 "https://www.parallelpython.com/downloads/pp/pp-"
23696 version ".zip"))
23697 (sha256
23698 (base32
23699 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23700 (native-inputs
23701 `(("unzip" ,unzip)))
23702 (build-system python-build-system)
23703 (arguments '(#:tests? #f)) ; No test suite.
23704 (home-page "https://www.parallelpython.com")
23705 (synopsis "Parallel and distributed programming for Python")
23706 (description "Parallel Python module (PP) provides an easy and efficient
23707 way to create parallel-enabled applications for SMP computers and clusters.
23708 PP module features cross-platform portability and dynamic load balancing.
23709 Thus applications written with PP will parallelize efficiently even on
23710 heterogeneous and multi-platform clusters (including clusters running other
23711 applications with variable CPU loads).")
23712 (license license:bsd-3)))
23713
23714 (define-public python2-parallel
23715 (package-with-python2 python-parallel))
23716
23717 (define-public python-djvulibre
23718 (package
23719 (name "python-djvulibre")
23720 (version "0.8.5")
23721 (source
23722 (origin
23723 (method url-fetch)
23724 (uri (pypi-uri "python-djvulibre" version))
23725 (sha256
23726 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23727 (build-system python-build-system)
23728 (native-inputs
23729 `(("ghostscript" ,ghostscript)
23730 ("pkg-config" ,pkg-config)
23731 ("python-nose" ,python-nose)))
23732 (inputs
23733 `(("djvulibre" ,djvulibre)
23734 ("python-cython" ,python-cython)))
23735 (arguments
23736 `(#:phases
23737 (modify-phases %standard-phases
23738 (add-after 'unpack 'fix-tests
23739 (lambda _
23740 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23741 ;; doesn't make sense on GNU/Linux.
23742 (delete-file "djvu/dllpath.py")
23743 #t)))))
23744 (synopsis "Python bindings for DjVuLibre")
23745 (description "This is a set of Python bindings for the DjVuLibre library.")
23746 (home-page "https://jwilk.net/software/python-djvulibre")
23747 (license license:gpl2)))
23748
23749 (define-public python2-djvulibre
23750 (package-with-python2 python-djvulibre))
23751
23752 (define-public python-versioneer
23753 (package
23754 (name "python-versioneer")
23755 (version "0.19")
23756 (source
23757 (origin
23758 (method url-fetch)
23759 (uri (pypi-uri "versioneer" version))
23760 (sha256
23761 (base32
23762 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23763 (build-system python-build-system)
23764 (home-page
23765 "https://github.com/python-versioneer/python-versioneer")
23766 (synopsis
23767 "Version-string management for VCS-controlled trees")
23768 (description
23769 "@code{versioneer} is a tool for managing a recorded version number in
23770 distutils-based python projects. The goal is to remove the tedious and
23771 error-prone \"update the embedded version string\" step from your release
23772 process.")
23773 (license license:public-domain)))
23774
23775 (define-public python2-gamera
23776 (package
23777 (name "python2-gamera")
23778 (version "3.4.4")
23779 (source
23780 (origin
23781 (method url-fetch)
23782 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23783 "gamera-" version ".tar.gz"))
23784 (sha256
23785 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23786 (modules '((guix build utils)))
23787 (snippet
23788 '(begin
23789 ;; Remove bundled libraries.
23790 (for-each delete-file-recursively
23791 '("src/libpng-1.2.5"
23792 "src/libtiff"
23793 "src/zlib-1.2.8"))))))
23794 (build-system python-build-system)
23795 (inputs
23796 `(("libpng" ,libpng)
23797 ("libtiff" ,libtiff)
23798 ("python2-wxpython" ,python2-wxpython)
23799 ("zlib" ,zlib)))
23800 (arguments
23801 `(#:python ,python-2))
23802 (synopsis "Framework for building document analysis applications")
23803 (description
23804 "Gamera is a toolkit for building document image recognition systems.")
23805 (home-page "https://gamera.informatik.hsnr.de/")
23806 (license license:gpl2+)))
23807
23808 (define-public python-contextvars
23809 (package
23810 (name "python-contextvars")
23811 (version "2.4")
23812 (source
23813 (origin
23814 (method url-fetch)
23815 (uri (pypi-uri "contextvars" version))
23816 (sha256
23817 (base32
23818 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23819 (build-system python-build-system)
23820 (propagated-inputs
23821 `(("python-immutables" ,python-immutables)))
23822 (home-page
23823 "https://github.com/MagicStack/contextvars")
23824 (synopsis "PEP 567 Backport")
23825 (description "This package implements a backport of Python 3.7
23826 @code{contextvars} module (see PEP 567) for Python 3.6.")
23827 (license license:asl2.0)))
23828
23829 (define-public python-aiofiles
23830 (package
23831 (name "python-aiofiles")
23832 (version "0.6.0")
23833 (source
23834 (origin
23835 (method url-fetch)
23836 (uri (pypi-uri "aiofiles" version))
23837 (sha256
23838 (base32
23839 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23840 (build-system python-build-system)
23841 (home-page "https://github.com/Tinche/aiofiles")
23842 (synopsis "File support for @code{asyncio}")
23843 (description "@code{python-aiofiles} is a library for handling local
23844 disk files in asyncio applications.")
23845 (license license:asl2.0)))
23846
23847 (define-public python-pyre-extensions
23848 (package
23849 (name "python-pyre-extensions")
23850 (version "0.0.18")
23851 (source
23852 (origin
23853 (method url-fetch)
23854 (uri (pypi-uri "pyre-extensions" version))
23855 (sha256
23856 (base32
23857 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23858 (build-system python-build-system)
23859 (propagated-inputs
23860 `(("python-typing-extensions"
23861 ,python-typing-extensions)
23862 ("python-typing-inspect" ,python-typing-inspect)))
23863 (home-page "https://pyre-check.org")
23864 (synopsis
23865 "Type system extensions for use with @code{python-pyre}")
23866 (description
23867 "@code{python-pyre-extensions} defines extensions to the standard
23868 @code{typing} module that are supported by the Pyre typechecker.")
23869 (license license:expat)))
23870
23871 (define-public python-dataclasses
23872 (package
23873 (name "python-dataclasses")
23874 (version "0.7")
23875 (source
23876 (origin
23877 (method url-fetch)
23878 (uri (pypi-uri "dataclasses" version))
23879 (sha256
23880 (base32
23881 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23882 (build-system python-build-system)
23883 (home-page
23884 "https://github.com/ericvsmith/dataclasses")
23885 (synopsis
23886 "Backport of the @code{dataclasses} module for Python 3.6")
23887 (description
23888 "This is an implementation of PEP 557, Data Classes. It is a
23889 backport of the @code{dataclasses} module for Python 3.6.")
23890 (license license:asl2.0)))
23891
23892 (define-public python-pywatchman
23893 (package
23894 (name "python-pywatchman")
23895 (version "1.4.1")
23896 (source
23897 (origin
23898 (method url-fetch)
23899 (uri (pypi-uri "pywatchman" version))
23900 (sha256
23901 (base32
23902 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23903 (build-system python-build-system)
23904 (arguments
23905 `(#:tests? #f)) ;there are none
23906 (home-page
23907 "https://facebook.github.io/watchman/")
23908 (synopsis "Watchman client for python")
23909 (description "@code{python-pywatchman} is a library to connect and
23910 query Watchman to discover file changes.")
23911 (license license:bsd-3)))
23912
23913 (define-public python-helpdev
23914 (package
23915 (name "python-helpdev")
23916 (version "0.7.1")
23917 (source
23918 (origin
23919 (method url-fetch)
23920 (uri (pypi-uri "helpdev" version))
23921 (sha256
23922 (base32
23923 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23924 (build-system python-build-system)
23925 (arguments
23926 `(#:phases
23927 (modify-phases %standard-phases
23928 (replace 'check
23929 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23930 (when tests?
23931 (add-installed-pythonpath inputs outputs)
23932 (invoke "pytest" "tests"))
23933 #t)))))
23934 (propagated-inputs
23935 `(("python-importlib-metadata" ,python-importlib-metadata)))
23936 (native-inputs
23937 `(("python-pytest" ,python-pytest)))
23938 (home-page "https://gitlab.com/dpizetta/helpdev")
23939 (synopsis
23940 "Extract information about the Python environment easily")
23941 (description
23942 "Helpdev is a library to easily extract information about the Python
23943 environment.")
23944 (license license:expat)))
23945
23946 (define-public python-qdarkstyle
23947 (package
23948 (name "python-qdarkstyle")
23949 (version "2.8.1")
23950 (source
23951 (origin
23952 (method url-fetch)
23953 (uri (pypi-uri "QDarkStyle" version))
23954 (sha256
23955 (base32
23956 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23957 (build-system python-build-system)
23958 (arguments
23959 `(;; Fails unable to detect valid Qt bindings even when
23960 ;; added as native-inputs.
23961 #:tests? #f))
23962 (propagated-inputs
23963 `(("python-helpdev" ,python-helpdev)
23964 ("python-qtpy" ,python-qtpy)))
23965 (home-page
23966 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23967 (synopsis
23968 "Complete dark stylesheet for Python and Qt applications")
23969 (description "QDarkStyle is the most complete dark stylesheet for Python and
23970 Qt applications.")
23971 (license license:expat)))
23972
23973 (define-public python-bitstring
23974 (package
23975 (name "python-bitstring")
23976 (version "3.1.7")
23977 (source
23978 (origin
23979 (method url-fetch)
23980 (uri (pypi-uri "bitstring" version))
23981 (sha256
23982 (base32
23983 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23984 (build-system python-build-system)
23985 (arguments
23986 `(#:phases
23987 (modify-phases %standard-phases
23988 (replace 'check
23989 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23990 (when tests?
23991 (add-installed-pythonpath inputs outputs)
23992 (with-directory-excursion "test"
23993 (invoke "pytest")))
23994 #t)))))
23995 (native-inputs
23996 `(("python-pytest" ,python-pytest)))
23997 (home-page "https://github.com/scott-griffiths/bitstring")
23998 (synopsis
23999 "Simple construction, analysis and modification of binary data")
24000 (description
24001 "Bitstring is a library for simple construction, analysis and modification
24002 of binary data.")
24003 (license license:expat)))
24004
24005 (define-public python-confuse
24006 (package
24007 (name "python-confuse")
24008 (version "1.4.0")
24009 (source
24010 (origin
24011 (method url-fetch)
24012 (uri (pypi-uri "confuse" version))
24013 (sha256
24014 (base32
24015 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24016 (build-system python-build-system)
24017 (propagated-inputs
24018 `(("python-pathlib" ,python-pathlib)
24019 ("python-pyyaml" ,python-pyyaml)))
24020 (home-page "https://github.com/beetbox/confuse")
24021 (synopsis "Painless YAML configuration.")
24022 (description "Confuse is a configuration library for Python that uses
24023 YAML. It takes care of defaults, overrides, type checking, command-line
24024 integration, human-readable errors, and standard OS-specific locations.")
24025 (license license:expat)))
24026
24027 (define-public python-reflink
24028 (package
24029 (name "python-reflink")
24030 (version "0.2.1")
24031 (source
24032 (origin
24033 (method url-fetch)
24034 (uri (pypi-uri "reflink" version))
24035 (sha256
24036 (base32
24037 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24038 (build-system python-build-system)
24039 (arguments
24040 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24041 (propagated-inputs
24042 `(("python-cffi" ,python-cffi)))
24043 (native-inputs
24044 `(("python-pytest" ,python-pytest)
24045 ("python-pytest-runner" ,python-pytest-runner)))
24046 (home-page "https://gitlab.com/rubdos/pyreflink")
24047 (synopsis "Python wrapper around reflink system call")
24048 (description
24049 "Python reflink wraps around platform specific @code{reflink}
24050 implementations.")
24051 (license license:expat)))
24052
24053 (define-public python-pivy
24054 (package
24055 (name "python-pivy")
24056 (version "0.6.5")
24057 (source
24058 (origin
24059 (method git-fetch)
24060 (uri (git-reference
24061 (url "https://github.com/coin3d/pivy")
24062 (commit version)))
24063 (file-name (git-file-name name version))
24064 (sha256
24065 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24066 (build-system python-build-system)
24067 (arguments
24068 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24069 #:tests? #f
24070 #:phases
24071 (modify-phases %standard-phases
24072 (add-after 'unpack 'patch-cmake-include-dirs
24073 (lambda _
24074 ;; Patch buildsystem to respect Coin3D include directory
24075 (substitute* "CMakeLists.txt"
24076 (("\\$\\{SoQt_INCLUDE_DIRS}")
24077 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24078 #t)))))
24079 (native-inputs
24080 `(("cmake" ,cmake)
24081 ("swig" ,swig)))
24082 (inputs
24083 `(("python-wrapper" ,python-wrapper)
24084 ("qtbase" ,qtbase)
24085 ("libxi" ,libxi)
24086 ("libice" ,libice)
24087 ("soqt" ,soqt)
24088 ("glew" ,glew)
24089 ("coin3D" ,coin3D-4)))
24090 (home-page "https://github.com/coin3d/pivy")
24091 (synopsis "Python bindings to Coin3D")
24092 (description
24093 "Pivy provides python bindings for Coin, a 3D graphics library with an
24094 Application Programming Interface based on the Open Inventor 2.1 API.")
24095 (license license:isc)))
24096
24097 (define-public python-crayons
24098 (package
24099 (name "python-crayons")
24100 (version "0.4.0")
24101 (source
24102 (origin
24103 (method url-fetch)
24104 (uri (pypi-uri "crayons" version))
24105 (sha256
24106 (base32
24107 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24108 (build-system python-build-system)
24109 (propagated-inputs
24110 `(("python-colorama" ,python-colorama)))
24111 (home-page "https://github.com/MasterOdin/crayons")
24112 (synopsis "TextUI colors for Python")
24113 (description "This package gives you colored strings for the terminal.
24114 Crayons automatically wraps a given string in the foreground color and
24115 restores the original state after the string is printed.")
24116 (license license:expat)))
24117
24118 (define-public python-sane
24119 (package
24120 (name "python-sane")
24121 (version "2.9.1")
24122 (source
24123 (origin
24124 (method url-fetch)
24125 (uri (pypi-uri name version))
24126 (sha256
24127 (base32
24128 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24129 (build-system python-build-system)
24130 (native-inputs
24131 `(("python-pytest" ,python-pytest)))
24132 (inputs
24133 `(("sane-backends" ,sane-backends)))
24134 (home-page "https://github.com/python-pillow/Sane")
24135 (synopsis "Python interface to the SANE scanner")
24136 (description "This package provides Python interface to the SANE scanner
24137 and frame grabber interface.")
24138 (license (license:non-copyleft
24139 ;; Yet another variant of the X/MIT license.
24140 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24141
24142 (define-public python-screenkey
24143 (package
24144 (name "python-screenkey")
24145 (version "1.4")
24146 (source
24147 (origin
24148 (method git-fetch)
24149 (uri (git-reference
24150 (url "https://gitlab.com/screenkey/screenkey")
24151 (commit (string-append "v" version))))
24152 (file-name (git-file-name name version))
24153 (sha256
24154 (base32
24155 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24156 (build-system python-build-system)
24157 (arguments
24158 `(#:phases
24159 (modify-phases %standard-phases
24160 (add-after 'unpack 'fix-dlopen-paths
24161 (lambda* (#:key inputs outputs #:allow-other-keys)
24162 (let* ((x11 (assoc-ref inputs "libx11"))
24163 (xtst (assoc-ref inputs "libxtst")))
24164 (substitute* "Screenkey/xlib.py"
24165 (("libX11.so.6")
24166 (string-append x11 "/lib/libX11.so.6")))
24167 (substitute* "Screenkey/xlib.py"
24168 (("libXtst.so.6")
24169 (string-append xtst "/lib/libXtst.so.6")))
24170 #t)))
24171 (add-after 'install 'wrap-screenkey
24172 (lambda* (#:key outputs #:allow-other-keys)
24173 (wrap-program
24174 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24175 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24176 `("GI_TYPELIB_PATH"
24177 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24178 #t)))))
24179 (inputs
24180 `(("python-distutils-extra" ,python-distutils-extra)
24181 ("python-tokenize-rt" ,python-tokenize-rt)
24182 ("libx11" ,libx11)
24183 ("libxtst" ,libxtst)
24184 ("gtk+" ,gtk+)
24185 ("python-pygobject" ,python-pygobject)
24186 ("python-pycairo" ,python-pycairo)
24187 ("python-setuptools-git" ,python-setuptools-git)
24188 ("python-babel" ,python-babel)))
24189 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24190 (synopsis
24191 "Screencast tool to display pressed keys")
24192 (description
24193 "A screencast tool to display your keys inspired by Screenflick.")
24194 (license license:gpl3+)))
24195
24196 (define-public python-jinja2-cli
24197 (package
24198 (name "python-jinja2-cli")
24199 (version "0.7.0")
24200 (source
24201 (origin
24202 (method url-fetch)
24203 (uri (pypi-uri "jinja2-cli" version))
24204 (sha256
24205 (base32
24206 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24207 (build-system python-build-system)
24208 (propagated-inputs
24209 `(("python-jinja2" ,python-jinja2)))
24210 (native-inputs
24211 `(("python-flake8" ,python-flake8)
24212 ("python-jinja2" ,python-jinja2)
24213 ("python-pytest" ,python-pytest)))
24214 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24215 (synopsis "Command-line interface to Jinja2")
24216 (description
24217 "This package provides a command-line interface (CLI) to the Jinja2
24218 template engine.")
24219 (license license:bsd-3)))
24220
24221 (define-public python-readability
24222 (package
24223 (name "python-readability")
24224 (version "0.3.1")
24225 (source
24226 (origin
24227 (method url-fetch)
24228 (uri (pypi-uri "readability" version))
24229 (sha256
24230 (base32
24231 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24232 (build-system python-build-system)
24233 (home-page
24234 "https://github.com/andreasvc/readability/")
24235 (synopsis
24236 "Measure the readability of a given text using surface
24237 characteristics")
24238 (description
24239 "This package provides a Python library that is an implementation of
24240 traditional readability measures based on simple surface
24241 characteristics. These measures are basically linear regressions based on the
24242 number of words, syllables, and sentences.")
24243 (license license:asl2.0)))
24244
24245 (define-public python-listparser
24246 (package
24247 (name "python-listparser")
24248 (version "0.18")
24249 (source
24250 (origin
24251 (method url-fetch)
24252 (uri (pypi-uri "listparser" version))
24253 (sha256
24254 (base32
24255 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24256 (build-system python-build-system)
24257 (home-page
24258 "https://github.com/kurtmckee/listparser")
24259 (synopsis
24260 "Parse subscription lists in Python")
24261 (description
24262 "This package provides a Python library that can parse OPML, FOAF, and
24263 iGoogle subscription lists.")
24264 (license license:expat)))