gnu: python-pygithub: Update to 1.54.1.
[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/inherit base
584 (propagated-inputs
585 `(("python2-enum34" ,python2-enum34) ;optional
586 ,@(package-propagated-inputs base))))))
587
588 (define-public python-shapely
589 (package
590 (name "python-shapely")
591 (version "1.7.1")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (pypi-uri "Shapely" version))
596 (sha256
597 (base32
598 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
599 (modules '((guix build utils)))
600 (snippet
601 '(begin
602 (delete-file "shapely/speedups/_speedups.c")
603 (delete-file "shapely/vectorized/_vectorized.c")
604 #t))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-cython" ,python-cython)
608 ("python-matplotlib" ,python-matplotlib)
609 ("python-pytest" ,python-pytest)
610 ("python-pytest-cov" ,python-pytest-cov)))
611 (inputs
612 `(("geos" ,geos)))
613 (propagated-inputs
614 `(("python-numpy" ,python-numpy)))
615 (arguments
616 `(#:phases
617 (modify-phases %standard-phases
618 (add-after 'unpack 'patch-geos-path
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((geos (assoc-ref inputs "geos"))
621 (glibc (assoc-ref inputs ,(if (%current-target-system)
622 "cross-libc" "libc"))))
623 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
624 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
625 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
626 geos "/lib/libgeos_c.so'])"))
627 (("free = load_dll\\('c'\\)\\.free")
628 (string-append "free = load_dll('c', fallbacks=['"
629 glibc "/lib/libc.so.6']).free"))
630 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
631 (string-append "free = load_dll('c', fallbacks=['"
632 glibc "/lib/libc.so.6']).free"))))
633 #t)))))
634 (home-page "https://github.com/Toblerity/Shapely")
635 (synopsis "Library for the manipulation and analysis of geometric objects")
636 (description "Shapely is a Python package for manipulation and analysis of
637 planar geometric objects. It is based on the @code{GEOS} library.")
638 (license license:bsd-3)))
639
640 (define-public python-shortuuid
641 (package
642 (name "python-shortuuid")
643 (version "0.5.0")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (pypi-uri "shortuuid" version))
648 (sha256
649 (base32
650 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
651 (build-system python-build-system)
652 (native-inputs
653 `(("python-pep8" ,python-pep8)))
654 (home-page "https://github.com/skorokithakis/shortuuid")
655 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
656 (description
657 "@code{shortuuid} is a Python library for generating concise, unambiguous
658 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
659 module and then similar looking characters are removed.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "8.2.0.post0")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version))
670 (sha256
671 (base32
672 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
673 (build-system python-build-system)
674 (arguments
675 `(#:tests? #f ; Tests not included in pypi release.
676 #:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "pytest"))
682 #t)))))
683 (native-inputs
684 `(("python-cython" ,python-cython)
685 ("python-pytest" ,python-pytest)
686 ("python-setuptools-scm" ,python-setuptools-scm)
687 ("python-toml" ,python-toml)
688 ("python-wheel" ,python-wheel)))
689 (home-page "https://github.com/python-useful-helpers/logwrap")
690 (synopsis "Decorator for logging function arguments")
691 (description "This package provides a decorator to log function arguments
692 and function call return values in a human-readable way.")
693 (license license:asl2.0)))
694
695 (define-public python2-shapely
696 (package-with-python2 python-shapely))
697
698 (define-public python-clyent
699 (package
700 (name "python-clyent")
701 (version "1.2.1")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "clyent" version))
706 (sha256
707 (base32
708 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
709 (build-system python-build-system)
710 (native-inputs
711 `(("python-mock" ,python-mock)))
712 (home-page "https://github.com/Anaconda-Platform/clyent")
713 (synopsis "Command line client library")
714 (description "Clyent is a Python command line utility library. It is used
715 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
716 (license license:bsd-3)))
717
718 (define-public python2-clyent
719 (package-with-python2 python-clyent))
720
721 (define-public python-babel
722 (package
723 (name "python-babel")
724 (version "2.9.0")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "Babel" version))
729 (sha256
730 (base32
731 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-freezegun" ,python-freezegun)
735 ("python-pytest" ,python-pytest)))
736 (propagated-inputs
737 `(("python-pytz" ,python-pytz)))
738 (arguments
739 `(#:phases (modify-phases %standard-phases
740 (replace 'check
741 (lambda _
742 (invoke "pytest" "-vv"))))))
743 (home-page "http://babel.pocoo.org/")
744 (synopsis
745 "Tools for internationalizing Python applications")
746 (description
747 "Babel is composed of two major parts:
748 - tools to build and work with gettext message catalogs
749 - a Python interface to the CLDR (Common Locale Data Repository), providing
750 access to various locale display names, localized number and date formatting,
751 etc. ")
752 (license license:bsd-3)))
753
754 (define-public python2-babel
755 (package-with-python2 python-babel))
756
757 (define-public python2-backport-ssl-match-hostname
758 (package
759 (name "python2-backport-ssl-match-hostname")
760 (version "3.5.0.1")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "backports.ssl_match_hostname" version))
765 (sha256
766 (base32
767 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:python ,python-2
771 #:tests? #f)) ; no test target
772 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
773 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
774 (description
775 "This backport brings the ssl.match_hostname() function to users of
776 earlier versions of Python. The function checks the hostname in the
777 certificate returned by the server to which a connection has been established,
778 and verifies that it matches the intended target hostname.")
779 (license license:psfl)))
780
781 (define-public python-bidict
782 (package
783 (name "python-bidict")
784 (version "0.21.2")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "bidict" version))
789 (sha256
790 (base32
791 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
792 (build-system python-build-system)
793 (native-inputs
794 `(("python-coverage" ,python-coverage)
795 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
796 ("python-pre-commit" ,python-pre-commit)
797 ("python-py" ,python-py)
798 ("python-pytest" ,python-pytest)
799 ("python-pytest-benchmark" ,python-pytest-benchmark)
800 ("python-pytest-cov" ,python-pytest-cov)
801 ("python-setuptools-scm" ,python-setuptools-scm)
802 ("python-sortedcollections" ,python-sortedcollections)
803 ("python-sortedcontainers" ,python-sortedcontainers)
804 ("python-sphinx" ,python-sphinx)
805 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
806 ("python-tox" ,python-tox)))
807 (arguments
808 `(#:phases (modify-phases %standard-phases
809 (add-after 'unpack 'relax-reqs
810 (lambda _
811 (substitute* "setup.py"
812 (("sortedcollections < 2") "sortedcollections"))
813 #t))
814 (replace 'check
815 (lambda _ (invoke "./run_tests.py"))))))
816 (home-page "https://bidict.readthedocs.io")
817 (synopsis "Bidirectional mapping library")
818 (description "The @code{bidict} library provides several data structures
819 for working with bidirectional mappings in Python.")
820 (license license:mpl2.0)))
821
822 (define-public python-bitarray
823 (package
824 (name "python-bitarray")
825 (version "1.4.0")
826 (source (origin
827 (method url-fetch)
828 (uri (pypi-uri "bitarray" version))
829 (sha256
830 (base32
831 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
832 (build-system python-build-system)
833 (home-page "https://github.com/ilanschnell/bitarray")
834 (synopsis "Efficient arrays of booleans")
835 (description "This package provides an object type which efficiently
836 represents an array of booleans. Bitarrays are sequence types and behave very
837 much like usual lists. Eight bits are represented by one byte in a contiguous
838 block of memory. The user can select between two representations:
839 little-endian and big-endian. All of the functionality is implemented in C.
840 Methods for accessing the machine representation are provided. This can be
841 useful when bit level access to binary files is required, such as portable
842 bitmap image files. Also, when dealing with compressed data which uses
843 variable bit length encoding, you may find this module useful.")
844 (license license:psfl)))
845
846 (define-public python-boolean.py
847 (package
848 (name "python-boolean.py")
849 (version "3.6")
850 (source
851 (origin
852 ;; There's no source tarball on PyPI.
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://github.com/bastikr/boolean.py")
856 (commit (string-append "v" version))))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
860 (build-system python-build-system)
861 (home-page "https://github.com/bastikr/boolean.py")
862 (synopsis "Boolean algebra in one Python module")
863 (description
864 "This is a small Python library that implements boolean algebra.
865 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
866 @code{Symbol} class that can take on one of these two values. Calculations
867 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
868 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
869 Expressions are constructed from parsed strings or directly in Python.")
870 (license license:bsd-2)))
871
872 (define-public python-hdf4
873 (package
874 (name "python-hdf4")
875 (version "0.9")
876 (source
877 (origin
878 (method url-fetch)
879 (uri (pypi-uri name version))
880 (sha256
881 (base32
882 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
883 (build-system python-build-system)
884 (native-inputs `(("nose" ,python-nose)))
885 (propagated-inputs `(("numpy" ,python-numpy)))
886 (inputs
887 `(("hdf4" ,hdf4)
888 ("libjpeg" ,libjpeg-turbo)
889 ("zlib" ,zlib)))
890 (arguments
891 `(#:phases
892 (modify-phases %standard-phases
893 (replace 'check
894 (lambda _
895 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
896 ;; on to import numpy. Somehow this works on their CI system.
897 ;; Let's just manage PYTHONPATH here instead.
898 (substitute* "runexamples.sh"
899 (("export PYTHONPATH=.*") ""))
900 (setenv "PYTHONPATH"
901 (string-append (getcwd) ":"
902 (getenv "PYTHONPATH")))
903 (invoke "./runexamples.sh")
904 (invoke "nosetests" "-v"))))))
905 (home-page "https://github.com/fhs/python-hdf4")
906 (synopsis "Python interface to the NCSA HDF4 library")
907 (description
908 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
909 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
910 NetCDF files can also be read and modified. Python-HDF4 is a fork of
911 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
912 (license license:expat)))
913
914 (define-public python2-hdf4
915 (package-with-python2 python-hdf4))
916
917 (define-public python-h5py
918 (package
919 (name "python-h5py")
920 (version "2.10.0")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "h5py" version))
925 (sha256
926 (base32
927 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
928 (build-system python-build-system)
929 (arguments
930 `(#:tests? #f ; no test target
931 #:phases
932 (modify-phases %standard-phases
933 (add-after 'unpack 'fix-hdf5-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 (let ((prefix (assoc-ref inputs "hdf5")))
936 (substitute* "setup_build.py"
937 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
938 (string-append "['" prefix "/lib" "']"))
939 (("'/opt/local/include', '/usr/local/include'")
940 (string-append "'" prefix "/include" "'")))
941 (substitute* "setup_configure.py"
942 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
943 (string-append "['" prefix "/lib" "']")))
944 #t))))))
945 (propagated-inputs
946 `(("python-six" ,python-six)
947 ("python-numpy" ,python-numpy)))
948 (inputs
949 `(("hdf5" ,hdf5-1.10)))
950 (native-inputs
951 `(("python-cython" ,python-cython)
952 ("python-pkgconfig" ,python-pkgconfig)
953 ("pkg-config" ,pkg-config)))
954 (home-page "https://www.h5py.org/")
955 (synopsis "Read and write HDF5 files from Python")
956 (description
957 "The h5py package provides both a high- and low-level interface to the
958 HDF5 library from Python. The low-level interface is intended to be a
959 complete wrapping of the HDF5 API, while the high-level component supports
960 access to HDF5 files, datasets and groups using established Python and NumPy
961 concepts.")
962 (license license:bsd-3)))
963
964 (define-public python2-h5py
965 (package-with-python2 python-h5py))
966
967 (define-public python-sh
968 (package
969 (name "python-sh")
970 (version "1.12.14")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "sh" version))
975 (sha256
976 (base32
977 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
978 (build-system python-build-system)
979 (arguments
980 '(#:phases
981 (modify-phases %standard-phases
982 (replace 'check
983 (lambda _
984 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
985 (setenv "HOME" "/tmp")
986 (invoke "python" "sh.py" "test"))))))
987 (native-inputs
988 `(("python-coverage" ,python-coverage)))
989 (home-page "https://github.com/amoffat/sh")
990 (synopsis "Python subprocess replacement")
991 (description "This package provides a replacement for Python's
992 @code{subprocess} feature.")
993 (license license:expat)))
994
995 (define-public python2-sh
996 (package-with-python2 python-sh))
997
998 (define-public python-cftime
999 (package
1000 (name "python-cftime")
1001 (version "1.0.4.2")
1002 (source
1003 (origin
1004 (method url-fetch)
1005 (uri (pypi-uri "cftime" version))
1006 (sha256
1007 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1008 (build-system python-build-system)
1009 (propagated-inputs
1010 `(("python-numpy" ,python-numpy)))
1011 (native-inputs
1012 `(("python-coveralls" ,python-coveralls)
1013 ("python-cython" ,python-cython)
1014 ("python-pytest-cov" ,python-pytest-cov)))
1015 (home-page "https://github.com/Unidata/cftime")
1016 (synopsis "Library for time handling")
1017 (description
1018 "This package provides time-handling functionality that used to be part
1019 of the netcdf4 package before.")
1020 ;; This package claims to include code under the GPLv3 but is released
1021 ;; under ISC.
1022 (license (list license:isc license:gpl3+))))
1023
1024 (define-public python-netcdf4
1025 (package
1026 (name "python-netcdf4")
1027 (version "1.5.3")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "netCDF4" version))
1032 (sha256
1033 (base32
1034 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:phases
1038 (modify-phases %standard-phases
1039 (add-after 'unpack 'configure-locations
1040 (lambda* (#:key inputs #:allow-other-keys)
1041 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1042 #t)))))
1043 (native-inputs
1044 `(("python-cython" ,python-cython)))
1045 (propagated-inputs
1046 `(("python-numpy" ,python-numpy)
1047 ("python-cftime" ,python-cftime)))
1048 (inputs
1049 `(("netcdf" ,netcdf)
1050 ("hdf4" ,hdf4)
1051 ("hdf5" ,hdf5)))
1052 (home-page "https://github.com/Unidata/netcdf4-python")
1053 (synopsis "Python/numpy interface to the netCDF library")
1054 (description "Netcdf4-python is a Python interface to the netCDF C
1055 library. netCDF version 4 has many features not found in earlier
1056 versions of the library and is implemented on top of HDF5. This module
1057 can read and write files in both the new netCDF 4 and the old netCDF 3
1058 format, and can create files that are readable by HDF5 clients. The
1059 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1060 to users of that module.")
1061 ;; The software is mainly ISC, but includes some files covered
1062 ;; by the Expat license.
1063 (license (list license:isc license:expat))))
1064
1065 (define-public python-license-expression
1066 (package
1067 (name "python-license-expression")
1068 (version "1.2")
1069 (source
1070 (origin
1071 (method url-fetch)
1072 (uri (pypi-uri "license-expression" version))
1073 (sha256
1074 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1075 (build-system python-build-system)
1076 (propagated-inputs
1077 `(("python-boolean.py" ,python-boolean.py)))
1078 (home-page "https://github.com/nexB/license-expression")
1079 (synopsis "Apply boolean logic to license expressions")
1080 (description
1081 "This Python module defines a tiny language to evaluate and compare
1082 license expressions using boolean logic. Logical combinations of licenses can
1083 be tested for equality, containment, and equivalence. They can be normalised
1084 and simplified. It supports SPDX license expressions as well as other naming
1085 conventions and aliases in the same expression.")
1086 (license license:gpl2+)))
1087
1088 (define-public python-lockfile
1089 (package
1090 (name "python-lockfile")
1091 (version "0.12.2")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "lockfile" version))
1096 (sha256
1097 (base32
1098 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1099 (build-system python-build-system)
1100 (arguments '(#:test-target "check"))
1101 (native-inputs
1102 `(("python-pbr" ,python-pbr)))
1103 (home-page "https://launchpad.net/pylockfile")
1104 (synopsis "Platform-independent file locking module")
1105 (description
1106 "The lockfile package exports a LockFile class which provides a simple
1107 API for locking files.")
1108 (license license:expat)))
1109
1110 (define-public python-filelock
1111 (package
1112 (name "python-filelock")
1113 (version "3.0.12")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "filelock" version))
1118 (sha256
1119 (base32
1120 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1121 (build-system python-build-system)
1122 (home-page
1123 "https://github.com/benediktschmitt/py-filelock")
1124 (synopsis "Platform independent file lock")
1125 (description "@code{filelock} contains a single module implementing
1126 a platform independent file lock in Python, which provides a simple way of
1127 inter-process communication.")
1128 (license license:unlicense)))
1129
1130 (define-public python-semantic-version
1131 (package
1132 (name "python-semantic-version")
1133 (version "2.8.5")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (pypi-uri "semantic_version" version))
1138 (sha256
1139 (base32
1140 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1141 (build-system python-build-system)
1142 (home-page "https://github.com/rbarrois/python-semanticversion")
1143 (synopsis "Semantic versioning module for Python")
1144 (description
1145 "The @code{semantic_version} class is a small library for handling
1146 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1147
1148 It can compare versions, generate a new version that represents a bump in one of
1149 the version levels, and check whether any given string is a proper semantic
1150 version identifier.")
1151 (license license:bsd-3)))
1152
1153 (define-public python2-semantic-version
1154 (package-with-python2 python-semantic-version))
1155
1156 (define-public python-serpent
1157 (package
1158 (name "python-serpent")
1159 (version "1.28")
1160 (source
1161 (origin
1162 (method url-fetch)
1163 (uri (pypi-uri "serpent" version))
1164 (sha256
1165 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1166 (build-system python-build-system)
1167 (native-inputs
1168 `(("python-attrs" ,python-attrs)
1169 ("python-pytz" ,python-pytz)))
1170 (home-page "https://github.com/irmen/Serpent")
1171 (synopsis "Serializer for literal Python expressions")
1172 (description
1173 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1174 serialization. It serializes an object tree into bytes (an utf-8 encoded
1175 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1176 to rebuild the original object tree.
1177
1178 Because only safe literals are encoded, it is safe to send serpent data to
1179 other machines, such as over the network.")
1180 (properties `((python2-variant . ,(delay python2-serpent))))
1181 (license license:expat)))
1182
1183 (define-public python2-serpent
1184 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1185 (package/inherit base
1186 (propagated-inputs
1187 `(("python-enum34" ,python2-enum34)
1188 ,@(package-propagated-inputs base))))))
1189
1190 (define-public python-setuptools
1191 (package
1192 (name "python-setuptools")
1193 (version "52.0.0")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (pypi-uri "setuptools" version))
1198 (sha256
1199 (base32
1200 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1201 (modules '((guix build utils)))
1202 (snippet
1203 '(begin
1204 ;; Remove included binaries which are used to build self-extracting
1205 ;; installers for Windows.
1206 ;; TODO: Find some way to build them ourself so we can include them.
1207 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1208 #t))))
1209 (build-system python-build-system)
1210 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1211 ;; One could bootstrap with an internal untested setuptools.
1212 (arguments
1213 `(#:tests? #f))
1214 (home-page "https://pypi.org/project/setuptools/")
1215 (synopsis
1216 "Library designed to facilitate packaging Python projects")
1217 (description
1218 "Setuptools is a fully-featured, stable library designed to facilitate
1219 packaging Python projects, where packaging includes:
1220 Python package and module definitions,
1221 distribution package metadata,
1222 test hooks,
1223 project installation,
1224 platform-specific details,
1225 Python 3 support.")
1226 ;; TODO: setuptools now bundles the following libraries:
1227 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1228 (license (list license:psfl ; setuptools itself
1229 license:expat ; six, appdirs, pyparsing
1230 license:asl2.0 ; packaging is dual ASL2/BSD-2
1231 license:bsd-2))
1232 (properties `((python2-variant . ,(delay python2-setuptools))))))
1233
1234 ;; Newer versions of setuptools no longer support Python 2.
1235 (define-public python2-setuptools
1236 (package
1237 (name "python2-setuptools")
1238 (version "41.0.1")
1239 (source
1240 (origin
1241 (method url-fetch)
1242 (uri (pypi-uri "setuptools" version ".zip"))
1243 (sha256
1244 (base32
1245 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1246 (modules '((guix build utils)))
1247 (snippet
1248 '(begin
1249 ;; Remove included binaries which are used to build self-extracting
1250 ;; installers for Windows.
1251 ;; TODO: Find some way to build them ourself so we can include them.
1252 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1253 #t))))
1254 (build-system python-build-system)
1255 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1256 ;; One could bootstrap with an internal untested setuptools.
1257 (arguments
1258 `(#:tests? #f))
1259 (native-inputs
1260 `(("unzip" ,unzip)))
1261 (home-page "https://pypi.org/project/setuptools/")
1262 (synopsis
1263 "Library designed to facilitate packaging Python projects")
1264 (description
1265 "Setuptools is a fully-featured, stable library designed to facilitate
1266 packaging Python projects, where packaging includes:
1267 Python package and module definitions,
1268 distribution package metadata,
1269 test hooks,
1270 project installation,
1271 platform-specific details,
1272 Python 3 support.")
1273 ;; TODO: setuptools now bundles the following libraries:
1274 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1275 (license (list license:psfl ; setuptools itself
1276 license:expat ; six, appdirs, pyparsing
1277 license:asl2.0 ; packaging is dual ASL2/BSD-2
1278 license:bsd-2))))
1279
1280 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1281 (define-public python-setuptools-for-tensorflow
1282 (hidden-package
1283 (package
1284 (inherit python-setuptools)
1285 (version "39.1.0")
1286 (source (origin
1287 (inherit (package-source python-setuptools))
1288 (uri (pypi-uri "setuptools" version ".zip"))
1289 (sha256
1290 (base32
1291 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1292
1293 (define-public python-uniseg
1294 (package
1295 (name "python-uniseg")
1296 (version "0.7.1")
1297 (source
1298 (origin
1299 (method url-fetch)
1300 (uri (pypi-uri "uniseg" version ".zip"))
1301 (sha256
1302 (base32
1303 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1304 (build-system python-build-system)
1305 (arguments
1306 '(#:tests? #f)) ; The test suite requires network access.
1307 (native-inputs
1308 `(("unzip" ,unzip)))
1309 (home-page
1310 "https://bitbucket.org/emptypage/uniseg-python")
1311 (synopsis
1312 "Python library to determine Unicode text segmentations")
1313 (description
1314 "Uniseg is a Python package used to determine Unicode text segmentations.
1315 Supported segmentations include:
1316 @enumerate
1317 @item @dfn{Code point} (any value in the Unicode codespace)
1318 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1319 multiple Unicode code points, e.g. \"G\" + acute-accent)
1320 @item Word break
1321 @item Sentence break
1322 @item Line break
1323 @end enumerate")
1324 (license license:expat)))
1325
1326 (define-public python2-uniseg
1327 (package-with-python2 python-uniseg))
1328
1329 (define-public python-humanfriendly
1330 (package
1331 (name "python-humanfriendly")
1332 (version "8.2")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (pypi-uri "humanfriendly" version))
1337 (sha256
1338 (base32
1339 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1343 #:tests? #f))
1344 (home-page "https://humanfriendly.readthedocs.io")
1345 (synopsis "Human-friendly input and output in Python")
1346 (description
1347 "The functions and classes in @code{humanfriendly} can be used to make
1348 text interfaces more user-friendly. It includes tools to parse and format
1349 numbers, file sizes, and timespans, timers for long-running operations, menus
1350 to allow the user to choose from a list of options, and terminal interaction
1351 helpers.")
1352 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1353 (license license:expat)))
1354
1355 (define-public python2-humanfriendly
1356 (let ((base (package-with-python2
1357 (strip-python2-variant python-humanfriendly))))
1358 (package/inherit base
1359 (propagated-inputs
1360 `(("python2-monotonic" ,python2-monotonic)
1361 ,@(package-propagated-inputs base))))))
1362
1363 (define-public python-textparser
1364 (package
1365 (name "python-textparser")
1366 (version "0.23.0")
1367 (source
1368 (origin
1369 (method url-fetch)
1370 (uri (pypi-uri "textparser" version))
1371 (sha256
1372 (base32
1373 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1374 (build-system python-build-system)
1375 (home-page "https://github.com/eerimoq/textparser")
1376 (synopsis "Fast text parser for Python")
1377 (description "This library provides a text parser written in the Python
1378 language. It aims to be fast.")
1379 (license license:expat)))
1380
1381 (define-public python-aenum
1382 (package
1383 (name "python-aenum")
1384 (version "2.2.4")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "aenum" version))
1389 (sha256
1390 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1391 (build-system python-build-system)
1392 (arguments
1393 `(#:phases (modify-phases %standard-phases
1394 (replace 'check
1395 (lambda _
1396 (format #t "current working dir ~s~%" (getcwd))
1397 (setenv "PYTHONPATH"
1398 (string-append ".:" (getenv "PYTHONPATH")))
1399 ;; We must run the test suite module directly, as it
1400 ;; fails to define the 'tempdir' variable in scope for
1401 ;; the tests otherwise
1402 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1403 ;; issues/32/running-tests-with-python-setuppy-test).
1404 (invoke "python3" "aenum/test.py")
1405 ;; This one fails with "NameError: name
1406 ;; 'test_pickle_dump_load' is not defined" (see:
1407 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1408 ;; /error-running-the-test_v3py-test-suite).
1409 ;; (invoke "python3" "aenum/test_v3.py")
1410 #t)))))
1411 (home-page "https://bitbucket.org/stoneleaf/aenum")
1412 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1413 (description "The aenum library includes an @code{Enum} base class, a
1414 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1415 class.")
1416 (license license:bsd-3)))
1417
1418 (define-public python-can
1419 (package
1420 (name "python-can")
1421 (version "3.3.3")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (pypi-uri "python-can" version))
1426 (sha256
1427 (base32
1428 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1429 (build-system python-build-system)
1430 (arguments
1431 `(#:phases (modify-phases %standard-phases
1432 (add-after 'unpack 'relax-version-requirements
1433 (lambda _
1434 (substitute* "setup.py"
1435 (("mock~=2\\.0") "mock")
1436 (("coverage<5") "coverage")
1437 (("pytest~=4\\.3") "pytest")
1438 (("hypothesis~=4\\.56") "hypothesis"))
1439 #t))
1440 (add-after 'unpack 'fix-broken-tests
1441 ;; The tests try to run two scripts it expects should be
1442 ;; in PATH, but they aren't at this time (see:
1443 ;; https://github.com/hardbyte/python-can/issues/805).
1444 (lambda _
1445 (substitute* "test/test_scripts.py"
1446 (("\"can_logger\\.py --help\"") "")
1447 (("\"can_player\\.py --help\"") ""))
1448 #t)))))
1449 (propagated-inputs
1450 `(("python-aenum" ,python-aenum)
1451 ("python-wrapt" ,python-wrapt)))
1452 (native-inputs
1453 `(("python-codecov" ,python-codecov)
1454 ("python-coverage" ,python-coverage)
1455 ("python-future" ,python-future)
1456 ("python-hypothesis" ,python-hypothesis)
1457 ("python-mock" ,python-mock)
1458 ("python-pyserial" ,python-pyserial)
1459 ("python-pytest" ,python-pytest)
1460 ("python-pytest-cov" ,python-pytest-cov)
1461 ("python-pytest-runner" ,python-pytest-runner)
1462 ("python-pytest-timeout" ,python-pytest-timeout)))
1463 (home-page "https://github.com/hardbyte/python-can")
1464 (synopsis "Controller Area Network (CAN) interface module for Python")
1465 (description "This package defines the @code{can} module, which provides
1466 controller area network (CAN) support for Python developers; providing common
1467 abstractions to different hardware devices, and a suite of utilities for
1468 sending and receiving messages on a CAN bus.")
1469 (license license:lgpl3+)))
1470
1471 (define-public python-caniusepython3
1472 (package
1473 (name "python-caniusepython3")
1474 (version "7.2.0")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "caniusepython3" version))
1479 (sha256
1480 (base32
1481 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1482 (build-system python-build-system)
1483 (arguments
1484 `(#:phases (modify-phases %standard-phases
1485 (add-after 'unpack 'relax-requirements
1486 (lambda _
1487 (substitute* "setup.py"
1488 ;; These are for compatibility with Python 2.
1489 ((".*'argparse', 'backports.functools_lru_cache',.*")
1490 ""))
1491 (substitute* "dev_requirements.txt"
1492 ((".*pylint.*") "")) ;not actually required
1493 #t))
1494 (replace 'check
1495 (lambda _
1496 (invoke "py.test" "-k" "not NetworkTests"))))))
1497 (propagated-inputs
1498 `(("python-distlib" ,python-distlib)
1499 ("python-packaging" ,python-packaging)
1500 ("python-requests" ,python-requests)))
1501 (native-inputs
1502 `(("python-mock" ,python-mock)
1503 ("python-pytest" ,python-pytest)))
1504 (home-page "https://github.com/brettcannon/caniusepython3")
1505 (synopsis "Check for Python 3-incompatible Python libraries")
1506 (description "The @command{caniusepython3} command scans your project and
1507 reports the Python 3-incompatible libraries it found. It can also be used as
1508 a library.")
1509 (license license:asl2.0)))
1510
1511 (define-public python-diskcache
1512 (package
1513 (name "python-diskcache")
1514 (version "4.1.0")
1515 (source
1516 (origin
1517 (method url-fetch)
1518 (uri (pypi-uri "diskcache" version))
1519 (sha256
1520 (base32
1521 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1522 (build-system python-build-system)
1523 (arguments
1524 `(#:tests? #f)) ;test suite not included in the release
1525 (home-page "http://www.grantjenks.com/docs/diskcache/")
1526 (synopsis "Disk and file backed cache library")
1527 (description "DiskCache is a disk and file backed persistent cache.")
1528 (license license:asl2.0)))
1529
1530 (define-public python-bitstruct
1531 (package
1532 (name "python-bitstruct")
1533 (version "8.9.0")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (pypi-uri "bitstruct" version))
1538 (sha256
1539 (base32
1540 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1541 (build-system python-build-system)
1542 (home-page "https://github.com/eerimoq/bitstruct")
1543 (synopsis "Python values to and C bit field structs converter")
1544 (description "This module performs conversions between Python values and C
1545 bit field structs represented as Python byte strings. It is intended to have
1546 a similar interface as the @code{struct} module from Python, but working on
1547 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1548 (license license:expat)))
1549
1550 (define-public python-cantools
1551 (package
1552 (name "python-cantools")
1553 (version "33.1.1")
1554 (source
1555 (origin
1556 ;; We take the sources from the Git repository as the documentation is
1557 ;; not included with the PyPI archive.
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/eerimoq/cantools")
1561 (commit version)))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1566 (build-system python-build-system)
1567 (arguments
1568 `(#:phases
1569 (modify-phases %standard-phases
1570 (add-after 'build 'build-doc
1571 (lambda _
1572 ;; See: https://github.com/eerimoq/cantools/issues/190.
1573 (substitute* "README.rst"
1574 (("https://github.com/eerimoq/cantools/raw/master\
1575 /docs/monitor.png")
1576 "monitor.png"))
1577 (with-directory-excursion "docs"
1578 (invoke "make" "man" "info"))))
1579 (add-after 'install 'install-doc
1580 (lambda* (#:key outputs #:allow-other-keys)
1581 (let* ((out (assoc-ref outputs "out"))
1582 (info (string-append out "/share/info"))
1583 (man1 (string-append out "/share/man/man1")))
1584 (format #t "CWD: ~s~%" (getcwd))
1585 (install-file "docs/_build/texinfo/cantools.info" info)
1586 (install-file "docs/_build/man/cantools.1" man1)
1587 #t))))))
1588 (native-inputs
1589 `(("sphinx" ,python-sphinx)
1590 ("texinfo" ,texinfo)))
1591 (propagated-inputs
1592 `(("python-bitstruct" ,python-bitstruct)
1593 ("python-can" ,python-can)
1594 ("python-diskcache" ,python-diskcache)
1595 ("python-textparser" ,python-textparser)))
1596 (home-page "https://github.com/eerimoq/cantools")
1597 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1598 (description "This package includes Controller Area Network (CAN) related
1599 tools that can be used to:
1600 @itemize
1601 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1602 @item encode and decode CAN messages
1603 @item multiplex simple and extended signals
1604 @item diagnose DID encoding and decoding
1605 @item dump the CAN decoder output
1606 @item test CAN nodes
1607 @item generate C source code
1608 @item monitor the CAN bus
1609 @end itemize")
1610 (license license:expat)))
1611
1612 (define-public python-capturer
1613 (package
1614 (name "python-capturer")
1615 (version "2.4")
1616 (source
1617 (origin
1618 (method url-fetch)
1619 (uri (pypi-uri "capturer" version))
1620 (sha256
1621 (base32
1622 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1623 (build-system python-build-system)
1624 (arguments
1625 `(#:tests? #f))
1626 (propagated-inputs
1627 `(("python-humanfriendly" ,python-humanfriendly)))
1628 (home-page "https://capturer.readthedocs.io")
1629 (synopsis "Capture stdout and stderr streams of the current process")
1630 (description
1631 "The capturer package makes it easy to capture the stdout and stderr
1632 streams of the current process and subprocesses. Output can be relayed
1633 to the terminal in real time but is also available to the Python program
1634 for additional processing.")
1635 (license license:expat)))
1636
1637 (define-public python2-capturer
1638 (package-with-python2 python-capturer))
1639
1640 (define-public python-case
1641 (package
1642 (name "python-case")
1643 (version "1.5.3")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "case" version))
1648 (sha256
1649 (base32
1650 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1651 (build-system python-build-system)
1652 (propagated-inputs
1653 `(("python-mock" ,python-mock)
1654 ("python-nose" ,python-nose)
1655 ("python-six" ,python-six)
1656 ("python-unittest2" ,python-unittest2)))
1657 (native-inputs
1658 `(("python-coverage" ,python-coverage)))
1659 (home-page "https://github.com/celery/case")
1660 (synopsis "Unittest utilities and convenience methods")
1661 (description
1662 "The @code{case} package provides utilities on top of unittest, including
1663 some helpful Python 2 compatibility convenience methods.")
1664 (license license:bsd-3)))
1665
1666 (define-public python-verboselogs
1667 (package
1668 (name "python-verboselogs")
1669 (version "1.7")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "verboselogs" version))
1674 (sha256
1675 (base32
1676 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1677 (build-system python-build-system)
1678 (arguments
1679 `(#:phases
1680 (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 ;; Do not run pylint plugin test, as astroid is an old
1684 ;; unsupported version.
1685 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1686 "verboselogs/tests.py"))))))
1687 (native-inputs
1688 `(("python-mock" ,python-mock)
1689 ("python-pytest" ,python-pytest)))
1690 (home-page "https://verboselogs.readthedocs.io")
1691 (synopsis "Verbose logging level for Python's logging module")
1692 (description
1693 "The @code{verboselogs} package extends Python's @code{logging} module to
1694 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1695 (license license:expat)))
1696
1697 (define-public python2-verboselogs
1698 (package-with-python2 python-verboselogs))
1699
1700 (define-public python-coloredlogs
1701 (package
1702 (name "python-coloredlogs")
1703 (version "10.0")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (pypi-uri "coloredlogs" version))
1708 (sha256
1709 (base32
1710 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1711 (build-system python-build-system)
1712 (arguments
1713 `(;Tests require some updated modules
1714 #:tests? #f))
1715 (propagated-inputs
1716 `(("python-capturer" ,python-capturer)))
1717 (home-page "https://coloredlogs.readthedocs.io")
1718 (synopsis "Colored stream handler for Python's logging module")
1719 (description
1720 "The @code{coloredlogs} package enables colored terminal output for
1721 Python's logging module. The @code{ColoredFormatter} class inherits from
1722 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1723 messages in color.")
1724 (license license:expat)))
1725
1726 (define-public python2-coloredlogs
1727 (package-with-python2 python-coloredlogs))
1728
1729 (define-public python-editorconfig
1730 (package
1731 (name "python-editorconfig")
1732 (version "0.12.2")
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (pypi-uri "EditorConfig" version))
1737 (sha256
1738 (base32
1739 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1740 (build-system python-build-system)
1741 (home-page "https://editorconfig.org/")
1742 (synopsis "EditorConfig bindings for python")
1743 (description "The EditorConfig project consists of a file format for
1744 defining coding styles and a collection of text editor plugins that enable
1745 editors to read the file format and adhere to defined styles. EditorConfig
1746 files are easily readable and they work nicely with version control systems.")
1747 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1748 (license (list license:bsd-2 license:psfl))))
1749
1750 (define-public dosage
1751 (package
1752 (name "dosage")
1753 (version "2.17")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "dosage" version))
1758 (sha256
1759 (base32
1760 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1761 (build-system python-build-system)
1762 (propagated-inputs
1763 `(("python2-backports-functools-lru-cache"
1764 ,python2-backports-functools-lru-cache)
1765 ("python2-backports-shutil-get-terminal-size"
1766 ,python2-backports-shutil-get-terminal-size)
1767 ("python-cached-property" ,python-cached-property)
1768 ("python-colorama" ,python-colorama)
1769 ("python-imagesize" ,python-imagesize)
1770 ("python-importlib-metadata" ,python-importlib-metadata)
1771 ("python-lxml" ,python-lxml)
1772 ("python-requests" ,python-requests)
1773 ("python-six" ,python-six)))
1774 (native-inputs
1775 `(("python-pytest-cov" ,python-pytest-cov)
1776 ("python-pytest-xdist" ,python-pytest-xdist)
1777 ("python-responses" ,python-responses)
1778 ("python-setuptools-scm" ,python-setuptools-scm)))
1779 (home-page "https://github.com/webcomics/dosage")
1780 (synopsis "Comic strip downloader and archiver")
1781 (description "Dosage is designed to keep a local copy of specific webcomics and other
1782 picture-based content such as Picture of the Day sites. With the @command{dosage}
1783 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1784 downloaded, or download a strip for a particular date or index, if possible.")
1785 (license license:expat)))
1786
1787 (define-public python-et-xmlfile
1788 (package
1789 (name "python-et-xmlfile")
1790 (version "1.0.1")
1791 (source
1792 (origin
1793 (method url-fetch)
1794 (uri (pypi-uri "et_xmlfile" version))
1795 (sha256
1796 (base32
1797 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1798 (build-system python-build-system)
1799 (arguments
1800 `(#:phases (modify-phases %standard-phases
1801 (replace 'check
1802 (lambda _
1803 (invoke "pytest"))))))
1804 (native-inputs
1805 `(("python-pytest" ,python-pytest)
1806 ("python-lxml" ,python-lxml))) ;used for the tests
1807 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1808 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1809 (description "This Python library is based upon the @code{xmlfile} module
1810 from @code{lxml}. It aims to provide a low memory, compatible implementation
1811 of @code{xmlfile}.")
1812 (license license:expat)))
1813
1814 (define-public python2-et-xmlfile
1815 (package-with-python2 python-et-xmlfile))
1816
1817 (define-public python-openpyxl
1818 (package
1819 (name "python-openpyxl")
1820 (version "3.0.5")
1821 (source
1822 (origin
1823 ;; We use the upstream repository, as the tests are not included in the
1824 ;; PyPI releases.
1825 (method hg-fetch)
1826 (uri (hg-reference
1827 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1828 (changeset version)))
1829 (file-name (string-append name "-" version "-checkout"))
1830 (sha256
1831 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1832 (build-system python-build-system)
1833 (arguments
1834 `(#:phases (modify-phases %standard-phases
1835 (replace 'check
1836 (lambda _
1837 (invoke "pytest"))))))
1838 (native-inputs
1839 ;; For the test suite.
1840 `(("python-lxml" ,python-lxml)
1841 ("python-pillow" ,python-pillow)
1842 ("python-pytest" ,python-pytest)))
1843 (propagated-inputs
1844 `(("python-et-xmlfile" ,python-et-xmlfile)
1845 ("python-jdcal" ,python-jdcal)))
1846 (home-page "https://openpyxl.readthedocs.io")
1847 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1848 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1849 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1850 standard.")
1851 (properties `((python2-variant . ,(delay python2-openpyxl))))
1852 (license license:expat)))
1853
1854 (define-public python2-openpyxl
1855 (let ((base (package-with-python2
1856 (strip-python2-variant python-openpyxl))))
1857 (package
1858 (inherit base)
1859 ;; This is the latest version that has python2 support
1860 (version "2.6.4")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "openpyxl" version))
1865 (sha256
1866 (base32
1867 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1868 (arguments '(#:tests? #f))))) ; No test suite.
1869
1870 (define-public python-eventlet
1871 (package
1872 (name "python-eventlet")
1873 (version "0.25.1")
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "eventlet" version))
1878 (sha256
1879 (base32
1880 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1881 (build-system python-build-system)
1882 (propagated-inputs
1883 `(("python-dnspython" ,python-dnspython)
1884 ("python-greenlet" ,python-greenlet)
1885 ("python-monotonic" ,python-monotonic)))
1886 (arguments
1887 ;; TODO: Requires unpackaged 'enum-compat'.
1888 '(#:tests? #f))
1889 (home-page "https://eventlet.net")
1890 (synopsis "Concurrent networking library for Python")
1891 (description
1892 "Eventlet is a concurrent networking library for Python that
1893 allows you to change how you run your code, not how you write it.
1894 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1895 Coroutines ensure that the developer uses a blocking style of programming
1896 that is similar to threading, but provide the benefits of non-blocking I/O.
1897 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1898 from the Python interpreter, or as a small part of a larger application.")
1899 (license license:expat)))
1900
1901 (define-public python-six
1902 (package
1903 (name "python-six")
1904 (version "1.14.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "six" version))
1909 (sha256
1910 (base32
1911 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1912 (build-system python-build-system)
1913 (arguments
1914 `(#:phases
1915 (modify-phases %standard-phases
1916 (replace 'check
1917 (lambda _
1918 (invoke "py.test" "-v"))))))
1919 (native-inputs
1920 `(("python-pytest" ,python-pytest-bootstrap)))
1921 (home-page "https://pypi.org/project/six/")
1922 (synopsis "Python 2 and 3 compatibility utilities")
1923 (description
1924 "Six is a Python 2 and 3 compatibility library. It provides utility
1925 functions for smoothing over the differences between the Python versions with
1926 the goal of writing Python code that is compatible on both Python versions.
1927 Six supports every Python version since 2.5. It is contained in only one
1928 Python file, so it can be easily copied into your project.")
1929 (license license:x11)))
1930
1931 (define-public python2-six
1932 (package-with-python2 python-six))
1933
1934 (define-public python-six-bootstrap
1935 (package
1936 (inherit python-six)
1937 (name "python-six-bootstrap")
1938 (native-inputs `())
1939 (arguments `(#:tests? #f))))
1940
1941 (define-public python2-six-bootstrap
1942 (package-with-python2 python-six-bootstrap))
1943
1944 (define-public python-schedule
1945 (package
1946 (name "python-schedule")
1947 (version "0.4.3")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "schedule" version))
1952 (sha256
1953 (base32
1954 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1955 (build-system python-build-system)
1956 (native-inputs
1957 `(("python-pytest" ,python-pytest)
1958 ("python-mock" ,python-mock)))
1959 (home-page "https://github.com/dbader/schedule")
1960 (synopsis "Schedule periodic function calls in Python")
1961 (description
1962 "Schedule is an in-process scheduler for periodic jobs that uses the
1963 builder pattern for configuration. Schedule lets you run Python functions (or
1964 any other callable) periodically at pre-determined intervals using a simple,
1965 human-friendly syntax.")
1966 (license license:expat)))
1967
1968 (define-public python2-schedule
1969 (package-with-python2 python-schedule))
1970
1971 (define-public python-scour
1972 (package
1973 (name "python-scour")
1974 (version "038.1")
1975 (source
1976 (origin
1977 (method git-fetch)
1978 (uri
1979 (git-reference
1980 (url "https://github.com/scour-project/scour")
1981 (commit
1982 (string-append "v" version))))
1983 (file-name (git-file-name name version))
1984 (sha256
1985 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1986 (propagated-inputs
1987 `(("python-six" ,python-six)))
1988 (build-system python-build-system)
1989 (home-page "https://github.com/scour-project/scour")
1990 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1991 (description "The goal of Scour is to output a file that renderes
1992 identically at a fraction of the size by removing a lot of redundant
1993 information created by most SVG editors. Optimization options are typically
1994 lossless but can be tweaked for more aggressive cleaning.")
1995 (license license:asl2.0)))
1996
1997 (define-public python-mechanize
1998 (package
1999 (name "python-mechanize")
2000 (version "0.4.5")
2001 (source
2002 (origin
2003 (method url-fetch)
2004 (uri (pypi-uri "mechanize" version))
2005 (sha256
2006 (base32
2007 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2008 (build-system python-build-system)
2009 (propagated-inputs
2010 `(("python-html5lib" ,python-html5lib)))
2011 (home-page "https://github.com/python-mechanize/mechanize")
2012 (synopsis
2013 "Stateful programmatic web browsing in Python")
2014 (description
2015 "Mechanize implements stateful programmatic web browsing in Python,
2016 after Andy Lester’s Perl module WWW::Mechanize.")
2017 (license license:bsd-3)))
2018
2019 (define-public python2-mechanize
2020 (package-with-python2 python-mechanize))
2021
2022 (define-public python-simpleaudio
2023 (package
2024 (name "python-simpleaudio")
2025 (version "1.0.4")
2026 (source
2027 (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "simpleaudio" version))
2030 (sha256
2031 (base32
2032 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2033 (build-system python-build-system)
2034 (arguments
2035 `(#:tests? #f))
2036 (inputs
2037 `(("alsa-lib" ,alsa-lib)))
2038 (home-page
2039 "https://github.com/hamiltron/py-simple-audio")
2040 (synopsis "Simple, asynchronous audio playback for Python 3")
2041 (description
2042 "The @code{simplaudio} package provides cross-platform, dependency-free
2043 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2044 (license license:expat))) ; MIT license
2045
2046 (define-public python-simplejson
2047 (package
2048 (name "python-simplejson")
2049 (version "3.17.0")
2050 (source
2051 (origin
2052 (method url-fetch)
2053 (uri (pypi-uri "simplejson" version))
2054 (sha256
2055 (base32
2056 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2057 (build-system python-build-system)
2058 (home-page "http://simplejson.readthedocs.org/en/latest/")
2059 (synopsis
2060 "Json library for Python")
2061 (description
2062 "JSON (JavaScript Object Notation) is a subset of JavaScript
2063 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2064 format.
2065
2066 Simplejson exposes an API familiar to users of the standard library marshal
2067 and pickle modules. It is the externally maintained version of the json
2068 library contained in Python 2.6, but maintains compatibility with Python 2.5
2069 and (currently) has significant performance advantages, even without using
2070 the optional C extension for speedups. Simplejson is also supported on
2071 Python 3.3+.")
2072 (license license:x11)))
2073
2074 (define-public python2-simplejson
2075 (package-with-python2 python-simplejson))
2076
2077
2078 (define-public python-pyicu
2079 (package
2080 (name "python-pyicu")
2081 (version "2.4.3")
2082 (source
2083 (origin
2084 (method url-fetch)
2085 (uri (pypi-uri "PyICU" version))
2086 (sha256
2087 (base32
2088 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2089 (build-system python-build-system)
2090 (inputs
2091 `(("icu4c" ,icu4c)))
2092 (native-inputs
2093 `(("python-pytest" ,python-pytest)
2094 ("python-six" ,python-six)))
2095 (home-page "https://github.com/ovalhub/pyicu")
2096 (synopsis "Python extension wrapping the ICU C++ API")
2097 (description
2098 "PyICU is a python extension wrapping the ICU C++ API.")
2099 (license license:x11)))
2100
2101 (define-public python2-pyicu
2102 (package-with-python2 python-pyicu))
2103
2104 (define-public python-dogtail
2105 (package
2106 (name "python-dogtail")
2107 (version "0.9.11")
2108 (source (origin
2109 (method url-fetch)
2110 (uri
2111 (string-append
2112 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2113 "dogtail-" version ".tar.gz"))
2114 (sha256
2115 (base32
2116 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2117 (build-system python-build-system)
2118 (arguments
2119 `(#:tests? #f ; TODO Launching dbus for the tests
2120 ; fails
2121 #:phases
2122 (modify-phases %standard-phases
2123 (replace 'check
2124 (lambda* (#:key tests? #:allow-other-keys)
2125 (when tests?
2126 (system "Xvfb :1 &")
2127 (setenv "DISPLAY" ":1")
2128 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2129 #t)))))
2130 (propagated-inputs
2131 `(("python-pygobject" ,python-pygobject)
2132 ("python-pycairo" ,python-pycairo)
2133 ("python-pyatspi" ,python-pyatspi)))
2134 (native-inputs
2135 `(("python-nose" ,python-nose)
2136 ("gtk+" ,gtk+)
2137 ("xvfb" ,xorg-server)
2138 ("dbus" ,dbus)
2139 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2140 ("gobject-introspection" ,gobject-introspection)))
2141 (home-page "https://gitlab.com/dogtail/dogtail/")
2142 (synopsis "GUI test tool and automation framework written in Python")
2143 (description
2144 "Dogtail is a GUI test tool and automation framework written in Python.
2145 It uses Accessibility (a11y) technologies to communicate with desktop
2146 applications. dogtail scripts are written in Python and executed like any
2147 other Python program.")
2148 (license license:gpl2+)))
2149
2150 (define-public python2-dogtail
2151 (package-with-python2 python-dogtail))
2152
2153 (define-public python-empy
2154 (package
2155 (name "python-empy")
2156 (version "3.3.3")
2157 (source (origin
2158 (method url-fetch)
2159 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2160 version ".tar.gz"))
2161 (sha256
2162 (base32
2163 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2164 (build-system python-build-system)
2165 (arguments
2166 `(#:tests? #f)) ; python2 only
2167 (home-page "http://www.alcyone.com/software/empy/")
2168 (synopsis "Templating system for Python")
2169 (description
2170 "EmPy is a system for embedding Python expressions and statements in
2171 template text; it takes an EmPy source file, processes it, and produces
2172 output. This is accomplished via expansions, which are special signals to the
2173 EmPy system and are set off by a special prefix (by default the at sign, @@).
2174 EmPy can expand arbitrary Python expressions and statements in this way, as
2175 well as a variety of special forms. Textual data not explicitly delimited in
2176 this way is sent unaffected to the output, allowing Python to be used in
2177 effect as a markup language. Also supported are callbacks via hooks,
2178 recording and playback via diversions, and dynamic, chainable filters. The
2179 system is highly configurable via command line options and embedded
2180 commands.")
2181 (license license:lgpl2.1+)))
2182
2183 (define-public python2-empy
2184 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2185 (package/inherit base
2186 (arguments `(,@(package-arguments base)
2187 #:tests? #t)))))
2188
2189 (define-public python2-element-tree
2190 (package
2191 (name "python2-element-tree")
2192 (version "1.2.6")
2193 (source (origin
2194 (method url-fetch)
2195 (uri (string-append
2196 "http://effbot.org/media/downloads/elementtree-"
2197 version "-20050316.tar.gz"))
2198 (sha256
2199 (base32
2200 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2201 (build-system python-build-system)
2202 (arguments
2203 `(#:python ,python-2 ; seems to be part of Python 3
2204 #:tests? #f)) ; no 'test' sub-command
2205 (synopsis "Toolkit for XML processing in Python")
2206 (description
2207 "ElementTree is a Python library supporting lightweight XML processing.")
2208 (home-page "https://effbot.org/zone/element-index.htm")
2209 (license (license:x11-style
2210 "http://docs.python.org/2/license.html"
2211 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2212
2213 (define-public python2-pybugz
2214 (package
2215 (name "python2-pybugz")
2216 (version "0.6.11")
2217 (source (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2221 version ".tar.gz"))
2222 (sha256
2223 (base32
2224 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2225 (patches (search-patches "pybugz-stty.patch"
2226 "pybugz-encode-error.patch"))))
2227 (build-system python-build-system)
2228 (arguments
2229 `(#:python ,python-2 ; SyntaxError with Python 3
2230 #:tests? #f)) ; no 'test' sub-command
2231 (propagated-inputs
2232 `(("element-tree" ,python2-element-tree)))
2233 (synopsis "Python and command-line interface to Bugzilla")
2234 (description
2235 "PyBugz is a Python library and command-line tool to query the Bugzilla
2236 bug tracking system. It is meant as an aid to speed up interaction with the
2237 bug tracker.")
2238 (home-page "http://www.liquidx.net/pybugz/")
2239 (license license:gpl2)))
2240
2241 (define-public python2-enum
2242 (package
2243 (name "python2-enum")
2244 (version "0.4.6")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "enum" version))
2248 (sha256
2249 (base32
2250 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2251 (build-system python-build-system)
2252 (arguments
2253 `(#:python ,python-2))
2254 (home-page "https://pypi.org/project/enum/")
2255 (synopsis "Robust enumerated type support in Python")
2256 (description
2257 "This provides a module for robust enumerations in Python. It has
2258 been superseded by the Python standard library and is provided only for
2259 compatibility.")
2260 ;; Choice of either license.
2261 (license (list license:gpl3+ license:psfl))))
2262
2263 (define-public python-enum34
2264 (package
2265 (name "python-enum34")
2266 (version "1.1.6")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (pypi-uri "enum34" version))
2271 (sha256
2272 (base32
2273 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2274 (build-system python-build-system)
2275 (home-page "https://pypi.org/project/enum34/")
2276 (synopsis "Backported Python 3.4 Enum")
2277 (description
2278 "Enum34 is the new Python stdlib enum module available in Python 3.4
2279 backported for previous versions of Python from 2.4 to 3.3.")
2280 (license license:bsd-3)))
2281
2282 (define-public python2-enum34
2283 (package-with-python2 python-enum34))
2284
2285 (define-public python-parse-type
2286 (package
2287 (name "python-parse-type")
2288 (version "0.4.2")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "parse_type" version))
2293 (sha256
2294 (base32
2295 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2296 (build-system python-build-system)
2297 (propagated-inputs
2298 `(("python-six" ,python-six)
2299 ("python-parse" ,python-parse)))
2300 (native-inputs
2301 `(("python-pytest" ,python-pytest)
2302 ("python-pytest-runner" ,python-pytest-runner)))
2303 (home-page "https://github.com/jenisys/parse_type")
2304 (synopsis "Extended parse module")
2305 (description
2306 "Parse_type extends the python parse module.")
2307 (properties
2308 `((python2-variant . ,(delay python2-parse-type))))
2309 (license license:bsd-3)))
2310
2311 (define-public python2-parse-type
2312 (let ((base (package-with-python2
2313 (strip-python2-variant python-parse-type))))
2314 (package/inherit base
2315 (propagated-inputs
2316 `(("python2-enum34" ,python2-enum34)
2317 ,@(package-propagated-inputs base))))))
2318
2319 (define-public python-parse
2320 (package
2321 (name "python-parse")
2322 (version "1.18.0")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "parse" version))
2327 (sha256
2328 (base32
2329 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2330 (build-system python-build-system)
2331 (arguments
2332 `(#:phases
2333 (modify-phases %standard-phases
2334 (replace 'check
2335 (lambda _ (invoke "python" "test_parse.py"))))))
2336 (home-page "https://github.com/r1chardj0n3s/parse")
2337 (synopsis "Parse strings")
2338 (description
2339 "Parse strings using a specification based on the Python @code{format()}
2340 syntax.")
2341 (license license:x11)))
2342
2343 (define-public python-polib
2344 (package
2345 (name "python-polib")
2346 (version "1.1.0")
2347 (source (origin
2348 (method url-fetch)
2349 (uri (pypi-uri "polib" version))
2350 (sha256
2351 (base32
2352 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2353 (build-system python-build-system)
2354 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2355 (synopsis "Manipulate, create and modify gettext files")
2356 (description "Polib can manipulate any gettext format (po, pot and mo)
2357 files. It can be used to create po files from scratch or to modify
2358 existing ones.")
2359 (license license:expat)))
2360
2361 (define-public python2-polib
2362 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2363 (package/inherit base
2364 (arguments `(,@(package-arguments base)
2365 ;; Tests don't work with python2.
2366 #:tests? #f)))))
2367
2368 (define-public python-poyo
2369 (package
2370 (name "python-poyo")
2371 (version "0.5.0")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "poyo" version))
2376 (sha256
2377 (base32
2378 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2379 (build-system python-build-system)
2380 (home-page "https://github.com/hackebrot/poyo")
2381 (synopsis "Lightweight YAML Parser for Python")
2382 (description
2383 "This package provides a lightweight YAML Parser for Python. It supports
2384 only a chosen subset of the YAML format that is required to parse cookiecutter
2385 user configuration files. It does not have support for serializing into YAML
2386 and is not compatible with JSON.")
2387 (license license:expat)))
2388
2389 (define-public scons
2390 (package
2391 (name "scons")
2392 (version "3.0.4")
2393 (source (origin
2394 (method git-fetch)
2395 (uri (git-reference
2396 (url "https://github.com/SCons/scons")
2397 (commit version)))
2398 (file-name (git-file-name name version))
2399 (sha256
2400 (base32
2401 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2402 (build-system python-build-system)
2403 (arguments
2404 `(#:use-setuptools? #f ; still relies on distutils
2405 #:tests? #f ; no 'python setup.py test' command
2406 #:phases
2407 (modify-phases %standard-phases
2408 (add-before 'build 'bootstrap
2409 (lambda _
2410 (substitute* "src/engine/SCons/compat/__init__.py"
2411 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2412 "sys.modules[new] = __import__(old)"))
2413 (substitute* "src/engine/SCons/Platform/__init__.py"
2414 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2415 "mod = __import__(full_name)"))
2416 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2417 (chdir "build/scons")
2418 #t)))))
2419 (home-page "https://scons.org/")
2420 (synopsis "Software construction tool written in Python")
2421 (description
2422 "SCons is a software construction tool. Think of SCons as an improved,
2423 cross-platform substitute for the classic Make utility with integrated
2424 functionality similar to autoconf/automake and compiler caches such as ccache.
2425 In short, SCons is an easier, more reliable and faster way to build
2426 software.")
2427 (license license:x11)))
2428
2429 (define-public scons-python2
2430 (package
2431 (inherit (package-with-python2 scons))
2432 (name "scons-python2")))
2433
2434 (define-public python-extension-helpers
2435 (package
2436 (name "python-extension-helpers")
2437 (version "0.1")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "extension-helpers" version))
2442 (sha256
2443 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2444 (build-system python-build-system)
2445 (native-inputs
2446 `(("coverage" ,python-coverage)
2447 ("pytest" ,python-pytest-astropy)
2448 ("pytest-cov" ,python-pytest-cov)
2449 ("setuptools-scm" ,python-setuptools-scm)))
2450 (home-page "https://github.com/astropy/astropy-helpers")
2451 (synopsis
2452 "Utilities for building and installing packages in the Astropy ecosystem")
2453 (description
2454 "The extension-helpers package includes many build, installation, and
2455 documentation-related tools used by the Astropy project.")
2456 (license license:bsd-3)))
2457
2458 (define-public python-extras
2459 (package
2460 (name "python-extras")
2461 (version "1.0.0")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "extras" version))
2466 (sha256
2467 (base32
2468 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2469 (build-system python-build-system)
2470 (arguments
2471 ;; FIXME: Circular dependency on testtools.
2472 '(#:tests? #f))
2473 (home-page "https://github.com/testing-cabal/extras")
2474 (synopsis "Useful extensions to the Python standard library")
2475 (description
2476 "Extras is a set of extensions to the Python standard library.")
2477 (license license:expat)))
2478
2479 (define-public python2-extras
2480 (package-with-python2 python-extras))
2481
2482 (define-public python-mimeparse
2483 (package
2484 (name "python-mimeparse")
2485 (version "1.6.0")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "python-mimeparse" version))
2490 (sha256
2491 (base32
2492 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2493 (build-system python-build-system)
2494 (arguments
2495 '(#:phases
2496 (modify-phases %standard-phases
2497 (replace 'check
2498 (lambda _
2499 (invoke "./mimeparse_test.py"))))))
2500 (home-page
2501 "https://github.com/dbtsai/python-mimeparse")
2502 (synopsis "Python library for parsing MIME types")
2503 (description
2504 "Mimeparse provides basic functions for parsing MIME type names and
2505 matching them against a list of media-ranges.")
2506 (license license:expat)))
2507
2508 (define-public python2-mimeparse
2509 (package-with-python2 python-mimeparse))
2510
2511 (define-public python-miniboa
2512 (package
2513 (name "python-miniboa")
2514 (version "1.0.7")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (pypi-uri "miniboa" version))
2519 (sha256
2520 (base32
2521 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2522 (build-system python-build-system)
2523 (home-page "https://github.com/shmup/miniboa")
2524 (synopsis "Simple, single-threaded Telnet server")
2525 (description
2526 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2527 server.")
2528 (license license:asl2.0)))
2529
2530 (define-public python2-miniboa
2531 (package-with-python2 python-miniboa))
2532
2533 (define-public python-pafy
2534 (package
2535 (name "python-pafy")
2536 (version "0.5.3.1")
2537 (source
2538 (origin
2539 (method url-fetch)
2540 (uri (pypi-uri "pafy" version))
2541 (sha256
2542 (base32
2543 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2544 (build-system python-build-system)
2545 (arguments
2546 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2547 (propagated-inputs
2548 ;; Youtube-dl is a python package which is imported in the file
2549 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2550 `(("youtube-dl" ,youtube-dl)))
2551 (home-page "https://np1.github.io/pafy/")
2552 (synopsis "Retrieve YouTube content and metadata")
2553 (description
2554 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2555 (license license:lgpl3+)))
2556
2557 (define-public python2-funcsigs
2558 (package
2559 (name "python2-funcsigs")
2560 (version "1.0.2")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "funcsigs" version))
2564 (sha256
2565 (base32
2566 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2567 (build-system python-build-system)
2568 (arguments
2569 `(#:python ,python-2))
2570 (native-inputs
2571 `(("python2-unittest2" ,python2-unittest2)))
2572 (home-page "http://funcsigs.readthedocs.org")
2573 (synopsis "Python function signatures from PEP362")
2574 (description
2575 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2576 (license license:asl2.0)))
2577
2578 (define-public python2-funcsigs-bootstrap
2579 (package
2580 (inherit python2-funcsigs)
2581 (name "python2-funcsigs-bootstrap")
2582 (native-inputs `())
2583 (arguments
2584 `(#:tests? #f
2585 ,@(package-arguments python2-funcsigs)))))
2586
2587 (define-public python-py
2588 (package
2589 (name "python-py")
2590 (version "1.8.1")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "py" version))
2595 (sha256
2596 (base32
2597 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2598 (build-system python-build-system)
2599 (arguments
2600 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2601 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2602 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2603 ;; Is this module globally installed?"
2604 '(#:tests? #f))
2605 (native-inputs
2606 `(("python-setuptools-scm" ,python-setuptools-scm)))
2607 (home-page "https://github.com/pytest-dev/py")
2608 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2609 (description
2610 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2611 code introspection, and logging.")
2612 (license license:expat)))
2613
2614 (define-public python-py-next
2615 (package
2616 (inherit python-py)
2617 (version "1.9.0")
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "py" version))
2622 (sha256
2623 (base32
2624 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2625
2626 (define-public python2-py
2627 (package-with-python2 python-py))
2628
2629 ;; Recent versions of python-fixtures and python-testrepository need
2630 ;; python-pbr for packaging, which itself needs these two packages for
2631 ;; testing.
2632 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2633 ;; same source, just without any test dependencies and with tests disabled.
2634 ;; python-pbr-minmal is then used to package python-fixtures and
2635 ;; python-testrepository.
2636 ;; Strictly speaking we currently could remove the test-requirements from the
2637 ;; normal python-pbr package (and save this package) since test are disabled
2638 ;; there anyway. But this may change in future.
2639 (define-public python-pbr-minimal
2640 (package
2641 (name "python-pbr-minimal")
2642 (version "3.0.1")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "pbr" version))
2647 (sha256
2648 (base32
2649 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2650 (build-system python-build-system)
2651 (arguments
2652 `(#:tests? #f))
2653 (home-page "https://docs.openstack.org/pbr/latest/")
2654 (synopsis "Minimal build of python-pbr used for bootstrapping")
2655 (description
2656 "Used only for bootstrapping python2-pbr, you should not need this.")
2657 (license license:asl2.0)))
2658
2659 (define-public python-pbr
2660 (package
2661 (inherit python-pbr-minimal)
2662 (name "python-pbr")
2663 (arguments
2664 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2665 (propagated-inputs
2666 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2667 (native-inputs
2668 `(("python-fixtures" ,python-fixtures-bootstrap)
2669 ;; discover, coverage, hacking, subunit
2670 ("python-mock" ,python-mock)
2671 ("python-six" ,python-six)
2672 ("python-sphinx" ,python-sphinx)
2673 ("python-testrepository" ,python-testrepository-bootstrap)
2674 ("python-testresources" ,python-testresources-bootstrap)
2675 ("python-testscenarios" ,python-testscenarios-bootstrap)
2676 ("python-testtools" ,python-testtools-bootstrap)
2677 ("python-virtualenv" ,python-virtualenv)))
2678 (synopsis "Enhance the default behavior of Python’s setuptools")
2679 (description
2680 "Python Build Reasonableness (PBR) is a library that injects some useful
2681 and sensible default behaviors into your setuptools run. It will set
2682 versions, process requirements files and generate AUTHORS and ChangeLog file
2683 from git information.
2684 ")))
2685
2686 (define-public python-pyrsistent
2687 (package
2688 (name "python-pyrsistent")
2689 (version "0.16.0")
2690 (home-page "https://github.com/tobgu/pyrsistent")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "pyrsistent" version))
2694 (sha256
2695 (base32
2696 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2697 (build-system python-build-system)
2698 (arguments
2699 '(#:phases (modify-phases %standard-phases
2700 ;; The package works fine with newer Pytest and Hypothesis, but
2701 ;; has pinned older versions to stay compatible with Python 2.
2702 (add-before 'check 'loosen-pytest-requirement
2703 (lambda _
2704 (substitute* "setup.py"
2705 (("pytest<5") "pytest")
2706 (("hypothesis<5") "hypothesis"))
2707 #t)))))
2708 (native-inputs
2709 `(("python-hypothesis" ,python-hypothesis)
2710 ("python-pytest" ,python-pytest)
2711 ("python-pytest-runner" ,python-pytest-runner)))
2712 (propagated-inputs
2713 `(("python-six" ,python-six)))
2714 (synopsis "Persistent data structures for Python")
2715 (description
2716 "Pyrsistent is a number of persistent collections (by some referred to as
2717 functional data structures). Persistent in the sense that they are immutable.
2718
2719 All methods on a data structure that would normally mutate it instead return a
2720 new copy of the structure containing the requested updates. The original
2721 structure is left untouched.")
2722 (license license:expat)))
2723
2724 (define-public python2-pyrsistent
2725 (package-with-python2 python-pyrsistent))
2726
2727 (define-public python-exif-read
2728 (package
2729 (name "python-exif-read")
2730 (version "2.1.2")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (pypi-uri "ExifRead" version))
2734 (sha256
2735 (base32
2736 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2737 (build-system python-build-system)
2738 (arguments `(#:tests? #f)) ; no tests
2739 (home-page "https://github.com/ianare/exif-py")
2740 (synopsis "Python library to extract EXIF data from image files")
2741 (description
2742 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2743 files.")
2744 (license license:bsd-3)))
2745
2746 (define-public python2-exif-read
2747 (package-with-python2 python-exif-read))
2748
2749 (define-public python-pyld
2750 (package
2751 (name "python-pyld")
2752 (version "1.0.5")
2753 (source (origin
2754 (method url-fetch)
2755 (uri (pypi-uri "PyLD" version))
2756 (sha256
2757 (base32
2758 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2759 (build-system python-build-system)
2760 (home-page "https://github.com/digitalbazaar/pyld")
2761 (synopsis "Python implementation of the JSON-LD specification")
2762 (description
2763 "PyLD is an implementation of the JSON-LD specification.")
2764 (license license:bsd-3)))
2765
2766 (define-public python2-pyld
2767 (package-with-python2 python-pyld))
2768
2769 (define-public python-cli-helpers
2770 (package
2771 (name "python-cli-helpers")
2772 (version "2.0.1")
2773 (source
2774 (origin
2775 ;; There's no source tarball on PyPI.
2776 (method git-fetch)
2777 (uri (git-reference
2778 (url "https://github.com/dbcli/cli_helpers")
2779 (commit (string-append "v" version))))
2780 (file-name (git-file-name name version))
2781 (sha256
2782 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2783 (build-system python-build-system)
2784 (native-inputs
2785 `(("python-pytest" ,python-pytest)))
2786 (propagated-inputs
2787 `(("python-wcwidth" ,python-wcwidth)
2788 ("python-configobj" ,python-configobj)
2789 ("python-tabulate" ,python-tabulate)
2790 ("python-terminaltables" ,python-terminaltables)))
2791 (home-page "https://github.com/dbcli/cli_helpers")
2792 (synopsis "Helpers for building command-line apps")
2793 (description
2794 "CLI Helpers is a Python package that makes it easy to perform common
2795 tasks when building command-line apps. It's a helper library for command-line
2796 interfaces.")
2797 (license license:bsd-3)))
2798
2799 (define-public python-click
2800 (package
2801 (name "python-click")
2802 (version "7.1.2")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "click" version))
2807 (sha256
2808 (base32
2809 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2810 (build-system python-build-system)
2811 (arguments
2812 `(#:phases
2813 (modify-phases %standard-phases
2814 (add-after 'unpack 'fix-paths
2815 (lambda* (#:key inputs #:allow-other-keys)
2816 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2817 "cross-libc" "libc"))))
2818 (substitute* "src/click/_unicodefun.py"
2819 (("'locale'")
2820 (string-append "'" glibc "/bin/locale'"))))
2821 #t))
2822 (replace 'check
2823 (lambda _
2824 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2825 (invoke "python" "-m" "pytest"))))))
2826 (native-inputs
2827 `(("python-pytest" ,python-pytest)))
2828 (home-page "https://palletsprojects.com/p/click/")
2829 (synopsis "Command line library for Python")
2830 (description
2831 "Click is a Python package for creating command line interfaces in a
2832 composable way with as little code as necessary. Its name stands for
2833 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2834 with sensible defaults out of the box.")
2835 (license license:bsd-3)))
2836
2837 (define-public python2-click
2838 (package-with-python2 python-click))
2839
2840 (define-public python-click-5
2841 (package (inherit python-click)
2842 (name "python-click")
2843 (version "5.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "click" version))
2848 (sha256
2849 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2850 (arguments `())))
2851
2852 (define-public python-vcversioner
2853 (package
2854 (name "python-vcversioner")
2855 (version "2.16.0.0")
2856 (source
2857 (origin
2858 (method url-fetch)
2859 (uri (pypi-uri "vcversioner" version))
2860 (sha256
2861 (base32
2862 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2863 (build-system python-build-system)
2864 (synopsis "Python library for version number discovery")
2865 (description "Vcversioner is a Python library that inspects tagging
2866 information in a variety of version control systems in order to discover
2867 version numbers.")
2868 (home-page "https://github.com/habnabit/vcversioner")
2869 (license license:isc)))
2870
2871 (define-public python2-vcversioner
2872 (package-with-python2 python-vcversioner))
2873
2874 (define-public python-jdcal
2875 (package
2876 (name "python-jdcal")
2877 (version "1.4")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (pypi-uri "jdcal" version))
2882 (sha256
2883 (base32
2884 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2885 (build-system python-build-system)
2886 (arguments
2887 `(#:phases (modify-phases %standard-phases
2888 (replace 'check
2889 (lambda _
2890 (invoke "pytest"))))))
2891 (native-inputs
2892 `(("python-pytest" ,python-pytest)))
2893 (home-page "https://github.com/phn/jdcal")
2894 (synopsis "Functions to convert between Julian dates Gregorian dates")
2895 (description "This Python library provides functions for converting
2896 between Julian dates and Gregorian dates.")
2897 (license license:bsd-2)))
2898
2899 (define-public python2-jdcal
2900 (package-with-python2 python-jdcal))
2901
2902 (define-public python-jsondiff
2903 (package
2904 (name "python-jsondiff")
2905 (version "1.2.0")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "jsondiff" version))
2910 (sha256
2911 (base32
2912 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2913 (build-system python-build-system)
2914 (native-inputs
2915 `(("python-nose" ,python-nose)
2916 ("python-nose-random" ,python-nose-random)))
2917 (home-page
2918 "https://github.com/fzumstein/jsondiff")
2919 (synopsis "Compare JSON and JSON-like structures in Python")
2920 (description "@code{jsondiff} is a Python library which lets you
2921 compare, diff, and patch JSON and JSON-like structures in Python.")
2922 (license license:expat)))
2923
2924 (define-public python-jsonschema
2925 (package
2926 (name "python-jsonschema")
2927 (version "3.2.0")
2928 (source (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "jsonschema" version))
2931 (sha256
2932 (base32
2933 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2934 (build-system python-build-system)
2935 (arguments
2936 '(#:phases
2937 (modify-phases %standard-phases
2938 (replace 'check
2939 (lambda* (#:key inputs outputs #:allow-other-keys)
2940 (add-installed-pythonpath inputs outputs)
2941 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2942 (invoke "trial" "jsonschema"))))))
2943 (native-inputs
2944 `(("python-setuptools_scm" ,python-setuptools-scm)
2945 ("python-twisted" ,python-twisted)))
2946 (propagated-inputs
2947 `(("python-attrs" ,python-attrs)
2948 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2949 ("python-pyrsistent" ,python-pyrsistent)
2950 ("python-six" ,python-six)))
2951 (home-page "https://github.com/Julian/jsonschema")
2952 (synopsis "Implementation of JSON Schema for Python")
2953 (description
2954 "Jsonschema is an implementation of JSON Schema for Python.")
2955 (license license:expat)
2956 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2957
2958 (define-public python2-jsonschema
2959 (let ((jsonschema (package-with-python2
2960 (strip-python2-variant python-jsonschema))))
2961 (package/inherit jsonschema
2962 (propagated-inputs
2963 `(("python2-functools32" ,python2-functools32)
2964 ,@(package-propagated-inputs jsonschema))))))
2965
2966 (define-public python-schema
2967 (package
2968 (name "python-schema")
2969 (version "0.6.6")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (pypi-uri "schema" version))
2974 (sha256
2975 (base32
2976 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2977 (build-system python-build-system)
2978 (native-inputs
2979 `(("python-pytest" ,python-pytest)))
2980 (home-page "https://github.com/keleshev/schema")
2981 (synopsis "Simple data validation library")
2982 (description
2983 "@code{python-schema} is a library for validating Python data
2984 structures, such as those obtained from config-files, forms, external
2985 services or command-line parsing, converted from JSON/YAML (or
2986 something else) to Python data-types.")
2987 (license license:psfl)))
2988
2989 (define-public python2-schema
2990 (package-with-python2 python-schema))
2991
2992 (define-public python-schema-0.5
2993 (package (inherit python-schema)
2994 (version "0.5.0")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "schema" version))
2999 (sha256
3000 (base32
3001 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3002
3003 (define-public python2-schema-0.5
3004 (package-with-python2 python-schema-0.5))
3005
3006 (define-public python-kitchen
3007 (package
3008 (name "python-kitchen")
3009 (version "1.2.5")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "kitchen" version))
3014 (sha256
3015 (base32
3016 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-chardet" ,python-chardet)))
3020 (home-page "https://github.com/fedora-infra/kitchen")
3021 (synopsis "Python API for snippets")
3022 (description "@code{kitchen} module provides a python API for all sorts of
3023 little useful snippets of code that everybody ends up writing for their projects
3024 but never seem big enough to build an independent release. Use kitchen and stop
3025 cutting and pasting that code over and over.")
3026 (license (list license:lgpl2.1+
3027 ;; subprocess.py, test_subprocess.py,
3028 ;; kitchen/pycompat25/defaultdict.py:
3029 license:psfl))))
3030
3031 (define-public python2-kitchen
3032 (package-with-python2 python-kitchen))
3033
3034 (define-public python-unidecode
3035 (package
3036 (name "python-unidecode")
3037 (version "1.1.1")
3038 (source (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "Unidecode" version))
3041 (sha256
3042 (base32
3043 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3044 (build-system python-build-system)
3045 (home-page "https://pypi.org/project/Unidecode/")
3046 (synopsis "ASCII transliterations of Unicode text")
3047 (description
3048 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3049 useful when integrating with legacy code that doesn't support Unicode, or for
3050 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3051 machine identifiers from human-readable Unicode strings that should still be
3052 somewhat intelligible.")
3053 (license license:gpl2+)))
3054
3055 (define-public python2-unidecode
3056 (package-with-python2 python-unidecode))
3057
3058 (define-public python-text-unidecode
3059 (package
3060 (name "python-text-unidecode")
3061 (version "1.3")
3062 (source (origin
3063 (method url-fetch)
3064 (uri (pypi-uri "text-unidecode" version))
3065 (sha256
3066 (base32
3067 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3068 (build-system python-build-system)
3069 (arguments
3070 '(#:phases (modify-phases %standard-phases
3071 (replace 'check
3072 (lambda _
3073 (setenv "PYTHONPATH"
3074 (string-append "./build/lib:"
3075 (getenv "PYTHONPATH")))
3076 (invoke "pytest" "-vv"))))))
3077 (native-inputs
3078 `(("python-pytest" ,python-pytest)))
3079 (home-page "https://github.com/kmike/text-unidecode/")
3080 (synopsis "Decode Unicode data")
3081 (description
3082 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3083 Perl library. It can create ASCII representations of Unicode data. In general
3084 users should prefer the @code{python-unidecode} package which offers better
3085 memory usage and transliteration quality.")
3086 ;; The user can choose either license.
3087 (license (list license:clarified-artistic license:gpl2+))))
3088
3089 (define-public python2-text-unidecode
3090 (package-with-python2 python-text-unidecode))
3091
3092 (define-public python-pyjwt
3093 (package
3094 (name "python-pyjwt")
3095 (version "1.7.1")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (pypi-uri "PyJWT" version))
3100 (sha256
3101 (base32
3102 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3103 (modules '((guix build utils)))
3104 (snippet
3105 '(begin
3106 (for-each delete-file-recursively
3107 (find-files "." "\\.pyc$"))
3108 #t))))
3109 (build-system python-build-system)
3110 (arguments
3111 '(#:phases (modify-phases %standard-phases
3112 (replace 'check
3113 (lambda _
3114 ;; Mimic upstream commit 3a20892442b34c7 to get
3115 ;; rid of dependency on pytest-runner < 5.0.
3116 ;; Remove substitution for PyJWT > 1.7.1.
3117 (substitute* "setup.py"
3118 ((".*pytest-runner.*")
3119 ""))
3120 (invoke "pytest" "-vv"))))))
3121 (native-inputs
3122 `(("python-pytest" ,python-pytest)
3123 ("python-pytest-cov" ,python-pytest-cov)))
3124 (home-page "https://github.com/progrium/pyjwt")
3125 (synopsis "JSON Web Token implementation in Python")
3126 (description
3127 "PyJWT is a JSON Web Token implementation written in Python.")
3128 (license license:expat)))
3129
3130 (define-public python2-pyjwt
3131 (package-with-python2 python-pyjwt))
3132
3133 (define-public python-pykka
3134 (package
3135 (name "python-pykka")
3136 (version "1.2.1")
3137 (source
3138 (origin
3139 (method url-fetch)
3140 (uri (pypi-uri "Pykka" version))
3141 (sha256
3142 (base32
3143 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3144 (build-system python-build-system)
3145 (native-inputs
3146 `(("python-mock" ,python-mock)
3147 ("python-nose" ,python-nose)
3148 ("python-gevent" ,python-gevent)
3149 ("python-eventlet" ,python-eventlet)))
3150 (home-page "https://www.pykka.org/")
3151 (synopsis "Pykka is a Python implementation of the actor model")
3152 (description
3153 "Pykka is a Python implementation of the actor model.
3154 The actor model introduces some simple rules to control the sharing
3155 of state and cooperation between execution units, which makes it
3156 easier to build concurrent applications.")
3157 (license license:asl2.0)))
3158
3159 (define-public python-pymsgbox
3160 (package
3161 (name "python-pymsgbox")
3162 (version "1.0.6")
3163 (source
3164 (origin
3165 (method git-fetch)
3166 (uri (git-reference
3167 ;; LICENSE.txt is not present on pypi
3168 (url "https://github.com/asweigart/PyMsgBox")
3169 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3170 (file-name (git-file-name name version))
3171 (sha256
3172 (base32
3173 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3174 (arguments
3175 ;; Circular dependency to run tests:
3176 ;; Tests need pyautogui, which depends on pymsgbox.
3177 '(#:tests? #f))
3178 (build-system python-build-system)
3179 (home-page "https://github.com/asweigart/PyMsgBox")
3180 (synopsis "Python module for JavaScript-like message boxes")
3181 (description
3182 "PyMsgBox is a simple, cross-platform, pure Python module for
3183 JavaScript-like message boxes. Types of dialog boxes include:
3184 @enumerate
3185 @item alert
3186 @item confirm
3187 @item prompt
3188 @item password
3189 @end enumerate
3190 ")
3191 (license license:bsd-3)))
3192
3193 (define-public python-pympler
3194 (package
3195 (name "python-pympler")
3196 (home-page "https://pythonhosted.org/Pympler/")
3197 (version "0.8")
3198 (source (origin
3199 (method url-fetch)
3200 (uri (pypi-uri "Pympler" version))
3201 (sha256
3202 (base32
3203 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3204 (build-system python-build-system)
3205 (arguments
3206 `(#:phases (modify-phases %standard-phases
3207 (delete 'check)
3208 (add-after 'install 'check
3209 (lambda* (#:key inputs outputs #:allow-other-keys)
3210 (add-installed-pythonpath inputs outputs)
3211 (invoke "python" "setup.py" "test"))))))
3212 (synopsis "Measure, monitor and analyze memory behavior")
3213 (description
3214 "Pympler is a development tool to measure, monitor and analyze
3215 the memory behavior of Python objects in a running Python application.
3216
3217 By pympling a Python application, detailed insight in the size and the
3218 lifetime of Python objects can be obtained. Undesirable or unexpected
3219 runtime behavior like memory bloat and other @samp{pymples} can easily
3220 be identified.
3221
3222 A web profiling frontend exposes process statistics, garbage
3223 visualisation and class tracker statistics.")
3224 (license license:asl2.0)))
3225
3226 (define-public python2-pympler
3227 (package-with-python2 python-pympler))
3228
3229 (define-public python-itsdangerous
3230 (package
3231 (name "python-itsdangerous")
3232 (version "1.1.0")
3233 (source
3234 (origin
3235 (method url-fetch)
3236 (uri (pypi-uri "itsdangerous" version))
3237 (sha256
3238 (base32
3239 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3240 (build-system python-build-system)
3241 (home-page "https://palletsprojects.com/p/itsdangerous/")
3242 (synopsis "Python library for passing data to/from untrusted environments")
3243 (description
3244 "Itsdangerous provides various helpers to pass trusted data to untrusted
3245 environments and back.")
3246 (license license:bsd-3)))
3247
3248 (define-public python2-itsdangerous
3249 (package-with-python2 python-itsdangerous))
3250
3251 (define-public python-pyyaml
3252 (package
3253 (name "python-pyyaml")
3254 (version "5.3.1")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (pypi-uri "PyYAML" version))
3259 (sha256
3260 (base32
3261 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3262 (build-system python-build-system)
3263 (inputs
3264 `(("libyaml" ,libyaml)))
3265 (home-page "https://pyyaml.org")
3266 (synopsis "YAML parser and emitter for Python")
3267 (description
3268 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3269 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3270 API, and sensible error messages. PyYAML supports standard YAML tags and
3271 provides Python-specific tags that represent an arbitrary Python object.")
3272 (license license:expat)))
3273
3274 (define-public python2-pyyaml
3275 (package-with-python2 python-pyyaml))
3276
3277 (define-public python-vine
3278 (package
3279 (name "python-vine")
3280 (version "1.1.4")
3281 (source
3282 (origin
3283 (method url-fetch)
3284 (uri (pypi-uri "vine" version))
3285 (sha256
3286 (base32
3287 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3288 (build-system python-build-system)
3289 (native-inputs
3290 `(("python-pytest" ,python-pytest)
3291 ("python-case" ,python-case)))
3292 (home-page "https://github.com/celery/vine")
3293 (synopsis "Promises for Python")
3294 (description
3295 "@code{vine} provides a special implementation of promises in that it can
3296 be used both for \"promise of a value\" and lazy evaluation. The biggest
3297 upside for this is that everything in a promise can also be a promise,
3298 e.g. filters, callbacks and errbacks can all be promises.")
3299 (license license:bsd-3)))
3300
3301 (define-public python-virtualenv
3302 (package
3303 (name "python-virtualenv")
3304 (version "20.2.1")
3305 (source
3306 (origin
3307 (method url-fetch)
3308 (uri (pypi-uri "virtualenv" version))
3309 (sha256
3310 (base32
3311 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3312 (build-system python-build-system)
3313 (native-inputs
3314 `(("python-mock" ,python-mock)
3315 ("python-pytest" ,python-pytest)
3316 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3317 ;; be an input at all". However, removing the input makes the build error:
3318 ;; File "setup.py", line 4, in <module>
3319 ;; raise RuntimeError("setuptools >= 41 required to build")
3320 ("python-setuptools" ,python-setuptools)
3321 ("python-setuptools-scm" ,python-setuptools-scm)))
3322 (propagated-inputs
3323 `(("python-appdirs" ,python-appdirs)
3324 ("python-distlib" ,python-distlib/next)
3325 ("python-filelock" ,python-filelock)
3326 ("python-six" ,python-six)
3327 ("python-importlib-metadata" ,python-importlib-metadata)))
3328 (home-page "https://virtualenv.pypa.io/")
3329 (synopsis "Virtual Python environment builder")
3330 (description
3331 "Virtualenv is a tool to create isolated Python environments.")
3332 (license license:expat)))
3333
3334 (define-public python-markupsafe
3335 (package
3336 (name "python-markupsafe")
3337 (version "1.1.1")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "MarkupSafe" version))
3342 (sha256
3343 (base32
3344 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3345 (build-system python-build-system)
3346 (arguments
3347 `(#:modules ((ice-9 ftw)
3348 (srfi srfi-1)
3349 (srfi srfi-26)
3350 (guix build utils)
3351 (guix build python-build-system))
3352 #:phases (modify-phases %standard-phases
3353 (replace 'check
3354 (lambda _
3355 (let ((cwd (getcwd))
3356 (libdir (find (cut string-prefix? "lib." <>)
3357 (scandir "build"))))
3358 (setenv "PYTHONPATH"
3359 (string-append cwd "/build/" libdir ":"
3360 (getenv "PYTHONPATH")))
3361 (invoke "pytest" "-vv")))))))
3362 (native-inputs
3363 `(("python-pytest" ,python-pytest)))
3364 (home-page "https://github.com/mitsuhiko/markupsafe")
3365 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3366 (description
3367 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3368 for Python.")
3369 (license license:bsd-3)))
3370
3371 (define-public python2-markupsafe
3372 (package-with-python2 python-markupsafe))
3373
3374 (define-public python-jinja2
3375 (package
3376 (name "python-jinja2")
3377 (version "2.11.2")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "Jinja2" version))
3382 (sha256
3383 (base32
3384 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3385 (build-system python-build-system)
3386 (arguments
3387 '(#:phases (modify-phases %standard-phases
3388 (replace 'check
3389 (lambda* (#:key tests? #:allow-other-keys)
3390 (if tests?
3391 (begin
3392 (setenv "PYTHONPATH"
3393 (string-append "./build/lib:"
3394 (getenv "PYTHONPATH")))
3395 (invoke "pytest" "-vv"))
3396 (format #t "test suite not run~%"))
3397 #t)))))
3398 (native-inputs
3399 `(("python-pytest" ,python-pytest)))
3400 (propagated-inputs
3401 `(("python-markupsafe" ,python-markupsafe)))
3402 (home-page "http://jinja.pocoo.org/")
3403 (synopsis "Python template engine")
3404 (description
3405 "Jinja2 is a small but fast and easy to use stand-alone template engine
3406 written in pure Python.")
3407 (license license:bsd-3)))
3408
3409 (define-public python2-jinja2
3410 (package-with-python2 python-jinja2))
3411
3412 (define-public python-jinja2-time
3413 (package
3414 (name "python-jinja2-time")
3415 (version "0.2.0")
3416 (source
3417 (origin
3418 (method url-fetch)
3419 (uri (pypi-uri "jinja2-time" version))
3420 (sha256
3421 (base32
3422 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3423 (build-system python-build-system)
3424 (propagated-inputs
3425 `(("python-arrow" ,python-arrow)
3426 ("python-jinja2" ,python-jinja2)))
3427 (home-page
3428 "https://github.com/hackebrot/jinja2-time")
3429 (synopsis "Jinja2 Extension for Dates and Times")
3430 (description
3431 "This package provides an extension for the template engine Jinja2. It
3432 adds a 'now' tag providing a convenient access to the arrow.now() API from
3433 templates. A format string can be provided to control the output.")
3434 (license license:expat)))
3435
3436 (define-public python-pystache
3437 (package
3438 (name "python-pystache")
3439 (version "0.5.4")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (pypi-uri "pystache" version))
3443 (sha256
3444 (base32
3445 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3446 (build-system python-build-system)
3447 (arguments
3448 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3449 (home-page "http://defunkt.io/pystache/")
3450 (synopsis "Python logic-less template engine")
3451 (description
3452 "Pystache is a Python implementation of the framework agnostic,
3453 logic-free templating system Mustache.")
3454 (license license:expat)
3455 (properties `((python2-variant . ,(delay python2-pystache))))))
3456
3457 (define-public python2-pystache
3458 (let ((base (package-with-python2
3459 (strip-python2-variant python-pystache))))
3460 (package/inherit base
3461 (arguments
3462 `(#:python ,python-2
3463 #:phases
3464 (modify-phases %standard-phases
3465 (replace 'check
3466 (lambda _
3467 (invoke "python" "test_pystache.py")))))))))
3468
3469 (define-public python-joblib
3470 (package
3471 (name "python-joblib")
3472 (version "0.14.1")
3473 (source (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "joblib" version))
3476 (sha256
3477 (base32
3478 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3479 (build-system python-build-system)
3480 (arguments
3481 `(#:phases
3482 (modify-phases %standard-phases
3483 (replace 'check
3484 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3485 (native-inputs
3486 `(("python-pytest" ,python-pytest)))
3487 (home-page "https://joblib.readthedocs.io/")
3488 (synopsis "Using Python functions as pipeline jobs")
3489 (description
3490 "Joblib is a set of tools to provide lightweight pipelining in Python.
3491 In particular, joblib offers: transparent disk-caching of the output values
3492 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3493 logging and tracing of the execution.")
3494 (license license:bsd-3)))
3495
3496 (define-public python2-joblib
3497 (package-with-python2 python-joblib))
3498
3499 (define-public python-daemon
3500 (package
3501 (name "python-daemon")
3502 (version "2.2.3")
3503 (source
3504 (origin
3505 (method url-fetch)
3506 (uri (pypi-uri "python-daemon" version))
3507 (sha256
3508 (base32
3509 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3510 (build-system python-build-system)
3511 (arguments
3512 `(#:phases
3513 (modify-phases %standard-phases
3514 (add-before 'check 'disable-tests
3515 (lambda _
3516 ;; FIXME: Determine why test fails
3517 (substitute* "test/test_daemon.py"
3518 (("test_detaches_process_context")
3519 "skip_test_detaches_process_context"))
3520 #t)))))
3521 (propagated-inputs
3522 `(("python-lockfile" ,python-lockfile)))
3523 (native-inputs
3524 `(("python-unittest2" ,python-unittest2)
3525 ("python-testtools" ,python-testtools)
3526 ("python-testscenarios" ,python-testscenarios)
3527 ("python-mock" ,python-mock)
3528 ("python-docutils" ,python-docutils)))
3529 (home-page "https://pagure.io/python-daemon/")
3530 (synopsis "Python library for making a Unix daemon process")
3531 (description "Python-daemon is a library that assists a Python program to
3532 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3533
3534 This library provides a @code{DaemonContext} class that manages the following
3535 important tasks for becoming a daemon process:
3536 @enumerate
3537 @item Detach the process into its own process group.
3538 @item Set process environment appropriate for running inside a chroot.
3539 @item Renounce suid and sgid privileges.
3540 @item Close all open file descriptors.
3541 @item Change the working directory, uid, gid, and umask.
3542 @item Set appropriate signal handlers.
3543 @item Open new file descriptors for stdin, stdout, and stderr.
3544 @item Manage a specified PID lock file.
3545 @item Register cleanup functions for at-exit processing.
3546 @end enumerate")
3547 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3548 (license (list license:asl2.0 license:gpl3+))))
3549
3550 (define-public python-anytree
3551 (package
3552 (name "python-anytree")
3553 (version "2.8.0")
3554 (source (origin
3555 (method url-fetch)
3556 (uri (pypi-uri "anytree" version))
3557 (sha256
3558 (base32
3559 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3560 (build-system python-build-system)
3561 (propagated-inputs
3562 `(("python-six" ,python-six)))
3563 (native-inputs
3564 `(;; For tests.
3565 ("graphviz" ,graphviz) ;for 'dot'
3566 ("python-nose" ,python-nose)))
3567 (home-page "https://github.com/c0fec0de/anytree")
3568 (synopsis "Lightweight tree data library")
3569 (description
3570 "@code{anytree} is a simple, lightweight, and extensible tree data
3571 structure for Python.")
3572 (license license:asl2.0)))
3573
3574 (define-public python-docutils
3575 (package
3576 (name "python-docutils")
3577 (version "0.16")
3578 (source
3579 (origin
3580 (method url-fetch)
3581 (uri (pypi-uri "docutils" version))
3582 (sha256
3583 (base32
3584 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3585 (build-system python-build-system)
3586 (arguments
3587 '(#:phases (modify-phases %standard-phases
3588 (replace 'check
3589 (lambda* (#:key tests? #:allow-other-keys)
3590 (if tests?
3591 (invoke "python" "test/alltests.py")
3592 (format #t "test suite not run~%"))
3593 #t)))))
3594 (home-page "http://docutils.sourceforge.net/")
3595 (synopsis "Python Documentation Utilities")
3596 (description
3597 "Docutils is a modular system for processing documentation into useful
3598 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3599 easy to use markup language, for input.
3600
3601 This package provides tools for converting @file{.rst} files to other formats
3602 via commands such as @command{rst2man}, as well as supporting Python code.")
3603 ;; Most of the source code is public domain, but some source files are
3604 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3605 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3606
3607 (define-public python2-docutils
3608 (package-with-python2 python-docutils))
3609
3610 ;; python2-sphinx fails its test suite with newer versions.
3611 (define-public python2-docutils-0.14
3612 (package
3613 (inherit python2-docutils)
3614 (version "0.14")
3615 (source (origin
3616 (method url-fetch)
3617 (uri (pypi-uri "docutils" version))
3618 (sha256
3619 (base32
3620 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3621
3622 (define-public python-restructuredtext-lint
3623 (package
3624 (name "python-restructuredtext-lint")
3625 (version "1.3.0")
3626 (source
3627 (origin
3628 (method url-fetch)
3629 (uri (pypi-uri "restructuredtext-lint" version))
3630 (sha256
3631 (base32
3632 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3633 (build-system python-build-system)
3634 (arguments
3635 `(#:phases
3636 (modify-phases %standard-phases
3637 (delete 'check)
3638 (add-after 'install 'check
3639 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3640 (when tests?
3641 (add-installed-pythonpath inputs outputs)
3642 (invoke "nosetests" "-v"))
3643 #t)))))
3644 (propagated-inputs
3645 `(("python-docutils" ,python-docutils)))
3646 (native-inputs
3647 `(("python-nose" ,python-nose)))
3648 (home-page "https://github.com/twolfson/restructuredtext-lint")
3649 (synopsis "reStructuredText linter")
3650 (description "This package provides a linter for the reStructuredText
3651 format.")
3652 (license license:unlicense)))
3653
3654 (define-public python-doc8
3655 (package
3656 (name "python-doc8")
3657 (version "0.8.0")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (pypi-uri "doc8" version))
3662 (sha256
3663 (base32
3664 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3665 (build-system python-build-system)
3666 (arguments
3667 `(#:phases
3668 (modify-phases %standard-phases
3669 (delete 'check)
3670 (add-after 'install 'check
3671 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3672 (when tests?
3673 (add-installed-pythonpath inputs outputs)
3674 (invoke "pytest" "-v"))
3675 #t)))))
3676 (propagated-inputs
3677 `(("python-chardet" ,python-chardet)
3678 ("python-docutils" ,python-docutils)
3679 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3680 ("python-six" ,python-six)
3681 ("python-stevedore" ,python-stevedore)))
3682 (native-inputs
3683 `(("python-testtools" ,python-testtools)
3684 ("python-pytest" ,python-pytest)))
3685 (home-page "https://launchpad.net/doc8")
3686 (synopsis
3687 "Style checker for Sphinx (or other) RST documentation")
3688 (description
3689 "Doc8 is an opinionated style checker for reStructured Text and plain
3690 text styles of documentation.")
3691 (license license:asl2.0)))
3692
3693 (define-public python-pygments
3694 (package
3695 (name "python-pygments")
3696 (version "2.7.3")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "Pygments" version))
3701 (sha256
3702 (base32
3703 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3704 (replacement python-pygments/fixed)
3705 (build-system python-build-system)
3706 (arguments
3707 ;; FIXME: Tests require sphinx, which depends on this.
3708 '(#:tests? #f))
3709 (home-page "https://pygments.org/")
3710 (synopsis "Syntax highlighting")
3711 (description
3712 "Pygments is a syntax highlighting package written in Python.")
3713 (license license:bsd-2)
3714 (properties `((python2-variant . ,(delay python2-pygments))))))
3715
3716 (define python-pygments/fixed
3717 (package/inherit python-pygments
3718 (version "2.7.4")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (pypi-uri "Pygments" version))
3723 (sha256
3724 (base32
3725 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3726
3727 ;; Pygments 2.6 and later does not support Python 2.
3728 (define-public python2-pygments
3729 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3730 (package
3731 (inherit base)
3732 (version "2.5.2")
3733 (source (origin
3734 (method url-fetch)
3735 (uri (pypi-uri "Pygments" version))
3736 (sha256
3737 (base32
3738 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3739
3740 (define-public python-bump2version
3741 (package
3742 (name "python-bump2version")
3743 (version "1.0.1")
3744 (source
3745 (origin
3746 (method url-fetch)
3747 (uri (pypi-uri "bump2version" version))
3748 (sha256
3749 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3750 (build-system python-build-system)
3751 (arguments
3752 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3753 ;; required: --new-version".
3754 `(#:tests? #false))
3755 (home-page "https://github.com/c4urself/bump2version")
3756 (synopsis "Version-bump your software with a single command!")
3757 (description
3758 "This package provides a small command line tool to simplify releasing
3759 software by updating all version strings in your source code by the correct
3760 increment. It also creates commits and tags.")
3761 (license license:expat)))
3762
3763 (define-public python-bumpversion
3764 (package
3765 (name "python-bumpversion")
3766 (version "0.5.3")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "bumpversion" version))
3771 (sha256
3772 (base32
3773 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3774 (build-system python-build-system)
3775 (home-page "https://github.com/peritus/bumpversion")
3776 (synopsis "Tool to bump software version")
3777 (description "This tool provides a command-line interface (CLI) to bump a
3778 software version simply.")
3779 (license license:expat)))
3780
3781 (define-public python-deprecated
3782 (package
3783 (name "python-deprecated")
3784 (version "1.2.5")
3785 (source
3786 (origin
3787 (method git-fetch)
3788 (uri (git-reference
3789 (url "https://github.com/tantale/deprecated")
3790 (commit (string-append "v" version))))
3791 (file-name (git-file-name name version))
3792 (sha256
3793 (base32
3794 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3795 (build-system python-build-system)
3796 (arguments
3797 `(#:phases (modify-phases %standard-phases
3798 (replace 'check
3799 (lambda _
3800 (invoke "pytest"))))))
3801 (propagated-inputs
3802 `(("python-wrapt" ,python-wrapt)))
3803 (native-inputs
3804 `(("python-bumpversion" ,python-bumpversion)
3805 ("python-pytest" ,python-pytest)
3806 ("python-pytest-cov" ,python-pytest-cov)
3807 ("python-sphinx" ,python-sphinx)
3808 ("python-tox" ,python-tox)))
3809 (home-page "https://github.com/tantale/deprecated")
3810 (synopsis "Python decorator to deprecate classes, functions or methods")
3811 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3812 to deprecate classes, functions or methods.")
3813 (license license:expat)))
3814
3815 (define-public python-pygithub
3816 (package
3817 (name "python-pygithub")
3818 (version "1.54.1")
3819 (source
3820 ;; We fetch from the Git repo because there are no tests in the PyPI
3821 ;; archive.
3822 (origin
3823 (method git-fetch)
3824 (uri (git-reference
3825 (url "https://github.com/PyGithub/PyGithub")
3826 (commit (string-append "v" version))))
3827 (file-name (git-file-name name version))
3828 (sha256
3829 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3830 (build-system python-build-system)
3831 (arguments
3832 `(#:phases
3833 (modify-phases %standard-phases
3834 (replace 'check
3835 (lambda* (#:key tests? #:allow-other-keys)
3836 (when tests?
3837 (invoke "pytest"))
3838 #t)))))
3839 (propagated-inputs
3840 `(("python-cryptography" ,python-cryptography)
3841 ("python-deprecated" ,python-deprecated)
3842 ("python-pyjwt" ,python-pyjwt)
3843 ("python-requests" ,python-requests)))
3844 (native-inputs
3845 `(("python-httpretty" ,python-httpretty)
3846 ("python-pytest" ,python-pytest)))
3847 (home-page "https://pygithub.readthedocs.io/en/latest/")
3848 (synopsis "Python library for the GitHub API")
3849 (description "This library allows managing GitHub resources such as
3850 repositories, user profiles, and organizations in your Python applications,
3851 using version 3 of the GitHub application programming interface (API).")
3852 (license license:lgpl3+)))
3853
3854 (define-public python-rellu
3855 (package
3856 (name "python-rellu")
3857 (version "0.7")
3858 (source
3859 (origin
3860 (method url-fetch)
3861 (uri (pypi-uri "rellu" version))
3862 (sha256
3863 (base32
3864 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3865 (build-system python-build-system)
3866 (propagated-inputs
3867 `(("python-invoke" ,python-invoke)
3868 ("python-pygithub" ,python-pygithub)))
3869 (home-page "https://github.com/robotframework/rellu")
3870 (synopsis "Utilities to create PyPI releases")
3871 (description "This collection of utilities contains tooling and templates
3872 to assist in creating releases on GitHub and publishing them on PyPI. It is
3873 designed to be used by Robot Framework and tools and libraries in its
3874 ecosystem, but can naturally be used also by other projects.")
3875 (license license:asl2.0)))
3876
3877 (define-public python-robotframework
3878 (package
3879 (name "python-robotframework")
3880 (version "3.2.2")
3881 ;; There are no tests in the PyPI archive.
3882 (source
3883 (origin
3884 (method git-fetch)
3885 (uri (git-reference
3886 (url "https://github.com/robotframework/robotframework")
3887 (commit (string-append "v" version))))
3888 (file-name (git-file-name name version))
3889 (sha256
3890 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3891 (patches (search-patches
3892 "python-robotframework-source-date-epoch.patch"))))
3893 (build-system python-build-system)
3894 (arguments
3895 `(#:phases (modify-phases %standard-phases
3896 (add-before 'build 'build-and-install-doc
3897 (lambda* (#:key outputs #:allow-other-keys)
3898 (let* ((doc-output (assoc-ref outputs "doc"))
3899 (doc (string-append doc-output "/share/"
3900 ,name "-" ,version "/")))
3901 (invoke "invoke" "library-docs" "all")
3902 (mkdir-p doc)
3903 (copy-recursively "doc/libraries"
3904 (string-append doc "/libraries"))
3905 #t)))
3906 (replace 'check
3907 (lambda* (#:key inputs #:allow-other-keys)
3908 ;; Some tests require timezone data. Otherwise, they
3909 ;; look up /etc/localtime, which doesn't exist, and fail
3910 ;; with:
3911 ;;
3912 ;; OverflowError: mktime argument out of range
3913 (setenv "TZDIR"
3914 (string-append (assoc-ref inputs "tzdata")
3915 "/share/zoneinfo"))
3916 (setenv "TZ" "Europe/Paris")
3917
3918 (invoke "python" "utest/run.py"))))))
3919 (native-inputs
3920 `(("python-invoke" ,python-invoke)
3921 ("python-rellu" ,python-rellu)
3922 ("python:tk" ,python "tk") ;used when building the HTML doc
3923 ("tzdata" ,tzdata-for-tests)))
3924 (outputs '("out" "doc"))
3925 (home-page "https://robotframework.org")
3926 (synopsis "Generic automation framework")
3927 (description "Robot Framework is a generic automation framework for
3928 acceptance testing, acceptance test driven development (ATDD), and robotic
3929 process automation (RPA).")
3930 (license license:asl2.0)))
3931
3932 (define-public python-robotframework-lint
3933 ;; There is no properly tagged release; the commit below seems to correspond
3934 ;; to the 0.9 stable release available from PyPI. The tests are not
3935 ;; included in the PyPI archive, so we fetch the sources from the upstream
3936 ;; Git repo.
3937 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3938 (revision "0"))
3939 (package
3940 (name "python-robotframework-lint")
3941 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3942 revision commit))
3943 (source
3944 (origin
3945 (method git-fetch)
3946 (uri (git-reference
3947 (url "https://github.com/boakley/robotframework-lint")
3948 (commit commit)))
3949 (file-name (git-file-name name version))
3950 (sha256
3951 (base32
3952 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3953 (build-system python-build-system)
3954 (arguments
3955 `(#:phases
3956 (modify-phases %standard-phases
3957 (replace 'check
3958 (lambda _
3959 (invoke "python" "-m" "robot" "-A"
3960 "tests/conf/default.args" "tests"))))))
3961 (propagated-inputs
3962 `(("python-robotframework" ,python-robotframework)))
3963 (home-page "https://github.com/boakley/robotframework-lint/")
3964 (synopsis "Static analysis tool (linter) for Robot Framework")
3965 (description "This package provides the @code{rflint} command-line
3966 utility, a static analysis tool (linter) for Robot Framework source files.")
3967 (license license:asl2.0))))
3968
3969 (define-public python-robotframework-sshlibrary
3970 (package
3971 (name "python-robotframework-sshlibrary")
3972 (version "3.3.0")
3973 ;; There are no tests in the PyPI archive.
3974 (source
3975 (origin
3976 (method git-fetch)
3977 (uri (git-reference
3978 (url "https://github.com/robotframework/SSHLibrary")
3979 (commit (string-append "v" version))))
3980 (file-name (git-file-name name version))
3981 (sha256
3982 (base32
3983 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3984 (build-system python-build-system)
3985 (arguments
3986 `(#:phases
3987 (modify-phases %standard-phases
3988 (add-before 'build 'build-and-install-doc
3989 (lambda* (#:key outputs #:allow-other-keys)
3990 (let* ((doc-output (assoc-ref outputs "doc"))
3991 (doc (string-append doc-output "/share/"
3992 ,name "-" ,version "/")))
3993 (invoke "chmod" "-R" "+w" "docs")
3994 (invoke "invoke" "kw-docs" "project-docs")
3995 (mkdir-p doc)
3996 (for-each delete-file (find-files "docs" "\\.rst"))
3997 (copy-recursively "docs" doc)
3998 #t)))
3999 (replace 'check
4000 (lambda _
4001 ;; Some tests require an SSH server; we remove them.
4002 (delete-file "utest/test_client_api.py")
4003 (delete-file "utest/test_scp.py")
4004 (invoke "python" "utest/run.py"))))))
4005 (propagated-inputs
4006 `(("python-robotframework" ,python-robotframework)
4007 ("python-paramiko" ,python-paramiko)
4008 ("python-scp" ,python-scp)))
4009 (native-inputs
4010 `(("openssh" ,openssh)
4011 ("which" ,which)
4012 ;; To generate the documentation
4013 ("python-docutils" ,python-docutils)
4014 ("python-invoke" ,python-invoke)
4015 ("python-pygments" ,python-pygments)
4016 ("python-rellu" ,python-rellu)))
4017 (outputs '("out" "doc"))
4018 (home-page "https://github.com/robotframework/SSHLibrary")
4019 (synopsis "Robot Framework library for SSH and SFTP")
4020 (description "SSHLibrary is a Robot Framework library providing support
4021 for SSH and SFTP. It has the following main usages:
4022 @itemize @bullet
4023 @item Executing commands on the remote machine, either blocking or non-blocking.
4024 @item Writing and reading in an interactive shell.
4025 @item Transferring files and directories over SFTP.
4026 @item Ensuring that files and directories exist on the remote machine.
4027 @end itemize")
4028 (license license:asl2.0)))
4029
4030 (define-public python-rstr
4031 (package
4032 (name "python-rstr")
4033 (version "2.2.6")
4034 (source
4035 (origin
4036 (method url-fetch)
4037 (uri (pypi-uri "rstr" version))
4038 (sha256
4039 (base32
4040 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4041 (build-system python-build-system)
4042 (home-page "https://github.com/leapfrogonline/rstr")
4043 (synopsis "Generate random strings in Python")
4044 (description "This package provides a python module for generating
4045 random strings of various types. It could be useful for fuzz testing,
4046 generating dummy data, or other applications. It has no dependencies
4047 outside the standard library.")
4048 (license license:bsd-3)))
4049
4050 (define-public python-scp
4051 (package
4052 (name "python-scp")
4053 (version "0.13.3")
4054 (source
4055 (origin
4056 (method url-fetch)
4057 (uri (pypi-uri "scp" version))
4058 (sha256
4059 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4060 (build-system python-build-system)
4061 (arguments
4062 '(#:tests? #f)) ;tests require an SSH server
4063 (propagated-inputs
4064 `(("python-paramiko" ,python-paramiko)))
4065 (home-page "https://github.com/jbardin/scp.py")
4066 (synopsis "SCP protocol module for Python and Paramiko")
4067 (description "The scp module extends the Paramiko library to send and
4068 receive files via the SCP1 protocol, as implemented by the OpenSSH
4069 @command{scp} program.")
4070 (license license:gpl2+)))
4071
4072 (define-public python-rst.linker
4073 (package
4074 (name "python-rst.linker")
4075 (version "1.11")
4076 (source
4077 (origin
4078 (method url-fetch)
4079 (uri (pypi-uri "rst.linker" version))
4080 (sha256
4081 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4082 (build-system python-build-system)
4083 (propagated-inputs
4084 `(("python-dateutil" ,python-dateutil)
4085 ("python-six" ,python-six)))
4086 (native-inputs
4087 `(("python-setuptools-scm" ,python-setuptools-scm)))
4088 ;; Test would require path.py, which would introduce a cyclic dependence.
4089 (arguments `(#:tests? #f))
4090 ;; Note: As of version 1.7 the documentation is not worth building.
4091 (home-page "https://github.com/jaraco/rst.linker")
4092 (synopsis "Sphinx plugin to add links and timestamps")
4093 (description "rst.linker automatically replaces text by a
4094 reStructuredText external reference or timestamps. It's primary purpose is to
4095 augment the changelog, but it can be used for other documents, too.")
4096 (license license:expat)))
4097
4098 (define-public python2-rst.linker
4099 (package-with-python2 python-rst.linker))
4100
4101 (define-public python-sshpubkeys
4102 (package
4103 (name "python-sshpubkeys")
4104 (version "3.1.0")
4105 (home-page "https://github.com/ojarva/python-sshpubkeys")
4106 (source (origin
4107 (method git-fetch)
4108 (uri (git-reference
4109 (url home-page)
4110 (commit (string-append "v" version))))
4111 (file-name (git-file-name name version))
4112 (sha256
4113 (base32
4114 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4115 (build-system python-build-system)
4116 (propagated-inputs
4117 `(("python-cryptography" ,python-cryptography)
4118 ("python-ecdsa" ,python-ecdsa)))
4119 (synopsis "OpenSSH public key parser")
4120 (description
4121 "This package provides a library for parsing and validating OpenSSH
4122 public key files.")
4123 (license license:bsd-3)))
4124
4125 (define-public python-feedgenerator
4126 (package
4127 (name "python-feedgenerator")
4128 (version "1.9")
4129 (source
4130 (origin
4131 (method url-fetch)
4132 (uri (pypi-uri "feedgenerator" version))
4133 (sha256
4134 (base32
4135 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4136 (modules '((guix build utils)))
4137 (snippet
4138 '(begin
4139 ;; Remove pre-compiled .pyc files from source.
4140 (for-each delete-file-recursively
4141 (find-files "." "__pycache__" #:directories? #t))
4142 (for-each delete-file (find-files "." "\\.pyc$"))
4143 #t))))
4144 (build-system python-build-system)
4145 (propagated-inputs
4146 `(("python-pytz" ,python-pytz)
4147 ("python-six" ,python-six)))
4148 (home-page "https://github.com/getpelican/feedgenerator")
4149 (synopsis
4150 "Standalone version of Django's Atom/RSS feed generator")
4151 (description
4152 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4153 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4154 (license license:bsd-3)))
4155
4156 (define-public python2-feedgenerator
4157 (package-with-python2 python-feedgenerator))
4158
4159 (define-public python-jsonrpc-server
4160 (package
4161 (name "python-jsonrpc-server")
4162 (version "0.4.0")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (pypi-uri "python-jsonrpc-server" version))
4167 (sha256
4168 (base32
4169 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4170 (build-system python-build-system)
4171 (propagated-inputs
4172 `(("python-mock" ,python-mock)
4173 ("python-pytest" ,python-pytest)
4174 ("python-ujson" ,python-ujson)))
4175 (home-page
4176 "https://github.com/palantir/python-jsonrpc-server")
4177 (synopsis "JSON RPC 2.0 server library")
4178 (description
4179 "This package provides a JSON RPC 2.0 server library for Python.")
4180 (license license:expat)))
4181
4182 (define-public python-pydantic
4183 (package
4184 (name "python-pydantic")
4185 (version "1.6.1")
4186 (source
4187 (origin
4188 (method git-fetch)
4189 (uri (git-reference
4190 (url "https://github.com/samuelcolvin/pydantic")
4191 (commit (string-append "v" version))))
4192 (file-name (git-file-name name version))
4193 (sha256
4194 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4195 (build-system python-build-system)
4196 (arguments
4197 '(#:phases
4198 (modify-phases %standard-phases
4199 ;; Reported upstream:
4200 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4201 ;; Disable the faulty test as the fix is unclear.
4202 (add-before 'check 'disable-test
4203 (lambda _
4204 (substitute* "tests/test_validators.py"
4205 (("test_assert_raises_validation_error")
4206 "_test_assert_raises_validation_error"))
4207 #t))
4208 (replace 'check
4209 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4210 (native-inputs
4211 `(("python-pytest" ,python-pytest)))
4212 (home-page "https://github.com/samuelcolvin/pydantic")
4213 (synopsis "Python data validation and settings management")
4214 (description
4215 "Pydantic enforces type hints at runtime, and provides user friendly
4216 errors when data is invalid.")
4217 (license license:expat)))
4218
4219 (define-public python-pydocstyle
4220 (package
4221 (name "python-pydocstyle")
4222 (version "3.0.0")
4223 (source
4224 (origin
4225 (method url-fetch)
4226 (uri (pypi-uri "pydocstyle" version))
4227 (sha256
4228 (base32
4229 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4230 (build-system python-build-system)
4231 (propagated-inputs
4232 `(("python-six" ,python-six)
4233 ("python-snowballstemmer" ,python-snowballstemmer)))
4234 (home-page
4235 "https://github.com/PyCQA/pydocstyle/")
4236 (synopsis "Python docstring style checker")
4237 (description
4238 "This package provides a style checker for the Python Language
4239 Server (PLS).")
4240 (license license:expat)))
4241
4242 (define-public python-language-server
4243 (package
4244 (name "python-language-server")
4245 (version "0.36.2")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "python-language-server" version))
4250 (sha256
4251 (base32
4252 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4253 (build-system python-build-system)
4254 (propagated-inputs
4255 `(("python-autopep8" ,python-autopep8)
4256 ("python-configparser" ,python-configparser)
4257 ("python-pydocstyle" ,python-pydocstyle)
4258 ("python-future" ,python-future)
4259 ("python-jedi" ,python-jedi)
4260 ("python-jsonrpc-server" ,python-jsonrpc-server)
4261 ("python-pluggy" ,python-pluggy)
4262 ("python-pycodestyle" ,python-pycodestyle)
4263 ("python-pyflakes" ,python-pyflakes)
4264 ("python-rope" ,python-rope)
4265 ("python-ujson" ,python-ujson)
4266 ("python-yapf" ,python-yapf)))
4267 (native-inputs
4268 `(("python-coverage" ,python-coverage)
4269 ("python-flaky" ,python-flaky)
4270 ("python-matplotlib" ,python-matplotlib)
4271 ("python-mock" ,python-mock)
4272 ("python-numpy" ,python-numpy)
4273 ("python-pandas" ,python-pandas)
4274 ("python-pylint" ,python-pylint)
4275 ("python-pytest" ,python-pytest)
4276 ("python-pytest-cov" ,python-pytest-cov)
4277 ("python-versioneer" ,python-versioneer)))
4278 (home-page "https://github.com/palantir/python-language-server")
4279 (synopsis "Python implementation of the Language Server Protocol")
4280 (description
4281 "The Python Language Server (pyls) is an implementation of the Python 3
4282 language specification for the Language Server Protocol (LSP). This tool is
4283 used in text editing environments to provide a complete and integrated
4284 feature-set for programming Python effectively.")
4285 (license license:expat)))
4286
4287 (define-public python-pathspec
4288 (package
4289 (name "python-pathspec")
4290 (version "0.7.0")
4291 (source
4292 (origin
4293 (method url-fetch)
4294 (uri (pypi-uri "pathspec" version))
4295 (sha256
4296 (base32
4297 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4298 (build-system python-build-system)
4299 (home-page "https://github.com/cpburnz/python-path-specification")
4300 (synopsis "Utility library for gitignore style pattern matching of file paths")
4301 (description
4302 "This package provides a utility library for gitignore style pattern
4303 matching of file paths.")
4304 (license license:mpl2.0)))
4305
4306 (define-public python-black
4307 (package
4308 (name "python-black")
4309 (version "20.8b1")
4310 (source
4311 (origin
4312 (method url-fetch)
4313 (uri (pypi-uri "black" version))
4314 (sha256
4315 (base32
4316 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4317 (build-system python-build-system)
4318 (arguments
4319 `(#:phases
4320 (modify-phases %standard-phases
4321 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4322 (lambda _
4323 (let ((python3 (which "python3")))
4324 (substitute* '("tests/data/fmtonoff.py"
4325 "tests/data/string_prefixes.py"
4326 "tests/data/function.py"
4327 "tests/data/python37.py")
4328 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4329 (string-append "#!" python3 (if (string? minor-version)
4330 minor-version
4331 "")))))
4332 #t))
4333 (add-after 'unpack 'disable-broken-tests
4334 (lambda* (#:key outputs inputs #:allow-other-keys)
4335 ;; Make installed package available for running the tests
4336 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4337 ":" (getenv "PATH")))
4338
4339 ;; These tests are supposed to be skipped when the blackd
4340 ;; dependencies are missing, but this doesn't quite work.
4341 (substitute* "tests/test_black.py"
4342 (("( *)class BlackDTestCase.*" match indent)
4343 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4344 indent "class BlackDTestCase(unittest.TestCase):\n"))
4345 (("web.Application") "False")
4346 (("@unittest_run_loop") ""))
4347
4348 ;; Patching the above file breaks the self test
4349 (substitute* "tests/test_black.py"
4350 (("( *)def test_self" match indent)
4351 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4352
4353 (substitute* "tests/test_black.py"
4354 (("( *)def test_python38" match indent)
4355 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4356 #t)))))
4357 (propagated-inputs
4358 `(("python-click" ,python-click)
4359 ("python-attrs" ,python-attrs)
4360 ("python-appdirs" ,python-appdirs)
4361 ("python-pathspec" ,python-pathspec)
4362 ("python-mypy-extensions" ,python-mypy-extensions)
4363 ("python-regex" ,python-regex)
4364 ("python-toml" ,python-toml)
4365 ("python-typed-ast" ,python-typed-ast)
4366 ("python-typing-extensions" ,python-typing-extensions)))
4367 (native-inputs
4368 `(("python-setuptools-scm" ,python-setuptools-scm)))
4369 (home-page "https://github.com/ambv/black")
4370 (synopsis "The uncompromising code formatter")
4371 (description "Black is the uncompromising Python code formatter.")
4372 (license license:expat)))
4373
4374 (define-public python-black-macchiato
4375 (package
4376 (name "python-black-macchiato")
4377 (version "1.3.0")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (pypi-uri "black-macchiato" version))
4382 (sha256
4383 (base32
4384 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4385 (build-system python-build-system)
4386 (propagated-inputs
4387 `(("python-black" ,python-black)))
4388 (home-page "https://github.com/wbolster/black-macchiato")
4389 (synopsis "Partial @code{python-black} formatting")
4390 (description
4391 "This package is built on top the @{python-black} code formatter to
4392 enable formatting of partial files.")
4393 (license license:bsd-3)))
4394
4395 (define-public python-blinker
4396 (package
4397 (name "python-blinker")
4398 (version "1.4")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (pypi-uri "blinker" version))
4403 (sha256
4404 (base32
4405 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4406 (build-system python-build-system)
4407 (home-page "https://pythonhosted.org/blinker/")
4408 (synopsis "Fast, simple object-to-object and broadcast signaling")
4409 (description
4410 "Blinker provides a fast dispatching system that allows any number of
4411 interested parties to subscribe to events, or \"signals\".")
4412 (license license:expat)))
4413
4414 (define-public python2-blinker
4415 (package-with-python2 python-blinker))
4416
4417 (define-public pelican
4418 (package
4419 (name "pelican")
4420 (version "4.2.0")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "pelican" version))
4425 (sha256
4426 (base32
4427 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4428 (build-system python-build-system)
4429 (propagated-inputs
4430 `(("python-blinker" ,python-blinker)
4431 ("python-dateutil" ,python-dateutil)
4432 ("python-docutils" ,python-docutils)
4433 ("python-feedgenerator" ,python-feedgenerator)
4434 ("python-jinja2" ,python-jinja2)
4435 ("python-markdown" ,python-markdown)
4436 ("python-pygments" ,python-pygments)
4437 ("python-pytz" ,python-pytz)
4438 ("python-six" ,python-six)
4439 ("python-unidecode" ,python-unidecode)))
4440 (home-page "https://getpelican.com/")
4441 (arguments
4442 `(;; XXX Requires a lot more packages to do unit tests :P
4443 #:tests? #f))
4444 (synopsis "Python-based static site publishing system")
4445 (description
4446 "Pelican is a tool to generate a static blog from reStructuredText,
4447 Markdown input files, and more. Pelican uses Jinja2 for templating
4448 and is very extensible.")
4449 (license license:agpl3+)))
4450
4451 (define-public mallard-ducktype
4452 (package
4453 (name "mallard-ducktype")
4454 (version "1.0.2")
4455 (source
4456 (origin
4457 (method git-fetch)
4458 ;; git-reference because tests are not included in pypi source tarball
4459 ;; https://issues.guix.gnu.org/issue/36755#2
4460 (uri (git-reference
4461 (url "https://github.com/projectmallard/mallard-ducktype")
4462 (commit version)))
4463 (file-name (git-file-name name version))
4464 (sha256
4465 (base32
4466 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4467 (build-system python-build-system)
4468 (arguments
4469 '(#:phases
4470 (modify-phases %standard-phases
4471 (replace 'check
4472 (lambda _
4473 (with-directory-excursion "tests"
4474 (invoke "sh" "runtests")))))))
4475 (home-page "http://projectmallard.org")
4476 (synopsis "Convert Ducktype to Mallard documentation markup")
4477 (description
4478 "Ducktype is a lightweight syntax that can represent all the semantics
4479 of the Mallard XML documentation system. Ducktype files can be converted to
4480 Mallard using the @command{ducktype} tool. The yelp-tools package
4481 provides additional functionality on the produced Mallard documents.")
4482 (license license:expat)))
4483
4484 (define-public python-cython
4485 (package
4486 (name "python-cython")
4487 (version "0.29.21")
4488 (source
4489 (origin
4490 (method url-fetch)
4491 (uri (pypi-uri "Cython" version))
4492 (sha256
4493 (base32
4494 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4495 (build-system python-build-system)
4496 ;; we need the full python package and not just the python-wrapper
4497 ;; because we need libpython3.3m.so
4498 (inputs
4499 `(("python" ,python)))
4500 (arguments
4501 `(#:phases
4502 (modify-phases %standard-phases
4503 (add-before 'check 'set-HOME
4504 ;; some tests require access to "$HOME/.cython"
4505 (lambda _ (setenv "HOME" "/tmp") #t))
4506 (replace 'check
4507 (lambda _
4508 ;; Disable compiler optimizations to greatly reduce the running
4509 ;; time of the test suite.
4510 (setenv "CFLAGS" "-O0")
4511
4512 (invoke "python" "runtests.py" "-vv"
4513 "-j" (number->string (parallel-job-count))
4514 ;; XXX: On 32-bit architectures, running the parallel tests
4515 ;; fails on many-core systems, see
4516 ;; <https://github.com/cython/cython/issues/2807>.
4517 ,@(if (not (target-64bit?))
4518 '("-x" "run.parallel")
4519 '())))))))
4520 (home-page "https://cython.org/")
4521 (synopsis "C extensions for Python")
4522 (description "Cython is an optimising static compiler for both the Python
4523 programming language and the extended Cython programming language. It makes
4524 writing C extensions for Python as easy as Python itself.")
4525 (license license:asl2.0)
4526 (properties `((python2-variant . ,(delay python2-cython))))))
4527
4528 (define-public python2-cython
4529 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4530 (package/inherit base
4531 (name "python2-cython")
4532 (inputs
4533 `(("python-2" ,python-2))) ;this is not automatically changed
4534 (arguments
4535 (substitute-keyword-arguments (package-arguments base)
4536 ((#:phases phases)
4537 `(modify-phases ,phases
4538 (add-before 'check 'adjust-test_embed
4539 (lambda _
4540 (substitute* "runtests.py"
4541 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4542 ;; so it can give the right -L flag to GCC when embedding static
4543 ;; builds of Python. It is unaware that the Python "config"
4544 ;; directory (where the static library lives) was renamed in
4545 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4546 ;; which works fine, because that is where the shared library is.
4547 ;;
4548 ;; It also appears to be unaware that the Makefile in Demos/embed
4549 ;; already unconditionally pass the static library location to GCC,
4550 ;; after checking sysconfig.get_config_var('LIBPL).
4551 ;;
4552 ;; The effect is that the linker is unable to resolve libexpat
4553 ;; symbols when building for Python 2, because neither the Python 2
4554 ;; shared library nor Expat is available. To fix it, we can either
4555 ;; add Expat as an input and make it visible to the linker, or just
4556 ;; prevent it from overriding the Python shared library location.
4557 ;; The end result is identical, so we take the easy route.
4558 ((" or libname not in os\\.listdir\\(libdir\\)")
4559 ""))
4560 #t)))))))))
4561
4562 ;; The RPython toolchain currently does not support Python 3.
4563 (define-public python2-rpython
4564 (package
4565 (name "python2-rpython")
4566 (version "0.2.1")
4567 (source
4568 (origin
4569 (method url-fetch)
4570 (uri (pypi-uri "rpython" version))
4571 (sha256
4572 (base32
4573 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4574 (build-system python-build-system)
4575 (arguments `(#:python ,python-2))
4576 (native-inputs
4577 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4578 (home-page "https://rpython.readthedocs.org")
4579 (synopsis "Framework for implementing interpreters and virtual machines")
4580 (description "RPython is a translation and support framework for
4581 producing implementations of dynamic languages, emphasizing a clean separation
4582 between language specification and implementation aspects.")
4583 (license license:expat)))
4584
4585 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4586 ;; python-scipy still build, as these three packages are often used together.
4587 (define-public python-numpy
4588 (package
4589 (name "python-numpy")
4590 (version "1.17.3")
4591 (source
4592 (origin
4593 (method url-fetch)
4594 (uri (string-append
4595 "https://github.com/numpy/numpy/releases/download/v"
4596 version "/numpy-" version ".tar.gz"))
4597 (sha256
4598 (base32
4599 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4600 (build-system python-build-system)
4601 (inputs
4602 `(("openblas" ,openblas)
4603 ("lapack" ,lapack)))
4604 (native-inputs
4605 `(("python-cython" ,python-cython)
4606 ("python-pytest" ,python-pytest)
4607 ("gfortran" ,gfortran)))
4608 (arguments
4609 `(#:phases
4610 (modify-phases %standard-phases
4611 (add-before 'build 'configure-blas-lapack
4612 (lambda* (#:key inputs #:allow-other-keys)
4613 (call-with-output-file "site.cfg"
4614 (lambda (port)
4615 (format port
4616 "[openblas]
4617 libraries = openblas
4618 library_dirs = ~a/lib
4619 include_dirs = ~a/include
4620
4621 # backslash-n to make emacs happy
4622 \n[lapack]
4623 lapack_libs = lapack
4624 library_dirs = ~a/lib
4625 include_dirs = ~a/include
4626 "
4627 (assoc-ref inputs "openblas")
4628 (assoc-ref inputs "openblas")
4629 (assoc-ref inputs "lapack")
4630 (assoc-ref inputs "lapack"))))
4631 #t))
4632 (add-before 'build 'fix-executable-paths
4633 (lambda* (#:key inputs #:allow-other-keys)
4634 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4635 ;; instead of /bin/sh.
4636 (substitute* "numpy/distutils/exec_command.py"
4637 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4638 (string-append match-start (assoc-ref inputs "bash") match-end)))
4639 ;; Use "gcc" executable, not "cc".
4640 (substitute* "numpy/distutils/system_info.py"
4641 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4642 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4643 #t))
4644 ;; Tests can only be run after the library has been installed and not
4645 ;; within the source directory.
4646 (delete 'check)
4647 (add-after 'install 'check
4648 (lambda* (#:key outputs inputs #:allow-other-keys)
4649 ;; Make installed package available for running the tests
4650 (add-installed-pythonpath inputs outputs)
4651 ;; Make sure "f2py" etc is found.
4652 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4653 ":" (getenv "PATH")))
4654 (with-directory-excursion "/tmp"
4655 (invoke "python" "-c"
4656 "import numpy; numpy.test(verbose=2)")))))))
4657 (home-page "https://numpy.org")
4658 (synopsis "Fundamental package for scientific computing with Python")
4659 (description "NumPy is the fundamental package for scientific computing
4660 with Python. It contains among other things: a powerful N-dimensional array
4661 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4662 and Fortran code, useful linear algebra, Fourier transform, and random number
4663 capabilities.")
4664 (properties `((python2-variant . ,(delay python2-numpy))))
4665 (license license:bsd-3)))
4666
4667 ;; Numpy 1.16.x are the last versions that support Python 2.
4668 (define-public python2-numpy
4669 (let ((numpy (package-with-python2
4670 (strip-python2-variant python-numpy))))
4671 (package/inherit
4672 numpy
4673 (version "1.16.5")
4674 (source (origin
4675 (method url-fetch)
4676 (uri (string-append
4677 "https://github.com/numpy/numpy/releases/download/v"
4678 version "/numpy-" version ".tar.gz"))
4679 (sha256
4680 (base32
4681 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4682
4683 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4684 ;; interest only for legacy code going back to NumPy's predecessor
4685 ;; Numeric.
4686 (define-public python2-numpy-1.8
4687 (package (inherit python2-numpy)
4688 (version "1.8.2")
4689 (source
4690 (origin
4691 (method git-fetch)
4692 (uri (git-reference
4693 (url "https://github.com/numpy/numpy")
4694 (commit (string-append "v" version))))
4695 (file-name (git-file-name "numpy" version))
4696 (sha256
4697 (base32
4698 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4699 (arguments
4700 (substitute-keyword-arguments (package-arguments python2-numpy)
4701 ((#:phases phases)
4702 `(modify-phases ,phases
4703 (replace 'configure-blas-lapack
4704 (lambda* (#:key inputs #:allow-other-keys)
4705 (call-with-output-file "site.cfg"
4706 (lambda (port)
4707 (format port
4708 "[openblas]
4709 libraries = openblas,lapack
4710 library_dirs = ~a/lib:~a/lib
4711 include_dirs = ~a/include:~a/include
4712 "
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "lapack")
4715 (assoc-ref inputs "openblas")
4716 (assoc-ref inputs "lapack"))))
4717 #t))))))
4718 (native-inputs
4719 `(("python2-nose" ,python2-nose)))
4720 (description "NumPy is the fundamental package for scientific computing
4721 with Python. It contains among other things: a powerful N-dimensional array
4722 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4723 and Fortran code, useful linear algebra, Fourier transform, and random number
4724 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4725 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4726 Numeric.")
4727 (license license:bsd-3)))
4728
4729 (define-public python-munch
4730 (package
4731 (name "python-munch")
4732 (version "2.0.4")
4733 (source
4734 (origin
4735 (method url-fetch)
4736 (uri (pypi-uri "munch" version))
4737 (sha256
4738 (base32
4739 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4740 (build-system python-build-system)
4741 (home-page "https://github.com/Infinidat/munch")
4742 (synopsis "Dot-accessible dictionary")
4743 (description "Munch is a dot-accessible dictionary similar to JavaScript
4744 objects.")
4745 (license license:expat)))
4746
4747 (define-public python2-munch
4748 (package-with-python2 python-munch))
4749
4750 (define-public python-colormath
4751 (package
4752 (name "python-colormath")
4753 (version "3.0.0")
4754 (source
4755 (origin
4756 (method url-fetch)
4757 (uri (pypi-uri "colormath" version))
4758 (sha256
4759 (base32
4760 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4761 (build-system python-build-system)
4762 (propagated-inputs
4763 `(("python-networkx" ,python-networkx)
4764 ("python-numpy" ,python-numpy)))
4765 (home-page "https://github.com/gtaylor/python-colormath")
4766 (synopsis "Color math and conversion library")
4767 (description
4768 "This is a Python library for color math and conversions.")
4769 (license license:bsd-3)))
4770
4771 (define-public python2-colormath
4772 (package-with-python2 python-colormath))
4773
4774 (define-public python-spectra
4775 (package
4776 (name "python-spectra")
4777 (version "0.0.11")
4778 (source
4779 (origin
4780 (method url-fetch)
4781 (uri (pypi-uri "spectra" version))
4782 (sha256
4783 (base32
4784 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4785 (build-system python-build-system)
4786 (arguments
4787 `(#:phases
4788 (modify-phases %standard-phases
4789 (replace 'check
4790 (lambda _ (invoke "nosetests" "-v"))))))
4791 (propagated-inputs
4792 `(("python-colormath" ,python-colormath)))
4793 (native-inputs
4794 `(("python-nose" ,python-nose)))
4795 (home-page "https://github.com/jsvine/spectra")
4796 (synopsis "Color scales and color conversion")
4797 (description
4798 "This package provides a Python library intended to make color math,
4799 color scales, and color space conversion easy. It has support for:
4800
4801 @enumerate
4802 @item Color scales
4803 @item Color ranges
4804 @item Color blending
4805 @item Brightening/darkening colors
4806 @item Saturating/desaturating colors
4807 @item Conversion to/from multiple color spaces.
4808 @end enumerate\n")
4809 (license license:expat)))
4810
4811 (define-public python2-spectra
4812 (package-with-python2 python-spectra))
4813
4814 (define-public python-numpy-documentation
4815 (package
4816 (name "python-numpy-documentation")
4817 (version (package-version python-numpy))
4818 (source (package-source python-numpy))
4819 (build-system python-build-system)
4820 (native-inputs
4821 `(("python-matplotlib" ,python-matplotlib)
4822 ("python-numpy" ,python-numpy)
4823 ("pkg-config" ,pkg-config)
4824 ("python-sphinx" ,python-sphinx)
4825 ("python-numpydoc" ,python-numpydoc)
4826 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4827 texlive-fonts-ec
4828 texlive-generic-ifxetex
4829 texlive-generic-pdftex
4830 texlive-amsfonts
4831 texlive-latex-capt-of
4832 texlive-latex-cmap
4833 texlive-latex-environ
4834 texlive-latex-eqparbox
4835 texlive-latex-etoolbox
4836 texlive-latex-expdlist
4837 texlive-latex-fancyhdr
4838 texlive-latex-fancyvrb
4839 texlive-latex-fncychap
4840 texlive-latex-float
4841 texlive-latex-framed
4842 texlive-latex-geometry
4843 texlive-latex-graphics
4844 texlive-latex-hyperref
4845 texlive-latex-mdwtools
4846 texlive-latex-multirow
4847 texlive-latex-needspace
4848 texlive-latex-oberdiek
4849 texlive-latex-parskip
4850 texlive-latex-preview
4851 texlive-latex-tabulary
4852 texlive-latex-threeparttable
4853 texlive-latex-titlesec
4854 texlive-latex-trimspaces
4855 texlive-latex-ucs
4856 texlive-latex-upquote
4857 texlive-latex-url
4858 texlive-latex-varwidth
4859 texlive-latex-wrapfig)))
4860 ("texinfo" ,texinfo)
4861 ("perl" ,perl)
4862 ("scipy-sphinx-theme"
4863 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4864 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4865 (method git-fetch)
4866 (uri (git-reference
4867 (url "https://github.com/scipy/scipy-sphinx-theme")
4868 (commit commit)))
4869 (file-name (git-file-name "python-scipy-sphinx-theme"
4870 (string-take commit 7)))
4871 (sha256
4872 (base32
4873 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4874 ,@(package-native-inputs python-numpy)))
4875 (arguments
4876 `(#:tests? #f ; we're only generating the documentation
4877 #:phases
4878 (modify-phases %standard-phases
4879 (delete 'build)
4880 (replace 'install
4881 (lambda* (#:key inputs outputs #:allow-other-keys)
4882 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4883 (doc (string-append
4884 data "/doc/" ,name "-"
4885 ,(package-version python-numpy)))
4886 (info-reader (string-append data "/info"))
4887 (html (string-append doc "/html"))
4888 (scipy-sphinx-theme "scipy-sphinx-theme")
4889 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4890 (pyver ,(string-append "PYVER=")))
4891
4892 ;; FIXME: this is needed to for texlive-union to generate
4893 ;; fonts, which are not found.
4894 (setenv "HOME" "/tmp")
4895
4896 (with-directory-excursion "doc"
4897 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4898 (mkdir-p html)
4899 (invoke "make" "html" pyver)
4900 (invoke "make" "latex" "PAPER=a4" pyver)
4901 (invoke "make" "-C" "build/latex"
4902 "all-pdf" "PAPER=a4" pyver)
4903 ;; FIXME: Generation of the info file fails.
4904 ;; (invoke "make" "info" pyver)
4905 ;; (mkdir-p info)
4906 ;; (copy-file "build/texinfo/numpy.info"
4907 ;; (string-append info "/numpy.info"))
4908 (for-each (lambda (file)
4909 (copy-file (string-append "build/latex" file)
4910 (string-append doc file)))
4911 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4912 (with-directory-excursion "build/html"
4913 (for-each (lambda (file)
4914 (let* ((dir (dirname file))
4915 (tgt-dir (string-append html "/" dir)))
4916 (unless (equal? "." dir)
4917 (mkdir-p tgt-dir))
4918 (install-file file html)))
4919 (find-files "." ".*")))))
4920 #t)))))
4921 (home-page (package-home-page python-numpy))
4922 (synopsis "Documentation for the python-numpy package")
4923 (description (package-description python-numpy))
4924 (license (package-license python-numpy))))
4925
4926 (define-public python2-numpy-documentation
4927 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4928 (package
4929 (inherit numpy-documentation)
4930 (native-inputs `(("python2-functools32" ,python2-functools32)
4931 ,@(package-native-inputs numpy-documentation))))))
4932
4933 (define-public python-pygit2
4934 (package
4935 (name "python-pygit2")
4936 (version "1.4.0")
4937 (source
4938 (origin
4939 (method url-fetch)
4940 (uri (pypi-uri "pygit2" version))
4941 (sha256
4942 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
4943 (build-system python-build-system)
4944 (arguments
4945 '(#:tests? #f)) ; tests don't run correctly in our environment
4946 (propagated-inputs
4947 `(("python-cached-property" ,python-cached-property)
4948 ("python-cffi" ,python-cffi)
4949 ("libgit2" ,libgit2)))
4950 (native-inputs
4951 `(("python-pytest" ,python-pytest)))
4952 (home-page "https://github.com/libgit2/pygit2")
4953 (synopsis "Python bindings for libgit2")
4954 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4955 library, libgit2 implements Git plumbing.")
4956 ;; GPL2.0 only, with linking exception.
4957 (license license:gpl2)))
4958
4959 (define-public python-patiencediff
4960 (package
4961 (name "python-patiencediff")
4962 (version "0.2.0")
4963 (source
4964 (origin
4965 (method url-fetch)
4966 (uri (pypi-uri "patiencediff" version))
4967 (sha256
4968 (base32
4969 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4970 (build-system python-build-system)
4971 (home-page "https://www.breezy-vcs.org/")
4972 (synopsis "Python implementation of the patiencediff algorithm")
4973 (description
4974 "This package contains a Python implementation of the @code{patiencediff}
4975 algorithm. Patiencediff provides a good balance of performance, nice output for
4976 humans, and implementation simplicity.")
4977 (license license:gpl2)))
4978
4979 (define-public python-pdftotext
4980 (package
4981 (name "python-pdftotext")
4982 (version "2.1.5")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "pdftotext" version))
4987 (sha256
4988 (base32
4989 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
4990 (build-system python-build-system)
4991 (inputs
4992 `(("poppler" ,poppler)))
4993 (home-page "https://github.com/jalan/pdftotext")
4994 (synopsis "Simple PDF text extraction")
4995 (description "Pdftotext is a Python library of PDF text extraction.")
4996 (license license:expat)))
4997
4998 (define-public python-pyparsing
4999 (package
5000 (name "python-pyparsing")
5001 (version "2.4.6")
5002 (source
5003 (origin
5004 (method url-fetch)
5005 (uri (pypi-uri "pyparsing" version))
5006 (sha256
5007 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5008 (build-system python-build-system)
5009 (outputs '("out" "doc"))
5010 (arguments
5011 `(#:tests? #f ; no test target
5012 #:phases
5013 (modify-phases %standard-phases
5014 (add-after 'install 'install-doc
5015 (lambda* (#:key outputs #:allow-other-keys)
5016 (let* ((doc (string-append (assoc-ref outputs "doc")
5017 "/share/doc/" ,name "-" ,version))
5018 (html-doc (string-append doc "/html"))
5019 (examples (string-append doc "/examples")))
5020 (mkdir-p html-doc)
5021 (mkdir-p examples)
5022 (for-each
5023 (lambda (dir tgt)
5024 (map (lambda (file)
5025 (install-file file tgt))
5026 (find-files dir ".*")))
5027 (list "docs" "htmldoc" "examples")
5028 (list doc html-doc examples))
5029 #t))))))
5030 (home-page "https://github.com/pyparsing/pyparsing")
5031 (synopsis "Python parsing class library")
5032 (description
5033 "The pyparsing module is an alternative approach to creating and
5034 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5035 of regular expressions. The pyparsing module provides a library of classes
5036 that client code uses to construct the grammar directly in Python code.")
5037 (license license:expat)))
5038
5039 (define-public python2-pyparsing
5040 (package-with-python2 python-pyparsing))
5041
5042 (define-public python-pyparsing-2.4.7
5043 (package
5044 (inherit python-pyparsing)
5045 (version "2.4.7")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "pyparsing" version))
5050 (sha256
5051 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5052
5053 (define-public python-numpydoc
5054 (package
5055 (name "python-numpydoc")
5056 (version "0.8.0")
5057 (source
5058 (origin
5059 (method url-fetch)
5060 (uri (pypi-uri "numpydoc" version))
5061 (sha256
5062 (base32
5063 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5064 (build-system python-build-system)
5065 (propagated-inputs
5066 `(("python-sphinx" ,python-sphinx)))
5067 (native-inputs
5068 `(("python-nose" ,python-nose)))
5069 (home-page "https://pypi.org/project/numpydoc/")
5070 (synopsis
5071 "Numpy's Sphinx extensions")
5072 (description
5073 "Sphinx extension to support docstrings in Numpy format.")
5074 (license license:bsd-2)
5075 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5076
5077 (define-public python2-numpydoc
5078 (let ((base (package-with-python2
5079 (strip-python2-variant python-numpydoc))))
5080 (package/inherit base
5081 (propagated-inputs
5082 `(("python2-jinja2" ,python2-jinja2)
5083 ,@(package-propagated-inputs base))))))
5084
5085 (define-public python-numexpr
5086 (package
5087 (name "python-numexpr")
5088 (version "2.6.5")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (pypi-uri "numexpr" version))
5093 (sha256
5094 (base32
5095 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5096 (build-system python-build-system)
5097 (arguments `(#:tests? #f)) ; no tests included
5098 (propagated-inputs
5099 `(("python-numpy" ,python-numpy)))
5100 (home-page "https://github.com/pydata/numexpr")
5101 (synopsis "Fast numerical expression evaluator for NumPy")
5102 (description
5103 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5104 expressions that operate on arrays are accelerated and use less memory than
5105 doing the same calculation in Python. In addition, its multi-threaded
5106 capabilities can make use of all your cores, which may accelerate
5107 computations, most specially if they are not memory-bounded (e.g. those using
5108 transcendental functions).")
5109 (license license:expat)))
5110
5111 (define-public python2-numexpr
5112 (package-with-python2 python-numexpr))
5113
5114 (define-public python-cycler
5115 (package
5116 (name "python-cycler")
5117 (version "0.10.0")
5118 (source (origin
5119 (method url-fetch)
5120 (uri (pypi-uri "cycler" version))
5121 (sha256
5122 (base32
5123 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5124 (build-system python-build-system)
5125 (arguments
5126 ;; XXX: The current version requires 'coveralls' which we don't have.
5127 ;; Enable this for the next release which uses 'python-pytest'.
5128 '(#:tests? #f))
5129 (propagated-inputs
5130 `(("python-six" ,python-six)))
5131 (home-page "https://matplotlib.org/cycler/")
5132 (synopsis "Composable keyword argument iterator")
5133 (description
5134 "When using @code{matplotlib} and plotting more than one line, it is
5135 common to want to be able to want to be able to cycle over one or more artist
5136 styles; but the plotting logic can quickly become involved.
5137 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5138 @code{Cycler} class was developed.")
5139 (license license:bsd-3)))
5140
5141 (define-public python2-cycler
5142 (package-with-python2 python-cycler))
5143
5144 (define-public python-colorspacious
5145 (package
5146 (name "python-colorspacious")
5147 (version "1.1.2")
5148 (source
5149 (origin
5150 (method git-fetch)
5151 (uri (git-reference
5152 (url "https://github.com/njsmith/colorspacious")
5153 (commit (string-append "v" version))))
5154 (file-name (git-file-name name version))
5155 (sha256
5156 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5157 (build-system python-build-system)
5158 (propagated-inputs
5159 `(("python-numpy" ,python-numpy)))
5160 (native-inputs
5161 `(("python-nose" ,python-nose)))
5162 (arguments
5163 `(#:phases
5164 (modify-phases %standard-phases
5165 (replace 'check
5166 (lambda _
5167 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5168 (home-page "https://github.com/njsmith/colorspacious")
5169 (synopsis "Python library for colorspace conversions")
5170 (description "@code{colorspacious} is a Python library that lets you
5171 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5172 (license license:expat)))
5173
5174 (define-public python2-colorspacious
5175 (package-with-python2 python-colorspacious))
5176
5177 (define-public python-matplotlib
5178 (package
5179 (name "python-matplotlib")
5180 (version "3.1.2")
5181 (source
5182 (origin
5183 (method url-fetch)
5184 (uri (pypi-uri "matplotlib" version))
5185 (sha256
5186 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5187 (patches
5188 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5189 (build-system python-build-system)
5190 (propagated-inputs ; the following packages are all needed at run time
5191 `(("python-cycler" ,python-cycler)
5192 ("python-kiwisolver" ,python-kiwisolver)
5193 ("python-pyparsing" ,python-pyparsing)
5194 ("python-pygobject" ,python-pygobject)
5195 ("gobject-introspection" ,gobject-introspection)
5196 ("python-tkinter" ,python "tk")
5197 ("python-dateutil" ,python-dateutil)
5198 ("python-numpy" ,python-numpy)
5199 ("python-pillow" ,python-pillow)
5200 ("python-pytz" ,python-pytz)
5201 ("python-six" ,python-six)
5202 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5203 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5204 ;; object. For this reason we need to import both libraries.
5205 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5206 ("python-pycairo" ,python-pycairo)
5207 ("python-cairocffi" ,python-cairocffi)))
5208 (inputs
5209 `(("libpng" ,libpng)
5210 ("freetype" ,freetype)
5211 ("cairo" ,cairo)
5212 ("glib" ,glib)
5213 ;; FIXME: Add backends when available.
5214 ;("python-wxpython" ,python-wxpython)
5215 ("tcl" ,tcl)
5216 ("tk" ,tk)))
5217 (native-inputs
5218 `(("pkg-config" ,pkg-config)
5219 ("python-pytest" ,python-pytest)
5220 ("python-mock" ,python-mock)
5221 ("unzip" ,unzip)
5222 ("jquery-ui"
5223 ,(origin
5224 (method url-fetch)
5225 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5226 (sha256
5227 (base32
5228 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5229 (arguments
5230 `(#:phases
5231 (modify-phases %standard-phases
5232 ;; XXX We disable all image comparison tests because we're using a
5233 ;; newer version of FreeType than matplotlib expects. This leads to
5234 ;; minor differences throughout the tests.
5235 (add-after 'unpack 'fix-and-disable-failing-tests
5236 (lambda _
5237 (substitute* (append (find-files "lib/matplotlib/tests/"
5238 "test_.*\\.py$")
5239 (find-files "lib/mpl_toolkits/tests"
5240 "test_.*\\.py$"))
5241 (("^from matplotlib" match)
5242 (string-append "import pytest\n" match))
5243 (("( *)@image_comparison" match indent)
5244 (string-append indent
5245 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5246 match)))
5247 (substitute* "lib/matplotlib/tests/test_animation.py"
5248 (("/bin/sh") (which "sh")))
5249 (for-each delete-file
5250 ;; test_normal_axes, test_get_tightbbox_polar
5251 '("lib/matplotlib/tests/test_axes.py"
5252 ;; We don't use the webagg backend and this test forces it.
5253 "lib/matplotlib/tests/test_backend_webagg.py"
5254 ;; test_outward_ticks
5255 "lib/matplotlib/tests/test_tightlayout.py"
5256 ;; test_hidden_axes fails with minor extent
5257 ;; differences, possibly due to the use of a
5258 ;; different version of FreeType.
5259 "lib/matplotlib/tests/test_constrainedlayout.py"
5260 ;; Fontconfig returns no fonts.
5261 "lib/matplotlib/tests/test_font_manager.py"))
5262 #t))
5263 (add-before 'install 'install-jquery-ui
5264 (lambda* (#:key outputs inputs #:allow-other-keys)
5265 (let ((dir (string-append (assoc-ref outputs "out")
5266 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5267 (mkdir-p dir)
5268 (invoke "unzip"
5269 (assoc-ref inputs "jquery-ui")
5270 "-d" dir))
5271 #t))
5272 (replace 'check
5273 (lambda* (#:key outputs inputs #:allow-other-keys)
5274 (add-installed-pythonpath inputs outputs)
5275 (invoke "python" "tests.py" "-v"
5276 "-m" "not network and not webagg")))
5277 (add-before 'build 'configure-environment
5278 (lambda* (#:key outputs inputs #:allow-other-keys)
5279 (let ((cairo (assoc-ref inputs "cairo")))
5280 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5281 ;; has not effect.
5282 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5283 (setenv "HOME" (getcwd))
5284 ;; Fix rounding errors when using the x87 FPU.
5285 (when (string-prefix? "i686" ,(%current-system))
5286 (setenv "CFLAGS" "-ffloat-store"))
5287 (call-with-output-file "setup.cfg"
5288 (lambda (port)
5289 (format port "[directories]~%
5290 basedirlist = ~a,~a~%
5291 [packages]~%
5292 tests = True~%"
5293 (assoc-ref inputs "tcl")
5294 (assoc-ref inputs "tk")))))
5295 #t)))))
5296 (home-page "https://matplotlib.org/")
5297 (synopsis "2D plotting library for Python")
5298 (description
5299 "Matplotlib is a Python 2D plotting library which produces publication
5300 quality figures in a variety of hardcopy formats and interactive environments
5301 across platforms. Matplotlib can be used in Python scripts, the python and
5302 ipython shell, web application servers, and six graphical user interface
5303 toolkits.")
5304 (license license:psfl)
5305 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5306
5307 (define-public python2-matplotlib
5308 (let ((matplotlib (package-with-python2
5309 (strip-python2-variant python-matplotlib))))
5310 (package (inherit matplotlib)
5311 (version "2.2.4")
5312 (source
5313 (origin
5314 (method url-fetch)
5315 (uri (pypi-uri "matplotlib" version))
5316 (sha256
5317 (base32
5318 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5319 (arguments
5320 (substitute-keyword-arguments (package-arguments matplotlib)
5321 ((#:phases phases)
5322 `(modify-phases ,phases
5323 (replace 'install-jquery-ui
5324 (lambda* (#:key outputs inputs #:allow-other-keys)
5325 (let ((dir (string-append (assoc-ref outputs "out")
5326 "/lib/python2.7/site-packages/"
5327 "matplotlib/backends/web_backend/")))
5328 (mkdir-p dir)
5329 (invoke "unzip"
5330 (assoc-ref inputs "jquery-ui")
5331 "-d" dir))
5332 #t))
5333 (delete 'fix-and-disable-failing-tests)
5334 (delete 'check))))) ; These tests weren't run the the past.
5335 ;; Make sure to use special packages for Python 2 instead
5336 ;; of those automatically rewritten by package-with-python2.
5337 (propagated-inputs
5338 `(("python2-pycairo" ,python2-pycairo)
5339 ("python2-backports-functools-lru-cache"
5340 ,python2-backports-functools-lru-cache)
5341 ("python2-functools32" ,python2-functools32)
5342 ("python2-pygobject-2" ,python2-pygobject-2)
5343 ("python2-subprocess32" ,python2-subprocess32)
5344 ("python2-tkinter" ,python-2 "tk")
5345 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5346 '("python-cairocffi"
5347 "python-pycairo"
5348 "python-pygobject"
5349 "python-tkinter")))))))
5350
5351 (define-public python-matplotlib-documentation
5352 (package
5353 (name "python-matplotlib-documentation")
5354 (version (package-version python-matplotlib))
5355 (source (package-source python-matplotlib))
5356 (build-system python-build-system)
5357 (native-inputs
5358 `(("python-matplotlib" ,python-matplotlib)
5359 ("python-colorspacious" ,python-colorspacious)
5360 ("python-sphinx" ,python-sphinx)
5361 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5362 ("python-sphinx-gallery" ,python-sphinx-gallery)
5363 ("python-numpydoc" ,python-numpydoc)
5364 ("python-ipython" ,python-ipython)
5365 ("python-ipykernel" ,python-ipykernel)
5366 ("python-mock" ,python-mock)
5367 ("graphviz" ,graphviz)
5368 ("texlive" ,(texlive-union (list texlive-amsfonts
5369 texlive-latex-amsmath
5370 texlive-latex-enumitem
5371 texlive-latex-expdlist
5372 texlive-latex-geometry
5373 texlive-latex-preview
5374 texlive-latex-type1cm
5375 texlive-latex-ucs
5376
5377 texlive-generic-pdftex
5378
5379 texlive-fonts-ec
5380 texlive-fonts-adobe-times
5381 texlive-fonts-txfonts)))
5382 ("texinfo" ,texinfo)
5383 ,@(package-native-inputs python-matplotlib)))
5384 (arguments
5385 `(#:tests? #f ; we're only generating documentation
5386 #:phases
5387 (modify-phases %standard-phases
5388 ;; The tests in python-matplotlib are run after the install phase, so
5389 ;; we need to delete the extra phase here.
5390 (delete 'check)
5391 (replace 'build
5392 (lambda _
5393 (chdir "doc")
5394 (setenv "PYTHONPATH"
5395 (string-append (getenv "PYTHONPATH")
5396 ":" (getcwd) "/../examples/units"))
5397 (substitute* "conf.py"
5398 ;; Don't use git.
5399 (("^SHA = check_output.*")
5400 (string-append "SHA = \"" ,version "\"\n"))
5401 ;; Don't fetch intersphinx files from the Internet
5402 (("^explicit_order_folders" m)
5403 (string-append "intersphinx_mapping = {}\n" m))
5404 (("'sphinx.ext.intersphinx',") "")
5405 ;; Disable URL embedding which requires internet access.
5406 (("'https://docs.scipy.org/doc/numpy'") "None")
5407 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5408 (invoke "make"
5409 "SPHINXBUILD=sphinx-build"
5410 "SPHINXOPTS=" ; don't abort on warnings
5411 "html" "texinfo")))
5412 (replace 'install
5413 (lambda* (#:key inputs outputs #:allow-other-keys)
5414 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5415 (doc (string-append data "/doc/python-matplotlib-" ,version))
5416 (info (string-append data "/info"))
5417 (html (string-append doc "/html")))
5418 (mkdir-p html)
5419 (mkdir-p info)
5420 (copy-recursively "build/html" html)
5421 (symlink (string-append html "/_images")
5422 (string-append info "/matplotlib-figures"))
5423 (with-directory-excursion "build/texinfo"
5424 (substitute* "matplotlib.texi"
5425 (("@image\\{([^,]*)" all file)
5426 (string-append "@image{matplotlib-figures/" file)))
5427 (symlink (string-append html "/_images")
5428 "./matplotlib-figures")
5429 (invoke "makeinfo" "--no-split"
5430 "-o" "matplotlib.info" "matplotlib.texi"))
5431 (install-file "build/texinfo/matplotlib.info" info))
5432 #t)))))
5433 (home-page (package-home-page python-matplotlib))
5434 (synopsis "Documentation for the python-matplotlib package")
5435 (description (package-description python-matplotlib))
5436 (license (package-license python-matplotlib))))
5437
5438 (define-public python2-matplotlib-documentation
5439 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5440 (package
5441 (inherit parent)
5442 (native-inputs
5443 (alist-delete "python-sphinx-copybutton"
5444 (package-native-inputs parent))))))
5445
5446 (define-public python-matplotlib-venn
5447 (package
5448 (name "python-matplotlib-venn")
5449 (version "0.11.5")
5450 (source
5451 (origin
5452 (method url-fetch)
5453 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5454 (sha256
5455 (base32
5456 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5457 (build-system python-build-system)
5458 (arguments '(#:tests? #f)) ; tests are not included
5459 (propagated-inputs
5460 `(("python-matplotlib" ,python-matplotlib)
5461 ("python-numpy" ,python-numpy)
5462 ("python-scipy" ,python-scipy)))
5463 (native-inputs
5464 `(("unzip" ,unzip)))
5465 (home-page "https://github.com/konstantint/matplotlib-venn")
5466 (synopsis "Plot area-proportional Venn diagrams")
5467 (description
5468 "This package provides tools for plotting area-proportional two- and
5469 three-way Venn diagrams in @code{matplotlib}.")
5470 (license license:expat)))
5471
5472 (define-public python-pysnptools
5473 (package
5474 (name "python-pysnptools")
5475 (version "0.4.11")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "pysnptools" version))
5480 (sha256
5481 (base32
5482 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5483 (build-system python-build-system)
5484 (arguments
5485 `(#:tests? #f ; no test data are included
5486 #:phases
5487 (modify-phases %standard-phases
5488 (replace 'check
5489 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5490 (if tests?
5491 (begin
5492 (add-installed-pythonpath inputs outputs)
5493 (invoke "python3" "pysnptools/test.py"))
5494 #t))))))
5495 (propagated-inputs
5496 `(("python-dill" ,python-dill)
5497 ("python-h5py" ,python-h5py)
5498 ("python-numpy" ,python-numpy)
5499 ("python-pandas" ,python-pandas)
5500 ("python-psutil" ,python-psutil)
5501 ("python-scipy" ,python-scipy)))
5502 (native-inputs
5503 `(("python-cython" ,python-cython)))
5504 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5505 (synopsis "Library for reading and manipulating genetic data")
5506 (description
5507 "PySnpTools is a library for reading and manipulating genetic data. It
5508 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5509 those files. It can also efficiently manipulate ranges of integers using set
5510 operators such as union, intersection, and difference.")
5511 (license license:asl2.0)))
5512
5513 (define-public python2-pysnptools
5514 (package-with-python2 python-pysnptools))
5515
5516 (define-public python-wurlitzer
5517 (package
5518 (name "python-wurlitzer")
5519 (version "2.0.1")
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (pypi-uri "wurlitzer" version))
5524 (sha256
5525 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5526 (build-system python-build-system)
5527 (arguments
5528 '(#:phases
5529 (modify-phases %standard-phases
5530 (replace 'check
5531 (lambda _
5532 (invoke "pytest" "-vv" "test.py"))))))
5533 (native-inputs
5534 `(("python-mock" ,python-mock)
5535 ("python-pytest" ,python-pytest)))
5536 (home-page "https://github.com/minrk/wurlitzer")
5537 (synopsis "Capture C-level output in context managers")
5538 (description
5539 "This library helps to redirect @code{sys.stdout} to a stream or a file
5540 while executing some piece of code, including C code running within a Python
5541 process.")
5542 (license license:expat)))
5543
5544 (define-public python-socksipy-branch
5545 (package
5546 (name "python-socksipy-branch")
5547 (version "1.01")
5548 (source
5549 (origin
5550 (method url-fetch)
5551 (uri (pypi-uri "SocksiPy-branch" version))
5552 (sha256
5553 (base32
5554 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5555 (build-system python-build-system)
5556 (arguments
5557 `(#:tests? #f)) ; There are no tests
5558 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5559 (synopsis "Python SOCKS module")
5560 (description
5561 "SocksiPy - A Python SOCKS client module. It provides a
5562 socket-like interface that supports connections to any TCP
5563 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5564 The original version was developed by Dan Haim, this is a
5565 branch created by Mario Vilas to address some open issues,
5566 as the original project seems to have been abandoned circa 2007.")
5567 (license license:bsd-3)))
5568
5569 (define-public python2-socksipy-branch
5570 (package-with-python2 python-socksipy-branch))
5571
5572 (define-public python-socksipychain
5573 (package
5574 (name "python-socksipychain")
5575 (version "2.1.2")
5576 (source
5577 (origin
5578 (method git-fetch)
5579 (uri (git-reference
5580 (url "https://github.com/pagekite/PySocksipyChain")
5581 (commit (string-append "v" version))))
5582 (file-name (git-file-name name version))
5583 (sha256
5584 (base32
5585 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5586 (build-system python-build-system)
5587 (arguments
5588 `(#:tests? #f)) ; Tests try to access the network.
5589 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5590 (synopsis "Python SOCKS module with chained proxies support")
5591 (description
5592 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5593 adds support for arbitrary chaining of proxy servers and various modes of
5594 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5595 a simple netcat replacement with chaining support.")
5596 (license license:bsd-3)))
5597
5598 (define-public python-pycodestyle
5599 (package
5600 (name "python-pycodestyle")
5601 (version "2.6.0")
5602 (source
5603 (origin
5604 (method url-fetch)
5605 (uri (pypi-uri "pycodestyle" version))
5606 (sha256
5607 (base32
5608 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5609 (build-system python-build-system)
5610 (arguments
5611 `(#:phases
5612 (modify-phases %standard-phases
5613 (replace 'check
5614 (lambda _
5615 (invoke "pytest" "-vv"))))))
5616 (native-inputs
5617 `(("python-pytest" ,python-pytest)))
5618 (home-page "https://pycodestyle.readthedocs.io/")
5619 (synopsis "Python style guide checker")
5620 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5621 Python code against some of the style conventions in
5622 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5623 (license license:expat)))
5624
5625 (define-public python2-pycodestyle
5626 (package-with-python2 python-pycodestyle))
5627
5628 (define-public python-multidict
5629 (package
5630 (name "python-multidict")
5631 (version "4.7.5")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (pypi-uri "multidict" version))
5636 (sha256
5637 (base32
5638 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5639 (build-system python-build-system)
5640 (arguments
5641 '(#:modules ((ice-9 ftw)
5642 (srfi srfi-1)
5643 (srfi srfi-26)
5644 (guix build utils)
5645 (guix build python-build-system))
5646 #:phases (modify-phases %standard-phases
5647 (replace 'check
5648 (lambda* (#:key tests? #:allow-other-keys)
5649 (if tests?
5650 (begin
5651 (let ((libdir (find (cut string-prefix? "lib." <>)
5652 (scandir "build"))))
5653 (setenv "PYTHONPATH"
5654 (string-append "./build/" libdir ":"
5655 (getenv "PYTHONPATH")))
5656 (invoke "pytest" "-vv")))
5657 (format #t "test suite not run~%"))
5658 #t)))))
5659 (native-inputs
5660 `(("python-pytest" ,python-pytest)
5661 ("python-pytest-cov" ,python-pytest-cov)))
5662 (home-page "https://github.com/aio-libs/multidict/")
5663 (synopsis "Multidict implementation")
5664 (description "Multidict is dict-like collection of key-value pairs
5665 where key might be occurred more than once in the container.")
5666 (license license:asl2.0)))
5667
5668 (define-public python-orderedmultidict
5669 (package
5670 (name "python-orderedmultidict")
5671 (version "1.0")
5672 (source
5673 (origin
5674 (method url-fetch)
5675 (uri (pypi-uri "orderedmultidict" version))
5676 (sha256
5677 (base32
5678 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5679 (build-system python-build-system)
5680 (arguments
5681 `(#:phases
5682 (modify-phases %standard-phases
5683 (add-after 'unpack 'fix-tests
5684 (lambda _
5685 ;; The package uses nosetest for running the tests.
5686 ;; Adding this initfile allows to run the test suite
5687 ;; without requiring nosetest.
5688 (with-output-to-file "tests/__init__.py" newline)
5689 #t)))))
5690 (propagated-inputs
5691 `(("python-six" ,python-six)))
5692 (native-inputs
5693 `(("python-pycodestyle" ,python-pycodestyle)))
5694 (home-page "https://github.com/gruns/orderedmultidict")
5695 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5696 (description "This package contains a library for ordered multivalue
5697 dictionaries. A multivalue dictionary is a dictionary that can store
5698 multiple values for the same key. An ordered multivalue dictionary is a
5699 multivalue dictionary that retains the order of insertions and deletions.")
5700 (license license:unlicense)))
5701
5702 (define-public python2-orderedmultidict
5703 (package-with-python2 python-orderedmultidict))
5704
5705 (define-public python-autopep8
5706 (package
5707 (name "python-autopep8")
5708 (version "1.5.3")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "autopep8" version))
5713 (sha256
5714 (base32
5715 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5716 (build-system python-build-system)
5717 (propagated-inputs
5718 `(("python-pycodestyle" ,python-pycodestyle)
5719 ("python-toml" ,python-toml)))
5720 (home-page "https://github.com/hhatto/autopep8")
5721 (synopsis "Format Python code according to the PEP 8 style guide")
5722 (description
5723 "@code{autopep8} automatically formats Python code to conform to
5724 the PEP 8 style guide. It uses the pycodestyle utility to determine
5725 what parts of the code needs to be formatted. @code{autopep8} is
5726 capable of fixing most of the formatting issues that can be reported
5727 by pycodestyle.")
5728 (license (license:non-copyleft
5729 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5730
5731 (define-public python2-autopep8
5732 (package-with-python2 python-autopep8))
5733
5734 (define-public python-distlib
5735 (package
5736 (name "python-distlib")
5737 (version "0.3.0")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (pypi-uri "distlib" version ".zip"))
5742 (sha256
5743 (base32
5744 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5745 (build-system python-build-system)
5746 (arguments
5747 `(#:phases
5748 (modify-phases %standard-phases
5749 (add-before 'build 'no-/bin/sh
5750 (lambda _
5751 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5752 (("/bin/sh") (which "sh")))
5753 #t))
5754 (add-before 'check 'prepare-test-env
5755 (lambda _
5756 (setenv "HOME" "/tmp")
5757 ;; NOTE: Any value works, the variable just has to be present.
5758 (setenv "SKIP_ONLINE" "1")
5759 #t)))))
5760 (native-inputs `(("unzip" ,unzip)))
5761 (home-page "https://bitbucket.org/pypa/distlib")
5762 (synopsis "Distribution utilities")
5763 (description "Distlib is a library which implements low-level functions that
5764 relate to packaging and distribution of Python software. It is intended to be
5765 used as the basis for third-party packaging tools.")
5766 (license license:psfl)))
5767
5768 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5769 (define-public python-distlib/next
5770 (package
5771 (inherit python-distlib)
5772 (version "0.3.1")
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "distlib" version ".zip"))
5777 (sha256
5778 (base32
5779 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5780
5781 (define-public python-distutils-extra
5782 (package
5783 (name "python-distutils-extra")
5784 (version "2.38")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5789 version "/+download/python-distutils-extra-"
5790 version ".tar.gz"))
5791 (sha256
5792 (base32
5793 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5794 (build-system python-build-system)
5795 (home-page "https://launchpad.net/python-distutils-extra/")
5796 (synopsis "Enhancements to Python's distutils")
5797 (description
5798 "The python-distutils-extra module enables you to easily integrate
5799 gettext support, themed icons, and scrollkeeper-based documentation into
5800 Python's distutils.")
5801 (license license:gpl2)))
5802
5803 (define-public python2-distutils-extra
5804 (package-with-python2 python-distutils-extra))
5805
5806 (define-public python2-elib.intl
5807 (package
5808 (name "python2-elib.intl")
5809 (version "0.0.3")
5810 (source
5811 (origin
5812 ;; This project doesn't tag releases or publish tarballs, so we take
5813 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5814 (method git-fetch)
5815 (uri (git-reference
5816 (url "https://github.com/dieterv/elib.intl")
5817 (commit "d09997cfef")))
5818 (file-name (string-append name "-" version "-checkout"))
5819 (sha256
5820 (base32
5821 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5822 (build-system python-build-system)
5823 (arguments
5824 ;; incompatible with Python 3 (exception syntax)
5825 `(#:python ,python-2
5826 #:tests? #f))
5827 (home-page "https://github.com/dieterv/elib.intl")
5828 (synopsis "Enhanced internationalization for Python")
5829 (description
5830 "The elib.intl module provides enhanced internationalization (I18N)
5831 services for your Python modules and applications.")
5832 (license license:lgpl3+)))
5833
5834 (define-public python-olefile
5835 (package
5836 (name "python-olefile")
5837 (version "0.46")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5842 "download/v" version "/olefile-" version ".tar.gz"))
5843 (file-name (string-append name "-" version ".tar.gz"))
5844 (sha256
5845 (base32
5846 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5847 (build-system python-build-system)
5848 (home-page "https://www.decalage.info/python/olefileio")
5849 (synopsis "Read and write Microsoft OLE2 files.")
5850 (description
5851 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5852 Storage or Compound Document, Microsoft Office). It is an improved version of
5853 the OleFileIO module from PIL, the Python Image Library.")
5854 (license license:bsd-3)))
5855
5856 (define-public python2-olefile
5857 (package-with-python2 python-olefile))
5858
5859 (define-public python-pikepdf
5860 (package
5861 (name "python-pikepdf")
5862 (version "2.9.1")
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "pikepdf" version))
5867 (sha256
5868 (base32 "1n53fhdgnq9yxvm2m039vl8l2kg3fkln3pm0wv4rzj0gvpq9rhcr"))))
5869 (build-system python-build-system)
5870 (arguments
5871 `(#:tests? #false)) ;require python-xmp-toolkit
5872 (native-inputs
5873 `(("pybind11" ,pybind11)
5874 ("python-setuptools" ,python-setuptools)
5875 ("python-setuptools-scm" ,python-setuptools-scm/next)
5876 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5877 ("python-toml" ,python-toml)
5878 ("python-wheel" ,python-wheel)))
5879 (inputs
5880 `(("qpdf" ,qpdf)))
5881 (propagated-inputs
5882 `(("python-lxml" ,python-lxml)
5883 ("python-pillow" ,python-pillow)))
5884 (home-page "https://github.com/pikepdf/pikepdf")
5885 (synopsis "Read and write PDFs with Python")
5886 (description
5887 "pikepdf is a Python library for reading and writing PDF files.")
5888 (license license:mpl2.0)))
5889
5890 (define-public python-pillow
5891 (package
5892 (name "python-pillow")
5893 (version "8.1.1")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "Pillow" version))
5898 (sha256
5899 (base32
5900 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5901 (build-system python-build-system)
5902 (native-inputs
5903 `(("python-pytest" ,python-pytest)))
5904 (inputs
5905 `(("freetype" ,freetype)
5906 ("lcms" ,lcms)
5907 ("libjpeg" ,libjpeg-turbo)
5908 ("libtiff" ,libtiff)
5909 ("libwebp" ,libwebp)
5910 ("openjpeg" ,openjpeg)
5911 ("zlib" ,zlib)))
5912 (propagated-inputs
5913 `(("python-olefile" ,python-olefile)))
5914 (arguments
5915 `(#:phases
5916 (modify-phases %standard-phases
5917 (add-after 'unpack 'patch-ldconfig
5918 (lambda _
5919 (substitute* "setup.py"
5920 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5921 (replace 'check
5922 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5923 (if tests?
5924 (begin
5925 (setenv "HOME" (getcwd))
5926 ;; Make installed package available for running the tests.
5927 (add-installed-pythonpath inputs outputs)
5928 (invoke "python" "selftest.py" "--installed")
5929 (invoke "python" "-m" "pytest" "-vv"))
5930 #t))))))
5931 (home-page "https://python-pillow.org")
5932 (synopsis "Fork of the Python Imaging Library")
5933 (description
5934 "The Python Imaging Library adds image processing capabilities to your
5935 Python interpreter. This library provides extensive file format support, an
5936 efficient internal representation, and fairly powerful image processing
5937 capabilities. The core image library is designed for fast access to data
5938 stored in a few basic pixel formats. It should provide a solid foundation for
5939 a general image processing tool.")
5940 (properties `((python2-variant . ,(delay python2-pillow))))
5941 (license (license:x11-style
5942 "http://www.pythonware.com/products/pil/license.htm"
5943 "The PIL Software License"))))
5944
5945 (define-public python2-pillow
5946 (package-with-python2
5947 (package
5948 (inherit (strip-python2-variant python-pillow))
5949 ;; Version 6 is the last series with Python 2 support.
5950 (version "6.2.2")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "Pillow" version))
5955 (sha256
5956 (base32
5957 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5958
5959 (define-public python-pillow-2.9
5960 (package
5961 (inherit python-pillow)
5962 (version "2.9.0")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (pypi-uri "Pillow" version))
5967 (sha256
5968 (base32
5969 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5970 (arguments
5971 (substitute-keyword-arguments (package-arguments python-pillow)
5972 ((#:tests? _ #f) #f)))
5973 (properties '((hidden? #t)))))
5974
5975 (define-public python-pillow-simd
5976 (package
5977 (inherit python-pillow)
5978 (name "python-pillow-simd")
5979 (version "7.1.2")
5980 ;; The PyPI tarball does not include test files.
5981 (source
5982 (origin
5983 (method git-fetch)
5984 (uri (git-reference
5985 (url "https://github.com/uploadcare/pillow-simd")
5986 (commit version)))
5987 (file-name (git-file-name name version))
5988 (sha256
5989 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
5990 (arguments
5991 (substitute-keyword-arguments
5992 (package-arguments python-pillow)
5993 ((#:phases phases)
5994 `(modify-phases ,phases
5995 (add-after 'unpack 'make-tests-writable
5996 (lambda _
5997 (for-each make-file-writable (find-files "Tests"))
5998 #t))))))
5999 (inputs
6000 `(("libraqm" ,libraqm)
6001 ("libimagequant" ,libimagequant)
6002 ,@(package-inputs python-pillow)))
6003 (home-page "https://github.com/uploadcare/pillow-simd")
6004 (synopsis "Fork of the Python Imaging Library (Pillow)")
6005 (description "This package is a fork of Pillow which adds support for SIMD
6006 parallelism.")))
6007
6008 (define-public python-roifile
6009 (package
6010 (name "python-roifile")
6011 (version "2020.5.28")
6012 (source
6013 (origin
6014 (method url-fetch)
6015 (uri (pypi-uri "roifile" version))
6016 (sha256
6017 (base32
6018 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
6019 (build-system python-build-system)
6020 (arguments `(#:tests? #f)) ; there are none
6021 (propagated-inputs
6022 `(("python-numpy" ,python-numpy)))
6023 (home-page "https://www.lfd.uci.edu/~gohlke/")
6024 (synopsis "Read and write ImageJ ROI format")
6025 (description "Roifile is a Python library to read, write, create, and plot
6026 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6027 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6028 (license license:bsd-3)))
6029
6030 (define-public python-tifffile
6031 (package
6032 (name "python-tifffile")
6033 (version "2020.6.3")
6034 (source
6035 (origin
6036 (method url-fetch)
6037 (uri (pypi-uri "tifffile" version))
6038 (sha256
6039 (base32
6040 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
6041 (build-system python-build-system)
6042 ;; Tests require lfdfiles, which depends on tifffile
6043 (arguments `(#:tests? #f))
6044 (propagated-inputs
6045 `(("python-numpy" ,python-numpy)
6046 ;;("python-lfdfiles" ,python-lfdfiles)
6047 ("python-roifile" ,python-roifile)))
6048 (home-page "https://www.lfd.uci.edu/~gohlke/")
6049 (synopsis "Read and write TIFF(r) files")
6050 (description "This package lets you read image and metadata from many
6051 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6052 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6053 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6054 (license license:bsd-3)))
6055
6056 (define-public python-lfdfiles
6057 (package
6058 (name "python-lfdfiles")
6059 (version "2020.1.1")
6060 (source
6061 (origin
6062 (method url-fetch)
6063 (uri (pypi-uri "lfdfiles" version))
6064 (sha256
6065 (base32
6066 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
6067 (build-system python-build-system)
6068 (propagated-inputs
6069 `(("python-click" ,python-click)
6070 ("python-numpy" ,python-numpy)
6071 ("python-tifffile" ,python-tifffile)))
6072 (home-page "https://www.lfd.uci.edu/~gohlke/")
6073 (synopsis "Work with LFD data files")
6074 (description
6075 "Lfdfiles is a Python library and console script for reading, writing,
6076 converting, and viewing many of the proprietary file formats used to store
6077 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6078 (license license:bsd-3)))
6079
6080 (define-public python-imageio
6081 (package
6082 (name "python-imageio")
6083 (version "2.8.0")
6084 (source
6085 (origin
6086 (method url-fetch)
6087 (uri (pypi-uri "imageio" version))
6088 (sha256
6089 (base32
6090 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6091 (build-system python-build-system)
6092 (arguments
6093 `(#:tests? #f ; many tests require online data
6094 #:phases
6095 (modify-phases %standard-phases
6096 (replace 'check
6097 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6098 (if tests?
6099 (begin
6100 ;; Make installed package available for running the tests.
6101 (add-installed-pythonpath inputs outputs)
6102 (invoke "pytest" "-vv"))
6103 #t))))))
6104 (propagated-inputs
6105 `(("python-numpy" ,python-numpy)
6106 ("python-pillow" ,python-pillow)
6107 ("python-psutil" ,python-psutil)))
6108 (native-inputs
6109 `(("python-pytest" ,python-pytest)))
6110 (home-page "https://imageio.github.io/")
6111 (synopsis "Library for reading and writing a wide range of image data")
6112 (description
6113 "Imageio is a Python library that provides an easy interface to read and
6114 write a wide range of image data, including animated images, video, volumetric
6115 data, and scientific formats.")
6116 (license license:bsd-2)))
6117
6118 (define-public python-pycparser
6119 (package
6120 (name "python-pycparser")
6121 (version "2.20")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (pypi-uri "pycparser" version))
6126 (sha256
6127 (base32
6128 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6129 (outputs '("out" "doc"))
6130 (build-system python-build-system)
6131 (native-inputs
6132 `(("pkg-config" ,pkg-config)))
6133 (arguments
6134 `(#:phases
6135 (modify-phases %standard-phases
6136 (replace 'check
6137 (lambda _
6138 (with-directory-excursion "tests"
6139 (invoke "python" "all_tests.py"))
6140 #t))
6141 (add-after 'install 'install-doc
6142 (lambda* (#:key outputs #:allow-other-keys)
6143 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6144 (doc (string-append data "/doc/" ,name "-" ,version))
6145 (examples (string-append doc "/examples")))
6146 (mkdir-p examples)
6147 (for-each (lambda (file)
6148 (copy-file (string-append "." file)
6149 (string-append doc file)))
6150 '("/README.rst" "/CHANGES" "/LICENSE"))
6151 (copy-recursively "examples" examples)
6152 #t))))))
6153 (home-page "https://github.com/eliben/pycparser")
6154 (synopsis "C parser in Python")
6155 (description
6156 "Pycparser is a complete parser of the C language, written in pure Python
6157 using the PLY parsing library. It parses C code into an AST and can serve as
6158 a front-end for C compilers or analysis tools.")
6159 (license license:bsd-3)))
6160
6161 (define-public python2-pycparser
6162 (package-with-python2 python-pycparser))
6163
6164 (define-public python-xlsxwriter
6165 (package
6166 (name "python-xlsxwriter")
6167 (version "1.3.7")
6168 (source
6169 (origin
6170 ;; There are no tests in the PyPI tarball.
6171 (method git-fetch)
6172 (uri (git-reference
6173 (url "https://github.com/jmcnamara/XlsxWriter")
6174 (commit (string-append "RELEASE_" version))))
6175 (file-name (git-file-name name version))
6176 (sha256
6177 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
6178 (build-system python-build-system)
6179 (home-page "https://github.com/jmcnamara/XlsxWriter")
6180 (synopsis "Python module for creating Excel XLSX files")
6181 (description
6182 "XlsxWriter is a Python module that can be used to write text, numbers,
6183 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6184 (license license:bsd-2)))
6185
6186 (define-public python-pywavelets
6187 (package
6188 (name "python-pywavelets")
6189 (version "1.1.1")
6190 (home-page "https://github.com/PyWavelets/pywt")
6191 (source (origin
6192 (method url-fetch)
6193 (uri (pypi-uri "PyWavelets" version))
6194 (sha256
6195 (base32
6196 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6197 (build-system python-build-system)
6198 (arguments
6199 '(#:modules ((ice-9 ftw)
6200 (srfi srfi-1)
6201 (srfi srfi-26)
6202 (guix build utils)
6203 (guix build python-build-system))
6204 #:phases
6205 (modify-phases %standard-phases
6206 (replace 'check
6207 (lambda _
6208 (let ((cwd (getcwd))
6209 (libdir (find (cut string-prefix? "lib." <>)
6210 (scandir "build"))))
6211 (with-directory-excursion (string-append cwd "/build/" libdir)
6212 (invoke "pytest" "-vv"))))))))
6213 (native-inputs
6214 `(("python-matplotlib" ,python-matplotlib) ;for tests
6215 ("python-pytest" ,python-pytest)))
6216 (propagated-inputs
6217 `(("python-numpy" ,python-numpy)))
6218 (synopsis "Wavelet transforms in Python")
6219 (description
6220 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6221 mathematical basis functions that are localized in both time and frequency.
6222 Wavelet transforms are time-frequency transforms employing wavelets. They are
6223 similar to Fourier transforms, the difference being that Fourier transforms are
6224 localized only in frequency instead of in time and frequency.")
6225 (license license:expat)))
6226
6227 (define-public python-pywal
6228 (package
6229 (name "python-pywal")
6230 (version "3.3.0")
6231 (source
6232 (origin
6233 (method git-fetch)
6234 (uri (git-reference
6235 (url "https://github.com/dylanaraps/pywal")
6236 (commit version)))
6237 (file-name (git-file-name name version))
6238 (sha256
6239 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6240 (build-system python-build-system)
6241 (arguments
6242 `(#:phases
6243 (modify-phases %standard-phases
6244 (add-before 'check 'fix-home-directory
6245 (lambda _
6246 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6247 (setenv "HOME" "/tmp")
6248 #t)))))
6249 (inputs
6250 `(("imagemagick" ,imagemagick)))
6251 (home-page "https://github.com/dylanaraps/pywal")
6252 (synopsis "Color palette generator and applicator")
6253 (description
6254 "Pywal is a tool that generates a color palette from the dominant colors
6255 in an image. It then applies the colors system-wide and on-the-fly in all of
6256 your favourite programs.")
6257 (license license:expat)))
6258
6259 (define-public python-pywinrm
6260 (package
6261 (name "python-pywinrm")
6262 (version "0.4.1")
6263 (source
6264 (origin
6265 (method url-fetch)
6266 (uri (pypi-uri "pywinrm" version))
6267 (sha256
6268 (base32
6269 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6270 (build-system python-build-system)
6271 (propagated-inputs
6272 `(("python-six" ,python-six)
6273 ("python-requests_ntlm" ,python-requests_ntlm)
6274 ("python-xmltodict" ,python-xmltodict)
6275 ("python-kerberos" ,python-kerberos)))
6276 (native-inputs
6277 `(("python-mock" ,python-mock)
6278 ("python-pytest" ,python-pytest)))
6279 (home-page "https://github.com/diyan/pywinrm/")
6280 (synopsis
6281 "Python library for Windows Remote Management (WinRM)")
6282 (description
6283 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6284 service. It allows you to invoke commands on target Windows machines from
6285 any machine that can run Python.")
6286 (license license:expat)))
6287
6288 (define-public python-xcffib
6289 (package
6290 (name "python-xcffib")
6291 (version "0.6.0")
6292 (source
6293 (origin
6294 (method url-fetch)
6295 (uri (pypi-uri "xcffib" version))
6296 (sha256
6297 (base32
6298 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6299 (build-system python-build-system)
6300 (inputs
6301 `(("libxcb" ,libxcb)))
6302 (propagated-inputs
6303 `(("python-cffi" ,python-cffi) ; used at run time
6304 ("python-six" ,python-six)))
6305 (arguments
6306 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6307 #:tests? #f
6308 #:phases
6309 (modify-phases %standard-phases
6310 (add-after 'unpack 'fix-libxcb-path
6311 (lambda* (#:key inputs #:allow-other-keys)
6312 (let ((libxcb (assoc-ref inputs "libxcb")))
6313 (substitute* '("xcffib/__init__.py")
6314 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6315 #t)))
6316 (add-after 'install 'install-doc
6317 (lambda* (#:key outputs #:allow-other-keys)
6318 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6319 "/doc/" ,name "-" ,version)))
6320 (mkdir-p doc)
6321 (copy-file "README.md"
6322 (string-append doc "/README.md"))
6323 #t))))))
6324 (home-page "https://github.com/tych0/xcffib")
6325 (synopsis "XCB Python bindings")
6326 (description
6327 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6328 support for Python 3 and PyPy. It is based on cffi.")
6329 (license license:expat)))
6330
6331 (define-public python2-xcffib
6332 (package-with-python2 python-xcffib))
6333
6334 (define-public python-cairocffi
6335 (package
6336 (name "python-cairocffi")
6337 (version "1.2.0")
6338 (source
6339 (origin
6340 ;; The PyPI archive does not include the documentation, so use Git.
6341 (method git-fetch)
6342 (uri (git-reference
6343 (url "https://github.com/Kozea/cairocffi")
6344 (commit (string-append "v" version))))
6345 (file-name (git-file-name name version))
6346 (sha256
6347 (base32
6348 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6349 (build-system python-build-system)
6350 (outputs '("out" "doc"))
6351 (inputs
6352 `(("glib" ,glib)
6353 ("gtk+" ,gtk+)
6354 ("gdk-pixbuf" ,gdk-pixbuf)
6355 ("cairo" ,cairo)))
6356 (native-inputs
6357 `(("python-numpy" ,python-numpy)
6358 ("python-pytest" ,python-pytest)
6359 ("python-pytest-cov" ,python-pytest-cov)
6360 ("python-pytest-runner" ,python-pytest-runner)
6361 ("python-sphinx" ,python-sphinx)
6362 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6363 (propagated-inputs
6364 `(("python-xcffib" ,python-xcffib))) ; used at run time
6365 (arguments
6366 `(#:phases
6367 (modify-phases %standard-phases
6368 (add-after 'unpack 'patch-paths
6369 (lambda* (#:key inputs #:allow-other-keys)
6370 (substitute* "cairocffi/__init__.py"
6371 ;; Hack the dynamic library loading mechanism.
6372 (("find_library\\(library_name\\)")
6373 "\"found\"")
6374 (("filenames = \\(library_filename,\\) \\+ filenames")
6375 "pass")
6376 (("libcairo.so.2")
6377 (string-append (assoc-ref inputs "cairo")
6378 "/lib/libcairo.so.2")))
6379 (substitute* "cairocffi/pixbuf.py"
6380 (("libgdk_pixbuf-2.0.so.0")
6381 (string-append (assoc-ref inputs "gdk-pixbuf")
6382 "/lib/libgdk_pixbuf-2.0.so.0"))
6383 (("libgobject-2.0.so.0")
6384 (string-append (assoc-ref inputs "glib")
6385 "/lib/libgobject-2.0.so.0"))
6386 (("libglib-2.0.so.0")
6387 (string-append (assoc-ref inputs "glib")
6388 "/lib/libglib-2.0.so.0"))
6389 (("libgdk-3.so.0")
6390 (string-append (assoc-ref inputs "gtk+")
6391 "/lib/libgdk-3.so.0")))
6392 #t))
6393 (add-after 'unpack 'disable-linters
6394 ;; Their check fails; none of our business.
6395 (lambda _
6396 (substitute* "setup.cfg"
6397 ((".*pytest-flake8.*") "")
6398 ((".*pytest-isort.*") "")
6399 (("--flake8") "")
6400 (("--isort") ""))
6401 #t))
6402 (add-after 'install 'install-doc
6403 (lambda* (#:key inputs outputs #:allow-other-keys)
6404 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6405 (doc (string-append data "/doc/" ,name "-" ,version))
6406 (html (string-append doc "/html")))
6407 (setenv "LD_LIBRARY_PATH"
6408 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6409 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6410 (setenv "LANG" "en_US.UTF-8")
6411 (mkdir-p html)
6412 (for-each (lambda (file)
6413 (copy-file (string-append "." file)
6414 (string-append doc file)))
6415 '("/README.rst" "/NEWS.rst"))
6416 (system* "python" "setup.py" "build_sphinx")
6417 (copy-recursively "docs/_build/html" html)
6418 #t))))))
6419 (home-page "https://github.com/Kozea/cairocffi")
6420 (synopsis "Python bindings and object-oriented API for Cairo")
6421 (description
6422 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6423 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6424 graphics library with support for multiple backends including image buffers,
6425 PNG, PostScript, PDF, and SVG file output.")
6426 (license license:bsd-3)))
6427
6428 (define-public python2-cairocffi
6429 (package-with-python2 python-cairocffi))
6430
6431 (define-public python-decorator
6432 (package
6433 (name "python-decorator")
6434 (version "4.3.0")
6435 (source
6436 (origin
6437 (method url-fetch)
6438 (uri (pypi-uri "decorator" version))
6439 (sha256
6440 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6441 (build-system python-build-system)
6442 (home-page "https://pypi.org/project/decorator/")
6443 (synopsis "Python module to simplify usage of decorators")
6444 (description
6445 "The aim of the decorator module is to simplify the usage of decorators
6446 for the average programmer, and to popularize decorators usage giving examples
6447 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6448 etc. The core of this module is a decorator factory.")
6449 (license license:expat)))
6450
6451 (define-public python2-decorator
6452 (package-with-python2 python-decorator))
6453
6454 (define-public python-drmaa
6455 (package
6456 (name "python-drmaa")
6457 (version "0.7.7")
6458 (source
6459 (origin
6460 (method url-fetch)
6461 (uri (pypi-uri "drmaa" version))
6462 (sha256
6463 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6464 (build-system python-build-system)
6465 ;; The test suite requires libdrmaa which is provided by the cluster
6466 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6467 ;; should be set to the path of the libdrmaa library.
6468 (arguments '(#:tests? #f))
6469 (native-inputs
6470 `(("python-nose" ,python-nose)))
6471 (home-page "https://pypi.org/project/drmaa/")
6472 (synopsis "Python bindings for the DRMAA library")
6473 (description
6474 "A Python package for Distributed Resource Management (DRM) job
6475 submission and control. This package is an implementation of the DRMAA 1.0
6476 Python language binding specification.")
6477 (license license:bsd-3)))
6478
6479 (define-public python2-drmaa
6480 (package-with-python2 python-drmaa))
6481
6482 (define-public python-grako
6483 (package
6484 (name "python-grako")
6485 (version "3.99.9")
6486 (source
6487 (origin
6488 (method url-fetch)
6489 (uri
6490 (pypi-uri "grako" version ".zip"))
6491 (sha256
6492 (base32
6493 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6494 (build-system python-build-system)
6495 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6496 (native-inputs
6497 `(("unzip" ,unzip)
6498 ("python-pytest" ,python-pytest)
6499 ("python-pytest-runner" ,python-pytest-runner)))
6500 (home-page "https://bitbucket.org/neogeny/grako")
6501 (synopsis "EBNF parser generator")
6502 (description
6503 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6504 memoizing PEG/Packrat parser in Python.")
6505 (license license:bsd-3)))
6506
6507 (define-public python2-grako
6508 (package-with-python2 python-grako))
6509
6510 (define-public python-grandalf
6511 (package
6512 (name "python-grandalf")
6513 (version "0.7")
6514 (source
6515 (origin
6516 ;; There's no source tarball on PyPI.
6517 (method git-fetch)
6518 (uri (git-reference
6519 (url "https://github.com/bdcht/grandalf")
6520 (commit (string-append "v" version))))
6521 (file-name (git-file-name name version))
6522 (sha256
6523 (base32
6524 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6525 (build-system python-build-system)
6526 (arguments
6527 '(#:phases
6528 (modify-phases %standard-phases
6529 (replace 'check
6530 (lambda _
6531 (invoke "python" "setup.py" "pytest"))))))
6532 (native-inputs
6533 `(("python-pytest" ,python-pytest)
6534 ("python-pytest-runner" ,python-pytest-runner)))
6535 (propagated-inputs
6536 `(("python-numpy" ,python-numpy)
6537 ("python-ply" ,python-ply)))
6538 (home-page "https://github.com/bdcht/grandalf")
6539 (synopsis "Graph and drawing algorithms framework")
6540 (description
6541 "Grandalf is a Python package made for experimentations with graphs
6542 drawing algorithms. It is written in pure Python, and currently implements
6543 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6544 minimization approach. While not as fast or featured as graphviz or other
6545 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6546 than thousands of nodes, while keeping the source code simple enough to tweak
6547 and hack any part of it for experimental purpose. With a total of about 1500
6548 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6549 in less than 600 lines. The energy minimization approach is comprised of only
6550 250 lines!
6551
6552 Grandalf does only 2 not-so-simple things:
6553 @itemize
6554 @item computing the nodes (x,y) coordinates (based on provided nodes
6555 dimensions, and a chosen layout)
6556 @item routing the edges with lines or nurbs
6557 @end itemize
6558
6559 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6560 will help you find where to draw things like nodes and edges, but it’s up to
6561 you to actually draw things with your favorite toolkit.")
6562 ;; The user can choose either license.
6563 (license (list license:gpl2 license:epl1.0))))
6564
6565 (define-public python-gridmap
6566 (package
6567 (name "python-gridmap")
6568 (version "0.14.0")
6569 (source
6570 (origin
6571 (method git-fetch)
6572 (uri (git-reference
6573 (url "https://github.com/pygridtools/gridmap")
6574 (commit (string-append "v" version))))
6575 (file-name (git-file-name name version))
6576 (sha256
6577 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6578 (build-system python-build-system)
6579 (arguments
6580 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6581 (propagated-inputs
6582 `(("python-psutil" ,python-psutil)
6583 ("python-drmaa" ,python-drmaa)
6584 ("python-pyzmq" ,python-pyzmq)))
6585 (home-page "https://github.com/pygridtools/gridmap")
6586 (synopsis "Create jobs on a cluster directly from Python")
6587 (description
6588 "Gridmap is a Python package to allow you to easily create jobs on the
6589 cluster directly from Python. You can directly map Python functions onto the
6590 cluster without needing to write any wrapper code yourself.")
6591 (license license:gpl3+)))
6592
6593 (define-public python2-gridmap
6594 (package-with-python2 python-gridmap))
6595
6596 (define-public python-honcho
6597 (package
6598 (name "python-honcho")
6599 (version "1.0.1")
6600 (source
6601 (origin
6602 (method git-fetch)
6603 (uri (git-reference
6604 (url "https://github.com/nickstenning/honcho")
6605 (commit (string-append "v" version))))
6606 (file-name (git-file-name name version))
6607 (sha256
6608 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6609 (build-system python-build-system)
6610 (native-inputs
6611 `(("python-pytest" ,python-pytest)
6612 ("python-mock" ,python-mock)
6613 ("python-tox" ,python-tox)
6614 ("which" ,which))) ;for tests
6615 (propagated-inputs
6616 `(("python-jinja2" ,python-jinja2)))
6617 (arguments
6618 `(#:phases
6619 (modify-phases %standard-phases
6620 (delete 'check)
6621 (add-after 'install 'check
6622 (lambda* (#:key outputs inputs #:allow-other-keys)
6623 ;; fix honcho path in testsuite
6624 (substitute* "tests/conftest.py"
6625 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6626 "/bin/honcho" "'")))
6627 ;; It's easier to run tests after install.
6628 ;; Make installed package available for running the tests
6629 (add-installed-pythonpath inputs outputs)
6630 (invoke "py.test" "-v"))))))
6631 (home-page "https://github.com/nickstenning/honcho")
6632 (synopsis "Manage Procfile-based applications")
6633 (description
6634 "A Procfile is a file which describes how to run an application
6635 consisting of several processes. honcho starts all listed processes.
6636 The output of all running processes is collected by honcho and
6637 displayed.")
6638 (license license:expat)))
6639
6640 (define-public python-pexpect
6641 (package
6642 (name "python-pexpect")
6643 (version "4.8.0")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (pypi-uri "pexpect" version))
6648 (sha256
6649 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6650 (build-system python-build-system)
6651 (arguments
6652 `(#:phases
6653 (modify-phases %standard-phases
6654 (add-before 'check 'prepare-tests
6655 (lambda _
6656 (substitute* (find-files "tests")
6657 (("/bin/ls") (which "ls"))
6658 (("/bin/echo") (which "echo"))
6659 (("/bin/which") (which "which"))
6660 ;; Many tests try to use the /bin directory which
6661 ;; is not present in the build environment.
6662 ;; Use one that's non-empty and unlikely to change.
6663 (("/bin'") "/dev'")
6664 ;; Disable failing test. See upstream bug report
6665 ;; https://github.com/pexpect/pexpect/issues/568
6666 (("def test_bash") "def _test_bash"))
6667 ;; XXX: Socket connection test gets "Connection reset by peer".
6668 ;; Why does it not work? Delete for now.
6669 (delete-file "tests/test_socket.py")
6670 #t))
6671 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6672 (native-inputs
6673 `(("python-nose" ,python-nose)
6674 ("python-pytest" ,python-pytest)
6675 ("man-db" ,man-db)
6676 ("which" ,which)
6677 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6678 (propagated-inputs
6679 `(("python-ptyprocess" ,python-ptyprocess)))
6680 (home-page "http://pexpect.readthedocs.org/")
6681 (synopsis "Controlling interactive console applications")
6682 (description
6683 "Pexpect is a pure Python module for spawning child applications;
6684 controlling them; and responding to expected patterns in their output.
6685 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6686 child application and control it as if a human were typing commands.")
6687 (license license:isc)))
6688
6689 (define-public python2-pexpect
6690 (package-with-python2 python-pexpect))
6691
6692 (define-public python-setuptools-scm
6693 (package
6694 (name "python-setuptools-scm")
6695 (version "3.4.3")
6696 (source (origin
6697 (method url-fetch)
6698 (uri (pypi-uri "setuptools_scm" version))
6699 (sha256
6700 (base32
6701 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6702 (build-system python-build-system)
6703 (home-page "https://github.com/pypa/setuptools_scm/")
6704 (synopsis "Manage Python package versions in SCM metadata")
6705 (description
6706 "Setuptools_scm handles managing your Python package versions in
6707 @dfn{software configuration management} (SCM) metadata instead of declaring
6708 them as the version argument or in a SCM managed file.")
6709 (license license:expat)))
6710
6711 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6712 (define-public python-setuptools-scm/next
6713 (package
6714 (inherit python-setuptools-scm)
6715 (version "5.0.1")
6716 (source
6717 (origin
6718 (method url-fetch)
6719 (uri (pypi-uri "setuptools_scm" version))
6720 (sha256
6721 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6722
6723 (define-public python2-setuptools-scm
6724 (package-with-python2 python-setuptools-scm))
6725
6726 (define-public python-sexpdata
6727 (package
6728 (name "python-sexpdata")
6729 (version "0.0.3")
6730 (source
6731 (origin
6732 (method url-fetch)
6733 (uri (pypi-uri "sexpdata" version))
6734 (sha256
6735 (base32
6736 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6737 (build-system python-build-system)
6738 (home-page "https://github.com/jd-boyd/sexpdata")
6739 (synopsis "S-expression parser for Python")
6740 (description
6741 "Sexpdata is an S-expression parser/serializer. It has load and dump
6742 functions like pickle, json or PyYAML module.")
6743 (license license:bsd-3)))
6744
6745 (define-public python-pathlib2
6746 (package
6747 (name "python-pathlib2")
6748 (version "2.3.3")
6749 (source
6750 (origin
6751 (method url-fetch)
6752 (uri (pypi-uri "pathlib2" version))
6753 (sha256
6754 (base32
6755 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6756 (build-system python-build-system)
6757 (propagated-inputs
6758 `(("python-scandir" ,python-scandir)
6759 ("python-six" ,python-six)))
6760 (home-page "https://pypi.org/project/pathlib2/")
6761 (synopsis "Object-oriented file system paths")
6762 (description "The goal of pathlib2 is to provide a backport of the
6763 standard @code{pathlib} module which tracks the standard library module, so
6764 all the newest features of the standard @code{pathlib} can be used also on
6765 older Python versions.")
6766 (license license:expat)))
6767
6768 (define-public python-importlib-resources
6769 (package
6770 (name "python-importlib-resources")
6771 (version "3.0.0")
6772 (source
6773 (origin
6774 (method url-fetch)
6775 (uri (pypi-uri "importlib_resources" version))
6776 (sha256
6777 (base32
6778 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6779 (build-system python-build-system)
6780 (native-inputs
6781 `(("python-setuptools-scm" ,python-setuptools-scm)
6782 ("python-toml" ,python-toml)))
6783 (home-page "http://importlib-resources.readthedocs.io/")
6784 (synopsis "Read resources from Python packages")
6785 (description
6786 "@code{importlib_resources} is a backport of Python 3's standard library
6787 @code{importlib.resources} module for Python 2.7, and Python 3.")
6788 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6789 (license license:asl2.0)))
6790
6791 (define-public python2-importlib-resources
6792 (package
6793 (name "python2-importlib-resources")
6794 (version "1.0.2")
6795 (source (origin
6796 (method url-fetch)
6797 (uri (pypi-uri "importlib_resources" version))
6798 (sha256
6799 (base32
6800 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6801 (build-system python-build-system)
6802 (arguments
6803 `(#:python ,python-2
6804 #:phases (modify-phases %standard-phases
6805 ;; The build system tests for python-wheel, but it is
6806 ;; not required for Guix nor the test suite. Just drop
6807 ;; it to make bootstrapping pytest easier.
6808 (add-after 'unpack 'drop-wheel-dependency
6809 (lambda _
6810 (substitute* "setup.cfg"
6811 (("^[[:blank:]]+wheel")
6812 ""))
6813 #t)))))
6814 (propagated-inputs
6815 `(("python-pathlib2" ,python2-pathlib2)
6816 ("python-typing" ,python2-typing)))
6817 (home-page "https://gitlab.com/python-devs/importlib_resources")
6818 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6819 (description
6820 "This package provides an implementation of @code{importlib.resources}
6821 for older versions of Python.")
6822 (license license:asl2.0)))
6823
6824 ;; For importlib-metadata-bootstrap below.
6825 (define-public python2-importlib-resources-bootstrap
6826 (hidden-package
6827 (package/inherit
6828 python2-importlib-resources
6829 (name "python2-importlib-resources-bootstrap")
6830 (propagated-inputs
6831 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6832 ("python-typing" ,python2-typing))))))
6833
6834 (define-public python-importlib-metadata
6835 (package
6836 (name "python-importlib-metadata")
6837 (version "1.5.0")
6838 (source
6839 (origin
6840 (method url-fetch)
6841 (uri (pypi-uri "importlib_metadata" version))
6842 (sha256
6843 (base32
6844 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6845 (build-system python-build-system)
6846 (propagated-inputs
6847 `(("python-zipp" ,python-zipp)))
6848 (native-inputs
6849 `(("python-setuptools-scm" ,python-setuptools-scm)
6850 ("python-pyfakefs" ,python-pyfakefs)
6851 ("python-packaging" ,python-packaging)))
6852 (home-page "https://importlib-metadata.readthedocs.io/")
6853 (synopsis "Read metadata from Python packages")
6854 (description
6855 "@code{importlib_metadata} is a library which provides an API for
6856 accessing an installed Python package's metadata, such as its entry points or
6857 its top-level name. This functionality intends to replace most uses of
6858 @code{pkg_resources} entry point API and metadata API. Along with
6859 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6860 need to use the older and less efficient @code{pkg_resources} package.")
6861 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6862 (license license:asl2.0)))
6863
6864 (define-public python2-importlib-metadata
6865 (let ((base (package-with-python2 (strip-python2-variant
6866 python-importlib-metadata))))
6867 (package/inherit
6868 base
6869 (name "python2-importlib-metadata")
6870 (native-inputs
6871 `(("python-setuptools-scm" ,python2-setuptools-scm)
6872 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6873 ("python-packaging" ,python2-packaging-bootstrap)))
6874 (propagated-inputs
6875 `(("python-configparser" ,python2-configparser)
6876 ("python-contextlib2" ,python2-contextlib2)
6877 ("python-importlib-resources" ,python2-importlib-resources)
6878 ("python-pathlib2" ,python2-pathlib2)
6879 ,@(package-propagated-inputs base))))))
6880
6881 ;; This package is used by python2-pytest, and thus must not depend on it.
6882 (define-public python2-importlib-metadata-bootstrap
6883 (hidden-package
6884 (package/inherit
6885 python2-importlib-metadata
6886 (name "python2-importlib-metadata-bootstrap")
6887 (arguments
6888 `(#:tests? #f
6889 ,@(package-arguments python2-importlib-metadata)))
6890 (propagated-inputs
6891 `(("python-zipp" ,python2-zipp-bootstrap)
6892 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6893 ("python-configparser" ,python2-configparser)
6894 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6895 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6896
6897 (define-public python-importmagic
6898 (package
6899 (name "python-importmagic")
6900 (version "0.1.7")
6901 (source
6902 (origin
6903 (method url-fetch)
6904 (uri (pypi-uri "importmagic" version))
6905 (sha256
6906 (base32
6907 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6908 (build-system python-build-system)
6909 (home-page "https://github.com/alecthomas/importmagic")
6910 (synopsis "Library for adding, removing and managing Python imports")
6911 (description
6912 "Importmagic is a Python library for automatically managing imports by
6913 finding unresolved symbols in Python code and their corresponding imports.")
6914 (license license:bsd-3)))
6915
6916 (define-public python-inotify-simple
6917 (package
6918 (name "python-inotify-simple")
6919 (version "1.3.5")
6920 (source
6921 (origin
6922 (method git-fetch)
6923 (uri (git-reference
6924 (url "https://github.com/chrisjbillington/inotify_simple")
6925 (commit version)))
6926 (file-name (git-file-name name version))
6927 (sha256
6928 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
6929 (build-system python-build-system)
6930 (home-page
6931 "https://github.com/chrisjbillington/inotify_simple")
6932 (synopsis "Simple wrapper around inotify library")
6933 (description
6934 "@code{inotify-simple} is a simple wrapper around inotify library.")
6935 (license license:bsd-3)))
6936
6937 (define-public python-jaraco-packaging
6938 (package
6939 (name "python-jaraco-packaging")
6940 (version "6.1")
6941 (source
6942 (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "jaraco.packaging" version))
6945 (sha256
6946 (base32
6947 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6948 (build-system python-build-system)
6949 (propagated-inputs
6950 `(("python-pytest" ,python-pytest)
6951 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6952 ("python-pytest-flake8" ,python-pytest-flake8)
6953 ("python-rst.linker" ,python-rst.linker)
6954 ("python-setuptools" ,python-setuptools)
6955 ("python-setuptools-scm" ,python-setuptools-scm)
6956 ("python-six" ,python-six)
6957 ("python-sphinx" ,python-sphinx)))
6958 (home-page "https://github.com/jaraco/jaraco.packaging")
6959 (synopsis "Tools to supplement packaging Python releases")
6960 (description
6961 "This package provides various tools to supplement packaging Python
6962 releases.")
6963 (license license:expat)))
6964
6965 (define-public python-pathpy
6966 (package
6967 (name "python-pathpy")
6968 (version "11.5.1")
6969 (source
6970 (origin
6971 (method url-fetch)
6972 (uri (pypi-uri "path.py" version))
6973 (sha256
6974 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6975 (outputs '("out" "doc"))
6976 (build-system python-build-system)
6977 (propagated-inputs
6978 `(("python-appdirs" ,python-appdirs)
6979 ("python-importlib-metadata" ,python-importlib-metadata)))
6980 (native-inputs
6981 `(("python-setuptools-scm" ,python-setuptools-scm)
6982 ("python-sphinx" ,python-sphinx)
6983 ("python-rst.linker" ,python-rst.linker)
6984 ("python-pytest" ,python-pytest)
6985 ("python-pytest-runner" ,python-pytest-runner)
6986 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6987 (arguments
6988 `(#:phases
6989 (modify-phases %standard-phases
6990 (add-after 'build 'build-doc
6991 (lambda _
6992 (setenv "LANG" "en_US.UTF-8")
6993 (invoke "python" "setup.py" "build_sphinx")))
6994 (add-after 'install 'install-doc
6995 (lambda* (#:key outputs #:allow-other-keys)
6996 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6997 (doc (string-append data "/doc/" ,name "-" ,version))
6998 (html (string-append doc "/html")))
6999 (mkdir-p html)
7000 (for-each (lambda (file)
7001 (copy-file file (string-append doc "/" file)))
7002 '("README.rst" "CHANGES.rst"))
7003 (copy-recursively "build/sphinx/html" html)
7004 #t)))
7005 (replace 'check
7006 (lambda _
7007 ;; The import time test aborts if an import takes longer than
7008 ;; 100ms. It may very well take a little longer than that.
7009 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7010 (home-page "https://github.com/jaraco/path.py")
7011 (synopsis "Python module wrapper for built-in os.path")
7012 (description
7013 "@code{path.py} implements path objects as first-class entities, allowing
7014 common operations on files to be invoked on those path objects directly.")
7015 (license license:expat)))
7016
7017 (define-public python-simplegeneric
7018 (package
7019 (name "python-simplegeneric")
7020 (version "0.8.1")
7021 (source
7022 (origin
7023 (method url-fetch)
7024 (uri (pypi-uri "simplegeneric" version ".zip"))
7025 (sha256
7026 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7027 (build-system python-build-system)
7028 (native-inputs
7029 `(("unzip" ,unzip)))
7030 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7031 (synopsis "Python module for simple generic functions")
7032 (description
7033 "The simplegeneric module lets you define simple single-dispatch generic
7034 functions, akin to Python’s built-in generic functions like @code{len()},
7035 @code{iter()} and so on. However, instead of using specially-named methods,
7036 these generic functions use simple lookup tables, akin to those used by
7037 e.g. @code{pickle.dump()} and other generic functions found in the Python
7038 standard library.")
7039 (license license:zpl2.1)))
7040
7041 (define-public python2-simplegeneric
7042 (package-with-python2 python-simplegeneric))
7043
7044 (define-public python-ipython-genutils
7045 ;; TODO: This package is retired, check if can be removed, see description.
7046 (package
7047 (name "python-ipython-genutils")
7048 (version "0.1.0")
7049 (source
7050 (origin
7051 (method url-fetch)
7052 (uri (pypi-uri "ipython_genutils" version))
7053 (sha256
7054 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7055 (build-system python-build-system)
7056 (arguments `(#:tests? #f)) ; no tests
7057 (home-page "https://ipython.org")
7058 (synopsis "Vestigial utilities from IPython")
7059 (description
7060 "This package provides retired utilities from IPython. No packages
7061 outside IPython/Jupyter should depend on it.
7062
7063 This package shouldn't exist. It contains some common utilities shared by
7064 Jupyter and IPython projects during The Big Split. As soon as possible, those
7065 packages will remove their dependency on this, and this package will go
7066 away.")
7067 (license license:bsd-3)))
7068
7069 (define-public python2-ipython-genutils
7070 (package-with-python2 python-ipython-genutils))
7071
7072 (define-public python-ipyparallel
7073 (package
7074 (name "python-ipyparallel")
7075 (version "6.2.4")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "ipyparallel" version))
7080 (sha256
7081 (base32
7082 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7083 (build-system python-build-system)
7084 (arguments
7085 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7086 #:phases
7087 (modify-phases %standard-phases
7088 (add-before 'check 'prepare-for-tests
7089 (lambda _
7090 (setenv "HOME" (getcwd))
7091 #t)))))
7092 (propagated-inputs
7093 `(("python-dateutil" ,python-dateutil)
7094 ("python-decorator" ,python-decorator)
7095 ("python-ipykernel" ,python-ipykernel)
7096 ("python-ipython" ,python-ipython)
7097 ("python-ipython-genutils" ,python-ipython-genutils)
7098 ("python-jupyter-client" ,python-jupyter-client)
7099 ("python-pyzmq" ,python-pyzmq)
7100 ("python-tornado" ,python-tornado)
7101 ("python-traitlets" ,python-traitlets)))
7102 (native-inputs
7103 `(("python-ipython" ,python-ipython)
7104 ("python-mock" ,python-mock)
7105 ("python-nose" ,python-nose)
7106 ("python-pytest" ,python-pytest)
7107 ("python-pytest-cov" ,python-pytest-cov)
7108 ("python-testpath" ,python-testpath)))
7109 (home-page "https://ipython.org/")
7110 (synopsis "Interactive Parallel Computing with IPython")
7111 (description
7112 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7113 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7114 CLI scripts:
7115 @enumerate
7116 @item ipcluster - start/stop a cluster
7117 @item ipcontroller - start a scheduler
7118 @item ipengine - start an engine
7119 @end enumerate")
7120 (license license:bsd-3)))
7121
7122 (define-public python2-ipyparallel
7123 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
7124 (package/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/inherit traitlets
7213 (propagated-inputs
7214 `(("python2-enum34" ,python2-enum34)
7215 ,@(package-propagated-inputs traitlets))))))
7216
7217 (define-public python-jupyter-core
7218 (package
7219 (name "python-jupyter-core")
7220 (version "4.4.0")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 (uri (string-append (pypi-uri "jupyter_core" version)))
7225 (sha256
7226 (base32
7227 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
7228 (build-system python-build-system)
7229 ;; FIXME: not sure how to run the tests
7230 (arguments `(#:tests? #f))
7231 (propagated-inputs
7232 `(("python-traitlets" ,python-traitlets)))
7233 (home-page "https://jupyter.org/")
7234 (synopsis "Jupyter base package")
7235 (description
7236 "Jupyter core is the base package on which Jupyter projects rely.")
7237 (license license:bsd-3)))
7238
7239 (define-public python2-jupyter-core
7240 (package-with-python2 python-jupyter-core))
7241
7242 (define-public python-jupyter-client
7243 (package
7244 (name "python-jupyter-client")
7245 (version "5.2.4")
7246 (source
7247 (origin
7248 (method url-fetch)
7249 (uri (pypi-uri "jupyter_client" version))
7250 (sha256
7251 (base32
7252 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7253 (build-system python-build-system)
7254 ;; Tests fail because of missing native python kernel which I assume is
7255 ;; provided by the ipython package, which we cannot use because it would
7256 ;; cause a dependency cycle.
7257 (arguments
7258 `(#:tests? #f
7259
7260 #:phases (modify-phases %standard-phases
7261 (add-after 'unpack 'set-tool-file-names
7262 (lambda* (#:key inputs #:allow-other-keys)
7263 (let ((iproute (assoc-ref inputs "iproute")))
7264 (substitute* "jupyter_client/localinterfaces.py"
7265 (("'ip'")
7266 (string-append "'" iproute "/sbin/ip'")))
7267 #t))))))
7268 (inputs
7269 `(("iproute" ,iproute)))
7270 (propagated-inputs
7271 `(("python-pyzmq" ,python-pyzmq)
7272 ("python-traitlets" ,python-traitlets)
7273 ("python-jupyter-core" ,python-jupyter-core)))
7274 (home-page "https://jupyter.org/")
7275 (synopsis "Jupyter protocol implementation and client libraries")
7276 (description
7277 "The @code{jupyter_client} package contains the reference implementation
7278 of the Jupyter protocol. It also provides client and kernel management APIs
7279 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7280 installing @code{kernelspec}s for use with Jupyter frontends.")
7281 (license license:bsd-3)))
7282
7283 (define-public python2-jupyter-client
7284 (package-with-python2 python-jupyter-client))
7285
7286 (define-public python-ipykernel
7287 (package
7288 (name "python-ipykernel")
7289 (version "5.1.3")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "ipykernel" version))
7294 (sha256
7295 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7296 (build-system python-build-system)
7297 (arguments
7298 `(#:phases
7299 (modify-phases %standard-phases
7300 (replace 'check
7301 (lambda _
7302 (setenv "HOME" "/tmp")
7303 (invoke "pytest" "-v")
7304 #t))
7305 (add-after 'install 'set-python-file-name
7306 (lambda* (#:key outputs #:allow-other-keys)
7307 ;; Record the absolute file name of the 'python' executable in
7308 ;; 'kernel.json'.
7309 (let ((out (assoc-ref outputs "out")))
7310 (substitute* (string-append out "/share/jupyter"
7311 "/kernels/python3/kernel.json")
7312 (("\"python\"")
7313 (string-append "\"" (which "python") "\"")))
7314 #t))))))
7315 (propagated-inputs
7316 `(("python-ipython" ,python-ipython)
7317 ;; imported at runtime during connect
7318 ("python-jupyter-client" ,python-jupyter-client)))
7319 (native-inputs
7320 `(("python-flaky" ,python-flaky)
7321 ("python-nose" ,python-nose)
7322 ("python-pytest" ,python-pytest)))
7323 (home-page "https://ipython.org")
7324 (synopsis "IPython Kernel for Jupyter")
7325 (description
7326 "This package provides the IPython kernel for Jupyter.")
7327 (properties `((python2-variant . ,(delay python2-ipykernel))))
7328 (license license:bsd-3)))
7329
7330 ;; Version 5.x and above no longer support Python 2.
7331 (define-public python2-ipykernel
7332 (package
7333 (name "python2-ipykernel")
7334 (version "4.10.1")
7335 (source
7336 (origin
7337 (method url-fetch)
7338 (uri (pypi-uri "ipykernel" version))
7339 (sha256
7340 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7341 (build-system python-build-system)
7342 (arguments
7343 `(#:python ,python-2))
7344 (propagated-inputs
7345 `(("python2-ipython" ,python2-ipython)
7346 ;; imported at runtime during connect
7347 ("python2-jupyter-client" ,python2-jupyter-client)
7348 ("python2-tornado" ,python2-tornado)
7349 ("python2-traitlets" ,python2-traitlets)))
7350 (native-inputs
7351 `(("python2-mock" ,python2-mock)
7352 ("python2-nose" ,python2-nose)
7353 ("python2-pytest" ,python2-pytest)
7354 ("python2-pytest-cov" ,python2-pytest-cov)))
7355 (home-page "https://ipython.org")
7356 (synopsis "IPython Kernel for Jupyter")
7357 (description
7358 "This package provides the IPython kernel for Jupyter.")
7359 (license license:bsd-3)))
7360
7361 (define-public python-pari-jupyter
7362 (package
7363 (name "python-pari-jupyter")
7364 (version "1.3.2")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "pari_jupyter" version))
7369 (sha256
7370 (base32
7371 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7372 (build-system python-build-system)
7373 (propagated-inputs
7374 `(("python-ipykernel" ,python-ipykernel)))
7375 (inputs
7376 `(("pari-gp" ,pari-gp)
7377 ("readline" ,readline)))
7378 (arguments
7379 `(#:tests? #f)) ; no test suite
7380 (home-page
7381 "https://github.com/jdemeyer/pari_jupyter")
7382 (synopsis "A Jupyter kernel for PARI/GP")
7383 (description "The package provides a PARI/GP kernel for Jupyter.")
7384 (license license:gpl3+)))
7385
7386 (define-public python-backcall
7387 (package
7388 (name "python-backcall")
7389 (version "0.1.0")
7390 (source
7391 (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "backcall" version))
7394 (sha256
7395 (base32
7396 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7397 (build-system python-build-system)
7398 (home-page "https://github.com/takluyver/backcall/")
7399 (synopsis "Specifications for callback functions passed in to an API")
7400 (description
7401 "If your code lets other people supply callback functions, it's important
7402 to specify the function signature you expect, and check that functions support
7403 that. Adding extra parameters later would break other peoples code unless
7404 you're careful. The @code{backcall} package provides a way of specifying the
7405 callback signature using a prototype function.")
7406 (license license:bsd-3)))
7407
7408 (define-public python-ipython
7409 (package
7410 (name "python-ipython")
7411 (version "7.9.0")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "ipython" version ".tar.gz"))
7416 (sha256
7417 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7418 (build-system python-build-system)
7419 (propagated-inputs
7420 `(("python-backcall" ,python-backcall)
7421 ("python-pyzmq" ,python-pyzmq)
7422 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7423 ("python-terminado" ,python-terminado)
7424 ("python-matplotlib" ,python-matplotlib)
7425 ("python-numpy" ,python-numpy)
7426 ("python-numpydoc" ,python-numpydoc)
7427 ("python-jedi" ,python-jedi)
7428 ("python-jinja2" ,python-jinja2)
7429 ("python-mistune" ,python-mistune)
7430 ("python-pexpect" ,python-pexpect)
7431 ("python-pickleshare" ,python-pickleshare)
7432 ("python-simplegeneric" ,python-simplegeneric)
7433 ("python-jsonschema" ,python-jsonschema)
7434 ("python-traitlets" ,python-traitlets)
7435 ("python-nbformat" ,python-nbformat)
7436 ("python-pygments" ,python-pygments)))
7437 (inputs
7438 `(("readline" ,readline)
7439 ("which" ,which)))
7440 (native-inputs
7441 `(("graphviz" ,graphviz)
7442 ("pkg-config" ,pkg-config)
7443 ("python-requests" ,python-requests) ;; for tests
7444 ("python-testpath" ,python-testpath)
7445 ("python-nose" ,python-nose)))
7446 (arguments
7447 `(#:phases
7448 (modify-phases %standard-phases
7449 (add-after 'unpack 'make-docs-reproducible
7450 (lambda _
7451 (substitute* "IPython/sphinxext/ipython_directive.py"
7452 ((".*import datetime") "")
7453 ((".*datetime.datetime.now\\(\\)") "")
7454 (("%timeit") "# %timeit"))
7455 #t))
7456 ;; Tests can only be run after the library has been installed and not
7457 ;; within the source directory.
7458 (delete 'check)
7459 (add-after 'install 'check
7460 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7461 (if tests?
7462 (begin
7463 ;; Make installed package available for running the tests
7464 (add-installed-pythonpath inputs outputs)
7465 (setenv "HOME" "/tmp/") ;; required by a test
7466 ;; We only test the core because one of the other tests
7467 ;; tries to import ipykernel.
7468 (invoke "python" "IPython/testing/iptest.py"
7469 "-v" "IPython/core/tests"))
7470 #t)))
7471 (add-before 'check 'fix-tests
7472 (lambda* (#:key inputs #:allow-other-keys)
7473 (substitute* "./IPython/utils/_process_posix.py"
7474 (("/usr/bin/env', 'which") (which "which")))
7475 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7476 (("#!/usr/bin/env python")
7477 (string-append "#!" (which "python"))))
7478 ;; This test introduces a circular dependency on ipykernel
7479 ;; (which depends on ipython).
7480 (delete-file "IPython/core/tests/test_display.py")
7481 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7482 (delete-file "IPython/core/tests/test_interactiveshell.py")
7483 #t)))))
7484 (home-page "https://ipython.org")
7485 (synopsis "IPython is a tool for interactive computing in Python")
7486 (description
7487 "IPython provides a rich architecture for interactive computing with:
7488 Powerful interactive shells, a browser-based notebook, support for interactive
7489 data visualization, embeddable interpreters and tools for parallel
7490 computing.")
7491 (properties `((python2-variant . ,(delay python2-ipython))))
7492 (license license:bsd-3)))
7493
7494 ;; This is the latest release of the LTS version of ipython with support for
7495 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7496 ;; dropped support for Python 2.7.
7497 (define-public python2-ipython
7498 (package
7499 (name "python2-ipython")
7500 (version "5.8.0")
7501 (source
7502 (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "ipython" version ".tar.gz"))
7505 (sha256
7506 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7507 (build-system python-build-system)
7508 (propagated-inputs
7509 `(("python2-backports-shutil-get-terminal-size"
7510 ,python2-backports-shutil-get-terminal-size)
7511 ("python2-pathlib2" ,python2-pathlib2)
7512 ("python2-pyzmq" ,python2-pyzmq)
7513 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7514 ("python2-terminado" ,python2-terminado)
7515 ("python2-matplotlib" ,python2-matplotlib)
7516 ("python2-numpy" ,python2-numpy)
7517 ("python2-numpydoc" ,python2-numpydoc)
7518 ("python2-jinja2" ,python2-jinja2)
7519 ("python2-mistune" ,python2-mistune)
7520 ("python2-pexpect" ,python2-pexpect)
7521 ("python2-pickleshare" ,python2-pickleshare)
7522 ("python2-simplegeneric" ,python2-simplegeneric)
7523 ("python2-jsonschema" ,python2-jsonschema)
7524 ("python2-traitlets" ,python2-traitlets)
7525 ("python2-nbformat" ,python2-nbformat)
7526 ("python2-pygments" ,python2-pygments)))
7527 (inputs
7528 `(("readline" ,readline)
7529 ("which" ,which)))
7530 (native-inputs
7531 `(("graphviz" ,graphviz)
7532 ("pkg-config" ,pkg-config)
7533 ("python2-requests" ,python2-requests) ;; for tests
7534 ("python2-testpath" ,python2-testpath)
7535 ("python2-mock" ,python2-mock)
7536 ("python2-nose" ,python2-nose)))
7537 (arguments
7538 `(#:python ,python-2
7539 #:phases
7540 (modify-phases %standard-phases
7541 (add-before 'check 'delete-broken-tests
7542 (lambda* (#:key inputs #:allow-other-keys)
7543 ;; These tests throw errors for unknown reasons.
7544 (delete-file "IPython/core/tests/test_displayhook.py")
7545 (delete-file "IPython/core/tests/test_magic_terminal.py")
7546 (delete-file "IPython/core/tests/test_profile.py")
7547 #t)))))
7548 (home-page "https://ipython.org")
7549 (synopsis "IPython is a tool for interactive computing in Python")
7550 (description
7551 "IPython provides a rich architecture for interactive computing with:
7552 Powerful interactive shells, a browser-based notebook, support for interactive
7553 data visualization, embeddable interpreters and tools for parallel
7554 computing.")
7555 (license license:bsd-3)))
7556
7557 (define-public python-ipython-documentation
7558 (package
7559 (inherit python-ipython)
7560 (name "python-ipython-documentation")
7561 (version (package-version python-ipython))
7562 (arguments
7563 `(#:phases
7564 (modify-phases %standard-phases
7565 (delete 'build)
7566 (delete 'check)
7567 (replace 'install
7568 (lambda* (#:key outputs #:allow-other-keys)
7569 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7570 (doc (string-append data "/doc/" ,name "-" ,version))
7571 (html (string-append doc "/html"))
7572 (man1 (string-append data "/man/man1"))
7573 (info (string-append data "/info"))
7574 (examples (string-append doc "/examples"))
7575 (python-arg (string-append "PYTHON=" (which "python"))))
7576 (setenv "LANG" "en_US.utf8")
7577 (with-directory-excursion "docs"
7578 ;; FIXME: pdf fails to build
7579 ;;(system* "make" "pdf" "PAPER=a4")
7580 (system* "make" python-arg "html")
7581 ;; FIXME: the generated texi file contains ^@^@, which trips
7582 ;; up the parser.
7583 ;; (system* "make" python-arg "info")
7584 )
7585 (copy-recursively "docs/man" man1)
7586 (copy-recursively "examples" examples)
7587 (copy-recursively "docs/build/html" html)
7588 ;; (copy-file "docs/build/latex/ipython.pdf"
7589 ;; (string-append doc "/ipython.pdf"))
7590 (mkdir-p info)
7591 ;; (copy-file "docs/build/texinfo/ipython.info"
7592 ;; (string-append info "/ipython.info"))
7593 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7594 #t)))))
7595 (inputs
7596 `(("python-ipython" ,python-ipython)
7597 ("python-ipykernel" ,python-ipykernel)))
7598 (native-inputs
7599 `(("python-sphinx" ,python-sphinx)
7600 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7601 ;; FIXME: It's possible that a smaller union would work just as well.
7602 ("texlive" ,(texlive-union (list texlive-amsfonts
7603 texlive-fonts-ec
7604 texlive-generic-ifxetex
7605 texlive-generic-pdftex
7606 texlive-latex-capt-of
7607 texlive-latex-cmap
7608 texlive-latex-environ
7609 texlive-latex-eqparbox
7610 texlive-latex-etoolbox
7611 texlive-latex-expdlist
7612 texlive-latex-fancyhdr
7613 texlive-latex-fancyvrb
7614 texlive-latex-fncychap
7615 texlive-latex-float
7616 texlive-latex-framed
7617 texlive-latex-geometry
7618 texlive-latex-graphics
7619 texlive-latex-hyperref
7620 texlive-latex-mdwtools
7621 texlive-latex-multirow
7622 texlive-latex-needspace
7623 texlive-latex-oberdiek
7624 texlive-latex-parskip
7625 texlive-latex-preview
7626 texlive-latex-tabulary
7627 texlive-latex-threeparttable
7628 texlive-latex-titlesec
7629 texlive-latex-trimspaces
7630 texlive-latex-ucs
7631 texlive-latex-upquote
7632 texlive-latex-url
7633 texlive-latex-varwidth
7634 texlive-latex-wrapfig)))
7635 ("texinfo" ,texinfo)))))
7636
7637 (define-public python-urwid
7638 (package
7639 (name "python-urwid")
7640 (version "2.1.0")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "urwid" version))
7645 (sha256
7646 (base32
7647 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7648 (build-system python-build-system)
7649 (home-page "http://urwid.org")
7650 (synopsis "Console user interface library for Python")
7651 (description
7652 "Urwid is a curses-based UI/widget library for Python. It includes many
7653 features useful for text console applications.")
7654 (license license:lgpl2.1+)))
7655
7656 (define-public python2-urwid
7657 (package-with-python2 python-urwid))
7658
7659 (define-public python-urwidtrees
7660 (package
7661 (name "python-urwidtrees")
7662 (version "1.0.2")
7663 (source
7664 (origin
7665 (method git-fetch)
7666 ;; package author intends on distributing via github rather than pypi:
7667 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7668 (uri (git-reference
7669 (url "https://github.com/pazz/urwidtrees")
7670 (commit version)))
7671 (file-name (git-file-name name version))
7672 (sha256
7673 (base32
7674 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7675 (build-system python-build-system)
7676 (arguments
7677 '(#:use-setuptools? #f
7678 #:tests? #f)) ; no tests
7679 (propagated-inputs `(("python-urwid" ,python-urwid)))
7680 (home-page "https://github.com/pazz/urwidtrees")
7681 (synopsis "Tree widgets for urwid")
7682 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7683 toolkit. Use it to build trees of widgets.")
7684 (license license:gpl3+)))
7685
7686 (define-public python2-urwidtrees
7687 (package-with-python2 python-urwidtrees))
7688
7689 (define-public python-ua-parser
7690 (package
7691 (name "python-ua-parser")
7692 (version "0.8.0")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (pypi-uri "ua-parser" version))
7697 (sha256
7698 (base32
7699 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7700 (build-system python-build-system)
7701 (arguments
7702 `(#:tests? #f)) ;no test suite in release
7703 (native-inputs
7704 `(("python-pyyaml" ,python-pyyaml)))
7705 (home-page "https://github.com/ua-parser/uap-python")
7706 (synopsis "User agent parser")
7707 (description
7708 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7709 (license license:asl2.0)))
7710
7711 (define-public python2-ua-parser
7712 (package-with-python2 python-ua-parser))
7713
7714 (define-public python-user-agents
7715 (package
7716 (name "python-user-agents")
7717 (version "1.1.0")
7718 (source
7719 (origin
7720 (method url-fetch)
7721 (uri (pypi-uri "user-agents" version))
7722 (sha256
7723 (base32
7724 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7725 (build-system python-build-system)
7726 (arguments
7727 `(#:tests? #f)) ;missing devices.json test file in release
7728 (propagated-inputs
7729 `(("python-ua-parser" ,python-ua-parser)))
7730 (home-page "https://github.com/selwin/python-user-agents")
7731 (synopsis "User Agent strings parsing library")
7732 (description
7733 "A library to identify devices (phones, tablets) and their capabilities by
7734 parsing (browser/HTTP) user agent strings.")
7735 (license license:expat)))
7736
7737 (define-public python2-user-agents
7738 (package-with-python2 python-user-agents))
7739
7740 (define-public python-dbus
7741 (package
7742 (name "python-dbus")
7743 (version "1.2.16")
7744 (source
7745 (origin
7746 (method url-fetch)
7747 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7748 "dbus-python-" version ".tar.gz"))
7749 (sha256
7750 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7751 (build-system gnu-build-system)
7752 (native-inputs
7753 `(("pkg-config" ,pkg-config)))
7754 (inputs
7755 `(("python" ,python-wrapper)
7756 ("dbus-glib" ,dbus-glib)))
7757 (synopsis "Python bindings for D-bus")
7758 (description "python-dbus provides bindings for libdbus, the reference
7759 implementation of D-Bus.")
7760 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7761 (license license:expat)))
7762
7763 (define-public python2-dbus
7764 (package/inherit python-dbus
7765 (name "python2-dbus")
7766 (inputs `(("python" ,python-2)
7767 ,@(alist-delete "python"
7768 (package-inputs python-dbus)
7769 equal?)))))
7770
7771 (define-public python-notify2
7772 (package
7773 (name "python-notify2")
7774 (version "0.3.1")
7775 (source
7776 (origin
7777 (method url-fetch)
7778 (uri (pypi-uri "notify2" version))
7779 (sha256
7780 (base32
7781 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7782 (build-system python-build-system)
7783 (arguments `(#:tests? #f)) ; tests depend on system state
7784 (native-inputs
7785 `(("python-dbus" ,python-dbus)))
7786 (home-page "https://bitbucket.org/takluyver/pynotify2")
7787 (synopsis "Python interface to D-Bus notifications")
7788 (description
7789 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7790 It is a reimplementation of pynotify in pure Python, and an alternative to
7791 the GObject Introspection bindings to libnotify for non-GTK applications.")
7792 (license (list license:bsd-2
7793 license:lgpl2.1+))))
7794
7795 (define-public python2-notify2
7796 (package-with-python2 python-notify2))
7797
7798 ;; beautifulsoup4 has a totally different namespace than 3.x,
7799 ;; and pypi seems to put it under its own name, so I guess we should too
7800 (define-public python-beautifulsoup4
7801 (package
7802 (name "python-beautifulsoup4")
7803 (version "4.9.1")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "beautifulsoup4" version))
7808 (sha256
7809 (base32
7810 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7811 (build-system python-build-system)
7812 (arguments
7813 `(#:phases
7814 (modify-phases %standard-phases
7815 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7816 ;; must use this conversion script when building with Python 3. The
7817 ;; conversion script also runs the tests.
7818 ;; For more information, see the file 'convert-py3k' in the source
7819 ;; distribution.
7820 (replace 'check
7821 (lambda _ (invoke "./convert-py3k"))))))
7822 (propagated-inputs
7823 `(("python-soupsieve" ,python-soupsieve)))
7824 (home-page
7825 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7826 (synopsis
7827 "Python screen-scraping library")
7828 (description
7829 "Beautiful Soup is a Python library designed for rapidly setting up
7830 screen-scraping projects. It offers Pythonic idioms for navigating,
7831 searching, and modifying a parse tree, providing a toolkit for
7832 dissecting a document and extracting what you need. It automatically
7833 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7834 (license license:expat)
7835 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7836
7837 (define-public python2-beautifulsoup4
7838 (let ((base (package-with-python2
7839 (strip-python2-variant python-beautifulsoup4))))
7840 (package/inherit base
7841 (arguments `(#:python ,python-2)))))
7842
7843 (define-public python-soupsieve
7844 (package
7845 (name "python-soupsieve")
7846 (version "2.0.1")
7847 (source
7848 (origin
7849 (method url-fetch)
7850 (uri (pypi-uri "soupsieve" version))
7851 (sha256
7852 (base32
7853 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7854 (build-system python-build-system)
7855 (arguments `(#:tests? #f))
7856 ;;XXX: 2 tests fail currently despite claming they were to be
7857 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7858 ;;don't want to create a circular dependency.
7859 (home-page "https://github.com/facelessuser/soupsieve")
7860 (synopsis "CSS selector library")
7861 (description
7862 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7863 Soup 4. It aims to provide selecting, matching, and filtering using modern
7864 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7865 specifications up through the latest CSS level 4 drafts and beyond (though
7866 some are not yet implemented).")
7867 (properties `((python2-variant . ,(delay python2-soupsieve))))
7868 (license license:expat)))
7869
7870 ;; This is the last version that supports python-2
7871 (define-public python2-soupsieve
7872 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7873 (package
7874 (inherit base)
7875 (version "1.9.6")
7876 (source
7877 (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "soupsieve" version))
7880 (sha256
7881 (base32
7882 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7883 (propagated-inputs
7884 `(("python2-backports-functools-lru-cache"
7885 ,python2-backports-functools-lru-cache)
7886 ,@(package-propagated-inputs base))))))
7887
7888 (define-public python-netifaces
7889 (package
7890 (name "python-netifaces")
7891 (version "0.10.9")
7892 (source
7893 (origin
7894 (method url-fetch)
7895 (uri (pypi-uri "netifaces" version))
7896 (sha256
7897 (base32
7898 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7899 (build-system python-build-system)
7900 (home-page "https://github.com/al45tair/netifaces")
7901 (synopsis
7902 "Python module for portable network interface information")
7903 (description
7904 "Netifaces is a Python module providing information on network
7905 interfaces in an easy and portable manner.")
7906 (license license:expat)))
7907
7908 (define-public python2-netifaces
7909 (package-with-python2 python-netifaces))
7910
7911 (define-public python-networkx
7912 (package
7913 (name "python-networkx")
7914 (version "2.5")
7915 (source
7916 (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "networkx" version))
7919 (sha256
7920 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7921 (build-system python-build-system)
7922 (arguments
7923 '(#:phases (modify-phases %standard-phases
7924 (replace 'check
7925 (lambda* (#:key tests? #:allow-other-keys)
7926 (if tests?
7927 (invoke "pytest" "-vv" "--pyargs" "networkx")
7928 (format #t "test suite not run~%"))
7929 #t)))))
7930 ;; python-decorator is needed at runtime.
7931 (propagated-inputs
7932 `(("python-decorator" ,python-decorator)))
7933 (native-inputs
7934 `(("python-pytest" ,python-pytest)))
7935 (home-page "https://networkx.github.io/")
7936 (synopsis "Python module for creating and manipulating graphs and networks")
7937 (description
7938 "NetworkX is a Python package for the creation, manipulation, and study
7939 of the structure, dynamics, and functions of complex networks.")
7940 (properties `((python2-variant . ,(delay python2-networkx))))
7941 (license license:bsd-3)))
7942
7943 ;; NetworkX 2.2 is the last version with support for Python 2.
7944 (define-public python2-networkx
7945 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7946 (package
7947 (inherit base)
7948 (version "2.2")
7949 (source (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "networkx" version ".zip"))
7952 (sha256
7953 (base32
7954 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7955 (arguments
7956 `(#:python ,python-2))
7957 (native-inputs
7958 `(("python-nose" ,python2-nose)
7959 ("unzip" ,unzip))))))
7960
7961 (define-public python-datrie
7962 (package
7963 (name "python-datrie")
7964 (version "0.8.2")
7965 (source
7966 (origin
7967 (method url-fetch)
7968 (uri (pypi-uri "datrie" version))
7969 (sha256
7970 (base32
7971 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7972 (build-system python-build-system)
7973 (native-inputs
7974 `(("python-cython" ,python-cython)
7975 ("python-hypothesis" ,python-hypothesis)
7976 ("python-pytest" ,python-pytest)
7977 ("python-pytest-runner" ,python-pytest-runner)))
7978 (home-page "https://github.com/kmike/datrie")
7979 (synopsis "Fast, efficiently stored trie for Python")
7980 (description
7981 "This package provides a fast, efficiently stored trie implementation for
7982 Python.")
7983 (license license:lgpl2.1+)))
7984
7985 (define-public python-amply
7986 (package
7987 (name "python-amply")
7988 (version "0.1.4")
7989 (source
7990 (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "amply" version))
7993 (sha256
7994 (base32
7995 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
7996 (build-system python-build-system)
7997 (propagated-inputs
7998 `(("python-docutils" ,python-docutils)
7999 ("python-pyparsing" ,python-pyparsing)))
8000 (native-inputs
8001 `(("python-setuptools-scm" ,python-setuptools-scm)))
8002 (home-page "https://github.com/willu47/amply")
8003 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8004 (description
8005 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8006 structures.")
8007 (license license:epl1.0)))
8008
8009 (define-public python-pulp
8010 (package
8011 (name "python-pulp")
8012 (version "2.4")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "PuLP" version))
8017 (sha256
8018 (base32
8019 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8020 (build-system python-build-system)
8021 (propagated-inputs
8022 `(("python-amply" ,python-amply)))
8023 (home-page "https://github.com/coin-or/pulp")
8024 (synopsis "Linear Programming modeler")
8025 (description
8026 "PuLP is a Linear Programming modeler written in Python. PuLP can
8027 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8028 solve linear problems.")
8029 (license license:expat)))
8030
8031 (define-public python-toposort
8032 (package
8033 (name "python-toposort")
8034 (version "1.6")
8035 (source
8036 (origin
8037 (method url-fetch)
8038 (uri (pypi-uri "toposort" version))
8039 (sha256
8040 (base32
8041 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8042 (build-system python-build-system)
8043 (home-page "https://gitlab.com/ericvsmith/toposort")
8044 (synopsis "Topological sort algorithm")
8045 (description
8046 "This package provides an implementation of a topological sort
8047 algorithm.")
8048 (license license:asl2.0)))
8049
8050 (define-public snakemake
8051 (package
8052 (name "snakemake")
8053 (version "5.32.2")
8054 (source
8055 (origin
8056 (method url-fetch)
8057 (uri (pypi-uri "snakemake" version))
8058 (sha256
8059 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8060 (build-system python-build-system)
8061 (arguments
8062 ;; TODO: Package missing test dependencies.
8063 '(#:tests? #f
8064 #:phases
8065 (modify-phases %standard-phases
8066 ;; For cluster execution Snakemake will call Python. Since there is
8067 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8068 ;; this by calling the snakemake wrapper instead.
8069 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8070 (lambda* (#:key outputs #:allow-other-keys)
8071 (substitute* "snakemake/executors/__init__.py"
8072 (("\\{sys.executable\\} -m snakemake")
8073 (string-append (assoc-ref outputs "out")
8074 "/bin/snakemake")))
8075 #t)))))
8076 (propagated-inputs
8077 `(("python-appdirs" ,python-appdirs)
8078 ("python-configargparse" ,python-configargparse)
8079 ("python-datrie" ,python-datrie)
8080 ("python-docutils" ,python-docutils)
8081 ("python-gitpython" ,python-gitpython)
8082 ("python-jinja2" ,python-jinja2)
8083 ("python-jsonschema" ,python-jsonschema)
8084 ("python-nbformat" ,python-nbformat)
8085 ("python-networkx" ,python-networkx)
8086 ("python-psutil" ,python-psutil)
8087 ("python-pulp" ,python-pulp)
8088 ("python-pyyaml" ,python-pyyaml)
8089 ("python-ratelimiter" ,python-ratelimiter)
8090 ("python-requests" ,python-requests)
8091 ("python-toposort" ,python-toposort)
8092 ("python-wrapt" ,python-wrapt)))
8093 (home-page "https://snakemake.readthedocs.io")
8094 (synopsis "Python-based execution environment for make-like workflows")
8095 (description
8096 "Snakemake aims to reduce the complexity of creating workflows by
8097 providing a clean and modern domain specific specification language (DSL) in
8098 Python style, together with a fast and comfortable execution environment.")
8099 (license license:expat)))
8100
8101 (define-public python-pyqrcode
8102 (package
8103 (name "python-pyqrcode")
8104 (version "1.2.1")
8105 (source
8106 (origin
8107 (method url-fetch)
8108 (uri (pypi-uri "PyQRCode" version))
8109 (sha256
8110 (base32
8111 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8112 (build-system python-build-system)
8113 (home-page
8114 "https://github.com/mnooner256/pyqrcode")
8115 (synopsis "QR code generator")
8116 (description
8117 "Pyqrcode is a QR code generator written purely in Python with
8118 SVG, EPS, PNG and terminal output.")
8119 (license license:bsd-3)))
8120
8121 (define-public python-seaborn
8122 (package
8123 (name "python-seaborn")
8124 (version "0.10.0")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "seaborn" version))
8129 (sha256
8130 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8131 (build-system python-build-system)
8132 (arguments
8133 `(#:phases
8134 (modify-phases %standard-phases
8135 (add-before 'check 'start-xserver
8136 (lambda* (#:key inputs #:allow-other-keys)
8137 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8138 ;; There must be a running X server and make check doesn't
8139 ;; start one. Therefore we must do it.
8140 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8141 (setenv "DISPLAY" ":1")
8142 #t)))
8143 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8144 (propagated-inputs
8145 `(("python-pandas" ,python-pandas)
8146 ("python-matplotlib" ,python-matplotlib)
8147 ("python-numpy" ,python-numpy)
8148 ("python-scipy" ,python-scipy)))
8149 (native-inputs
8150 `(("python-pytest" ,python-pytest)
8151 ("xorg-server" ,xorg-server-for-tests)))
8152 (home-page "https://seaborn.pydata.org/")
8153 (synopsis "Statistical data visualization")
8154 (description
8155 "Seaborn is a library for making attractive and informative statistical
8156 graphics in Python. It is built on top of matplotlib and tightly integrated
8157 with the PyData stack, including support for numpy and pandas data structures
8158 and statistical routines from scipy and statsmodels.")
8159 (properties `((python2-variant . ,(delay python2-seaborn))))
8160 (license license:bsd-3)))
8161
8162 ;; 0.9.1 is the last release with support for Python 2.
8163 (define-public python2-seaborn
8164 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8165 (package
8166 (inherit base)
8167 (version "0.9.1")
8168 (source (origin
8169 (method url-fetch)
8170 (uri (pypi-uri "seaborn" version))
8171 (sha256
8172 (base32
8173 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8174
8175 (define-public python-mpmath
8176 (package
8177 (name "python-mpmath")
8178 (version "1.1.0")
8179 (source (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "mpmath" version))
8182 (file-name (git-file-name name version))
8183 (sha256
8184 (base32
8185 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8186 (build-system python-build-system)
8187 (native-inputs
8188 `(("python-pytest" ,python-pytest)))
8189 (arguments
8190 '(#:phases
8191 (modify-phases %standard-phases
8192 (replace 'check
8193 (lambda _
8194 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8195 (home-page "https://mpmath.org")
8196 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8197 (description
8198 "@code{mpmath} can be used as an arbitrary-precision substitute for
8199 Python's float/complex types and math/cmath modules, but also does much
8200 more advanced mathematics.")
8201 (license license:bsd-3)))
8202
8203 (define-public python2-mpmath
8204 (package-with-python2 python-mpmath))
8205
8206 (define-public python-bigfloat
8207 (package
8208 (name "python-bigfloat")
8209 (version "0.3.0")
8210 (source
8211 (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "bigfloat" version))
8214 (sha256
8215 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8216 (build-system python-build-system)
8217 (inputs
8218 `(("mpfr" ,mpfr)))
8219 (home-page "https://github.com/mdickinson/bigfloat")
8220 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8221 (description
8222 "This package provides a Python interface to the MPFR library for
8223 multiprecision arithmetic.")
8224 (license license:lgpl3+)))
8225
8226 (define-public python2-bigfloat
8227 (package-with-python2 python-bigfloat))
8228
8229 (define-public python-sympy
8230 (package
8231 (name "python-sympy")
8232 (version "1.7.1")
8233 (source
8234 (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "sympy" version))
8237 (sha256
8238 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8239 (build-system python-build-system)
8240 (arguments
8241 `(#:phases
8242 (modify-phases %standard-phases
8243 (replace 'check
8244 (lambda* (#:key outputs #:allow-other-keys)
8245 (invoke
8246 (or (which "python3") (which "python"))
8247 "-c" "import sympy; sympy.test(\"/core\")"))))))
8248 (propagated-inputs
8249 `(("python-mpmath" ,python-mpmath)))
8250 (home-page "https://www.sympy.org/")
8251 (synopsis "Python library for symbolic mathematics")
8252 (description
8253 "SymPy is a Python library for symbolic mathematics. It aims to become a
8254 full-featured computer algebra system (CAS) while keeping the code as simple
8255 as possible in order to be comprehensible and easily extensible.")
8256 (license license:bsd-3)))
8257
8258 (define-public python2-sympy
8259 (package
8260 (inherit (package-with-python2 python-sympy))
8261 (version "1.5.1") ; last release for python2
8262 (source
8263 (origin
8264 (method url-fetch)
8265 (uri (pypi-uri "sympy" version))
8266 (sha256
8267 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8268
8269 (define-public python-q
8270 (package
8271 (name "python-q")
8272 (version "2.6")
8273 (source
8274 (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "q" version))
8277 (sha256
8278 (base32
8279 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8280 (build-system python-build-system)
8281 (home-page "https://github.com/zestyping/q")
8282 (synopsis "Quick-and-dirty debugging output for tired programmers")
8283 (description
8284 "q is a Python module for \"print\" style of debugging Python code. It
8285 provides convenient short API for print out of values, tracebacks, and
8286 falling into the Python interpreter.")
8287 (license license:asl2.0)))
8288
8289 (define-public python2-q
8290 (package-with-python2 python-q))
8291
8292 (define-public python-xlib
8293 (package
8294 (name "python-xlib")
8295 (version "0.29")
8296 (source
8297 (origin
8298 (method git-fetch)
8299 (uri (git-reference
8300 (url "https://github.com/python-xlib/python-xlib")
8301 (commit version)))
8302 (file-name (git-file-name name version))
8303 (sha256
8304 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8305 (build-system python-build-system)
8306 (arguments
8307 `(#:phases
8308 (modify-phases %standard-phases
8309 (add-before 'check 'start-xserver
8310 (lambda* (#:key inputs #:allow-other-keys)
8311 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8312 ;; There must be a running X server and make check doesn't
8313 ;; start one. Therefore we must do it.
8314 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8315 (setenv "DISPLAY" ":1")
8316 #t))))))
8317 (native-inputs
8318 `(("python-mock" ,python-mock)
8319 ("python-setuptools-scm" ,python-setuptools-scm)
8320 ("xorg-server" ,xorg-server)))
8321 (propagated-inputs
8322 `(("python-six" ,python-six)))
8323 (home-page "https://github.com/python-xlib/python-xlib")
8324 (synopsis "Python X11 client library")
8325 (description
8326 "The Python X Library is intended to be a fully functional
8327 X client library for Python programs. It is useful to implement
8328 low-level X clients. It is written entirely in Python.")
8329 (license license:gpl2+)))
8330
8331 (define-public python2-xlib
8332 (package-with-python2 python-xlib))
8333
8334 (define-public python-singledispatch
8335 (package
8336 (name "python-singledispatch")
8337 (version "3.4.0.3")
8338 (source
8339 (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "singledispatch" version))
8342 (sha256
8343 (base32
8344 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8345 (build-system python-build-system)
8346 (native-inputs
8347 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8348 (home-page
8349 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8350 (synopsis "Backport of singledispatch feature from Python 3.4")
8351 (description
8352 "This library brings functools.singledispatch from Python 3.4 to Python
8353 2.6-3.3.")
8354 (license license:expat)))
8355
8356 (define-public python2-singledispatch
8357 (package-with-python2 python-singledispatch))
8358
8359 ;; the python- version can be removed with python-3.5
8360 (define-public python-backports-abc
8361 (package
8362 (name "python-backports-abc")
8363 (version "0.5")
8364 (source
8365 (origin
8366 (method url-fetch)
8367 (uri (pypi-uri "backports_abc" version))
8368 (sha256
8369 (base32
8370 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8371 (build-system python-build-system)
8372 (home-page "https://github.com/cython/backports_abc")
8373 (synopsis "Backport of additions to the 'collections.abc' module")
8374 (description
8375 "Python-backports-abc provides a backport of additions to the
8376 @code{collections.abc} module in Python-3.5.")
8377 (license license:psfl)))
8378
8379 (define-public python2-backports-abc
8380 (package-with-python2 python-backports-abc))
8381
8382 (define-public python-backports-csv
8383 (package
8384 (name "python-backports-csv")
8385 (version "1.0.7")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "backports.csv" version))
8390 (sha256
8391 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8392 (build-system python-build-system)
8393 (home-page "https://github.com/ryanhiebert/backports.csv")
8394 (synopsis "Backport of Python 3's csv module for Python 2")
8395 (description
8396 "Provides a backport of Python 3's @code{csv} module for parsing
8397 comma separated values. The API of the @code{csv} module in Python 2
8398 is drastically different from the @code{csv} module in Python 3.
8399 This is due, for the most part, to the difference between str in
8400 Python 2 and Python 3.")
8401 (license license:psfl)))
8402
8403 (define-public python2-backports-csv
8404 (package-with-python2 python-backports-csv))
8405
8406 (define-public python2-backports-shutil-get-terminal-size
8407 (package
8408 (name "python2-backports-shutil-get-terminal-size")
8409 (version "1.0.0")
8410 (source
8411 (origin
8412 (method url-fetch)
8413 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8414 (sha256
8415 (base32
8416 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8417 (build-system python-build-system)
8418 (arguments
8419 `(#:python ,python-2
8420 #:phases
8421 (modify-phases %standard-phases
8422 (replace 'check
8423 (lambda _
8424 (setenv "PYTHONPATH" (string-append "./build/lib:"
8425 (getenv "PYTHONPATH")))
8426 (invoke "py.test" "-v"))))))
8427 (native-inputs
8428 `(("python2-pytest" ,python2-pytest)))
8429 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8430 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8431 (description
8432 "This package provides a backport of the @code{get_terminal_size
8433 function} from Python 3.3's @code{shutil}.
8434 Unlike the original version it is written in pure Python rather than C,
8435 so it might be a tiny bit slower.")
8436 (license license:expat)))
8437
8438 (define-public python-waf
8439 (package
8440 (name "python-waf")
8441 (version "2.0.19")
8442 (source (origin
8443 (method url-fetch)
8444 (uri (string-append "https://waf.io/"
8445 "waf-" version ".tar.bz2"))
8446 (sha256
8447 (base32
8448 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8449 (build-system python-build-system)
8450 (arguments
8451 '(#:phases
8452 (modify-phases %standard-phases
8453 (replace 'build
8454 (lambda _
8455 ;; XXX: Find a way to add all extra tools.
8456 (let ((tools '("gccdeps"
8457 "clang_compilation_database")))
8458 (invoke "python" "waf-light" "configure" "build"
8459 (string-append "--tools="
8460 (string-join tools ","))))))
8461 (replace 'check
8462 (lambda _
8463 (invoke "python" "waf" "--version")))
8464 (replace 'install
8465 (lambda* (#:key outputs #:allow-other-keys)
8466 (let ((out (assoc-ref outputs "out")))
8467 (install-file "waf" (string-append out "/bin")))
8468 #t))
8469 ;; waf breaks when it is wrapped.
8470 (delete 'wrap))))
8471 (home-page "https://waf.io/")
8472 (synopsis "Python-based build system")
8473 (description
8474 "Waf is a Python-based framework for configuring, compiling and installing
8475 applications.")
8476 (license license:bsd-3)))
8477
8478 (define-public python2-waf
8479 (package-with-python2 python-waf))
8480
8481 (define-public python-pyzmq
8482 (package
8483 (name "python-pyzmq")
8484 (version "17.1.2")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "pyzmq" version))
8489 (sha256
8490 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8491 (build-system python-build-system)
8492 (arguments
8493 `(#:configure-flags
8494 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8495 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8496 ;; --inplace' for 'python setup.py test' to work.
8497 #:tests? #f))
8498 (inputs
8499 `(("zeromq" ,zeromq)))
8500 (native-inputs
8501 `(("pkg-config" ,pkg-config)
8502 ("python-nose" ,python-nose)))
8503 (home-page "https://github.com/zeromq/pyzmq")
8504 (synopsis "Python bindings for 0MQ")
8505 (description
8506 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8507 (license license:bsd-4)))
8508
8509 (define-public python2-pyzmq
8510 (package-with-python2 python-pyzmq))
8511
8512 (define-public python-pep8
8513 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8514 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8515 ;; some dependents' test suites, and nothing more.
8516 (package
8517 (name "python-pep8")
8518 (version "1.7.0")
8519 (source
8520 (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "pep8" version))
8523 (sha256
8524 (base32
8525 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8526 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8527 (build-system python-build-system)
8528 (home-page "https://pep8.readthedocs.org/")
8529 (synopsis "Python style guide checker")
8530 (description
8531 "This tools checks Python code against some of the style conventions in
8532 PEP 8.")
8533 (license license:expat)))
8534
8535 (define-public python2-pep8
8536 (package-with-python2 python-pep8))
8537
8538 (define-public python-pep517
8539 (package
8540 (inherit python-pep517-bootstrap)
8541 (name "python-pep517")
8542 (arguments
8543 '(#:phases
8544 (modify-phases %standard-phases
8545 (replace 'check
8546 (lambda* (#:key tests? #:allow-other-keys)
8547 (delete-file "pytest.ini")
8548 ;; This test tries to connect to the internet
8549 (delete-file "tests/test_meta.py")
8550 (if tests?
8551 (invoke "pytest")
8552 #t))))))
8553 (native-inputs
8554 `(("python-mock" ,python-mock)
8555 ("python-pytest" ,python-pytest)
8556 ("python-testpath" ,python-testpath)))
8557 (properties `((python2-variant . ,(delay python2-pep517))))))
8558
8559 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8560 (define-public python2-pep517
8561 (let ((base (package-with-python2
8562 (strip-python2-variant python-pep517))))
8563 (package/inherit base
8564 (name "python2-pep517")
8565 (arguments
8566 `(#:tests? #f
8567 ,@(package-arguments base)))
8568 (native-inputs `()))))
8569
8570 (define-public python-pyflakes
8571 (package
8572 (name "python-pyflakes")
8573 (version "2.2.0")
8574 (source
8575 (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "pyflakes" version))
8578 (sha256
8579 (base32
8580 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8581 (build-system python-build-system)
8582 (home-page
8583 "https://github.com/pyflakes/pyflakes")
8584 (synopsis "Passive checker of Python programs")
8585 (description
8586 "Pyflakes statically checks Python source code for common errors.")
8587 (license license:expat)))
8588
8589 (define-public python2-pyflakes
8590 (package-with-python2 python-pyflakes))
8591
8592 (define-public python-mccabe
8593 (package
8594 (name "python-mccabe")
8595 (version "0.6.1")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "mccabe" version))
8600 (sha256
8601 (base32
8602 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8603 (build-system python-build-system)
8604 (native-inputs
8605 `(("python-pytest" ,python-pytest-bootstrap)
8606 ("python-pytest-runner" ,python-pytest-runner)))
8607 (home-page "https://github.com/flintwork/mccabe")
8608 (synopsis "McCabe checker, plugin for flake8")
8609 (description
8610 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8611 complexity of Python source code.")
8612 (license license:expat)))
8613
8614 (define-public python2-mccabe
8615 (package-with-python2 python-mccabe))
8616
8617 (define-public python-flake8
8618 (package
8619 (name "python-flake8")
8620 (version "3.8.4")
8621 (source (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "flake8" version))
8624 (sha256
8625 (base32
8626 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8627 (build-system python-build-system)
8628 (arguments
8629 `(#:phases
8630 (modify-phases %standard-phases
8631 (delete 'check)
8632 (add-after 'install 'check
8633 (lambda* (#:key inputs outputs #:allow-other-keys)
8634 (add-installed-pythonpath inputs outputs)
8635 (invoke "pytest" "-v")
8636 #t)))))
8637 (propagated-inputs
8638 `(("python-pycodestyle" ,python-pycodestyle)
8639 ("python-entrypoints" ,python-entrypoints)
8640 ("python-pyflakes" ,python-pyflakes)
8641 ("python-mccabe" ,python-mccabe)))
8642 (native-inputs
8643 `(("python-mock" ,python-mock)
8644 ("python-pytest" ,python-pytest-bootstrap)))
8645 (home-page "https://gitlab.com/pycqa/flake8")
8646 (synopsis
8647 "The modular source code checker: pep8, pyflakes and co")
8648 (description
8649 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8650 (properties `((python2-variant . ,(delay python2-flake8))))
8651 (license license:expat)))
8652
8653 (define-public python2-flake8
8654 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8655 (package/inherit base
8656 (propagated-inputs
8657 `(("python2-configparser" ,python2-configparser)
8658 ("python2-enum34" ,python2-enum34)
8659 ("python2-functools32" ,python2-functools32)
8660 ("python2-typing" ,python2-typing)
8661 ,@(package-propagated-inputs base))))))
8662
8663 (define-public python-flake8-bugbear
8664 (package
8665 (name "python-flake8-bugbear")
8666 (version "20.1.4")
8667 (source
8668 (origin
8669 (method url-fetch)
8670 (uri (pypi-uri "flake8-bugbear" version))
8671 (sha256
8672 (base32
8673 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8674 (build-system python-build-system)
8675 (arguments
8676 '(#:phases
8677 (modify-phases %standard-phases
8678 (add-before 'check 'disable-test
8679 (lambda _
8680 ;; This test fails on slow computers.
8681 (substitute* "tests/test_bugbear.py"
8682 (("def test_does_not_crash_on_any_valid_code")
8683 "def _test_does_not_crash_on_any_valid_code")))))))
8684 (native-inputs
8685 `(("python-hypothesis" ,python-hypothesis)
8686 ("python-hypothesmith" ,python-hypothesmith)))
8687 (propagated-inputs
8688 `(("python-attrs" ,python-attrs)
8689 ("python-flake8" ,python-flake8)))
8690 (home-page "https://github.com/PyCQA/flake8-bugbear")
8691 (synopsis
8692 "Flake8 plugin for finding likely bugs and design problems in your program")
8693 (description
8694 "This package contains a plugin for Flake8 finding likely bugs and
8695 design problems in your program. It contains warnings that don't belong
8696 in pyflakes and pycodestyle.")
8697 (license license:expat)))
8698
8699 (define-public python-flake8-implicit-str-concat
8700 (package
8701 (name "python-flake8-implicit-str-concat")
8702 (version "0.2.0")
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "flake8_implicit_str_concat" version))
8707 (sha256
8708 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8709 (build-system python-build-system)
8710 (propagated-inputs
8711 `(("python-attrs" ,python-attrs)
8712 ("python-more-itertools" ,python-more-itertools)))
8713 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8714 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8715 (description
8716 "This is a plugin for the Python code checking tool Flake8 to encourage
8717 correct string literal concatenation.
8718
8719 It looks for style problems like implicitly concatenated string literals on
8720 the same line (which can be introduced by the code formating tool Black), or
8721 unnecessary plus operators for explicit string literal concatenation.")
8722 (license license:expat)))
8723
8724 (define-public python-flake8-polyfill
8725 (package
8726 (name "python-flake8-polyfill")
8727 (version "1.0.2")
8728 (source
8729 (origin
8730 (method url-fetch)
8731 (uri (pypi-uri "flake8-polyfill" version))
8732 (sha256
8733 (base32
8734 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8735 (build-system python-build-system)
8736 (arguments
8737 '(#:phases
8738 (modify-phases %standard-phases
8739 (replace 'check
8740 (lambda _
8741 ;; Be compatible with Pytest 4:
8742 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8743 (substitute* "setup.cfg"
8744 (("\\[pytest\\]")
8745 "[tool:pytest]"))
8746
8747 (setenv "PYTHONPATH"
8748 (string-append (getcwd) "/build/lib:"
8749 (getenv "PYTHONPATH")))
8750 (invoke "py.test" "-v"))))))
8751 (native-inputs
8752 `(("python-flake8" ,python-flake8)
8753 ("python-mock" ,python-mock)
8754 ("python-pep8" ,python-pep8)
8755 ("python-pycodestyle" ,python-pycodestyle)
8756 ("python-pytest" ,python-pytest)))
8757 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8758 (synopsis "Polyfill package for Flake8 plugins")
8759 (description
8760 "This package that provides some compatibility helpers for Flake8
8761 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8762 (license license:expat)))
8763
8764 (define-public python2-flake8-polyfill
8765 (package-with-python2 python-flake8-polyfill))
8766
8767 (define-public python-flake8-print
8768 (package
8769 (name "python-flake8-print")
8770 (version "4.0.0")
8771 (source
8772 (origin
8773 (method url-fetch)
8774 (uri (pypi-uri "flake8-print" version))
8775 (sha256
8776 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8777 (build-system python-build-system)
8778 (propagated-inputs
8779 `(("python-flake8" ,python-flake8)
8780 ("python-pycodestyle" ,python-pycodestyle)
8781 ("python-six" ,python-six)))
8782 (home-page "https://github.com/jbkahn/flake8-print")
8783 (synopsis "Print statement checker plugin for Flake8")
8784 (description
8785 "This plugin for Flake8 checks for @code{print} statements in Python
8786 files.")
8787 (license license:expat)))
8788
8789 (define-public python-flake8-pyi
8790 (package
8791 (name "python-flake8-pyi")
8792 (version "20.5.0")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "flake8-pyi" version))
8797 (sha256
8798 (base32
8799 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8800 (build-system python-build-system)
8801 (propagated-inputs
8802 `(("python-attrs" ,python-attrs)
8803 ("python-flake8" ,python-flake8)
8804 ("python-pyflakes" ,python-pyflakes)))
8805 (home-page "https://github.com/ambv/flake8-pyi")
8806 (synopsis
8807 "Flake8 plugin that provides specializations for type hinting stub files")
8808 (description
8809 "This package contains a plugin that provides specializations for
8810 type hinting stub files, especially interesting for linting typeshed. It
8811 adds the @file{.pyi} extension to the default value of the @code{--filename}
8812 command-line argument to Flake8. This means stubs are linted by default with
8813 this plugin enabled, without needing to explicitly list every file. It
8814 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8815 expressions after the entire file has been read. This enables support for
8816 first-class forward references that stub files use.")
8817 (license license:expat)))
8818
8819 (define-public python-flake8-pie
8820 (package
8821 (name "python-flake8-pie")
8822 (version "0.5.0")
8823 (source
8824 (origin
8825 (method url-fetch)
8826 (uri (pypi-uri "flake8-pie" version))
8827 (sha256
8828 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8829 (build-system python-build-system)
8830 (home-page "https://github.com/sbdchd/flake8-pie")
8831 (synopsis "Flake8 extension that implements lints")
8832 (description
8833 "This package provides a flake8 extension that implements miscellaneous
8834 lints.")
8835 (license license:bsd-2)))
8836
8837 (define-public python-autoflake
8838 (package
8839 (name "python-autoflake")
8840 (version "1.3.1")
8841 (source
8842 (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "autoflake" version))
8845 (sha256
8846 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8847 (build-system python-build-system)
8848 (propagated-inputs
8849 `(("python-pyflakes" ,python-pyflakes)))
8850 (home-page "https://github.com/myint/autoflake")
8851 (synopsis "Removes unused imports and unused variables")
8852 (description
8853 "@code{autoflake} removes unused imports and unused variables from Python
8854 code as reported by @code{pyflakes}.
8855
8856 By default, it only removes unused imports for modules that are part of the
8857 standard library. Removal of unused variables is also disabled by default.
8858 It also removes useless @code{pass} statements.")
8859 (license license:expat)))
8860
8861 (define-public python-mistune
8862 (package
8863 (name "python-mistune")
8864 (version "0.8.4")
8865 (source
8866 (origin
8867 (method url-fetch)
8868 (uri (pypi-uri "mistune" version))
8869 (sha256
8870 (base32
8871 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8872 (build-system python-build-system)
8873 (native-inputs
8874 `(("python-nose" ,python-nose)
8875 ("python-cython" ,python-cython)))
8876 (home-page "https://github.com/lepture/mistune")
8877 (synopsis "Markdown parser in pure Python")
8878 (description "This package provides a fast markdown parser in pure
8879 Python.")
8880 (license license:bsd-3)))
8881
8882 (define-public python2-mistune
8883 (package-with-python2 python-mistune))
8884
8885 (define-public python-markdown
8886 (package
8887 (name "python-markdown")
8888 (version "3.2.1")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "Markdown" version))
8893 (sha256
8894 (base32
8895 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8896 (build-system python-build-system)
8897 (native-inputs
8898 `(("python-nose" ,python-nose)
8899 ("python-pyyaml" ,python-pyyaml)))
8900 (home-page "https://python-markdown.github.io/")
8901 (synopsis "Python implementation of Markdown")
8902 (description
8903 "This package provides a Python implementation of John Gruber's
8904 Markdown. The library features international input, various Markdown
8905 extensions, and several HTML output formats. A command line wrapper
8906 markdown_py is also provided to convert Markdown files to HTML.")
8907 (properties `((python2-variant . ,(delay python2-markdown))))
8908 (license license:bsd-3)))
8909
8910 ;; Markdown 3.2 dropped support for Python 2.
8911 (define-public python2-markdown
8912 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8913 (package/inherit
8914 base
8915 (version "3.1.1")
8916 (source (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "Markdown" version))
8919 (sha256
8920 (base32
8921 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8922
8923 (define-public python-ptyprocess
8924 (package
8925 (name "python-ptyprocess")
8926 (version "0.5.2")
8927 (source
8928 (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "ptyprocess" version))
8931 (sha256
8932 (base32
8933 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8934 (build-system python-build-system)
8935 (native-inputs
8936 `(("python-nose" ,python-nose)))
8937 (arguments
8938 `(#:phases
8939 (modify-phases %standard-phases
8940 (replace 'check
8941 (lambda _ (invoke "nosetests"))))))
8942 (home-page "https://github.com/pexpect/ptyprocess")
8943 (synopsis "Run a subprocess in a pseudo terminal")
8944 (description
8945 "This package provides a Python library used to launch a subprocess in a
8946 pseudo terminal (pty), and interact with both the process and its pty.")
8947 (license license:isc)))
8948
8949 (define-public python2-ptyprocess
8950 (package-with-python2 python-ptyprocess))
8951
8952 (define-public python-cram
8953 (package
8954 (name "python-cram")
8955 (version "0.7")
8956 (home-page "https://bitheap.org/cram/")
8957 (source (origin
8958 (method url-fetch)
8959 (uri (list (string-append home-page "cram-"
8960 version ".tar.gz")
8961 (pypi-uri "cram" version)))
8962 (sha256
8963 (base32
8964 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8965 (arguments
8966 '(#:phases
8967 (modify-phases %standard-phases
8968 (add-after 'unpack 'patch-source
8969 (lambda _
8970 (substitute* (find-files "cram" ".*\\.py$")
8971 ;; Replace default shell path.
8972 (("/bin/sh") (which "sh")))
8973 (substitute* (find-files "tests" ".*\\.t$")
8974 (("md5") "md5sum")
8975 (("/bin/bash") (which "bash"))
8976 (("/bin/sh") (which "sh")))
8977 (substitute* "cram/_test.py"
8978 ;; This hack works around a bug triggered by substituting
8979 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8980 ;; "cram -h", which breaks the output at 80 characters. This
8981 ;; causes the line showing the default shell to break into two
8982 ;; lines, but the test expects a single line...
8983 (("env\\['COLUMNS'\\] = '80'")
8984 "env['COLUMNS'] = '160'"))
8985
8986 (substitute* "Makefile"
8987 ;; Recent versions of python-coverage have caused the test
8988 ;; coverage to decrease (as of version 0.7). Allow that.
8989 (("--fail-under=100")
8990 "--fail-under=90"))
8991
8992 #t))
8993 (replace 'check
8994 ;; The test phase uses the built library and executable.
8995 (lambda* (#:key inputs outputs #:allow-other-keys)
8996 (add-installed-pythonpath inputs outputs)
8997 (setenv "PATH" (string-append (getenv "PATH") ":"
8998 (assoc-ref outputs "out") "/bin"))
8999 (invoke "make" "test"))))))
9000 (build-system python-build-system)
9001 (native-inputs
9002 `(("python-coverage" ,python-coverage)
9003 ("which" ,which)))
9004 (synopsis "Simple testing framework for command line applications")
9005 (description
9006 "Cram is a functional testing framework for command line applications.
9007 Cram tests look like snippets of interactive shell sessions. Cram runs each
9008 command and compares the command output in the test with the command’s actual
9009 output.")
9010 (license license:gpl2+)))
9011
9012 (define-public python2-cram
9013 (package-with-python2 python-cram))
9014
9015 (define-public python-crashtest
9016 (package
9017 (name "python-crashtest")
9018 (version "0.3.1")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "crashtest" version))
9023 (sha256
9024 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9025 (build-system python-build-system)
9026 (home-page "https://github.com/sdispater/crashtest")
9027 (synopsis "Manage Python errors with ease")
9028 (description
9029 "Python library that makes exceptions handling and inspection easier.")
9030 (license license:expat)))
9031
9032 (define-public python-straight-plugin
9033 (package
9034 (name "python-straight-plugin")
9035 (version "1.4.1")
9036 (source
9037 (origin
9038 (method url-fetch)
9039 (uri (pypi-uri "straight.plugin" version))
9040 (sha256
9041 (base32
9042 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9043 (build-system python-build-system)
9044 (home-page "https://github.com/ironfroggy/straight.plugin")
9045 (synopsis "Simple namespaced plugin facility")
9046 (description "Straight Plugin provides a type of plugin you can create from
9047 almost any existing Python modules, and an easy way for outside developers to
9048 add functionality and customization to your projects with their own plugins.")
9049 (license license:expat)))
9050
9051 (define-public python2-straight-plugin
9052 (package-with-python2 python-straight-plugin))
9053
9054 (define-public python-fonttools
9055 (package
9056 (name "python-fonttools")
9057 (version "4.6.0")
9058 (source (origin
9059 (method url-fetch)
9060 (uri (pypi-uri "fonttools" version ".zip"))
9061 (sha256
9062 (base32
9063 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9064 (build-system python-build-system)
9065 (native-inputs
9066 `(("unzip" ,unzip)
9067 ("python-pytest" ,python-pytest)
9068 ("python-pytest-runner" ,python-pytest-runner)))
9069 (home-page "https://github.com/fonttools/fonttools")
9070 (synopsis "Tools to manipulate font files")
9071 (description
9072 "FontTools/TTX is a library to manipulate font files from Python. It
9073 supports reading and writing of TrueType/OpenType fonts, reading and writing
9074 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9075 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9076 from an XML-based format.")
9077 (license license:expat)))
9078
9079 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9080 (define-public python2-fonttools
9081 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9082 (package/inherit
9083 base
9084 (version "3.44.0")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (pypi-uri "fonttools" version ".zip"))
9088 (sha256
9089 (base32
9090 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9091
9092 (define-public python-ly
9093 (package
9094 (name "python-ly")
9095 (version "0.9.5")
9096 (source
9097 (origin
9098 (method url-fetch)
9099 (uri (pypi-uri name version))
9100 (sha256
9101 (base32
9102 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9103 (build-system python-build-system)
9104 (arguments
9105 ;; FIXME: Some tests need network access.
9106 '(#:tests? #f))
9107 (synopsis "Tool and library for manipulating LilyPond files")
9108 (description "This package provides a Python library to parse, manipulate
9109 or create documents in LilyPond format. A command line program ly is also
9110 provided that can be used to do various manipulations with LilyPond files.")
9111 (home-page "https://pypi.org/project/python-ly/")
9112 (license license:gpl2+)))
9113
9114 (define-public python-appdirs
9115 (package
9116 (name "python-appdirs")
9117 (version "1.4.3")
9118 (source
9119 (origin
9120 (method url-fetch)
9121 (uri (pypi-uri "appdirs" version))
9122 (sha256
9123 (base32
9124 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9125 (build-system python-build-system)
9126 (home-page "https://github.com/ActiveState/appdirs")
9127 (synopsis
9128 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9129 (description
9130 "This module provides a portable way of finding out where user data
9131 should be stored on various operating systems.")
9132 (license license:expat)))
9133
9134 (define-public python2-appdirs
9135 (package-with-python2 python-appdirs))
9136
9137 (define-public python-gorilla
9138 (package
9139 (name "python-gorilla")
9140 (version "0.3.0")
9141 (source (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "gorilla" version))
9144 (sha256
9145 (base32
9146 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9147 (build-system python-build-system)
9148 (home-page "https://github.com/christophercrouzet/gorilla")
9149 (synopsis "Convenient monkey patching with Python")
9150 (description
9151 "Gorilla is a Python library that provides a convenient approach to
9152 monkey patching. Monkey patching is the process of modifying module and
9153 class attributes at runtime with the purpose of replacing or extending
9154 third-party code.")
9155 (license license:expat)))
9156
9157 (define-public python-llfuse
9158 (package
9159 (name "python-llfuse")
9160 (version "1.3.8")
9161 (source (origin
9162 (method url-fetch)
9163 (uri (pypi-uri "llfuse" version))
9164 (sha256
9165 (base32
9166 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9167 (build-system python-build-system)
9168 (inputs
9169 `(("fuse" ,fuse)
9170 ("attr" ,attr)))
9171 (native-inputs
9172 `(("pkg-config" ,pkg-config)))
9173 (synopsis "Python bindings for FUSE")
9174 (description
9175 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9176 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9177 (license license:lgpl2.0+)
9178 (properties `((python2-variant . ,(delay python2-llfuse))))))
9179
9180 (define-public python2-llfuse
9181 (let ((base (package-with-python2
9182 (strip-python2-variant python-llfuse))))
9183 (package/inherit base
9184 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9185
9186 (define-public python-msgpack
9187 (package
9188 (name "python-msgpack")
9189 (version "1.0.0")
9190 (source (origin
9191 (method url-fetch)
9192 (uri (pypi-uri "msgpack" version))
9193 (sha256
9194 (base32
9195 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9196 (build-system python-build-system)
9197 (arguments
9198 `(#:modules ((guix build utils)
9199 (guix build python-build-system)
9200 (ice-9 ftw)
9201 (srfi srfi-1)
9202 (srfi srfi-26))
9203 #:phases
9204 (modify-phases %standard-phases
9205 (replace 'check
9206 (lambda _
9207 (let ((cwd (getcwd)))
9208 (setenv "PYTHONPATH"
9209 (string-append cwd "/build/"
9210 (find (cut string-prefix? "lib" <>)
9211 (scandir (string-append cwd "/build")))
9212 ":"
9213 (getenv "PYTHONPATH")))
9214 (invoke "pytest" "-v" "test")))))))
9215 (native-inputs
9216 `(("python-pytest" ,python-pytest)))
9217 (synopsis "MessagePack (de)serializer")
9218 (description "MessagePack is a fast, compact binary serialization format,
9219 suitable for similar data to JSON. This package provides CPython bindings for
9220 reading and writing MessagePack data.")
9221 (home-page "https://pypi.org/project/msgpack/")
9222 (license license:asl2.0)))
9223
9224 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9225 ;; release 0.5. Some packages like borg still call it by the old name for now.
9226 ;; <https://bugs.gnu.org/30662>
9227 (define-public python-msgpack-transitional
9228 (package
9229 (inherit python-msgpack)
9230 (name "python-msgpack-transitional")
9231 (version "0.5.6")
9232 (source (origin
9233 (method url-fetch)
9234 (uri (pypi-uri "msgpack" version))
9235 (sha256
9236 (base32
9237 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9238 (arguments
9239 (substitute-keyword-arguments (package-arguments python-msgpack)
9240 ((#:phases phases)
9241 `(modify-phases ,phases
9242 (add-after 'unpack 'configure-transitional
9243 (lambda _
9244 ;; Keep using the old name.
9245 (substitute* "setup.py"
9246 (("TRANSITIONAL = False")
9247 "TRANSITIONAL = 1"))
9248 #t))))))))
9249
9250 (define-public python2-msgpack
9251 (package-with-python2 python-msgpack))
9252
9253 (define-public python-netaddr
9254 (package
9255 (name "python-netaddr")
9256 (version "0.7.19")
9257 (source
9258 (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "netaddr" version))
9261 (sha256
9262 (base32
9263 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9264 (build-system python-build-system)
9265 (arguments `(#:tests? #f)) ;; No tests.
9266 (home-page "https://github.com/drkjam/netaddr/")
9267 (synopsis "Pythonic manipulation of network addresses")
9268 (description
9269 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9270 and MAC network addresses.")
9271 (license license:bsd-3)))
9272
9273 (define-public python2-netaddr
9274 (package-with-python2 python-netaddr))
9275
9276 (define-public python2-pyroute2
9277 (package
9278 (name "python2-pyroute2")
9279 (version "0.5.6")
9280 (source
9281 (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "pyroute2" version))
9284 (sha256
9285 (base32
9286 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9287 (build-system python-build-system)
9288 (arguments
9289 `(#:python ,python-2)) ;Python 3.x is not supported
9290 (home-page "https://github.com/svinota/pyroute2")
9291 (synopsis "Python netlink library")
9292 (description
9293 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9294 Supported netlink families and protocols include:
9295 @itemize
9296 @item rtnl, network settings - addresses, routes, traffic controls
9297 @item nfnetlink - netfilter API: ipset, nftables, ...
9298 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9299 @item devlink - manage and monitor devlink-enabled hardware
9300 @item generic - generic netlink families
9301 @itemize
9302 @item nl80211 - wireless functions API (basic support)
9303 @item taskstats - extended process statistics
9304 @item acpi_events - ACPI events monitoring
9305 @item thermal_events - thermal events monitoring
9306 @item VFS_DQUOT - disk quota events monitoring
9307 @end itemize
9308 @end itemize")
9309 (license license:gpl2+)))
9310
9311 (define-public python-wrapt
9312 (package
9313 (name "python-wrapt")
9314 (version "1.11.2")
9315 (source
9316 (origin
9317 (method url-fetch)
9318 (uri (pypi-uri "wrapt" version))
9319 (sha256
9320 (base32
9321 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9322 (build-system python-build-system)
9323 (arguments
9324 ;; Tests are not included in the tarball, they are only available in the
9325 ;; git repository.
9326 `(#:tests? #f))
9327 (home-page "https://github.com/GrahamDumpleton/wrapt")
9328 (synopsis "Module for decorators, wrappers and monkey patching")
9329 (description
9330 "The aim of the wrapt module is to provide a transparent object proxy for
9331 Python, which can be used as the basis for the construction of function
9332 wrappers and decorator functions.")
9333 (license license:bsd-2)))
9334
9335 (define-public python2-wrapt
9336 (package-with-python2 python-wrapt))
9337
9338 (define-public python-commonmark
9339 (package
9340 (name "python-commonmark")
9341 (version "0.9.1")
9342 (source
9343 (origin
9344 (method url-fetch)
9345 (uri (pypi-uri "commonmark" version))
9346 (sha256
9347 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9348 (build-system python-build-system)
9349 (arguments
9350 `(#:phases
9351 (modify-phases %standard-phases
9352 (replace 'check
9353 (lambda* (#:key inputs outputs #:allow-other-keys)
9354 (add-installed-pythonpath inputs outputs)
9355 (invoke "python" "setup.py" "test"))))))
9356 (home-page "https://github.com/readthedocs/commonmark.py")
9357 (synopsis "Python parser for the CommonMark Markdown spec")
9358 (description
9359 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9360 Markdown parser and renderer for the CommonMark specification, using only
9361 native modules.")
9362 (license license:bsd-3)))
9363
9364 (define-public python-xlrd
9365 (package
9366 (name "python-xlrd")
9367 (version "1.2.0")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "xlrd" version))
9371 (sha256
9372 (base32
9373 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9374 (build-system python-build-system)
9375 (arguments
9376 `(#:phases
9377 (modify-phases %standard-phases
9378 ;; Some tests depend on writing a temporary file to the user's home
9379 ;; directory.
9380 (add-after 'unpack 'fix-tests
9381 (lambda _
9382 (delete-file "tests/test_open_workbook.py")
9383 #t)))))
9384 (home-page "http://www.python-excel.org/")
9385 (synopsis "Library for extracting data from Excel files")
9386 (description "This package provides a library to extract data from
9387 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9388 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9389 Unicode-aware. It is not intended as an end-user tool.")
9390 (license license:bsd-3)))
9391
9392 (define-public python2-xlrd
9393 (package-with-python2 python-xlrd))
9394
9395 (define-public python-immutables
9396 (package
9397 (name "python-immutables")
9398 (version "0.14")
9399 (source
9400 (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "immutables" version))
9403 (sha256
9404 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9405 (build-system python-build-system)
9406 (home-page "https://github.com/MagicStack/immutables")
9407 (synopsis "High-performance immutable mapping type for Python")
9408 (description
9409 "An immutable mapping type for Python. The underlying datastructure is a
9410 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9411 functional languages.")
9412 (license license:asl2.0)))
9413
9414 (define-public python-prettytable
9415 (package
9416 (name "python-prettytable")
9417 (version "0.7.2")
9418 (source
9419 (origin
9420 (method url-fetch)
9421 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9422 (sha256
9423 (base32
9424 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9425 (build-system python-build-system)
9426 (home-page "https://code.google.com/archive/p/prettytable/")
9427 (synopsis "Display tabular data in an ASCII table format")
9428 (description
9429 "A library designed to represent tabular data in visually appealing ASCII
9430 tables. PrettyTable allows for selection of which columns are to be printed,
9431 independent alignment of columns (left or right justified or centred) and
9432 printing of sub-tables by specifying a row range.")
9433 (license license:bsd-3)))
9434
9435 (define-public python2-prettytable
9436 (package-with-python2 python-prettytable))
9437
9438 (define-public python-curio
9439 (package
9440 (name "python-curio")
9441 (version "1.2")
9442 (source
9443 (origin
9444 (method url-fetch)
9445 (uri (pypi-uri "curio" version))
9446 (sha256
9447 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9448 (build-system python-build-system)
9449 (arguments
9450 `(#:phases
9451 (modify-phases %standard-phases
9452 (replace 'check
9453 (lambda* (#:key inputs outputs #:allow-other-keys)
9454 (add-installed-pythonpath inputs outputs)
9455 (invoke "pytest" "-vv" "-k"
9456 ;; Tries to open an outgoing connection.
9457 "not test_ssl_outgoing"))))))
9458 (native-inputs
9459 `(("python-pytest" ,python-pytest)))
9460 (home-page "https://github.com/dabeaz/curio")
9461 (synopsis "Coroutine-based library for concurrent Python")
9462 (description
9463 "Curio is a coroutine-based library for concurrent Python systems
9464 programming. It provides standard programming abstractions such as as
9465 tasks, sockets, files, locks, and queues.")
9466 (license license:bsd-3)))
9467
9468 (define-public python-tables
9469 (package
9470 (name "python-tables")
9471 (version "3.6.1")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "tables" version))
9476 (sha256
9477 (base32
9478 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9479 (modules '((guix build utils)))
9480 (snippet
9481 '(begin
9482 ;; Remove pre-compiled .pyc files from source.
9483 (for-each delete-file-recursively
9484 (find-files "." "__pycache__" #:directories? #t))
9485 (for-each delete-file (find-files "." "\\.pyc$"))
9486 #t))))
9487 (build-system python-build-system)
9488 (arguments
9489 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9490 ;; or "check", so we must override the build and check phases.
9491 #:phases
9492 (modify-phases %standard-phases
9493 (add-after 'unpack 'use-gcc
9494 (lambda _
9495 (substitute* "setup.py"
9496 (("^( +)compiler = new_compiler\\(\\)" line indent)
9497 (string-append line
9498 "\n"
9499 indent
9500 "compiler.set_executables(compiler='gcc',"
9501 "compiler_so='gcc',"
9502 "linker_exe='gcc',"
9503 "linker_so='gcc -shared')")))
9504 #t))
9505 (add-after 'unpack 'disable-tuning
9506 (lambda _
9507 (substitute* "setup.py"
9508 (("cpu_flags = .*")
9509 "cpu_flags = ['sse2']\n"))
9510 #t))
9511 (replace 'build
9512 (lambda* (#:key inputs #:allow-other-keys)
9513 (invoke "python" "setup.py" "build"
9514 (string-append "--hdf5="
9515 (assoc-ref inputs "hdf5")))))
9516 (replace 'check
9517 (lambda* (#:key inputs #:allow-other-keys)
9518 (invoke "python" "setup.py" "check"
9519 (string-append "--hdf5="
9520 (assoc-ref inputs "hdf5"))))))))
9521 (propagated-inputs
9522 `(("python-numexpr" ,python-numexpr)
9523 ("python-numpy" ,python-numpy)))
9524 (native-inputs
9525 `(("python-cython" ,python-cython)
9526 ("pkg-config" ,pkg-config)))
9527 (inputs
9528 `(("hdf5" ,hdf5-1.10)
9529 ("bzip2" ,bzip2)
9530 ("zlib" ,zlib)))
9531 (home-page "https://www.pytables.org/")
9532 (synopsis "Hierarchical datasets for Python")
9533 (description "PyTables is a package for managing hierarchical datasets and
9534 designed to efficiently cope with extremely large amounts of data.")
9535 (license license:bsd-3)))
9536
9537 (define-public python2-tables
9538 (package-with-python2 python-tables))
9539
9540 (define-public python-sniffio
9541 (package
9542 (name "python-sniffio")
9543 (version "1.1.0")
9544 (source
9545 (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "sniffio" version))
9548 (sha256
9549 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9550 (build-system python-build-system)
9551 (arguments
9552 `(#:phases
9553 (modify-phases %standard-phases
9554 (replace 'check
9555 (lambda _
9556 (invoke "pytest" "-vv"))))))
9557 (native-inputs
9558 `(("python-curio" ,python-curio)
9559 ("python-pytest" ,python-pytest)
9560 ("python-pytest-cov" ,python-pytest-cov)))
9561 (home-page "https://github.com/python-trio/sniffio")
9562 (synopsis "Detect which async library a program is running under")
9563 (description "This package detects which async library a program is
9564 running under. It supports multiple async I/O packages, like Trio, and
9565 asyncio.")
9566 ;; Either license applies.
9567 (license (list license:expat license:asl2.0))))
9568
9569 (define-public python-pytest-black
9570 (package
9571 (name "python-pytest-black")
9572 (version "0.3.8")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "pytest-black" version))
9577 (sha256
9578 (base32
9579 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9580 (build-system python-build-system)
9581 (propagated-inputs
9582 `(("python-pytest" ,python-pytest)
9583 ("python-black" ,python-black)
9584 ("python-toml" ,python-toml)))
9585 (native-inputs
9586 `(("python-setuptools-scm" ,python-setuptools-scm)))
9587 (home-page "https://github.com/shopkeep/pytest-black")
9588 (synopsis "Pytest plugin to enable format checking with black")
9589 (description
9590 "This package provides a pytest plugin to enable format checking with the
9591 Python code formatter \"black\".")
9592 (license license:expat)))
9593
9594 (define-public python-get-version
9595 (package
9596 (name "python-get-version")
9597 (version "2.1")
9598 (source
9599 (origin
9600 (method url-fetch)
9601 (uri (pypi-uri "get_version" version))
9602 (sha256
9603 (base32
9604 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9605 (build-system python-build-system)
9606 (propagated-inputs
9607 `(("python-pygments" ,python-pygments)
9608 ("python-pytest" ,python-pytest)
9609 ("python-pytest-black" ,python-pytest-black)
9610 ("python-pytest-cov" ,python-pytest-cov)
9611 ("python-setuptools" ,python-setuptools)
9612 ("python-testpath" ,python-testpath)))
9613 (home-page "https://github.com/flying-sheep/get_version")
9614 (synopsis "Version helper in the spirit of versioneer")
9615 (description
9616 "This package provides a version helper that lets you automatically use
9617 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9618 also supports getting the version from Python source distributions or, once
9619 your package is installed, via @code{pkg_resources} (part of
9620 @code{setuptools}).")
9621 (license license:gpl3+)))
9622
9623 (define-public python-legacy-api-wrap
9624 (package
9625 (name "python-legacy-api-wrap")
9626 (version "1.2")
9627 (source
9628 (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "legacy-api-wrap" version))
9631 (sha256
9632 (base32
9633 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9634 (build-system python-build-system)
9635 (propagated-inputs
9636 `(("python-get-version" ,python-get-version)
9637 ("python-pytest" ,python-pytest)
9638 ("python-pytest-black" ,python-pytest-black)
9639 ("python-pytest-cov" ,python-pytest-cov)
9640 ("python-setuptools" ,python-setuptools)))
9641 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9642 (synopsis "Legacy API wrapper")
9643 (description "This module defines a decorator to wrap legacy APIs. The
9644 primary use case is APIs defined before keyword-only parameters existed.")
9645 (license license:gpl3+)))
9646
9647 (define-public python-pyasn1
9648 (package
9649 (name "python-pyasn1")
9650 (version "0.4.8")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "pyasn1" version))
9655 (sha256
9656 (base32
9657 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9658 (build-system python-build-system)
9659 (home-page "http://pyasn1.sourceforge.net/")
9660 (synopsis "ASN.1 types and codecs")
9661 (description
9662 "This is an implementation of ASN.1 types and codecs in Python. It is
9663 suitable for a wide range of protocols based on the ASN.1 specification.")
9664 (license license:bsd-2)))
9665
9666 (define-public python2-pyasn1
9667 (package-with-python2 python-pyasn1))
9668
9669 (define-public python-pyasn1-modules
9670 (package
9671 (name "python-pyasn1-modules")
9672 (version "0.2.2")
9673 (source
9674 (origin
9675 (method url-fetch)
9676 (uri (pypi-uri "pyasn1-modules" version))
9677 (sha256
9678 (base32
9679 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9680 (build-system python-build-system)
9681 (propagated-inputs
9682 `(("python-pyasn1" ,python-pyasn1)))
9683 (home-page "https://sourceforge.net/projects/pyasn1/")
9684 (synopsis "ASN.1 codec implementations")
9685 (description
9686 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9687 implementations of ASN.1-based codecs and protocols.")
9688 (license license:bsd-3)))
9689
9690 (define-public python2-pyasn1-modules
9691 (package-with-python2 python-pyasn1-modules))
9692
9693 (define-public python-ipaddress
9694 (package
9695 (name "python-ipaddress")
9696 (version "1.0.22")
9697 (source (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "ipaddress" version))
9700 (sha256
9701 (base32
9702 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9703 (build-system python-build-system)
9704 (home-page "https://github.com/phihag/ipaddress")
9705 (synopsis "IP address manipulation library")
9706 (description
9707 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9708 in Python. This library is used to create, poke at, and manipulate IPv4 and
9709 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9710 module to older versions of Python.")
9711 (license license:psfl)))
9712
9713 (define-public python2-ipaddress
9714 (package-with-python2 python-ipaddress))
9715
9716 (define-public python2-ipaddr
9717 (package
9718 (name "python2-ipaddr")
9719 (version "2.1.11")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (pypi-uri "ipaddr" version))
9724 (sha256
9725 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9726 (build-system python-build-system)
9727 (arguments
9728 `(#:python ,python-2 ;version 2 only
9729 #:phases
9730 (modify-phases %standard-phases
9731 (replace 'check
9732 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9733 (home-page "https://github.com/google/ipaddr-py")
9734 (synopsis "IP address manipulation library")
9735 (description
9736 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9737 IPv6 addresses and networks.
9738
9739 For new implementations you may prefer to use the standard module
9740 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9741 versions of Python.")
9742 (license license:asl2.0)))
9743
9744 (define-public python-idna
9745 (package
9746 (name "python-idna")
9747 (version "2.10")
9748 (source
9749 (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "idna" version))
9752 (sha256
9753 (base32
9754 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9755 (build-system python-build-system)
9756 (home-page "https://github.com/kjd/idna")
9757 (synopsis "Internationalized domain names in applications")
9758 (description
9759 "This is a library to support the Internationalised Domain Names in
9760 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9761 protocol is often referred to as “IDNA2008” and can produce different results
9762 from the earlier standard from 2003. The library is also intended to act as a
9763 suitable drop-in replacement for the “encodings.idna” module that comes with
9764 the Python standard library but currently only supports the older 2003
9765 specification.")
9766 (license license:bsd-4)))
9767
9768 (define-public python-idna-2.7
9769 (package (inherit python-idna)
9770 (version "2.7")
9771 (source (origin
9772 (method url-fetch)
9773 (uri (pypi-uri "idna" version))
9774 (sha256
9775 (base32
9776 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9777
9778
9779 (define-public python2-idna
9780 (package-with-python2 python-idna))
9781
9782 (define-public python-libsass
9783 (package
9784 (name "python-libsass")
9785 (version "0.20.1")
9786 (source
9787 (origin
9788 ;; PyPI tarball is missing some test files.
9789 (method git-fetch)
9790 (uri (git-reference
9791 (url "https://github.com/sass/libsass-python")
9792 (commit version)))
9793 (file-name (git-file-name name version))
9794 (sha256
9795 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9796 (build-system python-build-system)
9797 (arguments
9798 `(#:phases
9799 (modify-phases %standard-phases
9800 ;; Use Guix package of libsass instead of compiling from a checkout.
9801 (add-before 'build 'set-libsass
9802 (lambda _
9803 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9804 #t))
9805 (replace 'check
9806 (lambda* (#:key inputs outputs #:allow-other-keys)
9807 (add-installed-pythonpath inputs outputs)
9808 (invoke "pytest" "sasstests.py"))))))
9809 (native-inputs
9810 `(("python-pytest" ,python-pytest)
9811 ("python-werkzeug" ,python-werkzeug)))
9812 (inputs
9813 `(("libsass" ,libsass)))
9814 (propagated-inputs
9815 `(("python-six" ,python-six)))
9816 (home-page "https://sass.github.io/libsass-python/")
9817 (synopsis "Straightforward binding of libsass for Python")
9818 (description
9819 "This package provides a simple Python extension module @code{sass} which
9820 is binding LibSass.")
9821 (license license:expat)))
9822
9823 (define-public python-idna-ssl
9824 (package
9825 (name "python-idna-ssl")
9826 (version "1.0.1")
9827 (source
9828 (origin
9829 (method url-fetch)
9830 (uri (pypi-uri "idna-ssl" version))
9831 (sha256
9832 (base32
9833 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9834 (build-system python-build-system)
9835 (arguments
9836 `(#:tests? #f)) ;circular dependency with python-aiohttp
9837 (home-page "https://github.com/aio-libs/idna-ssl")
9838 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9839 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9840 domains support.")
9841 (license license:expat)))
9842
9843 (define-public python-pretend
9844 (package
9845 (name "python-pretend")
9846 (version "1.0.9")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "pretend" version))
9851 (sha256
9852 (base32
9853 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9854 (build-system python-build-system)
9855 (home-page "https://github.com/alex/pretend")
9856 (synopsis "Library for stubbing in Python")
9857 (description
9858 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9859 technique for writing tests. You may hear the term mixed up with mocks,
9860 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9861 responses, rather than doing any computation.")
9862 (license license:bsd-3)))
9863
9864 (define-public python2-pretend
9865 (package-with-python2 python-pretend))
9866
9867 (define-public python-pip
9868 (package
9869 (name "python-pip")
9870 (version "20.2.4")
9871 (source
9872 (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "pip" version))
9875 (sha256
9876 (base32
9877 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
9878 (build-system python-build-system)
9879 (arguments
9880 '(#:tests? #f)) ; there are no tests in the pypi archive.
9881 (home-page "https://pip.pypa.io/")
9882 (synopsis "Package manager for Python software")
9883 (description
9884 "Pip is a package manager for Python software, that finds packages on the
9885 Python Package Index (PyPI).")
9886 (license license:expat)))
9887
9888 (define-public python2-pip
9889 (package-with-python2 python-pip))
9890
9891 (define-public python-tlsh
9892 (package
9893 (name "python-tlsh")
9894 (version "3.4.5")
9895 (home-page "https://github.com/trendmicro/tlsh")
9896 (source
9897 (origin
9898 (method git-fetch)
9899 (uri (git-reference
9900 (url "https://github.com/trendmicro/tlsh")
9901 (commit (string-append "v" version))))
9902 (file-name (git-file-name name version))
9903 (sha256
9904 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9905 (build-system cmake-build-system)
9906 (arguments
9907 '(#:out-of-source? #f
9908 #:phases (modify-phases %standard-phases
9909 (replace
9910 'install
9911 (lambda* (#:key outputs #:allow-other-keys)
9912 ;; Build and install the Python bindings. The underlying
9913 ;; C++ library is apparently not meant to be installed.
9914 (let ((out (assoc-ref outputs "out")))
9915 (with-directory-excursion "py_ext"
9916 (and (system* "python" "setup.py" "build")
9917 (system* "python" "setup.py" "install"
9918 (string-append "--prefix=" out))))))))))
9919 (inputs `(("python" ,python-wrapper))) ;for the bindings
9920 (synopsis "Fuzzy matching library for Python")
9921 (description
9922 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9923 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9924 value which can be used for similarity comparisons. Similar objects have
9925 similar hash values, which allows for the detection of similar objects by
9926 comparing their hash values. The byte stream should have a sufficient amount
9927 of complexity; for example, a byte stream of identical bytes will not generate
9928 a hash value.")
9929 (license license:asl2.0)))
9930
9931 (define-public python2-tlsh
9932 (package/inherit python-tlsh
9933 (name "python2-tlsh")
9934 (inputs `(("python" ,python-2)))))
9935
9936 (define-public python-termcolor
9937 (package
9938 (name "python-termcolor")
9939 (version "1.1.0")
9940 (source
9941 (origin
9942 (method url-fetch)
9943 (uri (pypi-uri "termcolor" version))
9944 (sha256
9945 (base32
9946 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9947 (build-system python-build-system)
9948 (arguments
9949 ;; There are no tests.
9950 `(#:tests? #f))
9951 (home-page "https://pypi.org/project/termcolor/")
9952 (synopsis "ANSII Color formatting for terminal output")
9953 (description
9954 "This package provides ANSII Color formatting for output in terminals.")
9955 (license license:expat)))
9956
9957 (define-public python2-termcolor
9958 (package-with-python2 python-termcolor))
9959
9960 (define-public python-terminaltables
9961 (package
9962 (name "python-terminaltables")
9963 (version "3.1.0")
9964 (source
9965 (origin
9966 (method url-fetch)
9967 (uri (pypi-uri "terminaltables" version))
9968 (sha256
9969 (base32
9970 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9971 (build-system python-build-system)
9972 (home-page "https://github.com/Robpol86/terminaltables")
9973 (synopsis
9974 "Generate simple tables in terminals from a nested list of strings")
9975 (description
9976 "This package makes it easy to draw tables in terminal/console
9977 applications from a list of lists of strings. It supports multi-line rows.")
9978 (license license:expat)))
9979
9980 (define-public python-libarchive-c
9981 (package
9982 (name "python-libarchive-c")
9983 (version "2.9")
9984 (source (origin
9985 (method url-fetch)
9986 (uri (pypi-uri "libarchive-c" version))
9987 (sha256
9988 (base32
9989 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9990 (build-system python-build-system)
9991 (arguments
9992 '(#:phases (modify-phases %standard-phases
9993 (add-before
9994 'build 'reference-libarchive
9995 (lambda* (#:key inputs #:allow-other-keys)
9996 ;; Retain the absolute file name of libarchive.so.
9997 (let ((libarchive (assoc-ref inputs "libarchive")))
9998 (substitute* "libarchive/ffi.py"
9999 (("find_library\\('archive'\\)")
10000 (string-append "'" libarchive
10001 "/lib/libarchive.so'"))))))
10002 (replace 'check
10003 (lambda _ (invoke "pytest" "-vv"))))))
10004 (native-inputs
10005 `(("python-mock" ,python-mock)
10006 ("python-pytest" ,python-pytest)))
10007 (inputs
10008 `(("libarchive" ,libarchive)))
10009 (home-page "https://github.com/Changaco/python-libarchive-c")
10010 (synopsis "Python interface to libarchive")
10011 (description
10012 "This package provides Python bindings to libarchive, a C library to
10013 access possibly compressed archives in many different formats. It uses
10014 Python's @code{ctypes} foreign function interface (FFI).")
10015 (license license:lgpl2.0+)))
10016
10017 (define-public python2-libarchive-c
10018 (package-with-python2 python-libarchive-c))
10019
10020 (define-public python-file
10021 (package/inherit file
10022 (name "python-file")
10023 (build-system python-build-system)
10024 (arguments
10025 '(#:tests? #f ;no tests
10026 #:configure-flags '("--single-version-externally-managed" "--root=/")
10027 #:phases (modify-phases %standard-phases
10028 (add-before 'build 'change-directory
10029 (lambda _
10030 (chdir "python")
10031 #t))
10032 (add-before 'build 'set-library-file-name
10033 (lambda* (#:key inputs #:allow-other-keys)
10034 (let ((file (assoc-ref inputs "file")))
10035 (substitute* "magic.py"
10036 (("find_library\\('magic'\\)")
10037 (string-append "'" file "/lib/libmagic.so'")))
10038 #t))))))
10039 (inputs `(("file" ,file)))
10040 (native-inputs (if (%current-target-system)
10041 `(("self" ,this-package))
10042 '()))
10043 (synopsis "Python bindings to the libmagic file type guesser")
10044 (description "This package provides Python bindings to the libmagic file
10045 type guesser.
10046
10047 Note that this module and the @code{python-magic} module both provide a
10048 @file{magic.py} file; these two modules, which are different and were
10049 developed separately, both serve the same purpose: provide Python bindings for
10050 libmagic.")))
10051
10052 (define-public python2-file
10053 (package-with-python2 python-file))
10054
10055 (define-public python-debian
10056 (package
10057 (name "python-debian")
10058 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10059 (version "0.1.36")
10060 (source
10061 (origin
10062 ;; Use git-fetch, as pypi doesn't include test suite.
10063 (method git-fetch)
10064 (uri (git-reference
10065 (url home-page)
10066 (commit version)))
10067 (file-name (git-file-name name version))
10068 (sha256
10069 (base32
10070 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10071 (build-system python-build-system)
10072 (arguments
10073 `(#:phases (modify-phases %standard-phases
10074 (add-after 'unpack 'remove-debian-specific-tests
10075 ;; python-apt, apt and dpkg are not yet available in guix,
10076 ;; and these tests heavily depend on them.
10077 (lambda _
10078 (delete-file "lib/debian/tests/test_deb822.py")
10079 (delete-file "lib/debian/tests/test_debfile.py")
10080 #t)))))
10081 (propagated-inputs
10082 `(("python-six" ,python-six)
10083 ("python-chardet" ,python-chardet)))
10084 (synopsis "Debian package related modules")
10085 (description
10086 ;; XXX: Use @enumerate instead of @itemize to work around
10087 ;; <http://bugs.gnu.org/21772>.
10088 "This package provides Python modules that abstract many formats of
10089 Debian-related files, such as:
10090
10091 @enumerate
10092 @item Debtags information;
10093 @item @file{debian/changelog} files;
10094 @item packages files, pdiffs;
10095 @item control files of single or multiple RFC822-style paragraphs---e.g.
10096 @file{debian/control}, @file{.changes}, @file{.dsc};
10097 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10098 contained files and meta-information.
10099 @end enumerate\n")
10100
10101 ;; Modules are either GPLv2+ or GPLv3+.
10102 (license license:gpl3+)))
10103
10104 (define-public python-nbformat
10105 (package
10106 (name "python-nbformat")
10107 (version "4.4.0")
10108 (source
10109 (origin
10110 (method url-fetch)
10111 (uri (pypi-uri "nbformat" version))
10112 (sha256
10113 (base32
10114 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
10115 (build-system python-build-system)
10116 (arguments `(#:tests? #f)) ; no test target
10117 (propagated-inputs
10118 `(("python-ipython-genutils" ,python-ipython-genutils)
10119 ("python-jsonschema" ,python-jsonschema)
10120 ("python-jupyter-core" ,python-jupyter-core)
10121 ("python-traitlets" ,python-traitlets)))
10122 (home-page "https://jupyter.org")
10123 (synopsis "Jupyter Notebook format")
10124 (description "This package provides the reference implementation of the
10125 Jupyter Notebook format and Python APIs for working with notebooks.")
10126 (license license:bsd-3)))
10127
10128 (define-public python2-nbformat
10129 (package-with-python2 python-nbformat))
10130
10131 (define-public python-bleach
10132 (package
10133 (name "python-bleach")
10134 (version "3.1.5")
10135 (source
10136 (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "bleach" version))
10139 (sha256
10140 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10141 (build-system python-build-system)
10142 (propagated-inputs
10143 `(("python-webencodings" ,python-webencodings)
10144 ("python-six" ,python-six)))
10145 (native-inputs
10146 `(("python-datrie" ,python-datrie)
10147 ("python-genshi" ,python-genshi)
10148 ("python-lxml" ,python-lxml)
10149 ("python-pytest" ,python-pytest)))
10150 (home-page "https://github.com/mozilla/bleach")
10151 (synopsis "Whitelist-based HTML-sanitizing tool")
10152 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10153 (license license:asl2.0)))
10154
10155 (define-public python2-bleach
10156 (package-with-python2 python-bleach))
10157
10158 (define-public python-entrypoints
10159 (package
10160 (name "python-entrypoints")
10161 (version "0.3")
10162 (source
10163 (origin
10164 (method url-fetch)
10165 (uri (pypi-uri "entrypoints" version))
10166 (sha256
10167 (base32
10168 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10169 (build-system python-build-system)
10170 ;; The package does not come with a setup.py file, so we have to generate
10171 ;; one ourselves.
10172 (arguments
10173 `(#:tests? #f
10174 #:phases
10175 (modify-phases %standard-phases
10176 (add-after 'unpack 'create-setup.py
10177 (lambda _
10178 (call-with-output-file "setup.py"
10179 (lambda (port)
10180 (format port "\
10181 from setuptools import setup
10182 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10183 " ,version))))))))
10184 (home-page "https://github.com/takluyver/entrypoints")
10185 (synopsis "Discover and load entry points from installed Python packages")
10186 (description "Entry points are a way for Python packages to advertise
10187 objects with some common interface. The most common examples are
10188 @code{console_scripts} entry points, which define shell commands by
10189 identifying a Python function to run. The @code{entrypoints} module contains
10190 functions to find and load entry points.")
10191 (license license:expat)))
10192
10193 (define-public python2-entrypoints
10194 (package-with-python2 python-entrypoints))
10195
10196 (define-public python-epc
10197 (package
10198 (name "python-epc")
10199 (version "0.0.5")
10200 (source
10201 (origin
10202 (method url-fetch)
10203 (uri (pypi-uri "epc" version))
10204 (sha256
10205 (base32
10206 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10207 (build-system python-build-system)
10208 (propagated-inputs
10209 `(("python-sexpdata" ,python-sexpdata)))
10210 (native-inputs
10211 `(("python-nose" ,python-nose)))
10212 (home-page "https://github.com/tkf/python-epc")
10213 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10214 (description
10215 "Python-EPC can call elisp functions from Python and Python functions
10216 from elisp.")
10217 (license license:gpl3)))
10218
10219 (define-public python-forex-python
10220 (package
10221 (name "python-forex-python")
10222 (version "1.5")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "forex-python" version))
10227 (sha256
10228 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10229 (build-system python-build-system)
10230 (arguments
10231 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10232 ;; repository require online data.
10233 `(#:tests? #f))
10234 (propagated-inputs
10235 `(("python-requests" ,python-requests)
10236 ("python-simplejson" ,python-simplejson)))
10237 (home-page "https://github.com/MicroPyramid/forex-python")
10238 (synopsis "Foreign exchange rates and currency conversion")
10239 (description
10240 "@code{python-forex-python} can be used to manipulate foreign
10241 exchange rates and to operate currency conversions.
10242
10243 Features:
10244 @itemize
10245 @item List all currency rates.
10246 @item BitCoin price for all currencies.
10247 @item Converting amount to BitCoins.
10248 @item Get historical rates for any day since 1999.
10249 @item Conversion rate for one currency(ex; USD to INR).
10250 @item Convert amount from one currency to other.('USD 10$' to INR).
10251 @item Currency symbols.
10252 @item Currency names.
10253 @end itemize")
10254 (license license:expat)))
10255
10256 (define-public python-simpleeval
10257 (package
10258 (name "python-simpleeval")
10259 (version "0.9.10")
10260 (source
10261 (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "simpleeval" version))
10264 (sha256
10265 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10266 (build-system python-build-system)
10267 (home-page "https://github.com/danthedeckie/simpleeval")
10268 (synopsis "Simple, safe single expression evaluator library")
10269 (description
10270 "This package provides a quick single file library for easily adding
10271 evaluatable expressions into python projects. Say you want to allow a user
10272 to set an alarm volume, which could depend on the time of day, alarm level,
10273 how many previous alarms had gone off, and if there is music playing at the
10274 time.")
10275 (license license:expat)))
10276
10277 (define-public python-nbconvert
10278 (package
10279 (name "python-nbconvert")
10280 (version "5.0.0b1")
10281 (source
10282 (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "nbconvert" version))
10285 (sha256
10286 (base32
10287 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10288 (build-system python-build-system)
10289 (arguments
10290 `(;; The "bdist_egg" target is disabled by default, causing the installation
10291 ;; to fail.
10292 #:configure-flags (list "bdist_egg")
10293 ;; FIXME: 5 failures, 40 errors.
10294 #:tests? #f))
10295 ;; #:phases
10296 ;; (modify-phases %standard-phases
10297 ;; (replace 'check
10298 ;; (lambda _
10299 ;; (zero? (system* "py.test" "-v")))))
10300 (native-inputs
10301 `(("python-pytest" ,python-pytest)))
10302 (propagated-inputs
10303 `(("python-bleach" ,python-bleach)
10304 ("python-entrypoints" ,python-entrypoints)
10305 ("python-jinja2" ,python-jinja2)
10306 ("python-jupyter-core" ,python-jupyter-core)
10307 ("python-mistune" ,python-mistune)
10308 ("python-nbformat" ,python-nbformat)
10309 ("python-pygments" ,python-pygments)
10310 ("python-traitlets" ,python-traitlets)))
10311 (home-page "https://jupyter.org")
10312 (synopsis "Converting Jupyter Notebooks")
10313 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10314 notebooks to various other formats via Jinja templates. It allows you to
10315 convert an @code{.ipynb} notebook file into various static formats including:
10316
10317 @enumerate
10318 @item HTML
10319 @item LaTeX
10320 @item PDF
10321 @item Reveal JS
10322 @item Markdown (md)
10323 @item ReStructured Text (rst)
10324 @item executable script
10325 @end enumerate\n")
10326 (license license:bsd-3)))
10327
10328 (define-public python2-nbconvert
10329 (package-with-python2 python-nbconvert))
10330
10331 (define-public python-notebook
10332 (package
10333 (name "python-notebook")
10334 (version "5.7.4")
10335 (source (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "notebook" version))
10338 (sha256
10339 (base32
10340 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10341 (build-system python-build-system)
10342 (arguments
10343 `(#:phases
10344 (modify-phases %standard-phases
10345 (replace 'check
10346 (lambda _
10347 ;; These tests require a browser
10348 (delete-file-recursively "notebook/tests/selenium")
10349 ;; Some tests need HOME
10350 (setenv "HOME" "/tmp")
10351 ;; This file contains "warningfilters", which are not supported
10352 ;; by this version of nose.
10353 (delete-file "setup.cfg")
10354 (with-directory-excursion "/tmp"
10355 (invoke "nosetests" "-v"))
10356 #t)))))
10357 (propagated-inputs
10358 `(("python-jupyter-core" ,python-jupyter-core)
10359 ("python-nbformat" ,python-nbformat)
10360 ("python-nbconvert" ,python-nbconvert)
10361 ("python-prometheus-client" ,python-prometheus-client)
10362 ("python-send2trash" ,python-send2trash)
10363 ("python-terminado" ,python-terminado)))
10364 (native-inputs
10365 `(("python-nose" ,python-nose)
10366 ("python-sphinx" ,python-sphinx)
10367 ("python-requests" ,python-requests)))
10368 (home-page "https://jupyter.org/")
10369 (synopsis "Web-based notebook environment for interactive computing")
10370 (description
10371 "The Jupyter HTML notebook is a web-based notebook environment for
10372 interactive computing.")
10373 (properties `((python2-variant . ,(delay python2-notebook))))
10374 (license license:bsd-3)))
10375
10376 (define-public python2-notebook
10377 (let ((base (package-with-python2
10378 (strip-python2-variant python-notebook))))
10379 (package/inherit base
10380 (native-inputs
10381 `(("python2-mock" ,python2-mock)
10382 ,@(package-native-inputs base)))
10383 (arguments
10384 (substitute-keyword-arguments (package-arguments base)
10385 ((#:phases phases)
10386 `(modify-phases ,phases
10387 (add-before 'check 'disable-test-case
10388 ;; The test requires network access to localhost. Curiously it
10389 ;; fails with Python 2 only. Simply make the test-case return
10390 ;; immediately.
10391 (lambda _
10392 (substitute*
10393 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10394 (("formats = self.nbconvert_api") "return #")))))))))))
10395
10396 (define-public python-widgetsnbextension
10397 (package
10398 (name "python-widgetsnbextension")
10399 (version "3.5.1")
10400 (source
10401 (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "widgetsnbextension" version))
10404 (sha256
10405 (base32
10406 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10407 (build-system python-build-system)
10408 (propagated-inputs
10409 `(("python-ipykernel" ,python-ipykernel)
10410 ("python-notebook" ,python-notebook)))
10411 (native-inputs
10412 `(("python-certifi" ,python-certifi)
10413 ("python-nose" ,python-nose)))
10414 (home-page "https://ipython.org")
10415 (synopsis "IPython HTML widgets for Jupyter")
10416 (description "This package provides interactive HTML widgets for Jupyter
10417 notebooks.")
10418 (license license:bsd-3)))
10419
10420 (define-public python2-widgetsnbextension
10421 (package-with-python2 python-widgetsnbextension))
10422
10423 (define-public python-ipywidgets
10424 (package
10425 (name "python-ipywidgets")
10426 (version "7.5.1")
10427 (source
10428 (origin
10429 (method url-fetch)
10430 (uri (pypi-uri "ipywidgets" version))
10431 (sha256
10432 (base32
10433 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10434 (build-system python-build-system)
10435 (propagated-inputs
10436 `(("python-ipython" ,python-ipython)
10437 ("python-traitlets" ,python-traitlets)
10438 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10439 (native-inputs
10440 `(("python-nose" ,python-nose)
10441 ("python-pytest" ,python-pytest)))
10442 (home-page "https://ipython.org")
10443 (synopsis "IPython HTML widgets for Jupyter")
10444 (description "Ipywidgets are interactive HTML widgets for Jupyter
10445 notebooks and the IPython kernel. Notebooks come alive when interactive
10446 widgets are used. Users gain control of their data and can visualize changes
10447 in the data.")
10448 (license license:bsd-3)))
10449
10450 (define-public python2-ipywidgets
10451 (package-with-python2 python-ipywidgets))
10452
10453 (define-public python-jupyter-console
10454 (package
10455 (name "python-jupyter-console")
10456 (version "6.1.0")
10457 (source
10458 (origin
10459 (method url-fetch)
10460 (uri (pypi-uri "jupyter_console" version))
10461 (sha256
10462 (base32
10463 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10464 (build-system python-build-system)
10465 (propagated-inputs
10466 `(("python-ipykernel" ,python-ipykernel)
10467 ("python-jupyter-client" ,python-jupyter-client)
10468 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10469 ("python-pygments" ,python-pygments)))
10470 (native-inputs
10471 `(("python-nose" ,python-nose)))
10472 (home-page "https://jupyter.org")
10473 (synopsis "Jupyter terminal console")
10474 (description "This package provides a terminal-based console frontend for
10475 Jupyter kernels. It also allows for console-based interaction with non-Python
10476 Jupyter kernels such as IJulia and IRKernel.")
10477 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10478 (license license:bsd-3)))
10479
10480 (define-public python2-jupyter-console
10481 (package
10482 (name "python2-jupyter-console")
10483 (version "5.2.0")
10484 (source
10485 (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "jupyter_console" version))
10488 (sha256
10489 (base32
10490 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10491 (build-system python-build-system)
10492 (arguments
10493 `(#:python ,python-2
10494 #:tests? #f)) ; Tests only run in a TTY.
10495 (propagated-inputs
10496 `(("python2-ipykernel" ,python2-ipykernel)
10497 ("python2-jupyter-client" ,python2-jupyter-client)
10498 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10499 ("python2-pygments" ,python2-pygments)))
10500 (native-inputs
10501 `(("python2-nose" ,python2-nose)))
10502 (home-page "https://jupyter.org")
10503 (synopsis "Jupyter terminal console")
10504 (description "This package provides a terminal-based console frontend for
10505 Jupyter kernels. It also allows for console-based interaction with non-Python
10506 Jupyter kernels such as IJulia and IRKernel.")
10507 (license license:bsd-3)))
10508
10509 ;; The python-ipython and python-jupyter-console require each other. To get
10510 ;; the functionality in both packages working, strip down the
10511 ;; python-jupyter-console package when using it as an input to python-ipython.
10512 (define python-jupyter-console-minimal
10513 (package/inherit python-jupyter-console
10514 (name "python-jupyter-console-minimal")
10515 (arguments
10516 (substitute-keyword-arguments
10517 (package-arguments python-jupyter-console)
10518 ((#:phases phases)
10519 `(modify-phases ,phases
10520 (add-after 'install 'delete-bin
10521 (lambda* (#:key outputs #:allow-other-keys)
10522 ;; Delete the bin files, to avoid conflicts in profiles
10523 ;; where python-ipython and python-jupyter-console are
10524 ;; both present.
10525 (delete-file-recursively
10526 (string-append
10527 (assoc-ref outputs "out") "/bin"))))))))
10528 ;; Remove the python-ipython propagated input, to avoid the cycle
10529 (propagated-inputs
10530 (alist-delete
10531 "python-ipython"
10532 (package-propagated-inputs python-jupyter-console)))))
10533
10534 (define-public python-qtconsole
10535 (package
10536 (name "python-qtconsole")
10537 (version "4.4.3")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (pypi-uri "qtconsole" version))
10542 (sha256
10543 (base32
10544 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10545 (build-system python-build-system)
10546 (arguments
10547 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10548 ;; but we only have the LTS version 5.x. This means that there might be
10549 ;; runtime errors, but since this is a dependency of the Jupyter package,
10550 ;; and Jupyter can be used without the qtconsole we can overlook this for
10551 ;; now.
10552 `(#:tests? #f
10553 #:phases
10554 (modify-phases %standard-phases
10555 (add-before 'check 'pre-check
10556 (lambda _
10557 (setenv "QT_QPA_PLATFORM" "offscreen")
10558 #t)))))
10559 (propagated-inputs
10560 `(("python-ipykernel" ,python-ipykernel)
10561 ("python-ipython" ,python-ipython)))
10562 (native-inputs
10563 `(("python-pytest" ,python-pytest)))
10564 (home-page "https://jupyter.org")
10565 (synopsis "Jupyter Qt console")
10566 (description "This package provides a Qt-based console for Jupyter with
10567 support for rich media output.")
10568 (license license:bsd-3)))
10569
10570 (define-public python-jsbeautifier
10571 (package
10572 (name "python-jsbeautifier")
10573 (version "1.10.2")
10574 (home-page "https://github.com/beautify-web/js-beautify")
10575 (source (origin
10576 (method git-fetch)
10577 (uri (git-reference
10578 (url home-page)
10579 (commit (string-append "v" version))))
10580 (file-name (git-file-name name version))
10581 (sha256
10582 (base32
10583 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10584 (build-system python-build-system)
10585 (arguments
10586 `(#:phases (modify-phases %standard-phases
10587 (add-after 'unpack 'chdir
10588 (lambda _
10589 ;; The upstream Git repository contains all the code,
10590 ;; but this package only builds the python code.
10591 (chdir "python")
10592 #t))
10593 (add-after 'unpack 'patch-python-six-requirements
10594 (lambda _
10595 (substitute* "python/setup.py"
10596 (("six>=1.12.0")
10597 "six>=1.11.0"))
10598 #t)))))
10599 (propagated-inputs
10600 `(("python-editorconfig" ,python-editorconfig)
10601 ("python-six" ,python-six)))
10602 (native-inputs
10603 `(("python-pytest" ,python-pytest)))
10604 (synopsis "JavaScript unobfuscator and beautifier")
10605 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10606 popular online obfuscators.")
10607 (license license:expat)))
10608
10609 (define-public jupyter
10610 (package
10611 (name "jupyter")
10612 (version "1.0.0")
10613 (source
10614 (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "jupyter" version))
10617 (sha256
10618 (base32
10619 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10620 (build-system python-build-system)
10621 (arguments '(#:tests? #f)) ; there are none.
10622 (propagated-inputs
10623 `(("python-ipykernel" ,python-ipykernel)
10624 ("python-ipywidgets" ,python-ipywidgets)
10625 ("python-jupyter-console" ,python-jupyter-console)
10626 ("python-nbconvert" ,python-nbconvert)
10627 ("python-notebook" ,python-notebook)
10628 ("python-qtconsole" ,python-qtconsole)))
10629 (native-search-paths
10630 (list (search-path-specification
10631 (variable "JUPYTER_PATH")
10632 (files '("share/jupyter")))))
10633 (home-page "https://jupyter.org")
10634 (synopsis "Web application for interactive documents")
10635 (description
10636 "The Jupyter Notebook is a web application that allows you to create and
10637 share documents that contain live code, equations, visualizations and
10638 explanatory text. Uses include: data cleaning and transformation, numerical
10639 simulation, statistical modeling, machine learning and much more.")
10640 (license license:bsd-3)))
10641
10642 (define-public python-chardet
10643 (package
10644 (name "python-chardet")
10645 (version "3.0.4")
10646 (source
10647 (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "chardet" version))
10650 (sha256
10651 (base32
10652 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10653 (native-inputs
10654 `(("python-hypothesis" ,python-hypothesis)
10655 ("python-pytest" ,python-pytest)
10656 ("python-pytest-runner" ,python-pytest-runner)))
10657 (build-system python-build-system)
10658 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10659 (arguments `(#:tests? #f))
10660 (home-page "https://github.com/chardet/chardet")
10661 (synopsis "Universal encoding detector for Python 2 and 3")
10662 (description
10663 "This package provides @code{chardet}, a Python module that can
10664 automatically detect a wide range of file encodings.")
10665 (license license:lgpl2.1+)))
10666
10667 (define-public python2-chardet
10668 (package-with-python2 python-chardet))
10669
10670 (define-public python-docopt
10671 (package
10672 (name "python-docopt")
10673 (version "0.6.2")
10674 (source
10675 (origin
10676 (method git-fetch)
10677 ;; The release on PyPI does not include tests.
10678 (uri (git-reference
10679 (url "https://github.com/docopt/docopt")
10680 (commit version)))
10681 (file-name (git-file-name name version))
10682 (sha256
10683 (base32
10684 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10685 (build-system python-build-system)
10686 (native-inputs
10687 `(("python-pytest" ,python-pytest)))
10688 (arguments
10689 `(#:phases
10690 (modify-phases %standard-phases
10691 (replace 'check
10692 (lambda _ (invoke "py.test"))))))
10693 (home-page "http://docopt.org")
10694 (synopsis "Command-line interface description language for Python")
10695 (description "This library allows the user to define a command-line
10696 interface from a program's help message rather than specifying it
10697 programmatically with command-line parsers like @code{getopt} and
10698 @code{argparse}.")
10699 (license license:expat)))
10700
10701 (define-public python2-docopt
10702 (package-with-python2 python-docopt))
10703
10704 (define-public python-pythondialog
10705 (package
10706 (name "python-pythondialog")
10707 (version "3.4.0")
10708 (source
10709 (origin
10710 (method url-fetch)
10711 (uri (pypi-uri "pythondialog" version))
10712 (sha256
10713 (base32
10714 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10715 (build-system python-build-system)
10716 (arguments
10717 `(#:phases
10718 (modify-phases %standard-phases
10719 (add-after 'unpack 'patch-path
10720 (lambda* (#:key inputs #:allow-other-keys)
10721 (let* ((dialog (assoc-ref inputs "dialog")))
10722 ;; Since this library really wants to grovel the search path, we
10723 ;; must hardcode dialog's store path into it.
10724 (substitute* "dialog.py"
10725 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10726 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10727 #t))))
10728 #:tests? #f)) ; no test suite
10729 (propagated-inputs
10730 `(("dialog" ,dialog)))
10731 (home-page "http://pythondialog.sourceforge.net/")
10732 (synopsis "Python interface to the UNIX dialog utility")
10733 (description "A Python wrapper for the dialog utility. Its purpose is to
10734 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10735 This allows one to make simple text-mode user interfaces on Unix-like systems")
10736 (license license:lgpl2.1)
10737 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10738
10739 (define-public python2-pythondialog
10740 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10741 (package
10742 (inherit base)
10743 (version (package-version python-pythondialog))
10744 (source (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "python2-pythondialog" version))
10747 (sha256
10748 (base32
10749 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10750
10751 (define-public python-configobj
10752 (package
10753 (name "python-configobj")
10754 (version "5.0.6")
10755 (source (origin
10756 (method url-fetch)
10757 (uri (pypi-uri "configobj" version))
10758 (sha256
10759 (base32
10760 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10761 ;; Patch setup.py so it looks for python-setuptools, which is
10762 ;; required to parse the keyword 'install_requires' in setup.py.
10763 (patches (search-patches "python-configobj-setuptools.patch"))))
10764 (build-system python-build-system)
10765 (propagated-inputs
10766 `(("python-six" ,python-six)))
10767 (synopsis "Config file reading, writing and validation")
10768 (description "ConfigObj is a simple but powerful config file reader and
10769 writer: an ini file round tripper. Its main feature is that it is very easy to
10770 use, with a straightforward programmer’s interface and a simple syntax for
10771 config files.")
10772 (home-page "https://github.com/DiffSK/configobj")
10773 (license license:bsd-3)))
10774
10775 (define-public python2-configobj
10776 (package-with-python2 python-configobj))
10777
10778 (define-public python-configargparse
10779 (package
10780 (name "python-configargparse")
10781 (version "1.2.3")
10782 (source (origin
10783 (method url-fetch)
10784 (uri (pypi-uri "ConfigArgParse" version))
10785 (sha256
10786 (base32
10787 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
10788 (build-system python-build-system)
10789 (native-inputs
10790 `(("python-pyyaml" ,python-pyyaml)))
10791 (arguments
10792 `(#:phases
10793 (modify-phases %standard-phases
10794 (replace 'check
10795 (lambda _
10796 ;; Bypass setuptools-shim because one test relies on "setup.py"
10797 ;; being the first argument passed to the python call.
10798 ;;
10799 ;; NOTE: Many tests do not run because they rely on Python's
10800 ;; built-in test.test_argparse, but we remove the unit tests from
10801 ;; our Python installation.
10802 (invoke "python" "setup.py" "test"))))))
10803 (synopsis "Replacement for argparse")
10804 (description "A drop-in replacement for argparse that allows options to also
10805 be set via config files and/or environment variables.")
10806 (home-page "https://github.com/bw2/ConfigArgParse")
10807 (license license:expat)))
10808
10809 (define-public python-argparse-manpage
10810 (package
10811 (name "python-argparse-manpage")
10812 (version "1.1")
10813 (source
10814 (origin
10815 (method url-fetch)
10816 (uri (pypi-uri "argparse-manpage" version))
10817 (sha256
10818 (base32
10819 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10820 (build-system python-build-system)
10821 (home-page "https://github.com/praiskup/argparse-manpage")
10822 (synopsis "Build manual page from Python's ArgumentParser object")
10823 (description
10824 "This package provides tools to build manual pages from Python's
10825 @code{ArgumentParser} object.")
10826 (license license:asl2.0)))
10827
10828 (define-public python-contextlib2
10829 (package
10830 (name "python-contextlib2")
10831 (version "0.6.0.post1")
10832 (source
10833 (origin
10834 (method url-fetch)
10835 (uri (pypi-uri "contextlib2" version))
10836 (sha256
10837 (base32
10838 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10839 (build-system python-build-system)
10840 (home-page "https://contextlib2.readthedocs.org/")
10841 (synopsis "Tools for decorators and context managers")
10842 (description "This module is primarily a backport of the Python
10843 3.2 contextlib to earlier Python versions. Like contextlib, it
10844 provides utilities for common tasks involving decorators and context
10845 managers. It also contains additional features that are not part of
10846 the standard library.")
10847 (properties `((python2-variant . ,(delay python2-contextlib2))))
10848 (license license:psfl)))
10849
10850 (define-public python2-contextlib2
10851 (let ((base (package-with-python2
10852 (strip-python2-variant python-contextlib2))))
10853 (package/inherit base
10854 (arguments
10855 (substitute-keyword-arguments (package-arguments base)
10856 ((#:phases phases)
10857 `(modify-phases ,phases
10858 (replace 'check
10859 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10860 (native-inputs
10861 `(("python2-unittest2" ,python2-unittest2))))))
10862
10863 ;; This package is used by python2-pytest via python2-importlib-metadata,
10864 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10865 (define-public python2-contextlib2-bootstrap
10866 (hidden-package
10867 (package/inherit
10868 python2-contextlib2
10869 (name "python2-contextlib2-bootstrap")
10870 (arguments
10871 `(#:tests? #f
10872 ,@(package-arguments python2-contextlib2)))
10873 (native-inputs '()))))
10874
10875 (define-public python-texttable
10876 (package
10877 (name "python-texttable")
10878 (version "1.6.2")
10879 (source
10880 (origin
10881 (method url-fetch)
10882 (uri (pypi-uri "texttable" version))
10883 (sha256
10884 (base32
10885 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10886 (build-system python-build-system)
10887 (arguments
10888 `(#:phases
10889 (modify-phases %standard-phases
10890 (replace 'check
10891 (lambda _ (invoke "pytest" "tests.py"))))))
10892 (native-inputs
10893 `(("python-pytest" ,python-pytest)))
10894 (home-page "https://github.com/foutaise/texttable/")
10895 (synopsis "Python module for creating simple ASCII tables")
10896 (description "Texttable is a Python module for creating simple ASCII
10897 tables.")
10898 (license license:expat)))
10899
10900 (define-public python2-texttable
10901 (package-with-python2 python-texttable))
10902
10903 (define-public python-atomicwrites
10904 (package
10905 (name "python-atomicwrites")
10906 (version "1.3.0")
10907 (source (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "atomicwrites" version))
10910 (sha256
10911 (base32
10912 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10913 (build-system python-build-system)
10914 (synopsis "Atomic file writes in Python")
10915 (description "Library for atomic file writes using platform dependent tools
10916 for atomic file system operations.")
10917 (home-page "https://github.com/untitaker/python-atomicwrites")
10918 (license license:expat)))
10919
10920 (define-public python2-atomicwrites
10921 (package-with-python2 python-atomicwrites))
10922
10923 (define-public python-click-threading
10924 (package
10925 (name "python-click-threading")
10926 (version "0.4.4")
10927 (source (origin
10928 (method url-fetch)
10929 (uri (pypi-uri "click-threading" version))
10930 (sha256
10931 (base32
10932 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10933 (build-system python-build-system)
10934 (propagated-inputs
10935 `(("python-click" ,python-click)))
10936 (synopsis "Utilities for multithreading in Click")
10937 (description "This package provides utilities for multithreading in Click
10938 applications.")
10939 (home-page "https://github.com/click-contrib/click-threading")
10940 (license license:expat)))
10941
10942 (define-public python-click-log
10943 (package
10944 (name "python-click-log")
10945 (version "0.3.2")
10946 (source (origin
10947 (method url-fetch)
10948 (uri (pypi-uri "click-log" version))
10949 (sha256
10950 (base32
10951 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10952 (build-system python-build-system)
10953 (propagated-inputs
10954 `(("python-click" ,python-click)))
10955 (synopsis "Logging for click applications")
10956 (description "This package provides a Python library for logging Click
10957 applications.")
10958 (home-page "https://github.com/click-contrib/click-log")
10959 (license license:expat)))
10960
10961 (define-public python-click-default-group
10962 (package
10963 (name "python-click-default-group")
10964 (version "1.2.2")
10965 (source (origin
10966 (method url-fetch)
10967 (uri (pypi-uri "click-default-group" version))
10968 (sha256
10969 (base32
10970 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
10971 (build-system python-build-system)
10972 (arguments
10973 `(#:tests? #f)) ; no target
10974 (propagated-inputs
10975 `(("python-click" ,python-click)))
10976 (synopsis "Extends click.Group")
10977 (description "This package extends click.Group to invoke a command without
10978 explicit subcommand name.")
10979 (home-page "https://github.com/click-contrib/click-default-group")
10980 (license license:bsd-3)))
10981
10982 (define-public python-structlog
10983 (package
10984 (name "python-structlog")
10985 (version "20.2.0")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "structlog" version))
10990 (sha256
10991 (base32
10992 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
10993 (build-system python-build-system)
10994 (arguments
10995 `(#:phases
10996 (modify-phases %standard-phases
10997 (replace 'check
10998 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10999 (when tests?
11000 (add-installed-pythonpath inputs outputs)
11001 (invoke "pytest"))
11002 #t)))))
11003 (native-inputs
11004 `(("python-coverage" ,python-coverage)
11005 ("python-freezegun" ,python-freezegun)
11006 ("python-pretend" ,python-pretend)
11007 ("python-pytest" ,python-pytest)
11008 ("python-pytest-asyncio" ,python-pytest-asyncio)
11009 ("python-simplejson" ,python-simplejson)
11010 ("python-twisted" ,python-twisted)))
11011 (home-page "https://www.structlog.org/")
11012 (synopsis "Structured Logging for Python")
11013 (description "@code{structlog} changes logging in Python by adding structure
11014 to your log entries.")
11015 (license (list license:asl2.0 license:expat))))
11016
11017 (define-public python-apipkg
11018 (package
11019 (name "python-apipkg")
11020 (version "1.5")
11021 (source (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "apipkg" version))
11024 (sha256
11025 (base32
11026 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11027 (build-system python-build-system)
11028 (native-inputs
11029 `(("python-pytest" ,python-pytest)
11030 ("python-setuptools-scm" ,python-setuptools-scm)))
11031 (synopsis "Namespace control and lazy-import mechanism")
11032 (description "With apipkg you can control the exported namespace of a Python
11033 package and greatly reduce the number of imports for your users. It is a small
11034 pure Python module that works on virtually all Python versions.")
11035 (home-page "https://github.com/pytest-dev/apipkg")
11036 (license license:expat)))
11037
11038 (define-public python-execnet
11039 (package
11040 (name "python-execnet")
11041 (version "1.4.1")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "execnet" version))
11045 (sha256
11046 (base32
11047 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11048 (build-system python-build-system)
11049 (arguments
11050 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11051 ;; The two test failures are caused by the lack of an `ssh` executable.
11052 ;; The test suite can be run with pytest after the 'install' phase.
11053 #:tests? #f))
11054 (native-inputs
11055 `(("python-pytest" ,python-pytest)
11056 ("python-setuptools-scm" ,python-setuptools-scm)))
11057 (propagated-inputs
11058 `(("python-apipkg" ,python-apipkg)))
11059 (synopsis "Rapid multi-Python deployment")
11060 (description "Execnet provides a share-nothing model with
11061 channel-send/receive communication for distributing execution across many
11062 Python interpreters across version, platform and network barriers. It has a
11063 minimal and fast API targeting the following uses:
11064 @enumerate
11065 @item distribute tasks to (many) local or remote CPUs
11066 @item write and deploy hybrid multi-process applications
11067 @item write scripts to administer multiple environments
11068 @end enumerate")
11069 (home-page "https://codespeak.net/execnet/")
11070 (license license:expat)))
11071
11072 (define-public python2-execnet
11073 (package-with-python2 python-execnet))
11074
11075 (define-public python-icalendar
11076 (package
11077 (name "python-icalendar")
11078 (version "4.0.5")
11079 (source (origin
11080 (method url-fetch)
11081 (uri (pypi-uri "icalendar" version))
11082 (sha256
11083 (base32
11084 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
11085 (build-system python-build-system)
11086 (propagated-inputs
11087 `(("python-dateutil" ,python-dateutil)
11088 ("python-pytz" ,python-pytz)))
11089 (synopsis "Python library for parsing iCalendar files")
11090 (description "The icalendar package is a parser/generator of iCalendar
11091 files for use with Python.")
11092 (home-page "https://github.com/collective/icalendar")
11093 (license license:bsd-2)))
11094
11095 (define-public python-args
11096 (package
11097 (name "python-args")
11098 (version "0.1.0")
11099 (source (origin
11100 (method url-fetch)
11101 (uri (pypi-uri "args" version))
11102 (sha256
11103 (base32
11104 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11105 (build-system python-build-system)
11106 (home-page "https://github.com/kennethreitz/args")
11107 (synopsis "Command-line argument parser")
11108 (description
11109 "This library provides a Python module to parse command-line arguments.")
11110 (license license:bsd-3)))
11111
11112 (define-public python2-args
11113 (package-with-python2 python-args))
11114
11115 (define-public python-clint
11116 (package
11117 (name "python-clint")
11118 (version "0.5.1")
11119 (source (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "clint" version))
11122 (sha256
11123 (base32
11124 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11125 (build-system python-build-system)
11126 (arguments
11127 '(#:phases
11128 (modify-phases %standard-phases
11129 (replace 'check
11130 (lambda _ (invoke "py.test" "-v"))))))
11131 (native-inputs
11132 `(("python-pytest" ,python-pytest)))
11133 (propagated-inputs
11134 `(("python-args" ,python-args)))
11135 (home-page "https://github.com/kennethreitz/clint")
11136 (synopsis "Command-line interface tools")
11137 (description
11138 "Clint is a Python module filled with a set of tools for developing
11139 command-line applications, including tools for colored and indented
11140 output, progress bar display, and pipes.")
11141 (license license:isc)))
11142
11143 (define-public python2-clint
11144 (package-with-python2 python-clint))
11145
11146 (define-public python-rply
11147 (package
11148 (name "python-rply")
11149 (version "0.7.5")
11150 (source (origin
11151 (method url-fetch)
11152 (uri (pypi-uri "rply" version))
11153 (sha256
11154 (base32
11155 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11156 (build-system python-build-system)
11157 (propagated-inputs
11158 `(("python-appdirs" ,python-appdirs)))
11159 (home-page "https://github.com/alex/rply")
11160 (synopsis "Parser generator for Python")
11161 (description
11162 "This package provides a pure Python based parser generator, that also
11163 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11164 with a new public API, and RPython support.")
11165 (license license:bsd-3)))
11166
11167 (define-public python2-rply
11168 (package-with-python2 python-rply))
11169
11170 (define-public python-hy
11171 (package
11172 (name "python-hy")
11173 (version "0.18.0")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "hy" version))
11177 (sha256
11178 (base32
11179 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11180 (build-system python-build-system)
11181 (arguments
11182 '(#:phases
11183 (modify-phases %standard-phases
11184 (add-before 'install 'set-HOME
11185 (lambda _
11186 (setenv "HOME" "/tmp") #t))
11187 (replace 'check
11188 (lambda _
11189 ;; Tests require write access to HOME.
11190 (setenv "HOME" "/tmp")
11191 (invoke "nosetests"))))))
11192 (native-inputs
11193 `(("python-coverage" ,python-coverage)
11194 ("python-nose" ,python-nose)))
11195 (propagated-inputs
11196 `(("python-astor" ,python-astor)
11197 ("python-colorama" ,python-colorama)
11198 ("python-rply" ,python-rply)
11199 ("python-funcparserlib"
11200 ,python-funcparserlib)))
11201 (home-page "http://hylang.org/")
11202 (synopsis "Lisp frontend to Python")
11203 (description
11204 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11205 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11206 Python at your fingertips, in Lisp form.")
11207 (license license:expat)))
11208
11209 (define-public python2-functools32
11210 (package
11211 (name "python2-functools32")
11212 (version "3.2.3-2")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "functools32" version))
11217 (sha256
11218 (base32
11219 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11220 (build-system python-build-system)
11221 (arguments
11222 `(#:python ,python-2
11223 #:tests? #f)) ; no test target
11224 (home-page "https://github.com/MiCHiLU/python-functools32")
11225 (synopsis
11226 "Backport of the functools module from Python 3.2.3")
11227 (description
11228 "This package is a backport of the @code{functools} module from Python
11229 3.2.3 for use with older versions of Python and PyPy.")
11230 (license license:expat)))
11231
11232 (define-public python2-subprocess32
11233 (package
11234 (name "python2-subprocess32")
11235 (version "3.2.7")
11236 (source (origin
11237 (method url-fetch)
11238 (uri (pypi-uri "subprocess32" version))
11239 (sha256
11240 (base32
11241 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11242 (patches
11243 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11244 (build-system python-build-system)
11245 (arguments
11246 `(#:python ,python-2
11247 ;; The test suite fails with Python > 2.7.13:
11248 ;; import test.support
11249 ;; ImportError: No module named support
11250 #:tests? #f
11251 #:phases
11252 (modify-phases %standard-phases
11253 (add-after 'unpack 'patch-/bin/sh
11254 (lambda _
11255 (substitute* '("subprocess32.py"
11256 "test_subprocess32.py")
11257 (("/bin/sh") (which "sh")))
11258 #t)))))
11259 (home-page "https://github.com/google/python-subprocess32")
11260 (synopsis "Backport of the subprocess module from Python 3.2")
11261 (description
11262 "This is a backport of the @code{subprocess} standard library module
11263 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11264 new features. On POSIX systems it is guaranteed to be reliable when used
11265 in threaded applications. It includes timeout support from Python 3.3 but
11266 otherwise matches 3.2’s API.")
11267 (license license:psfl)))
11268
11269 (define-public python2-futures
11270 (package
11271 (name "python2-futures")
11272 (version "3.2.0")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "futures" version))
11277 (sha256
11278 (base32
11279 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11280 (build-system python-build-system)
11281 (arguments
11282 `(#:python ,python-2
11283 #:phases
11284 (modify-phases %standard-phases
11285 (replace 'check
11286 (lambda _
11287 (invoke "python" "test_futures.py")
11288 #t)))))
11289 (home-page "https://github.com/agronholm/pythonfutures")
11290 (synopsis
11291 "Backport of the concurrent.futures package from Python 3.2")
11292 (description
11293 "The concurrent.futures module provides a high-level interface for
11294 asynchronously executing callables. This package backports the
11295 concurrent.futures package from Python 3.2")
11296 (license license:bsd-3)))
11297
11298 (define-public python-promise
11299 (package
11300 (name "python-promise")
11301 (version "0.4.2")
11302 (source
11303 (origin
11304 (method url-fetch)
11305 (uri (pypi-uri "promise" version))
11306 (sha256
11307 (base32
11308 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11309 (build-system python-build-system)
11310 ;; Tests wants python-futures, which is a python2 only program, and
11311 ;; can't be found by python-promise at test time.
11312 (arguments `(#:tests? #f))
11313 (home-page "https://github.com/syrusakbary/promise")
11314 (synopsis "Promises/A+ implementation for Python")
11315 (description
11316 "Promises/A+ implementation for Python")
11317 (properties `((python2-variant . ,(delay python2-promise))))
11318 (license license:expat)))
11319
11320 (define-public python2-promise
11321 (let ((promise (package-with-python2
11322 (strip-python2-variant python-promise))))
11323 (package/inherit promise
11324 (arguments (substitute-keyword-arguments (package-arguments promise)
11325 ((#:tests? _) #t)))
11326 (native-inputs
11327 `(("python2-futures" ,python2-futures)
11328 ("python2-pytest" ,python2-pytest)
11329 ,@(package-native-inputs promise))))))
11330
11331 (define-public python-progressbar2
11332 (package
11333 (name "python-progressbar2")
11334 (version "3.51.3")
11335 (source
11336 (origin
11337 (method url-fetch)
11338 (uri (pypi-uri "progressbar2" version))
11339 (sha256
11340 (base32
11341 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11342 (build-system python-build-system)
11343 (propagated-inputs
11344 `(("python-six" ,python-six)
11345 ("python-utils" ,python-utils)))
11346 (native-inputs
11347 `(("python-flake8" ,python-flake8)
11348 ("python-freezegun" ,python-freezegun)
11349 ("python-pycodestyle" ,python-pycodestyle)
11350 ("python-pytest" ,python-pytest)
11351 ("python-pytest-cache" ,python-pytest-cache)
11352 ("python-pytest-cov" ,python-pytest-cov)
11353 ("python-pytest-flakes" ,python-pytest-flakes)
11354 ("python-pytest-pep8" ,python-pytest-pep8)
11355 ("python-sphinx" ,python-sphinx)))
11356 (home-page "https://github.com/WoLpH/python-progressbar")
11357 (synopsis "Text progress bar library for Python")
11358 (description
11359 "This package provides a Python progressbar library to provide
11360 visual (yet text based) progress to long running operations.")
11361 (license license:bsd-3)))
11362
11363 (define-public python-progressbar33
11364 (package
11365 (name "python-progressbar33")
11366 (version "2.4")
11367 (source
11368 (origin
11369 (method url-fetch)
11370 (uri (pypi-uri "progressbar33" version))
11371 (sha256
11372 (base32
11373 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11374 (build-system python-build-system)
11375 (home-page "https://github.com/germangh/python-progressbar")
11376 (synopsis "Text progress bar library for Python")
11377 (description
11378 "This package provides a text progress bar library for Python. This
11379 version only differs from the original @code{progressbar} package in that it
11380 uses relative package imports instead of absolute imports, which is necessary
11381 for the module to work under Python 3.3.")
11382 ;; Either or both of these licenses may be selected.
11383 (license (list license:lgpl2.1+ license:bsd-3))))
11384
11385 (define-public python-colorama
11386 (package
11387 (name "python-colorama")
11388 (version "0.4.4")
11389 (source
11390 (origin
11391 (method url-fetch)
11392 (uri (pypi-uri "colorama" version))
11393 (sha256
11394 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11395 (build-system python-build-system)
11396 (synopsis "Colored terminal text rendering for Python")
11397 (description "Colorama is a Python library for rendering colored terminal
11398 text.")
11399 (home-page "https://pypi.org/project/colorama/")
11400 (license license:bsd-3)))
11401
11402 (define-public python2-colorama
11403 (package-with-python2 python-colorama))
11404
11405 (define-public python-moto
11406 (package
11407 (name "python-moto")
11408 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11409 (version "1.3.16.dev134")
11410 (source (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "moto" version))
11413 (sha256
11414 (base32
11415 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11416 (build-system python-build-system)
11417 (arguments
11418 `(#:phases (modify-phases %standard-phases
11419 (add-after 'unpack 'patch-hardcoded-executable-names
11420 (lambda _
11421 (substitute* "moto/batch/models.py"
11422 (("/bin/sh")
11423 (which "sh")))
11424 (substitute* (find-files "tests" "\\.py$")
11425 (("#!/bin/bash")
11426 (string-append "#!" (which "bash"))))
11427 #t))
11428 (replace 'check
11429 (lambda _
11430 (setenv "PYTHONPATH" (string-append "./build/lib:"
11431 (getenv "PYTHONPATH")))
11432 (invoke "pytest" "-vv" "-m" "not network"
11433 ;; These tests require Docker.
11434 "-k" "not test_terminate_job \
11435 and not test_invoke_function_from_sqs_exception"))))))
11436 (native-inputs
11437 `(("python-flask" ,python-flask)
11438 ("python-flask-cors" ,python-flask-cors)
11439 ("python-freezegun" ,python-freezegun)
11440 ("python-parameterized" ,python-parameterized)
11441 ("python-pytest" ,python-pytest)
11442 ("python-sure" ,python-sure)))
11443 (propagated-inputs
11444 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11445 ("python-boto" ,python-boto)
11446 ("python-boto3" ,python-boto3)
11447 ("python-botocore" ,python-botocore)
11448 ("python-cfn-lint" ,python-cfn-lint)
11449 ("python-cryptography" ,python-cryptography)
11450 ("python-dateutil" ,python-dateutil)
11451 ("python-docker" ,python-docker)
11452 ("python-idna" ,python-idna)
11453 ("python-jinja2" ,python-jinja2)
11454 ("python-jose" ,python-jose)
11455 ("python-jsondiff" ,python-jsondiff)
11456 ("python-mock" ,python-mock)
11457 ("python-pytz" ,python-pytz)
11458 ("python-pyyaml" ,python-pyyaml)
11459 ("python-requests" ,python-requests)
11460 ("python-responses" ,python-responses)
11461 ("python-six" ,python-six)
11462 ("python-sshpubkeys" ,python-sshpubkeys)
11463 ("python-werkzeug" ,python-werkzeug)
11464 ("python-xmltodict" ,python-xmltodict)))
11465 (home-page "https://github.com/spulec/moto")
11466 (synopsis "Mock out the boto library")
11467 (description
11468 "@code{moto} is a library designed to easily mock out the
11469 @code{boto} library.")
11470 (license license:asl2.0)))
11471
11472 (define-public python-rsa
11473 (package
11474 (name "python-rsa")
11475 (version "3.4.2")
11476 (source
11477 (origin
11478 (method url-fetch)
11479 (uri (pypi-uri "rsa" version))
11480 (sha256
11481 (base32
11482 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11483 (build-system python-build-system)
11484 (propagated-inputs
11485 `(("python-pyasn1" ,python-pyasn1)))
11486 (synopsis "Pure-Python RSA implementation")
11487 (description "Python-RSA is a pure-Python RSA implementation. It supports
11488 encryption and decryption, signing and verifying signatures, and key
11489 generation according to PKCS#1 version 1.5. It can be used as a Python
11490 library as well as on the command line.")
11491 (home-page "https://stuvel.eu/rsa")
11492 (license license:asl2.0)))
11493
11494 (define-public python2-rsa
11495 (package-with-python2 python-rsa))
11496
11497 (define-public python-pluggy
11498 (package
11499 (name "python-pluggy")
11500 (version "0.13.1")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri (pypi-uri "pluggy" version))
11505 (sha256
11506 (base32
11507 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11508 (build-system python-build-system)
11509 (native-inputs
11510 `(("python-setuptools-scm" ,python-setuptools-scm)))
11511 (synopsis "Plugin and hook calling mechanism for Python")
11512 (description "Pluggy is an extraction of the plugin manager as used by
11513 Pytest but stripped of Pytest specific details.")
11514 (home-page "https://pypi.org/project/pluggy/")
11515 (properties `((python2-variant . ,(delay python2-pluggy))))
11516 (license license:expat)))
11517
11518 (define-public python2-pluggy
11519 (let ((base (package-with-python2 (strip-python2-variant
11520 python-pluggy))))
11521 (package/inherit
11522 base
11523 (propagated-inputs
11524 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11525
11526 ;; This package requires python2-importlib-metadata, but that package
11527 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11528 ;; variant to solve the circular dependency.
11529 (define-public python2-pluggy-bootstrap
11530 (hidden-package
11531 (package/inherit
11532 python2-pluggy
11533 (name "python2-pluggy-bootstrap")
11534 (arguments
11535 `(#:tests? #f
11536 ,@(package-arguments python2-pluggy)))
11537 (propagated-inputs
11538 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11539
11540 (define-public python-tox
11541 (package
11542 (name "python-tox")
11543 (version "3.20.0")
11544 (source
11545 (origin
11546 (method url-fetch)
11547 (uri (pypi-uri "tox" version))
11548 (sha256
11549 (base32
11550 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11551 (build-system python-build-system)
11552 (arguments
11553 ;; FIXME: Tests require pytest-timeout, which itself requires
11554 ;; pytest>=2.8.0 for installation.
11555 '(#:tests? #f))
11556 (propagated-inputs
11557 `(("python-filelock" ,python-filelock)
11558 ("python-packaging" ,python-packaging)
11559 ("python-pluggy" ,python-pluggy)
11560 ("python-py" ,python-py)
11561 ("python-six" ,python-six)
11562 ("python-toml" ,python-toml)
11563 ("python-virtualenv" ,python-virtualenv)))
11564 (native-inputs
11565 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11566 ("python-pytest" ,python-pytest) ; >= 2.3.5
11567 ("python-setuptools-scm" ,python-setuptools-scm)))
11568 (home-page "https://tox.readthedocs.io")
11569 (synopsis "Virtualenv-based automation of test activities")
11570 (description "Tox is a generic virtualenv management and test command line
11571 tool. It can be used to check that a package installs correctly with
11572 different Python versions and interpreters, or run tests in each type of
11573 supported environment, or act as a frontend to continuous integration
11574 servers.")
11575 (license license:expat)))
11576
11577 (define-public python-jmespath
11578 (package
11579 (name "python-jmespath")
11580 (version "0.9.4")
11581 (source
11582 (origin
11583 (method url-fetch)
11584 (uri (pypi-uri "jmespath" version))
11585 (sha256
11586 (base32
11587 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11588 (build-system python-build-system)
11589 (native-inputs
11590 `(("python-nose" ,python-nose)))
11591 (synopsis "JSON Matching Expressions")
11592 (description "JMESPath (pronounced “james path”) is a Python library that
11593 allows one to declaratively specify how to extract elements from a JSON
11594 document.")
11595 (home-page "https://github.com/jmespath/jmespath.py")
11596 (license license:expat)))
11597
11598 (define-public python2-jmespath
11599 (package-with-python2 python-jmespath))
11600
11601 (define-public python-symengine
11602 (package
11603 (name "python-symengine")
11604 (version "0.6.1")
11605 (source
11606 (origin
11607 (method url-fetch)
11608 (uri (pypi-uri "symengine" version))
11609 (sha256
11610 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11611 (build-system python-build-system)
11612 (native-inputs
11613 `(("cmake" ,cmake)
11614 ("python-cython" ,python-cython)))
11615 (inputs
11616 `(("symengine" ,symengine)))
11617 (home-page "https://github.com/symengine/symengine.py")
11618 (synopsis "Python library providing wrappers to SymEngine")
11619 (description
11620 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11621 manipulation library.")
11622 (license license:expat)))
11623
11624 (define-public python-uncertainties
11625 (package
11626 (name "python-uncertainties")
11627 (version "3.1.5")
11628 (source
11629 (origin
11630 (method url-fetch)
11631 (uri (pypi-uri "uncertainties" version))
11632 (sha256
11633 (base32
11634 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11635 (build-system python-build-system)
11636 ;; While there are test files, there is no "tests" directory, so the tests
11637 ;; fail.
11638 (arguments '(#:tests? #false))
11639 (propagated-inputs
11640 `(("python-future" ,python-future)))
11641 (native-inputs
11642 `(("python-nose" ,python-nose)
11643 ("python-numpy" ,python-numpy)))
11644 (home-page "https://uncertainties-python-package.readthedocs.io/")
11645 (synopsis "Calculations with uncertainties")
11646 (description
11647 "The uncertainties package transparently handles calculations with
11648 numbers with uncertainties. It can also yield the derivatives of any
11649 expression.")
11650 (license license:bsd-3)))
11651
11652 (define-public python-asteval
11653 (package
11654 (name "python-asteval")
11655 (version "0.9.23")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "asteval" version))
11660 (sha256
11661 (base32
11662 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11663 (build-system python-build-system)
11664 (native-inputs
11665 `(("python-pytest" ,python-pytest)))
11666 (home-page "https://github.com/newville/asteval")
11667 (synopsis "Minimalistic evaluator of Python expressions")
11668 (description
11669 "This package provides a minimalistic evaluator of Python expression
11670 using the @code{ast} module")
11671 (license license:expat)))
11672
11673 (define-public python-lmfit
11674 (package
11675 (name "python-lmfit")
11676 (version "1.0.2")
11677 (source
11678 (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "lmfit" version))
11681 (sha256
11682 (base32
11683 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11684 (build-system python-build-system)
11685 (propagated-inputs
11686 `(("python-asteval" ,python-asteval)
11687 ("python-numpy" ,python-numpy)
11688 ("python-scipy" ,python-scipy)
11689 ("python-uncertainties" ,python-uncertainties)))
11690 (native-inputs
11691 `(("python-pytest" ,python-pytest)))
11692 (home-page "https://lmfit.github.io/lmfit-py/")
11693 (synopsis "Least-Squares minimization with bounds and constraints")
11694 (description
11695 "Lmfit provides a high-level interface to non-linear optimization and
11696 curve fitting problems for Python. It builds on and extends many of the
11697 optimization methods of @code{scipy.optimize}. Initially inspired by (and
11698 named for) extending the Levenberg-Marquardt method from
11699 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
11700 enhancements to optimization and data fitting problems.")
11701 (license license:bsd-3)))
11702
11703 (define-public python-boto
11704 (package
11705 (name "python-boto")
11706 (version "2.49.0")
11707 (source (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "boto" version))
11710 (sha256
11711 (base32
11712 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11713 (build-system python-build-system)
11714 (arguments
11715 ;; XXX: This package is unmaintained and has problems with newer versions
11716 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11717 ;; subset of this library, so keep it around for now, but disable tests.
11718 '(#:tests? #f))
11719 (propagated-inputs
11720 `(("python-paramiko" ,python-paramiko)
11721 ("python-requests" ,python-requests)))
11722 (home-page "https://github.com/boto/boto")
11723 (synopsis "Python interfaces for Amazon Web Services")
11724 (description
11725 "This package provides various facilities for interacting with Amazon
11726 Web Services through Python.
11727
11728 This software is unmaintained, and new projects should use @code{boto3} instead.")
11729 (license license:expat)))
11730
11731 (define-public python-botocore
11732 ;; Note: When updating botocore, also make sure that boto3 and awscli
11733 ;; are compatible.
11734 (package
11735 (name "python-botocore")
11736 (version "1.19.22")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "botocore" version))
11741 (sha256
11742 (base32
11743 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11744 (build-system python-build-system)
11745 (arguments
11746 ;; FIXME: Many tests are failing.
11747 '(#:tests? #f))
11748 (propagated-inputs
11749 `(("python-dateutil" ,python-dateutil)
11750 ("python-jmespath" ,python-jmespath)
11751 ("python-urllib3" ,python-urllib3)))
11752 (home-page "https://github.com/boto/botocore")
11753 (synopsis "Low-level interface to AWS")
11754 (description "Botocore is a Python library that provides a low-level
11755 interface to the Amazon Web Services (AWS) API.")
11756 (license license:asl2.0)))
11757
11758 (define-public python2-botocore
11759 (package-with-python2 python-botocore))
11760
11761 (define-public python-boto3
11762 (package
11763 (name "python-boto3")
11764 (version "1.16.22")
11765 (home-page "https://github.com/boto/boto3")
11766 (source (origin
11767 (method git-fetch)
11768 (uri (git-reference (url home-page) (commit version)))
11769 (file-name (git-file-name name version))
11770 (sha256
11771 (base32
11772 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11773 (arguments
11774 `(#:phases
11775 (modify-phases %standard-phases
11776 (add-after 'unpack 'delete-network-tests
11777 ;; Deleting integration tests because they are trying to connect to AWS.
11778 (lambda _
11779 (delete-file-recursively "tests/integration")
11780 #t)))))
11781 (build-system python-build-system)
11782 (native-inputs
11783 `(("python-nose" ,python-nose)
11784 ("python-mock" ,python-mock)))
11785 (propagated-inputs
11786 `(("python-botocore" ,python-botocore)
11787 ("python-jmespath" ,python-jmespath)
11788 ("python-s3transfer" ,python-s3transfer)))
11789 (synopsis "AWS SDK for Python")
11790 (description
11791 "Boto3 is a Python library for writing programs that interact with
11792 @acronym{AWS,Amazon Web Services}.")
11793 (license license:asl2.0)))
11794
11795 (define-public python-pyfiglet
11796 (package
11797 (name "python-pyfiglet")
11798 (version "0.8.post1")
11799 (source
11800 (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "pyfiglet" version))
11803 (sha256
11804 (base32
11805 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11806 (build-system python-build-system)
11807 (home-page "https://github.com/pwaller/pyfiglet")
11808 (synopsis "Draw ASCII art big letters in Python")
11809 (description "This module lets you draw large letter from ordinary characters
11810 in pure Python.")
11811 (license license:expat)))
11812
11813 (define-public python-xdo
11814 (package
11815 (name "python-xdo")
11816 (version "0.3")
11817 (source (origin
11818 (method url-fetch)
11819 (uri (string-append
11820 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11821 "python-xdo_" version ".orig.tar.gz"))
11822 (sha256
11823 (base32
11824 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11825 (build-system python-build-system)
11826 (arguments
11827 '(#:phases
11828 (modify-phases %standard-phases
11829 (add-before 'install 'patch-libxdo-path
11830 ;; Hardcode the path of dynamically loaded libxdo library.
11831 (lambda* (#:key inputs #:allow-other-keys)
11832 (let ((libxdo (string-append
11833 (assoc-ref inputs "xdotool")
11834 "/lib/libxdo.so")))
11835 (substitute* "xdo/_xdo.py"
11836 (("find_library\\(\"xdo\"\\)")
11837 (simple-format #f "\"~a\"" libxdo)))
11838 #t))))
11839 #:tests? #f)) ; no tests provided
11840 (propagated-inputs
11841 `(("python-six" ,python-six)))
11842 (inputs
11843 `(("xdotool" ,xdotool)
11844 ("libX11" ,libx11)))
11845 (home-page "https://tracker.debian.org/pkg/python-xdo")
11846 (synopsis "Python library for simulating X11 keyboard/mouse input")
11847 (description "Provides bindings to libxdo for manipulating X11 via simulated
11848 input. (Note that this is mostly a legacy library; you may wish to look at
11849 python-xdo for newer bindings.)")
11850 (license license:bsd-3)))
11851
11852 (define-public python2-xdo
11853 (package-with-python2 python-xdo))
11854
11855 (define-public python-mako
11856 (package
11857 (name "python-mako")
11858 (version "1.1.3")
11859 (source
11860 (origin
11861 (method url-fetch)
11862 (uri (pypi-uri "Mako" version))
11863 (sha256
11864 (base32
11865 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11866 (build-system python-build-system)
11867 (arguments
11868 `(#:phases (modify-phases %standard-phases
11869 (replace 'check
11870 (lambda* (#:key tests? #:allow-other-keys)
11871 (if tests?
11872 (invoke "nosetests" "-v")
11873 (format #t "test suite not run~%"))
11874 #t)))))
11875 (propagated-inputs
11876 `(("python-markupsafe" ,python-markupsafe)))
11877 (native-inputs
11878 `(("python-mock" ,python-mock)
11879 ("python-nose" ,python-nose)))
11880 (home-page "https://www.makotemplates.org/")
11881 (synopsis "Templating language for Python")
11882 (description "Mako is a templating language for Python that compiles
11883 templates into Python modules.")
11884 (license license:expat)))
11885
11886 (define-public python2-mako
11887 (package-with-python2 python-mako))
11888
11889 (define-public python-waitress
11890 (package
11891 (name "python-waitress")
11892 (version "1.1.0")
11893 (source
11894 (origin
11895 (method url-fetch)
11896 (uri (pypi-uri "waitress" version))
11897 (patches (search-patches "python-waitress-fix-tests.patch"))
11898 (sha256
11899 (base32
11900 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11901 (build-system python-build-system)
11902 (home-page "https://github.com/Pylons/waitress")
11903 (synopsis "Waitress WSGI server")
11904 (description "Waitress is meant to be a production-quality pure-Python WSGI
11905 server with very acceptable performance.")
11906 (license license:zpl2.1)))
11907
11908 (define-public python2-waitress
11909 (package-with-python2 python-waitress))
11910
11911 (define-public python-whichcraft
11912 (package
11913 (name "python-whichcraft")
11914 (version "0.6.1")
11915 (source
11916 (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "whichcraft" version))
11919 (sha256
11920 (base32
11921 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11922 (build-system python-build-system)
11923 (native-inputs
11924 `(("python-pytest" ,python-pytest)))
11925 (home-page "https://github.com/pydanny/whichcraft")
11926 (synopsis "Cross-platform cross-python shutil.which functionality")
11927 (description
11928 "This package provides a shim of the shutil.which function that's
11929 designed to work across multiple versions of Python.")
11930 (license license:bsd-3)))
11931
11932 (define-public python-cookiecutter
11933 (package
11934 (name "python-cookiecutter")
11935 (version "1.7.2")
11936 (source
11937 (origin
11938 (method url-fetch)
11939 (uri (pypi-uri "cookiecutter" version))
11940 (sha256
11941 (base32
11942 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11943 (build-system python-build-system)
11944 (native-inputs
11945 `(("python-freezegun" ,python-freezegun)
11946 ("python-pytest" ,python-pytest)
11947 ("python-pytest-catchlog" ,python-pytest-catchlog)
11948 ("python-pytest-cov" ,python-pytest-cov)
11949 ("python-pytest-mock" ,python-pytest-mock)))
11950 (propagated-inputs
11951 `(("python-binaryornot" ,python-binaryornot)
11952 ("python-click" ,python-click)
11953 ("python-future" ,python-future)
11954 ("python-jinja2" ,python-jinja2)
11955 ("python-jinja2-time" ,python-jinja2-time)
11956 ("python-poyo" ,python-poyo)
11957 ("python-requests" ,python-requests)
11958 ("python-slugify" ,python-slugify)
11959 ("python-text-unidecode" ,python-text-unidecode)
11960 ("python-whichcraft" ,python-whichcraft)))
11961 (home-page "https://github.com/cookiecutter/cookiecutter")
11962 (synopsis
11963 "Command-line utility that creates projects from project templates")
11964 (description
11965 "This package provides a command-line utility that creates projects from
11966 project templates, e.g. creating a Python package project from a Python package
11967 project template.")
11968 (license license:bsd-3)))
11969
11970 (define-public python-pyquery
11971 (package
11972 (name "python-pyquery")
11973 (version "1.2.17")
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "pyquery" version))
11978 (sha256
11979 (base32
11980 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11981 (build-system python-build-system)
11982 (native-inputs
11983 `(("python-webob" ,python-webob)
11984 ("python-webtest" ,python-webtest)))
11985 (propagated-inputs
11986 `(("python-lxml" ,python-lxml)
11987 ("python-cssselect" ,python-cssselect)))
11988 (home-page "https://github.com/gawel/pyquery")
11989 (synopsis "Make jQuery-like queries on xml documents")
11990 (description "pyquery allows you to make jQuery queries on xml documents.
11991 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11992 fast xml and html manipulation.")
11993 (license license:bsd-3)))
11994
11995 (define-public python-anyjson
11996 (package
11997 (name "python-anyjson")
11998 (version "0.3.3")
11999 (source
12000 (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "anyjson" version))
12003 (sha256
12004 (base32
12005 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12006 (build-system python-build-system)
12007 (arguments
12008 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12009 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12010 ;; whatever) so this transformation needs to be done before the tests
12011 ;; can be run. Maybe we could add a build step to transform beforehand
12012 ;; but it could be annoying/difficult.
12013 ;; We can enable tests for the Python 2 version, though, and do below.
12014 #:tests? #f))
12015 (home-page "https://bitbucket.org/runeh/anyjson/")
12016 (synopsis
12017 "Wraps best available JSON implementation in a common interface")
12018 (description
12019 "Anyjson loads whichever is the fastest JSON module installed
12020 and provides a uniform API regardless of which JSON implementation is used.")
12021 (license license:bsd-3)
12022 (properties `((python2-variant . ,(delay python2-anyjson))))))
12023
12024 (define-public python2-anyjson
12025 (let ((anyjson (package-with-python2
12026 (strip-python2-variant python-anyjson))))
12027 (package/inherit anyjson
12028 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12029 #:tests? #t
12030 ,@(package-arguments anyjson)))
12031 (native-inputs `(("python2-nose" ,python2-nose))))))
12032
12033 (define-public python-amqp
12034 (package
12035 (name "python-amqp")
12036 (version "2.3.2")
12037 (source
12038 (origin
12039 (method url-fetch)
12040 (uri (pypi-uri "amqp" version))
12041 (sha256
12042 (base32
12043 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12044 (build-system python-build-system)
12045 (native-inputs
12046 `(("python-case" ,python-case)
12047 ("python-pytest-sugar" ,python-pytest-sugar)
12048 ("python-mock" ,python-mock)))
12049 (propagated-inputs
12050 `(("python-vine" ,python-vine)))
12051 (home-page "https://github.com/celery/py-amqp")
12052 (synopsis
12053 "Low-level AMQP client for Python (fork of amqplib)")
12054 (description
12055 "This is a fork of amqplib which was originally written by Barry Pederson.
12056 It is maintained by the Celery project, and used by kombu as a pure python
12057 alternative when librabbitmq is not available.")
12058 (license license:lgpl2.1+)
12059 (properties `((python2-variant . ,(delay python2-amqp))))))
12060
12061 (define-public python2-amqp
12062 (let ((amqp (package-with-python2
12063 (strip-python2-variant python-amqp))))
12064 (package/inherit amqp
12065 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12066 ;; unmaintained. Weirdly, does not do this on the python 3
12067 ;; version?
12068 #:tests? #f
12069 ,@(package-arguments amqp))))))
12070
12071 (define-public python-txamqp
12072 (package
12073 (name "python-txamqp")
12074 (version "0.8.2")
12075 (source
12076 (origin
12077 (method url-fetch)
12078 (uri (pypi-uri "txAMQP" version))
12079 (sha256
12080 (base32
12081 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12082 (build-system python-build-system)
12083 (propagated-inputs
12084 `(("python-six" ,python-six)
12085 ("python-twisted" ,python-twisted)))
12086 (home-page "https://github.com/txamqp/txamqp")
12087 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12088 (description
12089 "This package provides a Python library for communicating with AMQP peers
12090 and brokers using the asynchronous networking framework Twisted. It contains
12091 all the necessary code to connect, send and receive messages to/from an
12092 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12093 also includes support for using Thrift RPC over AMQP in Twisted
12094 applications.")
12095 (license license:asl2.0)))
12096
12097 (define-public python2-txamqp
12098 (package-with-python2 python-txamqp))
12099
12100 (define-public python-kombu
12101 (package
12102 (name "python-kombu")
12103 (version "4.2.2")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (pypi-uri "kombu" version))
12108 (sha256
12109 (base32
12110 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12111 (build-system python-build-system)
12112 (native-inputs
12113 `(("python-mock" ,python-mock)
12114 ("python-case" ,python-case)
12115 ("python-pyro4" ,python-pyro4)
12116 ("python-pytest-sugar" ,python-pytest-sugar)
12117 ("python-pytz" ,python-pytz)))
12118 (propagated-inputs
12119 `(("python-anyjson" ,python-anyjson)
12120 ("python-amqp" ,python-amqp)
12121 ("python-redis" ,python-redis)))
12122 (home-page "https://kombu.readthedocs.io")
12123 (synopsis "Message passing library for Python")
12124 (description "The aim of Kombu is to make messaging in Python as easy as
12125 possible by providing an idiomatic high-level interface for the AMQ protocol,
12126 and also provide proven and tested solutions to common messaging problems.
12127 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12128 message orientation, queuing, routing, reliability and security, for which the
12129 RabbitMQ messaging server is the most popular implementation.")
12130 (license license:bsd-3)
12131 (properties `((python2-variant . ,(delay python2-kombu))))))
12132
12133 (define-public python2-kombu
12134 (let ((kombu (package-with-python2
12135 (strip-python2-variant python-kombu))))
12136 (package/inherit kombu
12137 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12138 ;; It works fine on the python3 variant.
12139 #:tests? #f
12140 ,@(package-arguments kombu)))
12141 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12142 ,@(package-native-inputs kombu))))))
12143
12144 (define-public python-billiard
12145 (package
12146 (name "python-billiard")
12147 (version "3.5.0.5")
12148 (source
12149 (origin
12150 (method url-fetch)
12151 (uri (pypi-uri "billiard" version))
12152 (sha256
12153 (base32
12154 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12155 (build-system python-build-system)
12156 (native-inputs
12157 `(("python-case" ,python-case)
12158 ("python-pytest" ,python-pytest)))
12159 (home-page "https://github.com/celery/billiard")
12160 (synopsis
12161 "Python multiprocessing fork with improvements and bugfixes")
12162 (description
12163 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12164 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12165 pyprocessing package. This standalone variant is intended to be compatible with
12166 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12167 (license license:bsd-3)
12168 (properties `((python2-variant . ,(delay python2-billiard))))))
12169
12170 (define-public python2-billiard
12171 (let ((billiard (package-with-python2
12172 (strip-python2-variant python-billiard))))
12173 (package/inherit billiard
12174 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12175 ("python2-mock" ,python2-mock)
12176 ,@(package-native-inputs billiard))))))
12177
12178 (define-public python-celery
12179 (package
12180 (name "python-celery")
12181 (version "4.2.1")
12182 (source
12183 (origin
12184 (method url-fetch)
12185 (uri (pypi-uri "celery" version))
12186 (sha256
12187 (base32
12188 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12189 (build-system python-build-system)
12190 (arguments
12191 '(;; TODO The tests fail with Python 3.7
12192 ;; https://github.com/celery/celery/issues/4849
12193 #:tests? #f
12194 #:phases
12195 (modify-phases %standard-phases
12196 (add-after 'unpack 'patch-requirements
12197 (lambda _
12198 (substitute* "requirements/test.txt"
12199 (("pytest>=3\\.0,<3\\.3")
12200 "pytest>=3.0"))
12201 #t)))))
12202 (native-inputs
12203 `(("python-case" ,python-case)
12204 ("python-pytest" ,python-pytest)))
12205 (propagated-inputs
12206 `(("python-pytz" ,python-pytz)
12207 ("python-billiard" ,python-billiard)
12208 ("python-kombu" ,python-kombu)))
12209 (home-page "https://celeryproject.org")
12210 (synopsis "Distributed Task Queue")
12211 (description "Celery is an asynchronous task queue/job queue based on
12212 distributed message passing. It is focused on real-time operation, but
12213 supports scheduling as well. The execution units, called tasks, are executed
12214 concurrently on a single or more worker servers using multiprocessing,
12215 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12216 synchronously (wait until ready).")
12217 (license license:bsd-3)
12218 (properties `((python2-variant . ,(delay python2-celery))))))
12219
12220 (define-public python2-celery
12221 (let ((celery (package-with-python2
12222 (strip-python2-variant python-celery))))
12223 (package/inherit celery
12224 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12225 ("python2-mock" ,python2-mock)
12226 ,@(package-native-inputs celery))))))
12227
12228 (define-public python-translitcodec
12229 (package
12230 (name "python-translitcodec")
12231 (version "0.4.0")
12232 (source
12233 (origin
12234 (method url-fetch)
12235 (uri (pypi-uri "translitcodec" version))
12236 (sha256
12237 (base32
12238 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12239 (build-system python-build-system)
12240 (arguments
12241 `(#:tests? #f)) ; no tests provided
12242 (home-page
12243 "https://github.com/claudep/translitcodec")
12244 (synopsis
12245 "Unicode to 8-bit charset transliteration codec")
12246 (description
12247 "This package contains codecs for transliterating ISO 10646 texts into
12248 best-effort representations using smaller coded character sets (ASCII,
12249 ISO 8859, etc.).")
12250 (license license:expat)))
12251
12252 (define-public python2-translitcodec
12253 (package-with-python2 python-translitcodec))
12254
12255 (define-public python-editor
12256 (package
12257 (name "python-editor")
12258 (version "1.0.4")
12259 (source
12260 (origin
12261 (method url-fetch)
12262 (uri (pypi-uri "python-editor" version))
12263 (sha256
12264 (base32
12265 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12266 (build-system python-build-system)
12267 (arguments
12268 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12269 (home-page "https://github.com/fmoo/python-editor")
12270 (synopsis "Programmatically open an editor, capture the result")
12271 (description
12272 "python-editor is a library that provides the editor module for
12273 programmatically interfacing with your system's $EDITOR.")
12274 (license license:asl2.0)))
12275
12276 (define-public python2-editor
12277 (package-with-python2 python-editor))
12278
12279 (define-public python-multiprocessing-logging
12280 (package
12281 (name "python-multiprocessing-logging")
12282 (version "0.3.1")
12283 (home-page "https://github.com/jruere/multiprocessing-logging")
12284 (source (origin
12285 (method git-fetch)
12286 (uri (git-reference
12287 (url home-page)
12288 (commit (string-append "v" version))))
12289 (file-name (git-file-name name version))
12290 (sha256
12291 (base32
12292 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12293 (build-system python-build-system)
12294 (synopsis "Manage logs from multiple processes")
12295 (description
12296 "This Python module implements a multiprocessing-aware @code{Handler}
12297 that, when set on the root @code{Logger}, will tunnel log records to the
12298 main process so that they are handled correctly.")
12299 (license license:lgpl3+)))
12300
12301 (define-public python-vobject
12302 (package
12303 (name "python-vobject")
12304 (version "0.9.6.1")
12305 (source (origin
12306 (method url-fetch)
12307 (uri (pypi-uri "vobject" version))
12308 (sha256
12309 (base32
12310 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12311 (build-system python-build-system)
12312 (arguments
12313 '(;; The test suite relies on some non-portable Windows interfaces.
12314 #:tests? #f))
12315 (propagated-inputs
12316 `(("python-dateutil" ,python-dateutil)
12317 ("python-pyicu" ,python-pyicu)))
12318 (synopsis "Parse and generate vCard and vCalendar files")
12319 (description "Vobject is intended to be a full featured Python package for
12320 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12321 are supported and well tested. vCard 3.0 files are supported, and all data
12322 should be imported, but only a few components are understood in a sophisticated
12323 way.")
12324 (home-page "https://eventable.github.io/vobject/")
12325 (license license:asl2.0)))
12326
12327 (define-public python2-vobject
12328 (package-with-python2 python-vobject))
12329
12330 (define-public python-munkres
12331 (package
12332 (name "python-munkres")
12333 (version "1.0.8")
12334 (source (origin
12335 (method url-fetch)
12336 (uri (pypi-uri "munkres" version))
12337 (sha256
12338 (base32
12339 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12340 (build-system python-build-system)
12341 (arguments
12342 '(#:tests? #f)) ; no test suite
12343 (home-page "https://software.clapper.org/munkres/")
12344 (synopsis "Implementation of the Munkres algorithm")
12345 (description "The Munkres module provides an implementation of the Munkres
12346 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12347 useful for solving the Assignment Problem.")
12348 (license license:bsd-3)))
12349
12350 (define-public python2-munkres
12351 (package-with-python2 python-munkres))
12352
12353 (define-public python-whoosh
12354 (package
12355 (name "python-whoosh")
12356 (version "2.7.4")
12357 (source
12358 (origin
12359 (method url-fetch)
12360 (uri (pypi-uri "Whoosh" version))
12361 (sha256
12362 (base32
12363 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12364 (build-system python-build-system)
12365 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12366 (native-inputs
12367 `(("python-pytest" ,python-pytest)))
12368 (home-page "https://bitbucket.org/mchaput/whoosh")
12369 (synopsis "Full text indexing, search, and spell checking library")
12370 (description
12371 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12372 checking library.")
12373 (license license:bsd-2)))
12374
12375 (define-public python2-whoosh
12376 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12377 (package/inherit whoosh
12378 (propagated-inputs
12379 `(("python2-backport-ssl-match-hostname"
12380 ,python2-backport-ssl-match-hostname)
12381 ,@(package-propagated-inputs whoosh))))))
12382
12383 (define-public python-pathlib
12384 (package
12385 (name "python-pathlib")
12386 (version "1.0.1")
12387 (source (origin
12388 (method url-fetch)
12389 (uri (pypi-uri "pathlib" version))
12390 (sha256
12391 (base32
12392 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12393 (build-system python-build-system)
12394 ;; The tests depend on the internal "test" module, which does not provide
12395 ;; a stable interface.
12396 (arguments `(#:tests? #f))
12397 (home-page "https://pathlib.readthedocs.org/")
12398 (synopsis "Object-oriented file system paths")
12399 (description "Pathlib offers a set of classes to handle file system paths.
12400 It offers the following advantages over using string objects:
12401
12402 @enumerate
12403 @item No more cumbersome use of os and os.path functions. Everything can
12404 be done easily through operators, attribute accesses, and method calls.
12405 @item Embodies the semantics of different path types. For example,
12406 comparing Windows paths ignores casing.
12407 @item Well-defined semantics, eliminating any inconsistencies or
12408 ambiguities (forward vs. backward slashes, etc.).
12409 @end enumerate
12410
12411 Note: In Python 3.4, pathlib is now part of the standard library. For other
12412 Python versions please consider python-pathlib2 instead, which tracks the
12413 standard library module. This module (python-pathlib) isn't maintained
12414 anymore.")
12415 (license license:expat)))
12416
12417 (define-public python2-pathlib
12418 (package-with-python2 python-pathlib))
12419
12420 (define-public python2-pathlib2
12421 (package
12422 (name "python2-pathlib2")
12423 (version "2.3.5")
12424 (source (origin
12425 (method url-fetch)
12426 (uri (pypi-uri "pathlib2" version))
12427 (sha256
12428 (base32
12429 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12430 (build-system python-build-system)
12431 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12432 ;; version is 3.4 which already includes this package as part of the
12433 ;; standard library.
12434 (arguments
12435 `(#:python ,python-2))
12436 (propagated-inputs
12437 `(("python2-scandir" ,python2-scandir)
12438 ("python2-six" ,python2-six)))
12439 (home-page "https://pypi.org/project/pathlib2/")
12440 (synopsis "Object-oriented file system paths - backport of standard
12441 pathlib module")
12442 (description "The goal of pathlib2 is to provide a backport of standard
12443 pathlib module which tracks the standard library module, so all the newest
12444 features of the standard pathlib can be used also on older Python versions.
12445
12446 Pathlib offers a set of classes to handle file system paths. It offers the
12447 following advantages over using string objects:
12448
12449 @enumerate
12450 @item No more cumbersome use of os and os.path functions. Everything can
12451 be done easily through operators, attribute accesses, and method calls.
12452 @item Embodies the semantics of different path types. For example,
12453 comparing Windows paths ignores casing.
12454 @item Well-defined semantics, eliminating any inconsistencies or
12455 ambiguities (forward vs. backward slashes, etc.).
12456 @end enumerate")
12457 (license license:expat)))
12458
12459 (define-public python2-pathlib2-bootstrap
12460 (hidden-package
12461 (package
12462 (inherit python2-pathlib2)
12463 (name "python2-pathlib2-bootstrap")
12464 (propagated-inputs
12465 `(("python2-scandir" ,python2-scandir)
12466 ("python2-six" ,python2-six-bootstrap))))))
12467
12468 (define-public python-jellyfish
12469 (package
12470 (name "python-jellyfish")
12471 (version "0.5.6")
12472 (source (origin
12473 (method url-fetch)
12474 (uri (pypi-uri "jellyfish" version))
12475 (sha256
12476 (base32
12477 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12478 (build-system python-build-system)
12479 (native-inputs
12480 `(("python-pytest" ,python-pytest)))
12481 (home-page "https://github.com/jamesturk/jellyfish")
12482 (synopsis "Approximate and phonetic matching of strings")
12483 (description "Jellyfish uses a variety of string comparison and phonetic
12484 encoding algorithms to do fuzzy string matching.")
12485 (license license:bsd-2)
12486 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12487
12488 (define-public python2-jellyfish
12489 (let ((jellyfish (package-with-python2
12490 (strip-python2-variant python-jellyfish))))
12491 (package/inherit jellyfish
12492 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12493 ,@(package-native-inputs jellyfish))))))
12494
12495 (define-public python2-unicodecsv
12496 (package
12497 (name "python2-unicodecsv")
12498 (version "0.14.1")
12499 (source (origin
12500 (method git-fetch)
12501 ;; The test suite is not included in the PyPi release.
12502 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12503 (uri (git-reference
12504 (url "https://github.com/jdunck/python-unicodecsv")
12505 (commit version)))
12506 (file-name (git-file-name name version))
12507 (sha256
12508 (base32
12509 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12510 (build-system python-build-system)
12511 (arguments
12512 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12513 #:python ,python-2))
12514 (native-inputs
12515 `(("python2-unittest2" ,python2-unittest2)))
12516 (home-page "https://github.com/jdunck/python-unicodecsv")
12517 (synopsis "Unicode CSV module for Python 2")
12518 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12519 module, adding support for Unicode strings.")
12520 (license license:bsd-2)))
12521
12522 (define-public python-pdfminer-six
12523 (package
12524 (name "python-pdfminer-six")
12525 (version "20201018")
12526 ;; There are no tests in the PyPI tarball.
12527 (source
12528 (origin
12529 (method git-fetch)
12530 (uri (git-reference
12531 (url "https://github.com/pdfminer/pdfminer.six")
12532 (commit version)))
12533 (file-name (git-file-name name version))
12534 (sha256
12535 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12536 (build-system python-build-system)
12537 (arguments
12538 `(#:phases
12539 (modify-phases %standard-phases
12540 ;; Tests write to the source tree.
12541 (add-after 'unpack 'make-git-checkout-writable
12542 (lambda _
12543 (for-each make-file-writable (find-files "."))
12544 #t))
12545 (replace 'check
12546 (lambda _
12547 (invoke "make" "test")))
12548 (add-before 'reset-gzip-timestamps 'make-files-writable
12549 (lambda* (#:key outputs #:allow-other-keys)
12550 (let ((out (assoc-ref outputs "out")))
12551 (for-each make-file-writable
12552 (find-files out "\\.gz$"))
12553 #t))))))
12554 (propagated-inputs
12555 `(("python-chardet" ,python-chardet)
12556 ("python-cryptography" ,python-cryptography)
12557 ("python-sortedcontainers" ,python-sortedcontainers)))
12558 (native-inputs
12559 `(("python-nose" ,python-nose)
12560 ("python-tox" ,python-tox)))
12561 (home-page "https://github.com/pdfminer/pdfminer.six")
12562 (synopsis "PDF parser and analyzer")
12563 (description "@code{pdfminer.six} is a community maintained fork of
12564 the original PDFMiner. It is a tool for extracting information from PDF
12565 documents. It focuses on getting and analyzing text data. Pdfminer.six
12566 extracts the text from a page directly from the sourcecode of the PDF. It
12567 can also be used to get the exact location, font or color of the text.")
12568 (license license:expat)))
12569
12570 (define-public python-rarfile
12571 (package
12572 (name "python-rarfile")
12573 (version "2.8")
12574 (source (origin
12575 (method url-fetch)
12576 (uri (pypi-uri "rarfile" version))
12577 (sha256
12578 (base32
12579 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12580 (build-system python-build-system)
12581 (arguments
12582 '(#:phases
12583 (modify-phases %standard-phases
12584 (replace 'check
12585 ;; Many tests fail, but the installation proceeds.
12586 (lambda _ (invoke "make" "-C" "test" "test"))))))
12587 (native-inputs
12588 `(("which" ,which))) ; required for tests
12589 (propagated-inputs
12590 `(("libarchive" ,libarchive)))
12591 (home-page "https://github.com/markokr/rarfile")
12592 (synopsis "RAR archive reader for Python")
12593 (description "This is Python module for RAR archive reading. The interface
12594 is made as zipfile like as possible.")
12595 (license license:isc)))
12596
12597 (define-public python2-rarfile
12598 (package-with-python2 python-rarfile))
12599
12600 (define-public python-magic
12601 (package
12602 (name "python-magic")
12603 (version "0.4.15")
12604 (source
12605 (origin
12606 (method url-fetch)
12607 (uri (pypi-uri "python-magic" version))
12608 (sha256
12609 (base32
12610 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12611 (file-name (string-append name "-" version "-checkout"))))
12612 (build-system python-build-system)
12613 (arguments
12614 ;; The tests are unreliable, so don't run them. The tests fail
12615 ;; under Python3 because they were written for Python2 and
12616 ;; contain import statements that do not work in Python3. One of
12617 ;; the tests fails under Python2 because its assertions are
12618 ;; overly stringent; it relies on comparing output strings which
12619 ;; are brittle and can change depending on the version of
12620 ;; libmagic being used and the system on which the test is
12621 ;; running. In my case, under GuixSD 0.10.0, only one test
12622 ;; failed, and it seems to have failed only because the version
12623 ;; of libmagic that is packaged in Guix outputs a slightly
12624 ;; different (but not wrong) string than the one that the test
12625 ;; expected.
12626 '(#:tests? #f
12627 #:phases (modify-phases %standard-phases
12628 ;; Replace a specific method call with a hard-coded
12629 ;; path to the necessary libmagic.so file in the
12630 ;; store. If we don't do this, then the method call
12631 ;; will fail to find the libmagic.so file, which in
12632 ;; turn will cause any application using
12633 ;; python-magic to fail.
12634 (add-before 'build 'hard-code-path-to-libmagic
12635 (lambda* (#:key inputs #:allow-other-keys)
12636 (let ((file (assoc-ref inputs "file")))
12637 (substitute* "magic.py"
12638 (("ctypes.util.find_library\\('magic'\\)")
12639 (string-append "'" file "/lib/libmagic.so'")))
12640 #t)))
12641 (add-before 'install 'disable-egg-compression
12642 (lambda _
12643 (let ((port (open-file "setup.cfg" "a")))
12644 (display "\n[easy_install]\nzip_ok = 0\n"
12645 port)
12646 (close-port port)
12647 #t))))))
12648 (inputs
12649 ;; python-magic needs to be able to find libmagic.so.
12650 `(("file" ,file)))
12651 (home-page
12652 "https://github.com/ahupp/python-magic")
12653 (synopsis
12654 "File type identification using libmagic")
12655 (description
12656 "This module uses ctypes to access the libmagic file type
12657 identification library. It makes use of the local magic database and
12658 supports both textual and MIME-type output. Note that this module and
12659 the python-file module both provide a \"magic.py\" file; these two
12660 modules, which are different and were developed separately, both serve
12661 the same purpose: to provide Python bindings for libmagic.")
12662 (license license:expat)))
12663
12664 (define-public python2-magic
12665 (package-with-python2 python-magic))
12666
12667 (define-public python2-s3cmd
12668 (package
12669 (name "python2-s3cmd")
12670 (version "1.6.1")
12671 (source
12672 (origin
12673 (method url-fetch)
12674 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12675 "s3cmd-" version ".tar.gz"))
12676 (sha256
12677 (base32
12678 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12679 (build-system python-build-system)
12680 (arguments
12681 ;; s3cmd is written for python2 only and contains no tests.
12682 `(#:python ,python-2
12683 #:tests? #f))
12684 (propagated-inputs
12685 `(("python2-dateutil" ,python2-dateutil)
12686 ;; The python-file package also provides a magic.py module.
12687 ;; This is an unfortunate state of affairs; however, s3cmd
12688 ;; fails to install if it cannot find specifically the
12689 ;; python-magic package. Thus we include it, instead of using
12690 ;; python-file. Ironically, s3cmd sometimes works better
12691 ;; without libmagic bindings at all:
12692 ;; https://github.com/s3tools/s3cmd/issues/198
12693 ("python2-magic" ,python2-magic)))
12694 (home-page "https://s3tools.org/s3cmd")
12695 (synopsis "Command line tool for S3-compatible storage services")
12696 (description
12697 "S3cmd is a command line tool for uploading, retrieving and managing data
12698 in storage services that are compatible with the Amazon Simple Storage
12699 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12700 GnuPG encryption, and more. It also supports management of Amazon's
12701 CloudFront content delivery network.")
12702 (license license:gpl2+)))
12703
12704 (define-public python-pkgconfig
12705 (package
12706 (name "python-pkgconfig")
12707 (version "1.3.1")
12708 (source
12709 (origin
12710 (method url-fetch)
12711 (uri (pypi-uri "pkgconfig" version))
12712 (sha256
12713 (base32
12714 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12715 (build-system python-build-system)
12716 (native-inputs
12717 `(("python-nose" ,python-nose)))
12718 (inputs
12719 `(("pkg-config" ,pkg-config)))
12720 (arguments
12721 `(#:phases
12722 (modify-phases %standard-phases
12723 (add-before 'build 'patch
12724 ;; Hard-code the path to pkg-config.
12725 (lambda _
12726 (substitute* "pkgconfig/pkgconfig.py"
12727 (("cmd = 'pkg-config")
12728 (string-append "cmd = '" (which "pkg-config"))))
12729 #t))
12730 (replace 'check
12731 (lambda _
12732 (invoke "nosetests" "test.py"))))))
12733 (home-page "https://github.com/matze/pkgconfig")
12734 (synopsis "Python interface for pkg-config")
12735 (description "This module provides a Python interface to pkg-config. It
12736 can be used to find all pkg-config packages, check if a package exists,
12737 check if a package meets certain version requirements, query CFLAGS and
12738 LDFLAGS and parse the output to build extensions with setup.py.")
12739 (license license:expat)))
12740
12741 (define-public python2-pkgconfig
12742 (package-with-python2 python-pkgconfig))
12743
12744 (define-public python-bz2file
12745 (package
12746 (name "python-bz2file")
12747 (version "0.98")
12748 (source
12749 (origin
12750 (method url-fetch)
12751 (uri (pypi-uri "bz2file" version))
12752 (sha256
12753 (base32
12754 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12755 (build-system python-build-system)
12756 (arguments
12757 `(#:tests? #f)) ; Tests use deprecated python modules.
12758 (home-page "https://github.com/nvawda/bz2file")
12759 (synopsis "Read and write bzip2-compressed files")
12760 (description
12761 "Bz2file is a Python library for reading and writing bzip2-compressed
12762 files. It contains a drop-in replacement for the I/O interface in the
12763 standard library's @code{bz2} module, including features from the latest
12764 development version of CPython that are not available in older releases.")
12765 (license license:asl2.0)))
12766
12767 (define-public python2-bz2file
12768 (package-with-python2 python-bz2file))
12769
12770 (define-public python-future
12771 (package
12772 (name "python-future")
12773 (version "0.17.1")
12774 (source
12775 (origin
12776 (method url-fetch)
12777 (uri (pypi-uri "future" version))
12778 (sha256
12779 (base32
12780 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12781 (build-system python-build-system)
12782 ;; Many tests connect to the network or are otherwise flawed.
12783 ;; https://github.com/PythonCharmers/python-future/issues/210
12784 (arguments
12785 `(#:tests? #f))
12786 (home-page "https://python-future.org")
12787 (synopsis "Single-source support for Python 3 and 2")
12788 (description
12789 "@code{python-future} is the missing compatibility layer between Python 2 and
12790 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12791 to support both Python 2 and Python 3 with minimal overhead.")
12792 (license license:expat)))
12793
12794 (define-public python2-future
12795 (package-with-python2 python-future))
12796
12797 (define-public python-cysignals
12798 (package
12799 (name "python-cysignals")
12800 (version "1.9.0")
12801 (source
12802 (origin
12803 (method url-fetch)
12804 (uri (pypi-uri "cysignals" version))
12805 (sha256
12806 (base32
12807 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12808 (build-system python-build-system)
12809 (native-inputs
12810 `(("python-cython" ,python-cython)
12811 ("python-sphinx" ,python-sphinx)))
12812 (inputs
12813 `(("pari-gp" ,pari-gp)))
12814 (arguments
12815 `(#:modules ((guix build python-build-system)
12816 ((guix build gnu-build-system) #:prefix gnu:)
12817 (guix build utils))
12818 ;; FIXME: Tests are executed after installation and currently fail
12819 ;; when not installing into standard locations; the author is working
12820 ;; on a fix.
12821 #:tests? #f
12822 #:phases
12823 (modify-phases %standard-phases
12824 (add-before
12825 'build 'configure
12826 (assoc-ref gnu:%standard-phases 'configure)))))
12827 (home-page
12828 "https://github.com/sagemath/cysignals")
12829 (synopsis
12830 "Handling of interrupts and signals for Cython")
12831 (description
12832 "The cysignals package provides mechanisms to handle interrupts (and
12833 other signals and errors) in Cython code, using two related approaches,
12834 for mixed Cython/Python code or external C libraries and pure Cython code,
12835 respectively.")
12836 (license license:lgpl3+)))
12837
12838 (define-public python2-cysignals
12839 (package-with-python2 python-cysignals))
12840
12841 (define-public python2-shedskin
12842 (package
12843 (name "python2-shedskin")
12844 (version "0.9.4")
12845 (source
12846 (origin
12847 (method url-fetch)
12848 (uri (string-append "https://github.com/shedskin/shedskin/"
12849 "releases/download/v" version
12850 "/shedskin-" version ".tgz"))
12851 (sha256
12852 (base32
12853 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12854 (build-system python-build-system)
12855 (arguments
12856 `(#:python ,python-2
12857 #:phases (modify-phases %standard-phases
12858 (add-after 'unpack 'fix-resulting-include-libs
12859 (lambda* (#:key inputs #:allow-other-keys)
12860 (let ((libgc (assoc-ref inputs "libgc"))
12861 (pcre (assoc-ref inputs "pcre")))
12862 (substitute* "shedskin/makefile.py"
12863 (("variable == 'CCFLAGS':[ ]*")
12864 (string-append "variable == 'CCFLAGS':\n"
12865 " line += ' -I " pcre "/include"
12866 " -I " libgc "/include'"))
12867 (("variable == 'LFLAGS':[ ]*")
12868 (string-append "variable == 'LFLAGS':\n"
12869 " line += ' -L" pcre "/lib"
12870 " -L " libgc "/lib'")))
12871 #t))))))
12872 (inputs `(("pcre" ,pcre)
12873 ("libgc" ,libgc)))
12874 (home-page "https://shedskin.github.io/")
12875 (synopsis "Experimental Python-2 to C++ Compiler")
12876 (description (string-append "This is an experimental compiler for a subset of
12877 Python. It generates C++ code and a Makefile."))
12878 (license (list license:gpl3 license:bsd-3 license:expat))))
12879
12880 (define-public python2-rope
12881 (package
12882 (name "python2-rope")
12883 (version "0.11.0")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "rope" version))
12888 (sha256
12889 (base32
12890 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12891 (arguments
12892 ;; Rope has only partial python3 support, see `python-rope'
12893 `(#:python ,python-2))
12894 (build-system python-build-system)
12895 (native-inputs
12896 `(("python2-unittest2" ,python2-unittest2)))
12897 (home-page "https://github.com/python-rope/rope")
12898 (synopsis "Refactoring library for Python")
12899 (description "Rope is a refactoring library for Python. It facilitates
12900 the renaming, moving and extracting of attributes, functions, modules, fields
12901 and parameters in Python 2 source code. These refactorings can also be applied
12902 to occurrences in strings and comments.")
12903 (license license:gpl2)))
12904
12905 (define-public python-rope
12906 (package/inherit python2-rope
12907 (name "python-rope")
12908 (arguments `(#:python ,python-wrapper
12909 ;; XXX: Only partial python3 support, results in some failing
12910 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12911 #:tests? #f))
12912 (properties `((python2-variant . ,(delay python2-rope))))))
12913
12914 (define-public python-py3status
12915 (package
12916 (name "python-py3status")
12917 (version "3.21")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "py3status" version))
12922 (sha256
12923 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12924 (build-system python-build-system)
12925 (inputs
12926 `(("file" ,file)))
12927 (arguments
12928 '(#:phases
12929 (modify-phases %standard-phases
12930 ;; 'file' is used for detection of configuration file encoding
12931 ;; let's make link the dependency to particular input
12932 (add-before 'build 'patch-file-path
12933 (lambda* (#:key inputs #:allow-other-keys)
12934 (let ((file-path (assoc-ref inputs "file")))
12935 (substitute* "py3status/parse_config.py"
12936 (("\\[\"file\", \"-b\"")
12937 (string-append "['" file-path "/bin/file', '-b'")))
12938 #t))))
12939 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12940 (home-page "https://github.com/ultrabug/py3status")
12941 (synopsis "Extensible i3status wrapper written in Python")
12942 (description "py3status is an i3status wrapper which extends i3status
12943 functionality in a modular way, allowing you to extend your panel with your
12944 own code, responding to click events and updating clock every second.")
12945 (license license:bsd-3)))
12946
12947 (define-public python2-selectors2
12948 (package
12949 (name "python2-selectors2")
12950 (version "2.0.1")
12951 (source (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "selectors2" version))
12954 (sha256
12955 (base32
12956 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12957 (build-system python-build-system)
12958 (arguments
12959 `(#:python ,python-2))
12960 (native-inputs
12961 `(("python2-mock" ,python2-mock)
12962 ("python2-psutil" ,python2-psutil)))
12963 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12964 (synopsis "Backport of the selectors module from Python 3.5+")
12965 (description
12966 "This package provides a drop-in replacement for the @code{selectors}
12967 module in Python 3.5 and later.")
12968 (license license:expat)))
12969
12970 (define-public python-tblib
12971 (package
12972 (name "python-tblib")
12973 (version "1.6.0")
12974 (source (origin
12975 (method url-fetch)
12976 (uri (pypi-uri "tblib" version))
12977 (sha256
12978 (base32
12979 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12980 (build-system python-build-system)
12981 (arguments
12982 `(#:phases
12983 (modify-phases %standard-phases
12984 (replace 'check
12985 (lambda _
12986 ;; Upstream runs tests after installation and the package itself
12987 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12988 ;; found.
12989 (setenv "PYTHONPATH"
12990 (string-append (getcwd) "/build/lib:"
12991 (getenv "PYTHONPATH")))
12992 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12993 (native-inputs
12994 `(("python-pytest" ,python-pytest)
12995 ("python-six" ,python-six)))
12996 (home-page "https://github.com/ionelmc/python-tblib")
12997 (synopsis "Traceback serialization library")
12998 (description
12999 "Traceback serialization allows you to:
13000
13001 @enumerate
13002 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13003 different processes. This allows better error handling when running code over
13004 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13005
13006 @item Parse traceback strings and raise with the parsed tracebacks.
13007 @end enumerate\n")
13008 (license license:bsd-3)))
13009
13010 (define-public python2-tblib
13011 (package-with-python2 python-tblib))
13012
13013 (define-public python-greenlet
13014 (package
13015 (name "python-greenlet")
13016 (version "1.0.0")
13017 (source (origin
13018 (method url-fetch)
13019 (uri (pypi-uri "greenlet" version))
13020 (sha256
13021 (base32
13022 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13023 (build-system python-build-system)
13024 (home-page "https://greenlet.readthedocs.io/")
13025 (synopsis "Lightweight in-process concurrent programming")
13026 (description
13027 "Greenlet package is a spin-off of Stackless, a version of CPython
13028 that supports micro-threads called \"tasklets\". Tasklets run
13029 pseudo-concurrently (typically in a single or a few OS-level threads) and
13030 are synchronized with data exchanges on \"channels\".")
13031 (license (list license:psfl license:expat))))
13032
13033 (define-public python-objgraph
13034 (package
13035 (name "python-objgraph")
13036 (version "3.4.1")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 (uri (pypi-uri "objgraph" version))
13041 (sha256
13042 (base32
13043 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13044 (build-system python-build-system)
13045 (propagated-inputs
13046 `(("python-graphviz" ,python-graphviz)))
13047 (native-inputs
13048 `(("python-mock" ,python-mock)
13049 ("graphviz" ,graphviz)))
13050 (home-page "https://mg.pov.lt/objgraph/")
13051 (synopsis "Draw Python object reference graphs with graphviz")
13052 (description
13053 "This package provides tools to draw Python object reference graphs with
13054 graphviz.")
13055 (license license:expat)))
13056
13057 (define-public python2-objgraph
13058 (package-with-python2 python-objgraph))
13059
13060 (define-public python-gevent
13061 (package
13062 (name "python-gevent")
13063 (version "21.1.2")
13064 (source (origin
13065 (method url-fetch)
13066 (uri (pypi-uri "gevent" version))
13067 (sha256
13068 (base32
13069 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13070 (modules '((guix build utils)))
13071 (snippet
13072 '(begin
13073 ;; unbunding libev and c-ares
13074 (delete-file-recursively "deps")))))
13075 (build-system python-build-system)
13076 (arguments
13077 `(#:modules ((ice-9 ftw)
13078 (ice-9 match)
13079 (srfi srfi-26)
13080 (guix build utils)
13081 (guix build python-build-system))
13082 #:phases (modify-phases %standard-phases
13083 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13084 (lambda _
13085 (substitute* "src/gevent/subprocess.py"
13086 (("/bin/sh") (which "sh")))
13087 (for-each (lambda (file)
13088 (substitute* file
13089 (("/bin/sh") (which "sh"))
13090 (("/bin/true") (which "true"))))
13091 (find-files "src/greentest" "\\.py$"))))
13092 (add-before 'build 'do-not-use-bundled-sources
13093 (lambda _
13094 (setenv "GEVENTSETUP_EMBED" "0")
13095
13096 ;; Prevent building bundled libev.
13097 (substitute* "setup.py"
13098 (("run_make=_BUILDING")
13099 "run_make=False"))))
13100 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13101 (lambda* (#:key inputs #:allow-other-keys)
13102 (let ((greenlet (string-append
13103 (assoc-ref inputs "python-greenlet")
13104 "/include")))
13105 (match (scandir greenlet
13106 (lambda (item)
13107 (string-prefix? "python" item)))
13108 ((python)
13109 (setenv "C_INCLUDE_PATH"
13110 (string-append greenlet "/" python ":"
13111 (or (getenv "C_INCLUDE_PATH")
13112 ""))))))))
13113 (add-before 'check 'pretend-to-be-CI
13114 (lambda _
13115 ;; A few tests are skipped due to network constraints or
13116 ;; get longer timeouts when running in a CI environment.
13117 ;; Piggy-back on that, as we need the same adjustments.
13118 (setenv "TRAVIS" "1")
13119 (setenv "APPVEYOR" "1")))
13120 (add-before 'check 'adjust-tests
13121 (lambda _
13122 (let ((disabled-tests
13123 '(;; These tests relies on networking which is
13124 ;; not available in the build container.
13125 "test__getaddrinfo_import.py"
13126 "test__server_pywsgi.py"
13127 ;; XXX: These tests borrow functionality from the
13128 ;; Python builtin 'test' module, but it is not
13129 ;; installed with the Guix Python distribution.
13130 "test_smtpd.py"
13131 "test_wsgiref.py"
13132 "test_urllib2.py"
13133 "test_thread.py"
13134 "test_threading.py"
13135 "test__threading_2.py"
13136 ;; These tests rely on KeyboardInterrupts which do not
13137 ;; work inside the build container for some reason
13138 ;; (lack of controlling terminal?).
13139 "test_subprocess.py"
13140 "test__issues461_471.py"
13141 ;; TODO: Patch out the tests that use getprotobyname, etc
13142 ;; instead of disabling all the tests from these files.
13143 "test__resolver_dnspython.py"
13144 "test__doctests.py"
13145 "test__all__.py"
13146 "test___config.py"
13147 "test__execmodules.py")))
13148 (call-with-output-file "skipped_tests.txt"
13149 (lambda (port)
13150 (format port "~a~%"
13151 (string-join disabled-tests "\n")))))))
13152 (replace 'check
13153 (lambda _
13154 ;; Make sure the build directory is on PYTHONPATH.
13155 (setenv "PYTHONPATH"
13156 (string-append
13157 (getenv "PYTHONPATH") ":"
13158 (getcwd) "/build/"
13159 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13160
13161 ;; Use the build daemons configured number of workers.
13162 (setenv "NWORKERS" (number->string (parallel-job-count)))
13163
13164 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13165 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13166 (propagated-inputs
13167 `(("python-greenlet" ,python-greenlet)
13168 ("python-objgraph" ,python-objgraph)
13169 ("python-zope.event" ,python-zope-event)
13170 ("python-zope.interface" ,python-zope-interface)))
13171 (native-inputs
13172 `(("python-six" ,python-six)
13173
13174 ;; For tests.
13175 ("python-dnspython" ,python-dnspython)
13176 ("python-psutil" ,python-psutil)))
13177 (inputs
13178 `(("c-ares" ,c-ares)
13179 ("libev" ,libev)))
13180 (home-page "https://www.gevent.org/")
13181 (synopsis "Coroutine-based network library")
13182 (description
13183 "@code{gevent} is a coroutine-based Python networking library that uses
13184 @code{greenlet} to provide a high-level synchronous API on top of the
13185 @code{libev} event loop.")
13186 (license license:expat)))
13187
13188 (define-public python-fastimport
13189 (package
13190 (name "python-fastimport")
13191 (version "0.9.8")
13192 (source
13193 (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "fastimport" version))
13196 (sha256
13197 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
13198 (build-system python-build-system)
13199 (home-page "https://github.com/jelmer/python-fastimport")
13200 (synopsis "VCS fastimport parser and generator in Python")
13201 (description "This package provides a parser for and generator of the Git
13202 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13203 format.")
13204 (license license:gpl2+)))
13205
13206 (define-public python2-fastimport
13207 (package-with-python2 python-fastimport))
13208
13209 (define-public python-twisted
13210 (package
13211 (name "python-twisted")
13212 (version "19.7.0")
13213 (source (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13216 (sha256
13217 (base32
13218 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13219 (build-system python-build-system)
13220 (arguments
13221 '(#:tests? #f)) ; FIXME: some tests fail
13222 (propagated-inputs
13223 `(("python-zope-interface" ,python-zope-interface)
13224 ("python-pyhamcrest" ,python-pyhamcrest)
13225 ("python-incremental" ,python-incremental)
13226 ("python-hyperlink" ,python-hyperlink)
13227 ("python-constantly" ,python-constantly)
13228 ("python-automat" ,python-automat)))
13229 (home-page "https://twistedmatrix.com/")
13230 (synopsis "Asynchronous networking framework written in Python")
13231 (description
13232 "Twisted is an extensible framework for Python programming, with special
13233 focus on event-based network programming and multiprotocol integration.")
13234 (license license:expat)))
13235
13236 (define-public python2-twisted
13237 (package-with-python2 python-twisted))
13238
13239 (define-public python-pika
13240 (package
13241 (name "python-pika")
13242 (version "0.12.0")
13243 (source
13244 (origin
13245 (method url-fetch)
13246 (uri (pypi-uri "pika" version))
13247 (sha256
13248 (base32
13249 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13250 (build-system python-build-system)
13251 (native-inputs
13252 `(("python-pyev" ,python-pyev)
13253 ("python-tornado" ,python-tornado)
13254 ("python-twisted" ,python-twisted)))
13255 (home-page "https://pika.readthedocs.org")
13256 (synopsis "Pure Python AMQP Client Library")
13257 (description
13258 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13259 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13260 network support library.")
13261 (license license:bsd-3)))
13262
13263 (define-public python2-pika
13264 (package-with-python2 python-pika))
13265
13266 (define-public python-ply
13267 (package
13268 (name "python-ply")
13269 (version "3.11")
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "ply" version))
13274 (sha256
13275 (base32
13276 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13277 (build-system python-build-system)
13278 (home-page "http://www.dabeaz.com/ply/")
13279 (synopsis "Python Lex & Yacc")
13280 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13281 It uses LR parsing and does extensive error checking.")
13282 (license license:bsd-3)))
13283
13284 (define-public python-tabulate
13285 (package
13286 (name "python-tabulate")
13287 (version "0.8.7")
13288 (source (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "tabulate" version))
13291 (sha256
13292 (base32
13293 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
13294 (build-system python-build-system)
13295 (arguments
13296 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13297 ;; and the latest release is not tagged in the upstream repository.
13298 '(#:tests? #f))
13299 (home-page "https://bitbucket.org/astanin/python-tabulate")
13300 (synopsis "Pretty-print tabular data")
13301 (description
13302 "Tabulate is a library and command-line utility to pretty-print tabular
13303 data in Python.")
13304 (license license:expat)))
13305
13306 (define-public python2-tabulate
13307 (package-with-python2 python-tabulate))
13308
13309 (define-public python-kazoo
13310 (package
13311 (name "python-kazoo")
13312 (version "2.4.0")
13313 (source
13314 (origin
13315 (method url-fetch)
13316 (uri (pypi-uri "kazoo" version))
13317 (sha256
13318 (base32
13319 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13320 (build-system python-build-system)
13321 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13322 (propagated-inputs
13323 `(("python-six" ,python-six)))
13324 (home-page "https://kazoo.readthedocs.org")
13325 (synopsis "High-level Zookeeper client library")
13326 (description
13327 "Kazoo is a Python client library for the Apache Zookeeper distributed
13328 application service. It is designed to be easy to use and to avoid common
13329 programming errors.")
13330 (license license:asl2.0)))
13331
13332 (define-public python2-kazoo
13333 (package-with-python2 python-kazoo))
13334
13335 (define-public python-pykafka
13336 (package
13337 (name "python-pykafka")
13338 (version "2.4.0")
13339 (source (origin
13340 (method url-fetch)
13341 (uri (pypi-uri "pykafka" version))
13342 (sha256
13343 (base32
13344 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13345 (build-system python-build-system)
13346 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13347 (propagated-inputs
13348 `(("python-gevent" ,python-gevent)
13349 ("python-kazoo" ,python-kazoo)
13350 ("python-tabulate" ,python-tabulate)))
13351 (inputs
13352 `(("librdkafka" ,librdkafka)))
13353 (home-page "https://pykafka.readthedocs.io/")
13354 (synopsis "Apache Kafka client for Python")
13355 (description
13356 "PyKafka is a client for the Apache Kafka distributed messaging system.
13357 It includes Python implementations of Kafka producers and consumers, which
13358 are optionally backed by a C extension built on librdkafka.")
13359 (license license:asl2.0)))
13360
13361 (define-public python-wcwidth
13362 (package
13363 (name "python-wcwidth")
13364 (version "0.1.8")
13365 (source (origin
13366 (method url-fetch)
13367 (uri (pypi-uri "wcwidth" version))
13368 (sha256
13369 (base32
13370 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13371 (build-system python-build-system)
13372 (home-page "https://github.com/jquast/wcwidth")
13373 (synopsis "Measure number of terminal column cells of wide-character codes")
13374 (description "Wcwidth measures the number of terminal column cells of
13375 wide-character codes. It is useful for those implementing a terminal emulator,
13376 or programs that carefully produce output to be interpreted by one. It is a
13377 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13378 specified in POSIX.1-2001 and POSIX.1-2008.")
13379 (license license:expat)))
13380
13381 (define-public python2-wcwidth
13382 (package-with-python2 python-wcwidth))
13383
13384 (define-public python2-jsonrpclib
13385 (package
13386 (name "python2-jsonrpclib")
13387 (version "0.1.7")
13388 (source (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "jsonrpclib" version))
13391 (sha256
13392 (base32
13393 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13394 (build-system python-build-system)
13395 (arguments
13396 `(#:tests? #f
13397 #:python ,python-2))
13398 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13399 (synopsis "Implementation of JSON-RPC specification for Python")
13400 (description
13401 "This library is an implementation of the JSON-RPC specification.
13402 It supports both the original 1.0 specification, as well as the
13403 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13404 etc.")
13405 (license license:asl2.0)))
13406
13407 (define-public python-chai
13408 (package
13409 (name "python-chai")
13410 (version "1.1.2")
13411 (source (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "chai" version))
13414 (sha256
13415 (base32
13416 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13417 (build-system python-build-system)
13418 (home-page "https://github.com/agoragames/chai")
13419 (synopsis "Mocking framework for Python")
13420 (description
13421 "Chai provides an api for mocking, stubbing and spying your python
13422 objects, patterned after the Mocha library for Ruby.")
13423 (license license:bsd-3)))
13424
13425 (define-public python2-chai
13426 (package-with-python2 python-chai))
13427
13428 (define-public python-inflection
13429 (package
13430 (name "python-inflection")
13431 (version "0.3.1")
13432 (source
13433 (origin (method url-fetch)
13434 (uri (pypi-uri "inflection" version))
13435 (sha256
13436 (base32
13437 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13438 (build-system python-build-system)
13439 (native-inputs
13440 `(("python-pytest" ,python-pytest)))
13441 (home-page "https://github.com/jpvanhal/inflection")
13442 (synopsis "Python string transformation library")
13443 (description
13444 "Inflection is a string transformation library. It singularizes
13445 and pluralizes English words, and transforms strings from CamelCase to
13446 underscored string.")
13447 (license license:expat)))
13448
13449 (define-public python2-inflection
13450 (package-with-python2 python-inflection))
13451
13452 (define-public python-pylev
13453 (package
13454 (name "python-pylev")
13455 (version "1.3.0")
13456 (source (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "pylev" version))
13459 (sha256
13460 (base32
13461 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13462 (build-system python-build-system)
13463 (home-page "https://github.com/toastdriven/pylev")
13464 (synopsis "Levenshtein distance implementation in Python")
13465 (description "Pure Python Levenshtein implementation, based off the
13466 Wikipedia code samples at
13467 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13468 (license license:bsd-3)))
13469
13470 (define-public python2-pylev
13471 (package-with-python2 python-pylev))
13472
13473 (define-public python-cleo
13474 (package
13475 (name "python-cleo")
13476 (version "0.8.1")
13477 (source (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "cleo" version))
13480 (sha256
13481 (base32
13482 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13483 (build-system python-build-system)
13484 (native-inputs
13485 `( ;; For testing
13486 ("python-mock" ,python-mock)
13487 ("python-pytest-mock" ,python-pytest-mock)
13488 ("python-pytest" ,python-pytest)))
13489 (propagated-inputs
13490 `(("python-backpack" ,python-backpack)
13491 ("python-clikit" ,python-clikit)
13492 ("python-pastel" ,python-pastel)
13493 ("python-pylev" ,python-pylev)))
13494 (home-page "https://github.com/sdispater/cleo")
13495 (synopsis "Command-line arguments library for Python")
13496 (description
13497 "Cleo allows you to create command-line commands with signature in
13498 docstring and colored output.")
13499 (license license:expat)))
13500
13501 (define-public python2-cleo
13502 (package-with-python2 python-cleo))
13503
13504 (define-public python-tomlkit
13505 (package
13506 (name "python-tomlkit")
13507 (version "0.7.0")
13508 (source
13509 (origin
13510 (method url-fetch)
13511 (uri (pypi-uri "tomlkit" version))
13512 (sha256
13513 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13514 (build-system python-build-system)
13515 (native-inputs
13516 `(("python-pytest" ,python-pytest)
13517 ("python-pyyaml" ,python-pyyaml)))
13518 (home-page "https://github.com/sdispater/tomlkit")
13519 (synopsis "Style-preserving TOML library")
13520 (description
13521 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13522 preserves all comments, indentations, whitespace and internal element ordering,
13523 and makes them accessible and editable via an intuitive API. It can also
13524 create new TOML documents from scratch using the provided helpers. Part of the
13525 implementation has been adapted, improved, and fixed from Molten.")
13526 (license license:expat)))
13527
13528 (define-public python-shellingham
13529 (package
13530 (name "python-shellingham")
13531 (version "1.3.2")
13532 (source
13533 (origin
13534 (method url-fetch)
13535 (uri (pypi-uri "shellingham" version))
13536 (sha256
13537 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13538 (build-system python-build-system)
13539 (arguments
13540 `(#:phases
13541 (modify-phases %standard-phases
13542 (add-after 'unpack 'restore-setup.py
13543 ;; setup.py will return in the next release.
13544 ;; <https://github.com/sarugaku/shellingham/issues/33>
13545 (lambda _
13546 (with-output-to-file "setup.py"
13547 (lambda _
13548 (display "from setuptools import setup\nsetup()\n")))
13549 #t)))))
13550 (home-page "https://github.com/sarugaku/shellingham")
13551 (synopsis "Tool to detect surrounding shell")
13552 (description
13553 "Shellingham detects what shell the current Python executable is
13554 running in.")
13555 (license license:isc)))
13556
13557 (define-public python-memcached
13558 (package
13559 (name "python-memcached")
13560 (version "1.59")
13561 (source
13562 (origin
13563 (method url-fetch)
13564 (uri (pypi-uri "python-memcached" version))
13565 (sha256
13566 (base32
13567 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13568 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13569 (build-system python-build-system)
13570 (propagated-inputs `(("python-six" ,python-six)))
13571 (home-page
13572 "https://github.com/linsomniac/python-memcached")
13573 (synopsis "Pure python memcached client")
13574 (description
13575 "This software is a pure Python interface to the memcached memory cache
13576 daemon. It is the client side software which allows storing values in one or
13577 more, possibly remote, memcached servers.")
13578 (license license:psfl)))
13579
13580 (define-public python-clikit
13581 (package
13582 (name "python-clikit")
13583 (version "0.6.2")
13584 (source
13585 (origin
13586 (method url-fetch)
13587 (uri (pypi-uri "clikit" version))
13588 (sha256
13589 (base32
13590 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13591 (build-system python-build-system)
13592 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13593 (propagated-inputs
13594 `(("python-crashtest" ,python-crashtest)
13595 ("python-pastel" ,python-pastel)
13596 ("python-pylev" ,python-pylev)))
13597 (home-page "https://github.com/sdispater/clikit")
13598 (synopsis "Group of utilities to build command line interfaces")
13599 (description
13600 "CliKit is a group of utilities to build testable command line
13601 interfaces.")
13602 (properties `((python2-variant . ,(delay python2-clikit))))
13603 (license license:expat)))
13604
13605 (define-public python2-clikit
13606 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13607 (package/inherit
13608 base
13609 (propagated-inputs
13610 `(("python-enum34" ,python2-enum34)
13611 ("python-typing" ,python2-typing)
13612 ,@(package-propagated-inputs base))))))
13613
13614 (define-public python-msgpack-python
13615 (package
13616 (name "python-msgpack-python")
13617 (version "0.5.6")
13618 (source
13619 (origin
13620 (method url-fetch)
13621 (uri (pypi-uri "msgpack-python" version))
13622 (sha256
13623 (base32
13624 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13625 (build-system python-build-system)
13626 (home-page "https://msgpack.org/")
13627 (synopsis "Package to deserialize messages in MessagePack binary format")
13628 (description
13629 "MessagePack is an efficient binary serialization format. It lets you
13630 exchange data among multiple languages like JSON. But it's faster and
13631 smaller. Small integers are encoded into a single byte, and typical short
13632 strings require only one extra byte in addition to the strings themselves.")
13633 (license license:asl2.0)))
13634
13635 (define-public python-cachy
13636 (package
13637 (name "python-cachy")
13638 (version "0.3.0")
13639 (source
13640 (origin
13641 (method url-fetch)
13642 (uri (pypi-uri "cachy" version))
13643 (sha256
13644 (base32
13645 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13646 (build-system python-build-system)
13647 (arguments
13648 '(#:phases
13649 (modify-phases %standard-phases
13650 (replace 'check
13651 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13652 "pytest"))))))
13653 (native-inputs
13654 `(("memcached" ,memcached)
13655 ("python-fakeredis" ,python-fakeredis)
13656 ("python-flexmock" ,python-flexmock)
13657 ("python-pifpaf" ,python-pifpaf)
13658 ("python-pytest" ,python-pytest)))
13659 (propagated-inputs
13660 `(("python-memcached" ,python-memcached)
13661 ("python-msgpack-python" ,python-msgpack-python)
13662 ("python-redis" ,python-redis)))
13663 (home-page "https://github.com/sdispater/cachy")
13664 (synopsis "Simple yet effective caching library")
13665 (description
13666 "Cachy provides a simple yet effective caching library. A simple but
13667 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13668 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13669 (license license:expat)))
13670
13671 (define-public poetry
13672 (package
13673 (name "poetry")
13674 (version "1.1.5")
13675 ;; Poetry can only be built from source with Poetry.
13676 (source
13677 (origin
13678 (method url-fetch)
13679 (uri (pypi-uri "poetry" version))
13680 (sha256
13681 (base32
13682 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
13683 (build-system python-build-system)
13684 (arguments
13685 `(#:tests? #f ;; Pypi does not have tests.
13686 #:phases
13687 (modify-phases %standard-phases
13688 (add-before 'build 'patch-setup-py
13689 (lambda _
13690 (substitute* "setup.py"
13691 ;; Allow newer versions of python-keyring.
13692 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
13693 ;; TODO: remove after the next release cycle,
13694 ;; when packaging has been updated.
13695 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13696 #t)))))
13697 (propagated-inputs
13698 `(("python-cachecontrol" ,python-cachecontrol)
13699 ("python-cachy" ,python-cachy)
13700 ("python-cleo" ,python-cleo)
13701 ("python-clikit" ,python-clikit)
13702 ("python-html5lib" ,python-html5lib)
13703 ("python-keyring" ,python-keyring)
13704 ("python-msgpack-transitional" ,python-msgpack-transitional)
13705 ("python-packaging" ,python-packaging)
13706 ("python-pexpect" ,python-pexpect)
13707 ("python-pip" ,python-pip)
13708 ("python-pkginfo" ,python-pkginfo)
13709 ("python-poetry-core" ,python-poetry-core)
13710 ("python-requests" ,python-requests)
13711 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13712 ("python-shellingham" ,python-shellingham)
13713 ("python-tomlkit" ,python-tomlkit)
13714 ("python-virtualenv" ,python-virtualenv)))
13715 (home-page "https://python-poetry.org")
13716 (synopsis "Python dependency management and packaging made easy")
13717 (description "Poetry is a tool for dependency management and packaging
13718 in Python. It allows you to declare the libraries your project depends on and
13719 it will manage (install/update) them for you.")
13720 (license license:expat)))
13721
13722 (define-public python-lark-parser
13723 (package
13724 (name "python-lark-parser")
13725 (version "0.9.0")
13726 (source (origin
13727 (method url-fetch)
13728 (uri (pypi-uri "lark-parser" version))
13729 (sha256
13730 (base32
13731 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13732 (build-system python-build-system)
13733 (home-page "https://github.com/lark-parser/lark")
13734 (synopsis "Multi-language parser for Python")
13735 (description
13736 "Lark is a parser built with a focus on ergonomics, performance and
13737 resilience. Lark can parse all context-free languages. That means it is
13738 capable of parsing almost any programming language out there, and to
13739 some degree most natural languages too.")
13740 (license license:expat)))
13741
13742 (define-public python-libcst
13743 (package
13744 (name "python-libcst")
13745 (version "0.3.8")
13746 (source (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "libcst" version))
13749 (sha256
13750 (base32
13751 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13752 (build-system python-build-system)
13753 (arguments
13754 `(#:phases
13755 (modify-phases %standard-phases
13756 (add-after 'unpack 'remove-failing-tests
13757 (lambda _
13758 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13759 (delete-file "libcst/tests/test_fuzz.py")
13760 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13761 (delete-file "libcst/tests/test_pyre_integration.py")
13762 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13763 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13764 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13765 #t))
13766 (add-before 'check 'generate-test-data
13767 (lambda _
13768 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13769 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13770 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13771 (replace 'check
13772 (lambda _
13773 (invoke "python" "-m" "unittest")
13774 #t)))))
13775 (native-inputs
13776 `(("python-black" ,python-black)
13777 ("python-isort" ,python-isort)))
13778 (propagated-inputs
13779 `(("python-typing-extensions" ,python-typing-extensions)
13780 ("python-typing-inspect" ,python-typing-inspect)
13781 ("python-pyyaml" ,python-pyyaml)))
13782 (home-page "https://github.com/Instagram/LibCST")
13783 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13784 (description
13785 "LibCST parses Python source code as a CST tree that keeps all
13786 formatting details (comments, whitespaces, parentheses, etc). It's useful
13787 for building automated refactoring (codemod) applications and linters.
13788 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13789 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13790 naming node types and fields, LibCST creates a lossless CST that looks and
13791 feels like an AST.")
13792 (license (list license:expat
13793 ;; Some files unde libcst/_parser/ are under Python Software
13794 ;; Foundation license (see LICENSE file for details)
13795 license:psfl
13796 ;; libcst/_add_slots.py
13797 license:asl2.0))))
13798
13799 (define-public python-typing-inspect
13800 (package
13801 (name "python-typing-inspect")
13802 (version "0.6.0")
13803 (source (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "typing_inspect" version))
13806 (sha256
13807 (base32
13808 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13809 (build-system python-build-system)
13810 (propagated-inputs
13811 `(("python-mypy-extensions" ,python-mypy-extensions)
13812 ("python-typing-extensions" ,python-typing-extensions)))
13813 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13814 (synopsis "API for inspection of types in the Python @code{typing} module")
13815 (description
13816 "The @code{typing_inspect} module defines experimental API for runtime
13817 inspection of types defined in the Python standard typing module.")
13818 (license license:expat)))
13819
13820 (define-public python-lazy-object-proxy
13821 (package
13822 (name "python-lazy-object-proxy")
13823 (version "1.5.1")
13824 (source (origin
13825 (method url-fetch)
13826 (uri (pypi-uri "lazy-object-proxy" version))
13827 (sha256
13828 (base32
13829 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13830 (native-inputs
13831 `(("python-setuptools-scm" ,python-setuptools-scm)))
13832 (build-system python-build-system)
13833 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13834 (synopsis "Lazy object proxy for python")
13835 (description
13836 "Lazy object proxy is an object that wraps a callable but defers the call
13837 until the object is actually required, and caches the result of said call.")
13838 (license license:bsd-2)))
13839
13840 (define-public python2-lazy-object-proxy
13841 (package-with-python2 python-lazy-object-proxy))
13842
13843 (define-public python-dnspython
13844 (package
13845 (name "python-dnspython")
13846 (version "2.0.0")
13847 (source (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "dnspython" version ".zip"))
13850 (sha256
13851 (base32
13852 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
13853 (build-system python-build-system)
13854 (native-inputs `(("unzip" ,unzip)))
13855 (arguments '(#:tests? #f)) ; XXX: requires internet access
13856 (home-page "https://www.dnspython.org")
13857 (synopsis "DNS toolkit for Python")
13858 (description
13859 "dnspython is a DNS toolkit for Python. It supports almost all record
13860 types. It can be used for queries, zone transfers, and dynamic updates.
13861 It supports TSIG authenticated messages and EDNS0.")
13862 (license license:expat)))
13863
13864 (define-public python-dnspython-1.16
13865 (package
13866 (inherit python-dnspython)
13867 (version "1.16.0")
13868 (source (origin
13869 (method url-fetch)
13870 (uri (string-append "http://www.dnspython.org/kits/"
13871 version "/dnspython-" version ".tar.gz"))
13872 (sha256
13873 (base32
13874 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13875 (native-inputs '())))
13876
13877 (define-public python2-dnspython-1.16
13878 (package-with-python2 python-dnspython-1.16))
13879
13880 (define-public python-py3dns
13881 (package
13882 (name "python-py3dns")
13883 (version "3.2.1")
13884 (source
13885 (origin
13886 (method url-fetch)
13887 (uri (pypi-uri "py3dns" version))
13888 (sha256
13889 (base32
13890 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13891 (build-system python-build-system)
13892 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13893 ;; removing functionality so we copy from Nix and "just don't build it".
13894 (arguments
13895 `(#:phases
13896 (modify-phases %standard-phases
13897 (add-after 'unpack 'patch-source
13898 (lambda _
13899 (substitute* "setup.py"
13900 (("import DNS") "")
13901 (("DNS.__version__") (string-append "\"" ,version "\"")))
13902 #t)))
13903 #:tests? #f)) ; Also skip the tests.
13904 (home-page "https://launchpad.net/py3dns")
13905 (synopsis "Python 3 DNS library")
13906 (description "This Python 3 module provides a DNS API for looking up DNS
13907 entries from within Python 3 modules and applications. This module is a
13908 simple, lightweight implementation.")
13909 (license license:psfl)))
13910
13911 (define-public python-email-validator
13912 (package
13913 (name "python-email-validator")
13914 (version "1.0.2")
13915 (source
13916 (origin (method url-fetch)
13917 (uri (pypi-uri "email_validator" version))
13918 (sha256
13919 (base32
13920 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13921 (build-system python-build-system)
13922 (arguments
13923 '(#:phases
13924 (modify-phases %standard-phases
13925 (add-before 'build 'use-dnspython
13926 (lambda _
13927 (substitute* "setup.py"
13928 (("dnspython3") "dnspython"))
13929 #t)))))
13930 (propagated-inputs
13931 `(("python-dnspython" ,python-dnspython)
13932 ("python-idna" ,python-idna)))
13933 (home-page "https://github.com/JoshData/python-email-validator")
13934 (synopsis "Email address validation library for Python")
13935 (description
13936 "This library validates email address syntax and deliverability.")
13937 (license license:cc0)))
13938
13939 (define-public python2-email-validator
13940 (package-with-python2 python-email-validator))
13941
13942 (define-public python-ukpostcodeparser
13943 (package
13944 (name "python-ukpostcodeparser")
13945 (version "1.0.3")
13946 (source (origin
13947 (method url-fetch)
13948 (uri (pypi-uri "UkPostcodeParser" version))
13949 (sha256
13950 (base32
13951 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13952 (build-system python-build-system)
13953 (home-page "https://github.com/hamstah/ukpostcodeparser")
13954 (synopsis "UK Postcode parser for Python")
13955 (description
13956 "This library provides the @code{parse_uk_postcode} function for
13957 parsing UK postcodes.")
13958 (license license:expat)))
13959
13960 (define-public python2-ukpostcodeparser
13961 (package-with-python2 python-ukpostcodeparser))
13962
13963 (define-public python-faker
13964 (package
13965 (name "python-faker")
13966 (version "4.0.2")
13967 (source (origin
13968 (method url-fetch)
13969 (uri (pypi-uri "Faker" version))
13970 (sha256
13971 (base32
13972 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13973 (build-system python-build-system)
13974 (arguments
13975 '(#:phases
13976 (modify-phases %standard-phases
13977 (replace 'check
13978 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13979 (native-inputs
13980 `(;; For testing
13981 ("python-freezegun" ,python-freezegun)
13982 ("python-pytest" ,python-pytest)
13983 ("python-random2" ,python-random2)
13984 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13985 ("python-validators" ,python-validators)))
13986 (propagated-inputs
13987 `(("python-dateutil" ,python-dateutil)
13988 ("python-text-unidecode" ,python-text-unidecode)))
13989 (home-page "https://github.com/joke2k/faker")
13990 (synopsis "Python package that generates fake data")
13991 (description
13992 "Faker is a Python package that generates fake data such as names,
13993 addresses, and phone numbers.")
13994 (license license:expat)
13995 (properties `((python2-variant . ,(delay python2-faker))))))
13996
13997 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13998 (define-public python2-faker
13999 (let ((base (package-with-python2 (strip-python2-variant
14000 python-faker))))
14001 (package
14002 (inherit base)
14003 (version "3.0.1")
14004 (source (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "Faker" version))
14007 (sha256
14008 (base32
14009 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14010 (native-inputs
14011 `(("python-mock" ,python2-mock)
14012 ,@(package-native-inputs base)))
14013 (propagated-inputs
14014 `(("python2-ipaddress" ,python2-ipaddress)
14015 ("python2-six" ,python2-six)
14016 ,@(package-propagated-inputs base))))))
14017
14018 (define-public python-pyaml
14019 (package
14020 (name "python-pyaml")
14021 (version "18.11.0")
14022 (source (origin
14023 (method url-fetch)
14024 (uri (pypi-uri "pyaml" version))
14025 (sha256
14026 (base32
14027 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14028 (build-system python-build-system)
14029 (native-inputs
14030 `(("python-unidecode" ,python-unidecode)))
14031 (propagated-inputs
14032 `(("python-pyyaml" ,python-pyyaml)))
14033 (home-page "https://github.com/mk-fg/pretty-yaml")
14034 (synopsis "YAML pretty-print library for Python")
14035 (description
14036 "pyaml is a PyYAML based python module to produce pretty and readable
14037 YAML-serialized data.")
14038 (license license:wtfpl2)))
14039
14040 (define-public python2-pyaml
14041 (package-with-python2 python-pyaml))
14042
14043 (define-public python-backpack
14044 (package
14045 (name "python-backpack")
14046 (version "0.1")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "backpack" version))
14051 (sha256
14052 (base32
14053 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14054 (build-system python-build-system)
14055 (native-inputs
14056 `(("python-pytest" ,python-pytest)
14057 ("python-nose" ,python-nose)))
14058 (propagated-inputs
14059 `(("python-simplejson" ,python-simplejson)))
14060 (home-page "https://github.com/sdispater/backpack")
14061 (synopsis "Utilities for working with Python collections")
14062 (description "Backpack provides some useful utilities for working with
14063 collections of data.")
14064 (license license:expat)))
14065
14066 (define-public python2-backpack
14067 (package-with-python2 python-backpack))
14068
14069 (define-public python-prompt-toolkit
14070 (package
14071 (name "python-prompt-toolkit")
14072 (version "3.0.9")
14073 (source
14074 (origin
14075 (method url-fetch)
14076 (uri (pypi-uri "prompt_toolkit" version))
14077 (sha256
14078 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14079 (build-system python-build-system)
14080 (arguments
14081 `(#:phases
14082 (modify-phases %standard-phases
14083 (delete 'check)
14084 (add-after 'install 'post-install-check
14085 (lambda* (#:key inputs outputs #:allow-other-keys)
14086 ;; HOME is needed for the test
14087 ;; "test_pathcompleter_can_expanduser".
14088 (setenv "HOME" "/tmp")
14089 (add-installed-pythonpath inputs outputs)
14090 (invoke "py.test"))))))
14091 (propagated-inputs
14092 `(("python-wcwidth" ,python-wcwidth)))
14093 (native-inputs
14094 `(("python-pytest" ,python-pytest)))
14095 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14096 (synopsis "Library for building command line interfaces in Python")
14097 (description
14098 "Prompt-Toolkit is a library for building interactive command line
14099 interfaces in Python. It's like GNU Readline but it also features syntax
14100 highlighting while typing, out-of-the-box multi-line input editing, advanced
14101 code completion, incremental search, support for Chinese double-width
14102 characters, mouse support, and auto suggestions.")
14103 (license license:bsd-3)
14104 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14105
14106 (define-public python-prompt-toolkit-2
14107 (package (inherit python-prompt-toolkit)
14108 (name "python-prompt-toolkit")
14109 (version "2.0.7")
14110 (source
14111 (origin
14112 (method url-fetch)
14113 (uri (pypi-uri "prompt_toolkit" version))
14114 (sha256
14115 (base32
14116 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14117 (propagated-inputs
14118 `(("python-wcwidth" ,python-wcwidth)
14119 ("python-six" ,python-six)
14120 ("python-pygments" ,python-pygments)))
14121 (properties '())))
14122
14123 (define-public python2-prompt-toolkit
14124 (package-with-python2 python-prompt-toolkit-2))
14125
14126 (define-public python-prompt-toolkit-1
14127 (package (inherit python-prompt-toolkit-2)
14128 (version "1.0.15")
14129 (source
14130 (origin
14131 (method url-fetch)
14132 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14133 (sha256
14134 (base32
14135 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14136
14137 (define-public python2-prompt-toolkit-1
14138 (package-with-python2 python-prompt-toolkit-1))
14139
14140 (define-public python-jedi
14141 (package
14142 (name "python-jedi")
14143 (version "0.17.2")
14144 (source
14145 (origin
14146 (method url-fetch)
14147 (uri (pypi-uri "jedi" version))
14148 (sha256
14149 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14150 (build-system python-build-system)
14151 (arguments
14152 `(#:phases
14153 (modify-phases %standard-phases
14154 (replace 'check
14155 (lambda* (#:key tests? #:allow-other-keys)
14156 (when tests?
14157 (setenv "HOME" "/tmp")
14158 (invoke "python" "-m" "pytest" "-vv"))
14159 #t)))))
14160 (native-inputs
14161 `(("python-pytest" ,python-pytest)
14162 ("python-docopt" ,python-docopt)))
14163 (propagated-inputs
14164 `(("python-parso" ,python-parso)))
14165 (home-page "https://github.com/davidhalter/jedi")
14166 (synopsis "Autocompletion and static analysis library for Python")
14167 (description
14168 "Jedi is a static analysis tool for Python that can be used in Integrated
14169 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14170 on a deeper level than many other static analysis frameworks for Python.
14171
14172 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14173 well.")
14174 (license license:expat)))
14175
14176 (define-public python2-jedi
14177 (package-with-python2 python-jedi))
14178
14179 (define-public ptpython
14180 (package
14181 (name "ptpython")
14182 (version "3.0.5")
14183 (source (origin
14184 (method url-fetch)
14185 (uri (pypi-uri "ptpython" version))
14186 (sha256
14187 (base32
14188 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14189 (build-system python-build-system)
14190 (arguments
14191 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14192 (propagated-inputs
14193 `(("python-appdirs" ,python-appdirs)
14194 ("python-jedi" ,python-jedi)
14195 ("python-prompt-toolkit" ,python-prompt-toolkit)
14196 ("python-pygments" ,python-pygments)))
14197 (home-page "https://github.com/jonathanslenders/ptpython")
14198 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14199 (description
14200 "ptpython is a Python read-eval-print loop with IDE-like features.
14201 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14202 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14203 etc.")
14204 (license license:bsd-3)
14205 (properties `((python2-variant . ,(delay ptpython-2))))))
14206
14207 (define-public ptpython-2
14208 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14209 (package/inherit base
14210 (name "ptpython2"))))
14211
14212 (define-public python-stem
14213 (package
14214 (name "python-stem")
14215 (version "1.8.0")
14216 (source
14217 (origin
14218 (method url-fetch)
14219 (uri (pypi-uri "stem" version))
14220 (sha256
14221 (base32
14222 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14223 (build-system python-build-system)
14224 (arguments
14225 `(#:phases
14226 (modify-phases %standard-phases
14227 (replace 'check
14228 (lambda _
14229 (invoke "./run_tests.py" "--unit")
14230 #t)))))
14231 (native-inputs
14232 `(("python-mock" ,python-mock)
14233 ("python-pycodestyle" ,python-pycodestyle)
14234 ("python-pyflakes" ,python-pyflakes)))
14235 (home-page "https://stem.torproject.org/")
14236 (synopsis
14237 "Python controller library that allows applications to interact with Tor")
14238 (description
14239 "Stem is a Python controller library for Tor. With it you can use Tor's
14240 control protocol to script against the Tor process and read descriptor data
14241 relays publish about themselves.")
14242 (license license:lgpl3)))
14243
14244 (define-public python2-stem
14245 (package-with-python2 python-stem))
14246
14247 (define-public python-pyserial
14248 (package
14249 (name "python-pyserial")
14250 (version "3.4")
14251 (source
14252 (origin
14253 (method url-fetch)
14254 (uri (pypi-uri "pyserial" version))
14255 (sha256
14256 (base32
14257 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
14258 (build-system python-build-system)
14259 (arguments
14260 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14261 ;; #:phases
14262 ;; (modify-phases %standard-phases
14263 ;; (replace 'check
14264 ;; (lambda _
14265 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14266 (home-page
14267 "https://github.com/pyserial/pyserial")
14268 (synopsis "Python Serial Port Bindings")
14269 (description "@code{pyserial} provide serial port bindings for Python. It
14270 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14271 and/or Xon/Xoff. The port is accessed in RAW mode.")
14272 (license license:bsd-3)))
14273
14274 (define-public python2-pyserial
14275 (package-with-python2 python-pyserial))
14276
14277 (define-public python-kivy
14278 (package
14279 (name "python-kivy")
14280 (version "1.10.1")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "Kivy" version))
14285 (file-name (string-append name "-" version ".tar.gz"))
14286 (sha256
14287 (base32
14288 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14289 (build-system python-build-system)
14290 (arguments
14291 `(#:tests? #f ; Tests require many optional packages
14292 #:phases
14293 (modify-phases %standard-phases
14294 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14295 (lambda* (#:key inputs #:allow-other-keys)
14296 (setenv "KIVY_SDL2_PATH"
14297 (string-append (assoc-ref inputs "sdl-union")
14298 "/include/SDL2"))
14299 #t)))))
14300 (native-inputs
14301 `(("pkg-config" ,pkg-config)
14302 ("python-cython" ,python-cython)))
14303 (inputs
14304 `(("gstreamer" ,gstreamer)
14305 ("mesa" ,mesa)
14306 ("sdl-union"
14307 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14308 (home-page "https://kivy.org")
14309 (synopsis
14310 "Multitouch application framework")
14311 (description
14312 "A software library for rapid development of
14313 hardware-accelerated multitouch applications.")
14314 (license license:expat)))
14315
14316 (define-public python2-kivy
14317 (package-with-python2 python-kivy))
14318
14319 (define-public python-binaryornot
14320 (package
14321 (name "python-binaryornot")
14322 (version "0.4.4")
14323 (source (origin
14324 (method url-fetch)
14325 (uri (pypi-uri "binaryornot" version))
14326 (sha256
14327 (base32
14328 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14329 (build-system python-build-system)
14330 (arguments
14331 `(#:phases
14332 (modify-phases %standard-phases
14333 (add-after 'unpack 'patch-tests
14334 (lambda _
14335 ;; TypeError: binary() got an unexpected keyword argument
14336 ;; 'average_size'.
14337 (substitute* "tests/test_check.py"
14338 (("average_size=512") ""))
14339 #t)))))
14340 (propagated-inputs
14341 `(("python-chardet" ,python-chardet)
14342 ("python-hypothesis" ,python-hypothesis)))
14343 (home-page "https://github.com/audreyr/binaryornot")
14344 (synopsis "Package to check if a file is binary or text")
14345 (description "Ultra-lightweight pure Python package to check if a file is
14346 binary or text.")
14347 (license license:bsd-3)
14348 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14349
14350 (define-public python2-binaryornot
14351 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14352 (package/inherit base
14353 (propagated-inputs
14354 `(("python2-enum34" ,python2-enum34)
14355 ,@(package-propagated-inputs base))))))
14356
14357 (define-public python-binwalk
14358 (package
14359 (name "python-binwalk")
14360 (version "2.2.0")
14361 (source
14362 (origin
14363 (method git-fetch)
14364 (uri (git-reference
14365 (url "https://github.com/ReFirmLabs/binwalk")
14366 (commit (string-append "v" version))))
14367 (file-name (git-file-name name version))
14368 (sha256
14369 (base32
14370 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14371 (build-system python-build-system)
14372 (arguments
14373 `(#:phases
14374 (modify-phases %standard-phases
14375 (add-before 'check 'set-pythonpath
14376 (lambda _
14377 (setenv "PYTHONPATH"
14378 (string-append
14379 (getcwd) "/src/"
14380 ":" (getenv "PYTHONPATH")))
14381 (setenv "HOME" "")
14382 #t)))))
14383 (native-inputs
14384 `(("python-coverage" ,python-coverage)
14385 ("python-nose" ,python-nose)))
14386 (home-page "https://github.com/ReFirmLabs/binwalk")
14387 (synopsis "Firmware analysis tool")
14388 (description "Binwalk is a tool for analyzing, reverse engineering, and
14389 extracting firmware images")
14390 (license license:expat)))
14391
14392 (define-public python-nltk
14393 (package
14394 (name "python-nltk")
14395 (version "3.2.1")
14396 (source (origin
14397 (method url-fetch)
14398 (uri (pypi-uri "nltk" version))
14399 (sha256
14400 (base32
14401 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14402 (build-system python-build-system)
14403 (arguments
14404 '(;; The tests require some extra resources to be downloaded.
14405 ;; TODO Try packaging these resources.
14406 #:tests? #f))
14407 (home-page "http://nltk.org/")
14408 (synopsis "Natural Language Toolkit")
14409 (description "It provides interfaces to over 50 corpora and lexical
14410 resources such as WordNet, along with a suite of text processing libraries
14411 for classification, tokenization, stemming, tagging, parsing, and semantic
14412 reasoning, wrappers for natural language processing libraries.")
14413 (license license:asl2.0)))
14414
14415 (define-public python2-nltk
14416 (package-with-python2 python-nltk))
14417
14418 (define-public python-pymongo
14419 (package
14420 (name "python-pymongo")
14421 (version "3.7.2")
14422 (source (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "pymongo" version))
14425 (sha256
14426 (base32
14427 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14428 (build-system python-build-system)
14429 (propagated-inputs
14430 `(("python-certifi" ,python-certifi)))
14431 (home-page "https://github.com/mongodb/mongo-python-driver")
14432 (synopsis "Python driver for MongoDB")
14433 (description "Python driver for MongoDB.")
14434 (license license:asl2.0)))
14435
14436 (define-public python2-pymongo
14437 (package-with-python2 python-pymongo))
14438
14439 (define-public python-consul
14440 (package
14441 (name "python-consul")
14442 (version "0.6.1")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "python-consul" version))
14447 (sha256
14448 (base32
14449 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14450 (build-system python-build-system)
14451 (arguments
14452 '(#:tests? #f)) ; The tests are not distributed
14453 (propagated-inputs
14454 `(("python-requests" ,python-requests)
14455 ("python-six" ,python-six)))
14456 (home-page "https://github.com/cablehead/python-consul")
14457 (synopsis "Python client for Consul")
14458 (description
14459 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14460 discovery, monitoring and configuration.")
14461 (license license:expat)))
14462
14463 (define-public python2-consul
14464 (package-with-python2 python-consul))
14465
14466 (define-public python-schematics
14467 (package
14468 (name "python-schematics")
14469 (version "1.1.1")
14470 (source
14471 (origin
14472 (method git-fetch)
14473 (uri (git-reference
14474 (url "https://github.com/schematics/schematics")
14475 (commit (string-append "v" version))))
14476 (file-name (git-file-name name version))
14477 (sha256
14478 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14479 (build-system python-build-system)
14480 (propagated-inputs
14481 `(("python-six" ,python-six)))
14482 (arguments
14483 ;; The tests require a bunch of not very nice packages with fixed
14484 ;; version requirements (e.g. python-coveralls).
14485 `(#:tests? #f))
14486 (home-page "https://github.com/schematics/schematics")
14487 (synopsis "Python Data Structures for Humans")
14488 (description "Python Data Structures for Humans.")
14489 (license license:bsd-3)))
14490
14491 (define-public python2-schematics
14492 (package-with-python2 python-schematics))
14493
14494 (define-public python-odfpy
14495 (package
14496 (name "python-odfpy")
14497 (version "1.4.1")
14498 (source (origin
14499 (method url-fetch)
14500 (uri (pypi-uri "odfpy" version))
14501 (sha256
14502 (base32
14503 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14504 (arguments
14505 `(#:phases
14506 (modify-phases %standard-phases
14507 (replace 'check
14508 (lambda _
14509 (setenv "PYTHONPATH" (string-append "./build/lib:"
14510 (getenv "PYTHONPATH")))
14511 (invoke "pytest" "-vv"))))))
14512 (build-system python-build-system)
14513 (native-inputs
14514 `(("python-pytest" ,python-pytest)))
14515 (propagated-inputs
14516 `(("python-defusedxml" ,python-defusedxml)))
14517 (home-page "https://github.com/eea/odfpy")
14518 (synopsis "Python API and tools to manipulate OpenDocument files")
14519 (description "Collection of libraries and utility programs written in
14520 Python to manipulate OpenDocument 1.2 files.")
14521 (license
14522 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14523 ;; number of files with other licenses.
14524 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14525
14526 (define-public python2-odfpy
14527 (package-with-python2 python-odfpy))
14528
14529 (define-public python-natsort
14530 (package
14531 (name "python-natsort")
14532 (version "7.0.1")
14533 (source (origin
14534 (method url-fetch)
14535 (uri (pypi-uri "natsort" version))
14536 (sha256
14537 (base32
14538 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14539 (build-system python-build-system)
14540 (arguments
14541 `(#:modules ((guix build utils)
14542 (guix build python-build-system)
14543 (srfi srfi-1)
14544 (srfi srfi-26)
14545 (ice-9 ftw))
14546 #:phases
14547 (modify-phases %standard-phases
14548 (add-before 'check 'set-cachedir
14549 ;; Tests require write access to $HOME by default
14550 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14551 (replace 'check
14552 (lambda _
14553 (let ((cwd (getcwd)))
14554 (setenv "PYTHONPATH"
14555 (string-append
14556 cwd "/build/"
14557 (find (cut string-prefix? "lib" <>)
14558 (scandir (string-append cwd "/build")))
14559 ":"
14560 (getenv "PYTHONPATH")))
14561 (invoke "pytest" "-v")))))))
14562 (native-inputs
14563 `(("python-hypothesis" ,python-hypothesis)
14564 ("python-pytest-cov" ,python-pytest-cov)
14565 ("python-pytest-mock" ,python-pytest-mock)
14566 ("python-pytest" ,python-pytest)))
14567 (propagated-inputs ; TODO: Add python-fastnumbers.
14568 `(("python-pyicu" ,python-pyicu)))
14569 (home-page "https://github.com/SethMMorton/natsort")
14570 (synopsis "Natural sorting for python and shell")
14571 (description
14572 "Natsort lets you apply natural sorting on lists instead of
14573 lexicographical. If you use the built-in @code{sorted} method in python
14574 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14575 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14576 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14577 identifies numbers and sorts them separately from strings. It can also sort
14578 version numbers, real numbers, mixed types and more, and comes with a shell
14579 command @command{natsort} that exposes this functionality in the command line.")
14580 (license license:expat)
14581 (properties `((python2-variant . ,(delay python2-natsort))))))
14582
14583 ;; Natsort 6.x are the last versions with support for Python 2.
14584 (define-public python2-natsort
14585 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14586 (package (inherit base)
14587 (version "6.2.1")
14588 (source (origin
14589 (method url-fetch)
14590 (uri (pypi-uri "natsort" version))
14591 (sha256
14592 (base32
14593 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14594 (native-inputs
14595 `(("python2-pathlib" ,python2-pathlib)
14596 ,@(package-native-inputs base))))))
14597
14598 (define-public glances
14599 (package
14600 (name "glances")
14601 (version "3.1.6")
14602 (source
14603 (origin
14604 (method url-fetch)
14605 (uri (pypi-uri "Glances" version))
14606 (sha256
14607 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
14608 (modules '((guix build utils)))
14609 (snippet
14610 '(begin
14611 ;; Glances phones PyPI for weekly update checks by default.
14612 ;; Disable these. The user can re-enable them if desired.
14613 (substitute* "glances/outdated.py"
14614 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14615 (string-append indentation
14616 "self.args.disable_check_update = True\n"
14617 line)))
14618 #t))))
14619 (build-system python-build-system)
14620 (propagated-inputs
14621 `(("python-future" ,python-future)
14622 ("python-psutil" ,python-psutil)))
14623 (home-page "https://github.com/nicolargo/glances")
14624 (synopsis "Cross-platform curses-based monitoring tool")
14625 (description
14626 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14627 Glances uses the PsUtil library to get information from your system. It
14628 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14629 (license license:lgpl3+)))
14630
14631 (define-public python-glances
14632 (deprecated-package "python-glances" glances))
14633
14634 (define-public python-graphql-core
14635 (package
14636 (name "python-graphql-core")
14637 (version "3.1.2")
14638 (source
14639 (origin
14640 (method url-fetch)
14641 (uri (pypi-uri "graphql-core" version))
14642 (sha256
14643 (base32
14644 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
14645 (build-system python-build-system)
14646 (arguments
14647 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14648 #:phases
14649 (modify-phases %standard-phases
14650 (add-after 'unpack 'patch-hardcoded-version
14651 (lambda _ (substitute*
14652 "setup.py"
14653 (("'gevent==1.1rc1'") "'gevent'"))
14654 #t)))))
14655 (native-inputs
14656 `(("python-gevent" ,python-gevent)
14657 ("python-mock" ,python-mock)
14658 ("python-pytest-mock" ,python-pytest-mock)))
14659 (propagated-inputs
14660 `(("python-promise" ,python-promise)
14661 ("python-six" ,python-six)))
14662 (home-page "https://github.com/graphql-python/graphql-core")
14663 (synopsis "GraphQL implementation for Python")
14664 (description
14665 "GraphQL implementation for Python. GraphQL is a data query language and
14666 runtime designed and used to request and deliver data to mobile and web apps.
14667 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14668 to Python.")
14669 (license license:expat)))
14670
14671 (define-public python2-graphql-core
14672 (package-with-python2 python-graphql-core))
14673
14674 (define-public python-graphql-relay
14675 (package
14676 (name "python-graphql-relay")
14677 (version "0.4.5")
14678 (source
14679 (origin
14680 (method url-fetch)
14681 (uri (pypi-uri "graphql-relay" version))
14682 (sha256
14683 (base32
14684 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14685 (build-system python-build-system)
14686 (arguments
14687 '(#:tests? #f)) ; The tests are not distributed
14688 (propagated-inputs
14689 `(("python-graphql-core" ,python-graphql-core)
14690 ("python-promise" ,python-promise)
14691 ("python-six" ,python-six)))
14692 (home-page "https://github.com/graphql-python/graphql-relay-py")
14693 (synopsis "Relay implementation for Python")
14694 (description
14695 "This is a library to allow the easy creation of Relay-compliant servers
14696 using the GraphQL Python reference implementation of a GraphQL server. It
14697 should be noted that the code is a exact port of the original
14698 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14699 from Facebook.")
14700 (license license:expat)))
14701
14702 (define-public python-graphene
14703 (package
14704 (name "python-graphene")
14705 (version "0.10.2")
14706 (source
14707 (origin
14708 (method url-fetch)
14709 (uri (pypi-uri "graphene" version))
14710 (sha256
14711 (base32
14712 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14713 (build-system python-build-system)
14714 (propagated-inputs
14715 `(("python-graphql-core" ,python-graphql-core)
14716 ("python-graphql-relay" ,python-graphql-relay)
14717 ("python-iso8601" ,python-iso8601)
14718 ("python-promise" ,python-promise)
14719 ("python-six" ,python-six)))
14720 (arguments
14721 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14722 (home-page "https://graphene-python.org/")
14723 (synopsis "GraphQL Framework for Python")
14724 (description
14725 "Graphene is a Python library for building GraphQL schemas/types.
14726 A GraphQL schema describes your data model, and provides a GraphQL server
14727 with an associated set of resolve methods that know how to fetch data.")
14728 (license license:expat)))
14729
14730 (define-public python-nautilus
14731 (package
14732 (name "python-nautilus")
14733 (version "0.4.9")
14734 (source
14735 (origin
14736 (method url-fetch)
14737 (uri (pypi-uri "nautilus" version))
14738 (sha256
14739 (base32
14740 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14741 (build-system python-build-system)
14742 (arguments `(#:tests? #f)) ; fails to import test modules
14743 (propagated-inputs
14744 `(("python-bcrypt" ,python-bcrypt)
14745 ("python-click" ,python-click)
14746 ("python-consul" ,python-consul)
14747 ("python-graphene" ,python-graphene)
14748 ("python-jinja2" ,python-jinja2)
14749 ("python-peewee" ,python-peewee)
14750 ("python-pika" ,python-pika)
14751 ("python-tornado" ,python-tornado)
14752 ("python-wtforms" ,python-wtforms)))
14753 (native-inputs
14754 `(("python-nose2" ,python-nose2)))
14755 (home-page "https://github.com/AlecAivazis/nautilus")
14756 (synopsis "Library for creating microservice applications")
14757 (description
14758 "Nautilus is a framework for flux based microservices that looks to
14759 provide extendible implementations of common aspects of a cloud so that you can
14760 focus on building massively scalable web applications.")
14761 (license license:expat)))
14762
14763 (define-public python-random2
14764 (package
14765 (name "python-random2")
14766 (version "1.0.1")
14767 (source (origin
14768 (method url-fetch)
14769 (uri (pypi-uri "random2" version ".zip"))
14770 (sha256
14771 (base32
14772 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14773 (build-system python-build-system)
14774 (native-inputs `(("unzip" ,unzip)))
14775 (home-page "http://pypi.python.org/pypi/random2")
14776 (synopsis "Python 3 version of the Python 2 @code{random} module")
14777 (description
14778 "This package provides a Python 3 ported version of Python 2.7’s
14779 @code{random} module. It has also been back-ported to work in Python 2.6.
14780
14781 In Python 3, the implementation of @code{randrange()} was changed, so that
14782 even with the same seed you get different sequences in Python 2 and 3.
14783
14784 This package closes that gap, allowing stable random number generation
14785 between the different Python versions.")
14786 (license license:psfl)))
14787
14788 (define-public python2-random2
14789 (package-with-python2 python-random2))
14790
14791 (define-public python-snowballstemmer
14792 (package
14793 (name "python-snowballstemmer")
14794 (version "2.0.0")
14795 (source (origin
14796 (method url-fetch)
14797 (uri (pypi-uri "snowballstemmer" version))
14798 (sha256
14799 (base32
14800 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14801 (build-system python-build-system)
14802 (arguments
14803 `(;; No tests exist
14804 #:tests? #f))
14805 (home-page "https://github.com/shibukawa/snowball_py")
14806 (synopsis "Snowball stemming library collection for Python")
14807 (description "This package provides 16 word stemmer algorithms generated
14808 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14809 English stemmer.")
14810 (license license:bsd-3)))
14811
14812 (define-public python2-snowballstemmer
14813 (package-with-python2 python-snowballstemmer))
14814
14815 (define-public python-setproctitle
14816 (package
14817 (name "python-setproctitle")
14818 (version "1.1.10")
14819 (source
14820 (origin
14821 (method url-fetch)
14822 (uri (pypi-uri "setproctitle" version))
14823 (sha256
14824 (base32
14825 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14826 (build-system python-build-system)
14827 (arguments
14828 '(#:phases
14829 (modify-phases %standard-phases
14830 (add-before 'check 'patch-Makefile
14831 ;; Stricly this is only required for the python2 variant.
14832 ;; But adding a phase in an inherited package seems to be
14833 ;; cumbersum. So we patch even for python3.
14834 (lambda _
14835 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14836 (when nose
14837 (substitute* "Makefile"
14838 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14839 (string-append nose "/bin/nosetests "))))
14840 #t)))
14841 (replace 'check
14842 (lambda _
14843 (setenv "PYTHON" (or (which "python3") (which "python")))
14844 (setenv "PYCONFIG" (if (which "python3-config")
14845 "python3-config --embed"
14846 "python-config"))
14847 (setenv "CC" "gcc")
14848 ;; No need to extend PYTHONPATH to find the built package, since
14849 ;; the Makefile will build anyway
14850 (invoke "make" "check"))))))
14851 (native-inputs
14852 `(("procps" ,procps))) ; required for tests
14853 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14854 (synopsis
14855 "Setproctitle implementation for Python to customize the process title")
14856 (description "The library allows a process to change its title (as displayed
14857 by system tools such as ps and top).
14858
14859 Changing the title is mostly useful in multi-process systems, for
14860 example when a master process is forked: changing the children's title
14861 allows identifying the task each process is busy with. The technique
14862 is used by PostgreSQL and the OpenSSH Server for example.")
14863 (license license:bsd-3)
14864 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14865
14866 (define-public python2-setproctitle
14867 (let ((base (package-with-python2
14868 (strip-python2-variant python-setproctitle))))
14869 (package/inherit base
14870 (native-inputs `(("python2-nose" ,python2-nose)
14871 ,@(package-native-inputs base))))))
14872
14873 (define-public python-validictory
14874 (package
14875 (name "python-validictory")
14876 (version "1.0.1")
14877 (source
14878 (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "validictory" version))
14881 (sha256
14882 (base32
14883 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14884 (build-system python-build-system)
14885 (arguments
14886 '(#:phases
14887 (modify-phases %standard-phases
14888 (add-after 'unpack 'bootstrap
14889 ;; Move the tests out of the package directory to avoid
14890 ;; packaging them.
14891 (lambda* _
14892 (rename-file "validictory/tests" "tests")
14893 (delete-file "tests/__init__.py")))
14894 (replace 'check
14895 (lambda _
14896 ;; Extend PYTHONPATH so the built package will be found.
14897 (setenv "PYTHONPATH"
14898 (string-append (getcwd) "/build/lib:"
14899 (getenv "PYTHONPATH")))
14900 (invoke "py.test" "-vv" ))))))
14901 (native-inputs
14902 `(("python-pytest" ,python-pytest)))
14903 (home-page
14904 "https://github.com/jamesturk/validictory")
14905 (synopsis "General purpose Python data validator")
14906 (description "It allows validation of arbitrary Python data structures.
14907
14908 The schema format is based on the JSON Schema
14909 proposal (http://json-schema.org), so combined with json the library is also
14910 useful as a validator for JSON data.")
14911 (license license:expat)))
14912
14913 (define-public python2-validictory
14914 (package-with-python2 python-validictory))
14915
14916 (define-public python-pyelftools
14917 (package
14918 (name "python-pyelftools")
14919 (version "0.25")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "pyelftools" version))
14924 (sha256
14925 (base32
14926 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14927 (build-system python-build-system)
14928 (arguments
14929 `(#:phases
14930 (modify-phases %standard-phases
14931 (add-before 'check 'set-pythonpath
14932 (lambda _
14933 (setenv "PYTHONPATH"
14934 (string-append
14935 (getcwd) "/test/"
14936 ":" (getenv "PYTHONPATH")))
14937 #t)))))
14938 (home-page
14939 "https://github.com/eliben/pyelftools")
14940 (synopsis
14941 "Analyze binary and library file information")
14942 (description "This Python library provides interfaces for parsing and
14943 analyzing two binary and library file formats; the Executable and Linking
14944 Format (ELF), and debugging information in the Debugging With Attributed
14945 Record Format (DWARF).")
14946 (license license:public-domain)))
14947
14948 (define-public python-pyev
14949 (package
14950 (name "python-pyev")
14951 (version "0.9.0")
14952 (source
14953 (origin
14954 (method url-fetch)
14955 (uri (pypi-uri "pyev" version))
14956 (sha256
14957 (base32
14958 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14959 (build-system python-build-system)
14960 (arguments
14961 `(#:tests? #f ; no test suite
14962 #:phases
14963 (modify-phases %standard-phases
14964 (add-after 'unpack 'patch
14965 (lambda* (#:key inputs #:allow-other-keys)
14966 (let ((libev (string-append (assoc-ref inputs "libev")
14967 "/lib/libev.so.4")))
14968 (substitute* "setup.py"
14969 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14970 (string-append "libev_dll_name = \"" libev "\"")))))))))
14971 (inputs
14972 `(("libev" ,libev)))
14973 (home-page "https://github.com/gabrielfalcao/pyev")
14974 (synopsis "Python libev interface")
14975 (description "Pyev provides a Python interface to libev.")
14976 (license license:gpl3)))
14977
14978 (define-public python2-pyev
14979 (package-with-python2 python-pyev))
14980
14981 (define-public python-imagesize
14982 (package
14983 (name "python-imagesize")
14984 (version "1.2.0")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "imagesize" version))
14989 (sha256
14990 (base32
14991 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14992 (build-system python-build-system)
14993 (home-page "https://github.com/shibukawa/imagesize_py")
14994 (synopsis "Gets image size of files in various formats in Python")
14995 (description
14996 "This package allows determination of image size from
14997 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14998 (license license:expat)))
14999
15000 (define-public python2-imagesize
15001 (package-with-python2 python-imagesize))
15002
15003 (define-public python-termstyle
15004 (package
15005 (name "python-termstyle")
15006 (version "0.1.11")
15007 (source
15008 (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "termstyle" version))
15011 (sha256
15012 (base32
15013 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15014 (build-system python-build-system)
15015 (arguments
15016 '(#:phases
15017 (modify-phases %standard-phases
15018 (replace 'check
15019 (lambda _
15020 (invoke "python" "test3.py"))))))
15021 (home-page "https://github.com/gfxmonk/termstyle")
15022 (synopsis "Console text coloring for Python")
15023 (description "This package provides console text coloring for Python.")
15024 (license license:bsd-3)))
15025
15026 (define-public python-argcomplete
15027 (package
15028 (name "python-argcomplete")
15029 (version "1.11.1")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "argcomplete" version))
15034 (sha256
15035 (base32
15036 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15037 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15038 (build-system python-build-system)
15039 (native-inputs
15040 `(("python-coverage" ,python-coverage)
15041 ("python-flake8" ,python-flake8)
15042 ("python-pexpect" ,python-pexpect)
15043 ("python-wheel" ,python-wheel)
15044 ("tcsh" ,tcsh)
15045 ("fish" ,fish)
15046 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15047 (home-page "https://github.com/kislyuk/argcomplete")
15048 (synopsis "Shell tab completion for Python argparse")
15049 (description "argcomplete provides extensible command line tab completion
15050 of arguments and options for Python scripts using @code{argparse}. It's
15051 particularly useful for programs with many options or sub-parsers that can
15052 dynamically suggest completions; for example, when browsing resources over the
15053 network.")
15054 (license license:asl2.0)
15055 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15056
15057 (define-public python2-argcomplete
15058 (let ((variant (package-with-python2
15059 (strip-python2-variant python-argcomplete))))
15060 (package/inherit variant
15061 (arguments
15062 (substitute-keyword-arguments (package-arguments variant)
15063 ((#:phases phases '%standard-phases)
15064 `(modify-phases ,phases
15065 (add-after 'unpack 'set-my-HOME
15066 (lambda _ (setenv "HOME" "/tmp")))))))
15067 (native-inputs
15068 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15069 ,@(package-native-inputs variant))))))
15070
15071 (define-public python-csscompressor
15072 (package
15073 (name "python-csscompressor")
15074 (version "0.9.5")
15075 (source
15076 (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "csscompressor" version))
15079 (sha256
15080 (base32
15081 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15082 (build-system python-build-system)
15083 (arguments
15084 '(#:phases
15085 (modify-phases %standard-phases
15086 (replace 'check
15087 (lambda _
15088 (invoke "py.test"))))))
15089 (native-inputs
15090 `(("python-pytest" ,python-pytest)))
15091 (home-page "https://github.com/sprymix/csscompressor")
15092 (synopsis "Python port of YUI CSS Compressor")
15093 (description
15094 "This package provides a python port of YUI CSS Compressor.")
15095 (license license:bsd-3)))
15096
15097 (define-public python-rcssmin
15098 (package
15099 (name "python-rcssmin")
15100 (version "1.0.6")
15101 (source
15102 (origin
15103 (method url-fetch)
15104 (uri (pypi-uri "rcssmin" version))
15105 (sha256
15106 (base32
15107 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15108 (build-system python-build-system)
15109 (arguments
15110 '(#:phases
15111 (modify-phases %standard-phases
15112 (replace 'check
15113 (lambda _
15114 (invoke "python" "run_tests.py" "tests"))))))
15115 (home-page "http://opensource.perlig.de/rcssmin/")
15116 (synopsis "CSS Minifier")
15117 (description "The minifier is based on the semantics of the YUI compressor,
15118 which itself is based on the rule list by Isaac Schlueter.")
15119 (license license:asl2.0)))
15120
15121 (define-public python-rjsmin
15122 (package
15123 (name "python-rjsmin")
15124 (version "1.1.0")
15125 (source
15126 (origin
15127 (method url-fetch)
15128 (uri (pypi-uri "rjsmin" version))
15129 (sha256
15130 (base32
15131 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15132 (modules '((guix build utils)))
15133 (snippet
15134 '(begin
15135 (for-each delete-file (find-files "bench" "\\.js$"))
15136 #t))))
15137 (build-system python-build-system)
15138 (arguments
15139 '(#:tests? #f ; Not all test files included.
15140 #:phases
15141 (modify-phases %standard-phases
15142 (replace 'check
15143 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15144 (add-installed-pythonpath inputs outputs)
15145 (if tests?
15146 (invoke "py.test" "-vv" "tests")
15147 #t))))))
15148 (native-inputs
15149 `(("python-pytest" ,python-pytest)))
15150 (home-page "http://opensource.perlig.de/rjsmin/")
15151 (synopsis "Javascript Minifier")
15152 (description "@code{rJSmin} is a javascript minifier written in Python. The
15153 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15154 is a re-implementation aiming for speed, so it can be used at runtime (rather
15155 than during a preprocessing step).")
15156 (license license:asl2.0)))
15157
15158 (define-public python-xopen
15159 (package
15160 (name "python-xopen")
15161 (version "0.5.0")
15162 (source
15163 (origin
15164 (method url-fetch)
15165 (uri (pypi-uri "xopen" version))
15166 (sha256
15167 (base32
15168 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15169 (build-system python-build-system)
15170 (propagated-inputs
15171 `(("python-setuptools-scm" ,python-setuptools-scm)))
15172 (home-page "https://github.com/marcelm/xopen/")
15173 (synopsis "Open compressed files transparently")
15174 (description "This module provides an @code{xopen} function that works like
15175 Python's built-in @code{open} function, but can also deal with compressed files.
15176 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15177 recognized by their file extensions. The focus is on being as efficient as
15178 possible on all supported Python versions.")
15179 (license license:expat)))
15180
15181 (define-public python2-xopen
15182 (let ((base (package-with-python2
15183 (strip-python2-variant python-xopen))))
15184 (package/inherit base
15185 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15186 ,@(package-propagated-inputs base))))))
15187
15188 (define-public python-cheetah
15189 (package
15190 (name "python-cheetah")
15191 (version "3.2.4")
15192 (source
15193 (origin
15194 (method url-fetch)
15195 (uri (pypi-uri "Cheetah3" version))
15196 (sha256
15197 (base32
15198 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15199 (build-system python-build-system)
15200 (arguments
15201 `(#:modules ((guix build utils)
15202 (guix build python-build-system)
15203 (ice-9 ftw)
15204 (srfi srfi-1)
15205 (srfi srfi-26))
15206 #:phases (modify-phases %standard-phases
15207 (add-after 'unpack 'use-absolute-python
15208 (lambda _
15209 (substitute* "Cheetah/CheetahWrapper.py"
15210 (("#!/usr/bin/env python")
15211 (string-append "#!" (which "python"))))
15212 #t))
15213 (add-after 'unpack 'fix-tests
15214 (lambda _
15215 (substitute* "Cheetah/Tests/ImportHooks.py"
15216 (("os.path.dirname\\(__file__\\)")
15217 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15218 #t))
15219 (replace 'check
15220 (lambda _
15221 (let ((cwd (getcwd)))
15222 (setenv "PYTHONPATH"
15223 (string-append
15224 cwd "/build/"
15225 (find (cut string-prefix? "lib" <>)
15226 (scandir (string-append cwd "/build")))
15227 ":" (getenv "PYTHONPATH")))
15228 (setenv "PATH"
15229 (string-append (getenv "PATH")
15230 ":" cwd "/bin"))
15231 (setenv "TMPDIR" "/tmp")
15232
15233 (substitute* "Cheetah/Tests/Test.py"
15234 (("unittest.TextTestRunner\\(\\)")
15235 "unittest.TextTestRunner(verbosity=2)"))
15236
15237 (invoke "python" "Cheetah/Tests/Test.py")))))))
15238 (propagated-inputs
15239 `(("python-markdown" ,python-markdown))) ;optional
15240 (home-page "https://cheetahtemplate.org/")
15241 (synopsis "Template engine")
15242 (description "Cheetah is a text-based template engine and Python code
15243 generator.
15244
15245 Cheetah can be used as a standalone templating utility or referenced as
15246 a library from other Python applications. It has many potential uses,
15247 but web developers looking for a viable alternative to ASP, JSP, PHP and
15248 PSP are expected to be its principle user group.
15249
15250 Features:
15251 @enumerate
15252 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15253 text-based format.
15254 @item Cleanly separates content, graphic design, and program code.
15255 @item Blends the power and flexibility of Python with a simple template language
15256 that non-programmers can understand.
15257 @item Gives template writers full access to any Python data structure, module,
15258 function, object, or method in their templates.
15259 @item Makes code reuse easy by providing an object-orientated interface to
15260 templates that is accessible from Python code or other Cheetah templates.
15261 One template can subclass another and selectively reimplement sections of it.
15262 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15263 improve the performance of a dynamic website.
15264 @item Compiles templates into optimized, yet readable, Python code.
15265 @end enumerate")
15266 (license (license:x11-style "file://LICENSE"))))
15267
15268 (define-public python2-cheetah
15269 (package-with-python2 python-cheetah))
15270
15271 (define-public python-dulwich
15272 (package
15273 (name "python-dulwich")
15274 (version "0.19.16")
15275 (source
15276 (origin
15277 (method url-fetch)
15278 (uri (list (string-append "https://www.dulwich.io/releases/"
15279 "dulwich-" version ".tar.gz")
15280 (pypi-uri "dulwich" version)))
15281 (sha256
15282 (base32
15283 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15284 (build-system python-build-system)
15285 (arguments
15286 `(#:phases
15287 (modify-phases %standard-phases
15288 (add-before 'check 'fix-tests
15289 (lambda* (#:key inputs #:allow-other-keys)
15290 ;; The tests use Popen with a custom environment which doesn't
15291 ;; include PATH.
15292 (substitute* "dulwich/tests/compat/utils.py"
15293 (("'git'") (string-append "'"
15294 (which "git")
15295 "'")))
15296 (substitute* '("dulwich/tests/test_repository.py"
15297 "dulwich/tests/test_hooks.py")
15298 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15299 (setenv "TEST_RUNNER" "unittest")
15300 (setenv "PYTHONHASHSEED" "random")
15301 #t)))))
15302 (propagated-inputs
15303 `(("python-fastimport" ,python-fastimport)
15304 ("python-urllib3" ,python-urllib3)))
15305 (native-inputs
15306 `(("python-mock" ,python-mock)
15307 ("python-geventhttpclient" ,python-geventhttpclient)
15308 ("git" ,git)))
15309 (home-page "https://www.dulwich.io/")
15310 (synopsis "Git implementation in Python")
15311 (description "Dulwich is an implementation of the Git file formats and
15312 protocols written in pure Python.")
15313 ;; Can be used with either license.
15314 (license (list license:asl2.0 license:gpl2+))))
15315
15316 (define-public python2-dulwich
15317 (package-with-python2 python-dulwich))
15318
15319 (define-public python-pbkdf2
15320 (package
15321 (name "python-pbkdf2")
15322 (version "1.3")
15323 (source
15324 (origin
15325 (method url-fetch)
15326 (uri (pypi-uri "pbkdf2" version))
15327 (sha256
15328 (base32
15329 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15330 (build-system python-build-system)
15331 (arguments
15332 '(#:phases
15333 (modify-phases %standard-phases
15334 (replace 'check
15335 (lambda _
15336 (setenv "PYTHONPATH"
15337 (string-append (getcwd) "/build/lib:"
15338 (getenv "PYTHONPATH")))
15339 (invoke "python" "test/test_pbkdf2.py"))))))
15340 (propagated-inputs
15341 `(("python-pycrypto" ,python-pycrypto))) ; optional
15342 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15343 (synopsis "Password-based key derivation")
15344 (description "This module implements the password-based key derivation
15345 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15346
15347 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15348 is part of the RSA Public Key Cryptography Standards series. The provided
15349 implementation takes a password or a passphrase and a salt value (and
15350 optionally a iteration count, a digest module, and a MAC module) and provides
15351 a file-like object from which an arbitrarily-sized key can be read.")
15352 (license license:expat)))
15353
15354 (define-public python2-pbkdf2
15355 (package-with-python2 python-pbkdf2))
15356
15357 (define-public python-qrcode
15358 (package
15359 (name "python-qrcode")
15360 (version "6.1")
15361 (source
15362 (origin
15363 (method url-fetch)
15364 (uri (pypi-uri "qrcode" version))
15365 (sha256
15366 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15367 (build-system python-build-system)
15368 (arguments
15369 ;; FIXME: Tests require packaging 'pymaging'.
15370 '(#:tests? #f))
15371 (propagated-inputs
15372 `(("python-lxml" ,python-lxml) ; for SVG output
15373 ("python-pillow" ,python-pillow) ; for PNG output
15374 ("python-six" ,python-six)))
15375 (home-page "https://github.com/lincolnloop/python-qrcode")
15376 (synopsis "QR Code image generator")
15377 (description "This package provides a pure Python QR Code generator
15378 module. It uses the Python Imaging Library (PIL) to allow for the generation
15379 of QR Codes.
15380
15381 In addition this package provides a command line tool to generate QR codes and
15382 either write these QR codes to a file or do the output as ascii art at the
15383 console.")
15384 (license license:bsd-3)))
15385
15386 (define-public python2-qrcode
15387 (package-with-python2 python-qrcode))
15388
15389 (define-public python-rst2ansi
15390 (package
15391 (name "python-rst2ansi")
15392 (version "0.1.5")
15393 (source
15394 (origin
15395 (method url-fetch)
15396 (uri (pypi-uri "rst2ansi" version))
15397 (sha256
15398 (base32
15399 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15400 (build-system python-build-system)
15401 (propagated-inputs
15402 `(("python-docutils" ,python-docutils)))
15403 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15404 (synopsis "Convert RST to ANSI-decorated console output")
15405 (description
15406 "Python module dedicated to rendering RST (reStructuredText) documents
15407 to ansi-escaped strings suitable for display in a terminal.")
15408 (license license:expat)))
15409
15410 (define-public python-ansi2html
15411 (package
15412 (name "python-ansi2html")
15413 (version "1.2.0")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 (uri (pypi-uri "ansi2html" version))
15418 (sha256
15419 (base32
15420 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15421 (build-system python-build-system)
15422 (native-inputs
15423 `(("python-mock" ,python-mock)
15424 ("python-nose" ,python-nose)))
15425 (propagated-inputs
15426 `(("python-six" ,python-six)))
15427 (home-page "https://github.com/ralphbean/ansi2html")
15428 (synopsis "Convert ANSI-decorated console output to HTML")
15429 (description
15430 "@command{ansi2html} is a Python library and command line utility for
15431 converting text with ANSI color codes to HTML or LaTeX.")
15432 (license license:gpl3+)))
15433
15434 (define-public python2-ansi2html
15435 (package-with-python2 python-ansi2html))
15436
15437 (define-public python-ddt
15438 (package
15439 (name "python-ddt")
15440 (version "1.4.1")
15441 (source
15442 (origin
15443 (method url-fetch)
15444 (uri (pypi-uri "ddt" version))
15445 (sha256
15446 (base32
15447 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15448 (build-system python-build-system)
15449 (native-inputs
15450 `(("python-pytest" ,python-pytest)))
15451 (propagated-inputs
15452 `(("python-pyyaml" ,python-pyyaml)))
15453 (home-page "https://github.com/datadriventests/ddt")
15454 (synopsis "Data-Driven Tests")
15455 (description
15456 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15457 running it with different test data, and make it appear as multiple test
15458 cases.")
15459 (license license:expat)))
15460
15461 (define-public python-pycountry
15462 (package
15463 (name "python-pycountry")
15464 (version "18.5.26")
15465 (source
15466 (origin
15467 (method url-fetch)
15468 (uri (pypi-uri "pycountry" version))
15469 (sha256
15470 (base32
15471 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15472 (build-system python-build-system)
15473 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15474 (synopsis "ISO databases for languages, countries, currencies, etc.")
15475 (description
15476 "@code{pycountry} provides the ISO databases for the standards:
15477 @enumerate
15478 @item 639-3 (Languages)
15479 @item 3166 (Countries)
15480 @item 3166-3 (Deleted Countries)
15481 @item 3166-2 (Subdivisions of countries)
15482 @item 4217 (Currencies)
15483 @item 15924 (Scripts)
15484 @end enumerate
15485 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15486 through a Python API.")
15487 (license license:lgpl2.1+)))
15488
15489 (define-public python2-pycountry
15490 (package-with-python2 python-pycountry))
15491
15492 (define-public python-pycosat
15493 (package
15494 (name "python-pycosat")
15495 (version "0.6.3")
15496 (source
15497 (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "pycosat" version ".zip"))
15500 (sha256
15501 (base32
15502 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15503 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15504 (build-system python-build-system)
15505 (native-inputs
15506 `(("unzip" ,unzip)))
15507 (home-page "https://github.com/ContinuumIO/pycosat")
15508 (synopsis "Bindings to picosat (a SAT solver)")
15509 (description
15510 "This package provides efficient Python bindings to @code{picosat} on
15511 the C level. When importing pycosat, the @code{picosat} solver becomes part
15512 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15513 Problem} (SAT) solver.")
15514 (license license:expat)))
15515
15516 (define-public python2-pycosat
15517 (package-with-python2 python-pycosat))
15518
15519 (define-public python2-ruamel.ordereddict
15520 (package
15521 (name "python2-ruamel.ordereddict")
15522 (version "0.4.9")
15523 (source
15524 (origin
15525 (method url-fetch)
15526 (uri (pypi-uri "ruamel.ordereddict" version))
15527 (sha256
15528 (base32
15529 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15530 (build-system python-build-system)
15531 (arguments
15532 `(#:python ,python-2
15533 #:phases
15534 (modify-phases %standard-phases
15535 (delete 'check)
15536 (add-after 'install 'check
15537 (lambda* (#:key inputs outputs #:allow-other-keys)
15538 (add-installed-pythonpath inputs outputs)
15539 (invoke "python" "test/testordereddict.py"))))))
15540 (home-page "https://bitbucket.org/ruamel/ordereddict")
15541 (synopsis "Version of dict that keeps keys in insertion order")
15542 (description
15543 "This is an implementation of an ordered dictionary with @dfn{Key
15544 Insertion Order} (KIO: updates of values do not affect the position of the
15545 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15546 removed and put at the back). The standard library module @code{OrderedDict},
15547 implemented later, implements a subset of @code{ordereddict} functionality.
15548 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15549 Order} (KSO, no sorting function can be specified, but a transform can be
15550 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15551 (license license:expat)))
15552
15553 (define-public python-pypeg2
15554 (package
15555 (name "python-pypeg2")
15556 (version "2.15.2")
15557 (source
15558 (origin
15559 (method url-fetch)
15560 (uri (pypi-uri "pyPEG2" version))
15561 (sha256
15562 (base32
15563 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15564 (build-system python-build-system)
15565 (propagated-inputs `(("python-lxml" ,python-lxml)))
15566 (arguments
15567 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15568 '(#:tests? #f))
15569 (home-page "https://fdik.org/pyPEG/")
15570 (synopsis "Parsering Expression Grammars in Python")
15571 (description "PyPEG is an intrinsic parser interpreter framework for
15572 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15573 parse many formal languages.")
15574 (license license:gpl2)))
15575
15576 (define-public python-incremental
15577 (package
15578 (name "python-incremental")
15579 (version "17.5.0")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "incremental" version))
15584 (sha256
15585 (base32
15586 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15587 (build-system python-build-system)
15588 (home-page "https://github.com/hawkowl/incremental")
15589 (synopsis "Library for versioning Python projects")
15590 (description "Incremental is a small library that versions your Python
15591 projects.")
15592 (license license:expat)))
15593
15594 (define-public python2-incremental
15595 (package-with-python2 python-incremental))
15596
15597 (define-public python-invoke
15598 (package
15599 (name "python-invoke")
15600 (home-page "https://www.pyinvoke.org/")
15601 (version "1.5.0")
15602 (source (origin
15603 (method url-fetch)
15604 (uri (pypi-uri "invoke" version))
15605 (sha256
15606 (base32
15607 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
15608 (build-system python-build-system)
15609 (arguments
15610 ;; XXX: Requires many dependencies that are not yet in Guix.
15611 `(#:tests? #f
15612 #:phases
15613 (modify-phases %standard-phases
15614 (add-after 'unpack 'fix-bash-path
15615 (lambda* (#:key inputs #:allow-other-keys)
15616 (let ((bash (assoc-ref inputs "bash")))
15617 (substitute* "invoke/config.py"
15618 (("shell = \"/bin/bash\"")
15619 (string-append "shell = \"" bash "/bin/bash\""))
15620 )
15621 #t))))))
15622 (inputs
15623 `(("bash" ,bash-minimal)))
15624 (synopsis "Pythonic task execution")
15625 (description
15626 "Invoke is a Python task execution tool and library, drawing inspiration
15627 from various sources to arrive at a powerful and clean feature set. It is
15628 evolved from the Fabric project, but focuses on local and abstract concerns
15629 instead of servers and network commands.")
15630 (license license:bsd-3)))
15631
15632 (define-public python2-invoke
15633 (package-with-python2 python-invoke))
15634
15635 (define-public python-automat
15636 (package
15637 (name "python-automat")
15638 (version "20.2.0")
15639 (source (origin
15640 (method url-fetch)
15641 (uri (pypi-uri "Automat" version))
15642 (sha256
15643 (base32
15644 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15645 (build-system python-build-system)
15646 ;; We disable the tests because they require python-twisted, while
15647 ;; python-twisted depends on python-automat. Twisted is optional, but the
15648 ;; tests fail if it is not available. Also see
15649 ;; <https://github.com/glyph/automat/issues/71>.
15650 (arguments '(#:tests? #f))
15651 (native-inputs
15652 `(("python-m2r" ,python-m2r)
15653 ("python-setuptools-scm" ,python-setuptools-scm)
15654 ("python-graphviz" ,python-graphviz)))
15655 (propagated-inputs
15656 `(("python-six" ,python-six)
15657 ("python-attrs" ,python-attrs)))
15658 (home-page "https://github.com/glyph/Automat")
15659 (synopsis "Self-service finite-state machines")
15660 (description "Automat is a library for concise, idiomatic Python
15661 expression of finite-state automata (particularly deterministic finite-state
15662 transducers).")
15663 (license license:expat)))
15664
15665 (define-public python2-automat
15666 (package-with-python2 python-automat))
15667
15668 (define-public python-m2r
15669 (package
15670 (name "python-m2r")
15671 (version "0.2.1")
15672 (source (origin
15673 (method url-fetch)
15674 (uri (pypi-uri "m2r" version))
15675 (sha256
15676 (base32
15677 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15678 (build-system python-build-system)
15679 (propagated-inputs
15680 `(("python-docutils" ,python-docutils)
15681 ("python-mistune" ,python-mistune)))
15682 (native-inputs
15683 `(("python-pygments" ,python-pygments)
15684 ("python-mock" ,python-mock)))
15685 (home-page "https://github.com/miyakogi/m2r")
15686 (synopsis "Markdown to reStructuredText converter")
15687 (description "M2R converts a markdown file including reST markups to valid
15688 reST format.")
15689 (license license:expat)))
15690
15691 (define-public python2-m2r
15692 (package-with-python2 python-m2r))
15693
15694 (define-public python-constantly
15695 (package
15696 (name "python-constantly")
15697 (version "15.1.0")
15698 (source (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "constantly" version))
15701 (sha256
15702 (base32
15703 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15704 (build-system python-build-system)
15705 (home-page "https://github.com/twisted/constantly")
15706 (synopsis "Symbolic constants in Python")
15707 (description "Constantly is a Python library that provides symbolic
15708 constant support. It includes collections and constants with text, numeric,
15709 and bit flag values.")
15710 (license license:expat)))
15711
15712 (define-public python2-constantly
15713 (package-with-python2 python-constantly))
15714
15715 (define-public python-attrs
15716 (package
15717 (name "python-attrs")
15718 (version "19.3.0")
15719 (source (origin
15720 (method url-fetch)
15721 (uri (pypi-uri "attrs" version))
15722 (sha256
15723 (base32
15724 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15725 (build-system python-build-system)
15726 (arguments
15727 `(#:modules ((guix build utils)
15728 (guix build python-build-system)
15729 (ice-9 ftw)
15730 (srfi srfi-1)
15731 (srfi srfi-26))
15732 #:phases (modify-phases %standard-phases
15733 (replace 'check
15734 (lambda _
15735 (let ((cwd (getcwd)))
15736 (setenv "PYTHONPATH"
15737 (string-append
15738 cwd "/build/"
15739 (find (cut string-prefix? "lib" <>)
15740 (scandir (string-append cwd "/build")))
15741 ":"
15742 (getenv "PYTHONPATH")))
15743 (invoke "python" "-m" "pytest")))))))
15744 (native-inputs
15745 `(("python-coverage" ,python-coverage)
15746 ("python-hypothesis" ,python-hypothesis)
15747 ("python-pympler" ,python-pympler)
15748 ("python-pytest" ,python-pytest)
15749 ("python-six" ,python-six)
15750 ("python-sphinx" ,python-sphinx)
15751 ("python-zope-interface" ,python-zope-interface)))
15752 (home-page "https://github.com/python-attrs/attrs/")
15753 (synopsis "Attributes without boilerplate")
15754 (description "@code{attrs} is a Python package with class decorators that
15755 ease the chores of implementing the most common attribute-related object
15756 protocols.")
15757 (license license:expat)))
15758
15759 (define-public python2-attrs
15760 (package-with-python2 python-attrs))
15761
15762 (define-public python-attrs-bootstrap
15763 (package
15764 (inherit python-attrs)
15765 (name "python-attrs-bootstrap")
15766 (native-inputs `())
15767 (arguments `(#:tests? #f))))
15768
15769 (define-public python2-attrs-bootstrap
15770 (package-with-python2 python-attrs-bootstrap))
15771
15772 (define-public python2-cliapp
15773 (package
15774 (name "python2-cliapp")
15775 (version "1.20180812.1")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (string-append
15780 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15781 version ".tar.gz"))
15782 (sha256
15783 (base32
15784 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15785 (build-system python-build-system)
15786 (arguments
15787 `(#:python ,python-2
15788 #:phases
15789 (modify-phases %standard-phases
15790 ;; check phase needs to be run before the build phase. If not,
15791 ;; coverage-test-runner looks for tests for the built source files,
15792 ;; and fails.
15793 (delete 'check)
15794 (add-before 'build 'check
15795 (lambda _
15796 ;; Disable python3 tests
15797 (substitute* "check"
15798 (("python3") "# python3"))
15799 (invoke "./check"))))))
15800 (native-inputs
15801 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15802 ("python2-pep8" ,python2-pep8)))
15803 (propagated-inputs
15804 `(("python2-pyaml" ,python2-pyaml)))
15805 (home-page "https://liw.fi/cliapp/")
15806 (synopsis "Python framework for command line programs")
15807 (description "@code{python2-cliapp} is a python framework for
15808 command line programs. It contains the typical stuff such programs
15809 need to do, such as parsing the command line for options, and
15810 iterating over input files.")
15811 (license license:gpl2+)))
15812
15813 (define-public python2-ttystatus
15814 (package
15815 (name "python2-ttystatus")
15816 (version "0.38")
15817 (source
15818 (origin
15819 (method git-fetch)
15820 (uri (git-reference
15821 (url "http://git.liw.fi/ttystatus")
15822 ;; There are no tags after ttystatus-0.36.
15823 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15824 (sha256
15825 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15826 (file-name (git-file-name name version))))
15827 (build-system python-build-system)
15828 (native-inputs
15829 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15830 ("python2-pep8" ,python2-pep8)))
15831 (arguments
15832 `(#:python ,python-2
15833 #:phases
15834 (modify-phases %standard-phases
15835 ;; check phase needs to be run before the build phase. If not,
15836 ;; coverage-test-runner looks for tests for the built source files,
15837 ;; and fails.
15838 (delete 'check)
15839 (add-before 'build 'check
15840 (lambda _ (invoke "make" "check"))))))
15841 (home-page "https://liw.fi/ttystatus/")
15842 (synopsis "Python library for showing progress reporting and
15843 status updates on terminals")
15844 (description "@code{python2-ttystatus} is a python library for
15845 showing progress reporting and status updates on terminals, for
15846 command line programs. Output is automatically adapted to the width
15847 of the terminal: truncated if it does not fit, and resized if the
15848 terminal size changes.")
15849 (license license:gpl3+)))
15850
15851 (define-public python2-tracing
15852 (package
15853 (name "python2-tracing")
15854 (version "0.10")
15855 (source
15856 (origin
15857 (method url-fetch)
15858 (uri (string-append
15859 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15860 version ".tar.gz"))
15861 (sha256
15862 (base32
15863 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15864 (build-system python-build-system)
15865 (arguments
15866 `(#:python ,python-2))
15867 (home-page "https://liw.fi/tracing/")
15868 (synopsis "Python debug logging helper")
15869 (description "@code{python2-tracing} is a python library for
15870 logging debug messages. It provides a way to turn debugging messages
15871 on and off, based on the filename they occur in. It is much faster
15872 than using @code{logging.Filter} to accomplish the same thing, which
15873 matters when code is run in production mode. The actual logging still
15874 happens using the @code{logging} library.")
15875 (license license:gpl3+)))
15876
15877 (define-public python2-larch
15878 (package
15879 (name "python2-larch")
15880 (version "1.20151025")
15881 (source
15882 (origin
15883 (method url-fetch)
15884 (uri (string-append
15885 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15886 version ".tar.gz"))
15887 (patches (search-patches
15888 "python2-larch-coverage-4.0a6-compatibility.patch"))
15889 (sha256
15890 (base32
15891 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15892 (build-system python-build-system)
15893 (arguments
15894 `(#:python ,python-2
15895 #:phases
15896 (modify-phases %standard-phases
15897 ;; check phase needs to be run before the build phase. If not,
15898 ;; coverage-test-runner looks for tests for the built source files,
15899 ;; and fails.
15900 (delete 'check)
15901 (add-before 'build 'check
15902 (lambda _ (invoke "make" "check"))))))
15903 (native-inputs
15904 `(("cmdtest" ,cmdtest)
15905 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15906 (propagated-inputs
15907 `(("python2-tracing" ,python2-tracing)))
15908 (home-page "https://liw.fi/larch/")
15909 (synopsis "Python copy-on-write B-tree library")
15910 (description "@code{python2-larch} is an implementation of
15911 particular kind of B-tree, based on research by Ohad Rodeh. See
15912 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15913 on the data structure.
15914
15915 The distinctive feature of this B-tree is that a node is never
15916 (conceptually) modified. Instead, all updates are done by
15917 copy-on-write. This makes it easy to clone a tree, and modify only the
15918 clone, while other processes access the original tree.")
15919 (license license:gpl3+)))
15920
15921 (define-public python-astroid
15922 (package
15923 (name "python-astroid")
15924 (version "2.4.2")
15925 (source
15926 (origin
15927 (method url-fetch)
15928 (uri (pypi-uri "astroid" version))
15929 (sha256
15930 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15931 (modules '((guix build utils)))
15932 (snippet
15933 '(begin
15934 ;; Check to see if the version pinning has been removed.
15935 (substitute* "astroid/__pkginfo__.py"
15936 (("==1\\.4\\.\\*") ">=1.4.0"))
15937 #t))))
15938 (build-system python-build-system)
15939 (propagated-inputs
15940 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15941 ("python-six" ,python-six)
15942 ("python-wrapt" ,python-wrapt)))
15943 (native-inputs
15944 `(("python-dateutil" ,python-dateutil)
15945 ("python-pytest" ,python-pytest)
15946 ("python-pytest-runner" ,python-pytest-runner)))
15947 (home-page "https://github.com/PyCQA/astroid")
15948 (synopsis "Common base representation of python source code for pylint and
15949 other projects")
15950 (description "@code{python-astroid} provides a common base representation
15951 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15952
15953 It provides a compatible representation which comes from the _ast module. It
15954 rebuilds the tree generated by the builtin _ast module by recursively walking
15955 down the AST and building an extended ast. The new node classes have
15956 additional methods and attributes for different usages. They include some
15957 support for static inference and local name scopes. Furthermore, astroid
15958 builds partial trees by inspecting living objects.")
15959 (license license:lgpl2.1+)
15960 (properties `((python2-variant . ,(delay python2-astroid))))))
15961
15962 (define-public python2-astroid
15963 (let ((base (package-with-python2
15964 (strip-python2-variant python-astroid))))
15965 (package (inherit base)
15966 ;; Version 2.x removes python2 support.
15967 (version "1.6.5")
15968 (source
15969 (origin
15970 (method url-fetch)
15971 (uri (pypi-uri "astroid" version))
15972 (sha256
15973 (base32
15974 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15975 (arguments
15976 (substitute-keyword-arguments (package-arguments base)
15977 ((#:phases phases)
15978 `(modify-phases ,phases
15979 (add-after 'unpack 'remove-spurious-test
15980 (lambda _
15981 ;; https://github.com/PyCQA/astroid/issues/276
15982 (delete-file "astroid/tests/unittest_brain.py")
15983 #t))
15984 (replace 'check
15985 (lambda _
15986 (invoke"python" "-m" "unittest" "discover"
15987 "-p" "unittest*.py")))))))
15988 (native-inputs `())
15989 (propagated-inputs
15990 `(("python2-backports-functools-lru-cache"
15991 ,python2-backports-functools-lru-cache)
15992 ("python2-enum34" ,python2-enum34)
15993 ("python2-singledispatch" ,python2-singledispatch)
15994 ,@(alist-delete "python-typed-ast"
15995 (package-propagated-inputs base)))))))
15996
15997 (define-public python-isbnlib
15998 (package
15999 (name "python-isbnlib")
16000 (version "3.10.4")
16001 (source
16002 (origin
16003 (method url-fetch)
16004 (uri (pypi-uri "isbnlib" version))
16005 (sha256
16006 (base32
16007 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16008 (build-system python-build-system)
16009 (arguments '(#:tests? #f)) ; No test
16010 (home-page "https://github.com/xlcnd/isbnlib")
16011 (synopsis "Python library to work with ISBN strings")
16012 (description "@code{python-isbnlib} is a (pure) python library that provides
16013 several useful methods and functions to validate, clean, transform, hyphenate and
16014 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16015 version, is suitable to be include as a dependency in other projects.")
16016 (license license:lgpl3+)))
16017
16018 (define-public python-isort
16019 (package
16020 (name "python-isort")
16021 (version "4.3.4")
16022 (source
16023 (origin
16024 (method git-fetch)
16025 (uri (git-reference
16026 ;; Tests pass only from the Github sources
16027 (url "https://github.com/timothycrosley/isort")
16028 (commit version)))
16029 (file-name (git-file-name name version))
16030 (sha256
16031 (base32
16032 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16033 (build-system python-build-system)
16034 (native-inputs
16035 `(("python-mock" ,python-mock)
16036 ("python-pytest" ,python-pytest)))
16037 (home-page "https://github.com/timothycrosley/isort")
16038 (synopsis "Python utility/library to sort python imports")
16039 (description "@code{python-isort} is a python utility/library to sort
16040 imports alphabetically, and automatically separated into sections. It
16041 provides a command line utility, a python library and plugins for various
16042 editors.")
16043 (license license:expat)
16044 (properties `((python2-variant . ,(delay python2-isort))))))
16045
16046 (define-public python2-isort
16047 (let ((base (package-with-python2
16048 (strip-python2-variant python-isort))))
16049 (package/inherit base
16050 (native-inputs
16051 `(("python2-futures" ,python2-futures)
16052 ,@(package-native-inputs base))))))
16053
16054 (define-public python2-backports-functools-lru-cache
16055 (package
16056 (name "python2-backports-functools-lru-cache")
16057 (version "1.6.1")
16058 (source
16059 (origin
16060 (method url-fetch)
16061 ;; only the pypi tarballs contain the necessary metadata
16062 (uri (pypi-uri "backports.functools_lru_cache" version))
16063 (sha256
16064 (base32
16065 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16066 (build-system python-build-system)
16067 (native-inputs
16068 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16069 (arguments
16070 `(#:python ,python-2))
16071 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16072 (synopsis "Backport of functools.lru_cache from Python 3.3")
16073 (description "@code{python2-backports-functools-lru-cache} is a backport
16074 of @code{functools.lru_cache} from python 3.3.")
16075 (license license:expat)))
16076
16077 (define-public python-configparser
16078 (package
16079 (name "python-configparser")
16080 (version "4.0.2")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "configparser" version))
16085 (sha256
16086 (base32
16087 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16088 (native-inputs
16089 `(("python-setuptools_scm" ,python-setuptools-scm)))
16090 (build-system python-build-system)
16091 (home-page "https://github.com/jaraco/configparser/")
16092 (synopsis "Backport of configparser from python 3.5")
16093 (description "@code{python-configparser} is a backport of
16094 @code{configparser} from Python 3.5 so that it can be used directly
16095 in other versions.")
16096 (license license:expat)))
16097
16098 (define-public python2-configparser
16099 (package-with-python2 python-configparser))
16100
16101 (define-public python-iniconfig
16102 (package
16103 (name "python-iniconfig")
16104 (version "1.1.1")
16105 (source
16106 (origin
16107 (method url-fetch)
16108 (uri (pypi-uri "iniconfig" version))
16109 (sha256
16110 (base32
16111 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16112 (build-system python-build-system)
16113 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16114 (synopsis "Simple INI-file parser")
16115 (description "The @code{iniconfig} package provides a small and simple
16116 INI-file parser module having a unique set of features; @code{iniconfig}
16117 @itemize
16118 @item maintains the order of sections and entries;
16119 @item supports multi-line values with or without line-continuations;
16120 @item supports \"#\" comments everywhere;
16121 @item raises errors with proper line-numbers;
16122 @item raises an error when two sections have the same name.
16123 @end itemize")
16124 (license license:expat)))
16125
16126 (define-public python-mamba
16127 (package
16128 (name "python-mamba")
16129 (version "0.11.2")
16130 (source (origin
16131 (method url-fetch)
16132 (uri (pypi-uri "mamba" version))
16133 (sha256
16134 (base32
16135 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16136 (build-system python-build-system)
16137 (arguments `(#:tests? #f)) ; No test
16138 (propagated-inputs
16139 `(("python-clint" ,python-clint)
16140 ("python-coverage" ,python-coverage)))
16141 (home-page "https://nestorsalceda.com/mamba/")
16142 (synopsis "Test runner for Python")
16143 (description
16144 "Mamba is a Behaviour-Driven Development tool for Python developers.
16145 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16146 (license license:expat)))
16147
16148 (define-public python-mando
16149 (package
16150 (name "python-mando")
16151 (version "0.6.4")
16152 (source (origin
16153 (method url-fetch)
16154 (uri (pypi-uri "mando" version))
16155 (sha256
16156 (base32
16157 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16158 (build-system python-build-system)
16159 (propagated-inputs
16160 `(("python-rst2ansi" ,python-rst2ansi)
16161 ("python-six" ,python-six)))
16162 (native-inputs
16163 `(("python-pytest" ,python-pytest)))
16164 (home-page "https://mando.readthedocs.org/")
16165 (synopsis
16166 "Wrapper around argparse, allowing creation of complete CLI applications")
16167 (description
16168 "This package is a wrapper around argparse, allowing you to write complete CLI
16169 applications in seconds while maintaining all the flexibility.")
16170 (license license:expat)))
16171
16172 (define-public python2-mando
16173 (package-with-python2 python-mando))
16174
16175 (define-public python2-argparse
16176 (package
16177 (name "python2-argparse")
16178 (version "1.4.0")
16179 (source
16180 (origin
16181 (method url-fetch)
16182 (uri (pypi-uri "argparse" version))
16183 (sha256
16184 (base32
16185 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16186 (build-system python-build-system)
16187 (arguments
16188 `(#:python ,python-2))
16189 (home-page "https://github.com/ThomasWaldmann/argparse/")
16190 (synopsis "Python command-line parsing library")
16191 (description
16192 "This package is mostly for people who want to have @code{argparse} on
16193 older Pythons because it was not part of the standard library back then.")
16194 (license license:psfl)))
16195
16196 (define-public python-fudge
16197 (package
16198 (name "python-fudge")
16199 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16200 ;; package, which is currently the only use of this package.
16201 (version "0.9.6")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "fudge" version))
16206 (sha256
16207 (base32
16208 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16209 (build-system python-build-system)
16210 (arguments
16211 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16212 (home-page "https://github.com/fudge-py/fudge")
16213 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16214 (description
16215 "Fudge is a Python module for using fake objects (mocks and stubs) to
16216 test real ones.
16217
16218 In readable Python code, you declare the methods available on your fake object
16219 and how they should be called. Then you inject that into your application and
16220 start testing. This declarative approach means you don’t have to record and
16221 playback actions and you don’t have to inspect your fakes after running code.
16222 If the fake object was used incorrectly then you’ll see an informative
16223 exception message with a traceback that points to the culprit.")
16224 (license license:expat)))
16225
16226 (define-public python2-fudge
16227 (package-with-python2 python-fudge))
16228
16229 (define-public python-mwclient
16230 (package
16231 (name "python-mwclient")
16232 (version "0.10.1")
16233 (source
16234 (origin
16235 (method git-fetch)
16236 ;; The PyPI version wouldn't contain tests.
16237 (uri (git-reference
16238 (url "https://github.com/mwclient/mwclient")
16239 (commit (string-append "v" version))))
16240 (file-name (git-file-name name version))
16241 (sha256
16242 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16243 (build-system python-build-system)
16244 (propagated-inputs
16245 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16246 ("python-six" ,python-six)))
16247 (native-inputs
16248 `(("python-mock" ,python-mock)
16249 ("python-pytest" ,python-pytest)
16250 ("python-pytest-cov" ,python-pytest-cov)
16251 ("python-pytest-runner" ,python-pytest-runner)
16252 ("python-responses" ,python-responses)))
16253 (home-page "https://github.com/btongminh/mwclient")
16254 (synopsis "MediaWiki API client")
16255 (description "This package provides a MediaWiki API client.")
16256 (license license:expat)))
16257
16258 (define-public python-utils
16259 (package
16260 (name "python-utils")
16261 (version "2.4.0")
16262 (source (origin
16263 (method url-fetch)
16264 (uri (pypi-uri "python-utils" version))
16265 (sha256
16266 (base32
16267 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16268 (build-system python-build-system)
16269 (arguments
16270 `(#:phases
16271 (modify-phases %standard-phases
16272 (replace 'check
16273 (lambda* (#:key inputs outputs #:allow-other-keys)
16274 (add-installed-pythonpath inputs outputs)
16275 (delete-file "pytest.ini")
16276 (invoke "pytest" "-vv"))))))
16277 (native-inputs
16278 `(("pytest-runner" ,python-pytest-runner)
16279 ("pytest" ,python-pytest)
16280 ("six" ,python-six)))
16281 (home-page "https://github.com/WoLpH/python-utils")
16282 (synopsis "Convenient utilities not included with the standard Python install")
16283 (description
16284 "Python Utils is a collection of small Python functions and classes which
16285 make common patterns shorter and easier.")
16286 (license license:bsd-2)))
16287
16288 (define-public python2-utils
16289 (package-with-python2 python-utils))
16290
16291 (define-public python-diff-match-patch
16292 (package
16293 (name "python-diff-match-patch")
16294 (version "20121119")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "diff-match-patch" version))
16299 (sha256
16300 (base32
16301 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16302 (build-system python-build-system)
16303 (home-page "https://code.google.com/p/google-diff-match-patch")
16304 (synopsis "Synchronize plain text")
16305 (description "Diff Match and Patch libraries offer robust algorithms to
16306 perform the operations required for synchronizing plain text.")
16307 (license license:asl2.0)))
16308
16309 (define-public python2-diff-match-patch
16310 (package-with-python2 python-diff-match-patch))
16311
16312 (define-public python-dirsync
16313 (package
16314 (name "python-dirsync")
16315 (version "2.2.5")
16316 (source
16317 (origin
16318 (method url-fetch)
16319 (uri (pypi-uri "dirsync" version))
16320 (sha256
16321 (base32
16322 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16323 (build-system python-build-system)
16324 (propagated-inputs
16325 `(("six" ,python-six)))
16326 (home-page "https://github.com/tkhyn/dirsync")
16327 (synopsis "Advanced directory tree synchronisation tool")
16328 (description "Advanced directory tree synchronisation tool.")
16329 (license license:expat)))
16330
16331 (define-public python2-dirsync
16332 (package-with-python2 python-dirsync))
16333
16334 (define-public python-levenshtein
16335 (package
16336 (name "python-levenshtein")
16337 (version "0.12.0")
16338 (source
16339 (origin
16340 (method url-fetch)
16341 (uri (pypi-uri "python-Levenshtein" version))
16342 (sha256
16343 (base32
16344 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16345 (build-system python-build-system)
16346 (home-page "https://github.com/ztane/python-Levenshtein")
16347 (synopsis "Fast computation of Levenshtein distance and string similarity")
16348 (description
16349 "The Levenshtein Python C extension module contains functions for fast computation of
16350 @enumerate
16351 @item Levenshtein (edit) distance, and edit operations
16352 @item string similarity
16353 @item approximate median strings, and generally string averaging
16354 @item string sequence and set similarity
16355 @end enumerate
16356 It supports both normal and Unicode strings.")
16357 (license license:gpl2+)))
16358
16359 (define-public python2-levenshtein
16360 (package-with-python2 python-levenshtein))
16361
16362 (define-public python-scandir
16363 (package
16364 (name "python-scandir")
16365 (version "1.10.0")
16366 (source
16367 (origin
16368 (method url-fetch)
16369 (uri (pypi-uri "scandir" version))
16370 (sha256
16371 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16372 (build-system python-build-system)
16373 (arguments
16374 `(#:phases (modify-phases %standard-phases
16375 (replace 'check
16376 (lambda _
16377 (invoke "python" "test/run_tests.py"))))))
16378 (home-page "https://github.com/benhoyt/scandir")
16379 (synopsis "Directory iteration function")
16380 (description
16381 "Directory iteration function like os.listdir(), except that instead of
16382 returning a list of bare filenames, it yields DirEntry objects that include
16383 file type and stat information along with the name. Using scandir() increases
16384 the speed of os.walk() by 2-20 times (depending on the platform and file
16385 system) by avoiding unnecessary calls to os.stat() in most cases.
16386
16387 This package is part of the Python standard library since version 3.5.")
16388 (license license:bsd-3)))
16389
16390 (define-public python2-scandir
16391 (package-with-python2 python-scandir))
16392
16393 (define-public python2-stemming
16394 (package
16395 (name "python2-stemming")
16396 (version "1.0.1")
16397 (source
16398 (origin
16399 (method url-fetch)
16400 (uri (pypi-uri "stemming" version))
16401 (sha256
16402 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16403 (build-system python-build-system)
16404 (arguments
16405 `(#:python ,python-2))
16406 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16407 (synopsis "Python implementations of various stemming algorithms")
16408 (description
16409 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16410 stemming algorithms for English. These implementations are straightforward and
16411 efficient, unlike some Python versions of the same algorithms available on the
16412 Web. This package is an extraction of the stemming code included in the Whoosh
16413 search engine.")
16414 (license license:public-domain)))
16415
16416 (define-public python-factory-boy
16417 (package
16418 (name "python-factory-boy")
16419 (version "2.8.1")
16420 (source
16421 (origin
16422 (method url-fetch)
16423 (uri (pypi-uri "factory_boy" version))
16424 (sha256
16425 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16426 (build-system python-build-system)
16427 (arguments
16428 ;; Tests are not included in the tarball.
16429 `(#:tests? #f))
16430 (propagated-inputs
16431 `(("faker" ,python-faker)))
16432 (home-page "https://github.com/benhoyt/scandir")
16433 (synopsis "Versatile test fixtures replacement")
16434 (description
16435 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16436
16437 As a fixtures replacement tool, it aims to replace static, hard to maintain
16438 fixtures with easy-to-use factories for complex object.
16439
16440 Instead of building an exhaustive test setup with every possible combination
16441 of corner cases, factory_boy allows you to use objects customized for the
16442 current test, while only declaring the test-specific fields")
16443 (license license:expat)))
16444
16445 (define-public python2-factory-boy
16446 (package-with-python2 python-factory-boy))
16447
16448 (define-public python-translate-toolkit
16449 (package
16450 (name "python-translate-toolkit")
16451 (version "2.1.0")
16452 (source
16453 (origin
16454 (method url-fetch)
16455 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16456 (sha256
16457 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16458 (build-system python-build-system)
16459 (native-inputs
16460 `(("python-pytest" ,python-pytest)
16461 ("python-sphinx" ,python-sphinx)))
16462 (propagated-inputs
16463 `(("python-babel" ,python-babel)
16464 ("python-beautifulsoup4" ,python-beautifulsoup4)
16465 ("python-chardet" ,python-chardet)
16466 ("python-diff-match-patch" ,python-diff-match-patch)
16467 ("python-levenshtein" ,python-levenshtein)
16468 ("python-lxml" ,python-lxml)
16469 ("python-six" ,python-six)
16470 ("python-vobject" ,python-vobject)
16471 ("python-pyyaml" ,python-pyyaml)))
16472 (arguments
16473 ;; TODO: tests are not run, because they end with
16474 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16475 ;; 'parse_funcs'
16476 ;; during test setup.
16477 `(#:tests? #f))
16478 (home-page "https://toolkit.translatehouse.org")
16479 (synopsis "Tools and API for translation and localization engineering")
16480 (description
16481 "Tools and API for translation and localization engineering. It contains
16482 several utilities, as well as an API for building localization tools.")
16483 (license license:gpl2+)))
16484
16485 (define-public python2-translate-toolkit
16486 (package-with-python2 python-translate-toolkit))
16487
16488 (define-public python-packaging
16489 (package
16490 (name "python-packaging")
16491 (version "20.0")
16492 (source
16493 (origin
16494 (method url-fetch)
16495 (uri (pypi-uri "packaging" version))
16496 ;; XXX: The URL in the patch file is wrong, it should be
16497 ;; <https://github.com/pypa/packaging/pull/256>.
16498 (patches (search-patches "python-packaging-test-arch.patch"))
16499 (sha256
16500 (base32
16501 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16502 (build-system python-build-system)
16503 (arguments
16504 `(#:phases (modify-phases %standard-phases
16505 (replace 'check
16506 (lambda* (#:key tests? #:allow-other-keys)
16507 (if tests?
16508 (invoke "py.test" "-vv")
16509 (format #t "test suite not run~%"))
16510 #t)))))
16511 (native-inputs
16512 `(("python-pretend" ,python-pretend)
16513 ("python-pytest" ,python-pytest)))
16514 (propagated-inputs
16515 `(("python-pyparsing" ,python-pyparsing)
16516 ("python-six" ,python-six)))
16517 (home-page "https://github.com/pypa/packaging")
16518 (synopsis "Core utilities for Python packages")
16519 (description "Packaging is a Python module for dealing with Python packages.
16520 It offers an interface for working with package versions, names, and dependency
16521 information.")
16522 ;; From 'LICENSE': This software is made available under the terms of
16523 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16524 ;; Contributions to this software is made under the terms of *both* these
16525 ;; licenses.
16526 (license (list license:asl2.0 license:bsd-2))))
16527
16528 (define-public python2-packaging
16529 (package-with-python2 python-packaging))
16530
16531 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16532 (define-public python-packaging-bootstrap
16533 (hidden-package
16534 (package/inherit
16535 python-packaging
16536 (name "python-packaging-bootstrap")
16537 (native-inputs '())
16538 (propagated-inputs
16539 `(("python-pyparsing" ,python-pyparsing)))
16540 (arguments '(#:tests? #f)))))
16541
16542 (define-public python2-packaging-bootstrap
16543 (hidden-package
16544 (package/inherit
16545 python2-packaging
16546 (name "python2-packaging-bootstrap")
16547 (native-inputs '())
16548 (propagated-inputs
16549 `(("python-pyparsing" ,python2-pyparsing)))
16550 (arguments
16551 `(#:tests? #f
16552 ,@(package-arguments python2-packaging))))))
16553
16554 (define-public python-relatorio
16555 (package
16556 (name "python-relatorio")
16557 (version "0.8.0")
16558 (source
16559 (origin
16560 (method url-fetch)
16561 (uri (pypi-uri "relatorio" version))
16562 (sha256
16563 (base32
16564 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16565 (build-system python-build-system)
16566 (propagated-inputs
16567 `(("python-lxml" ,python-lxml)
16568 ("python-genshi" ,python-genshi)))
16569 (native-inputs
16570 `(("python-magic" ,python-magic)))
16571 (home-page "https://relatorio.tryton.org/")
16572 (synopsis "Templating library able to output ODT and PDF files")
16573 (description "Relatorio is a templating library which provides a way to
16574 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16575 for more filetypes can be easily added by creating plugins for them.")
16576 (license license:gpl3+)))
16577
16578 (define-public python2-relatorio
16579 (package-with-python2 python-relatorio))
16580
16581 (define-public python-radon
16582 (package
16583 (name "python-radon")
16584 (version "4.1.0")
16585 (source
16586 (origin
16587 (method url-fetch)
16588 (uri (pypi-uri "radon" version))
16589 (sha256
16590 (base32
16591 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16592 (build-system python-build-system)
16593 (arguments
16594 `(#:phases (modify-phases %standard-phases
16595 (replace 'check
16596 (lambda _
16597 (invoke "python" "radon/tests/run.py"))))))
16598 (propagated-inputs
16599 `(("python-colorama" ,python-colorama)
16600 ("python-flake8-polyfill" ,python-flake8-polyfill)
16601 ("python-mando" ,python-mando)))
16602 (native-inputs
16603 `(("python-pytest" ,python-pytest)
16604 ("python-pytest-mock" ,python-pytest-mock)))
16605 (home-page "https://radon.readthedocs.org/")
16606 (synopsis "Code Metrics in Python")
16607 (description "Radon is a Python tool which computes various code metrics.
16608 Supported metrics are:
16609 @itemize @bullet
16610 @item raw metrics: SLOC, comment lines, blank lines, &c.
16611 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16612 @item Halstead metrics (all of them)
16613 @item the Maintainability Index (a Visual Studio metric)
16614 @end itemize")
16615 (properties `((python2-variant . ,(delay python2-radon))))
16616 (license license:expat)))
16617
16618 (define-public python2-radon
16619 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16620 (package/inherit base
16621 (propagated-inputs
16622 `(("python-configparser" ,python2-configparser)
16623 ("python-future" ,python2-future)
16624 ,@(package-propagated-inputs base))))))
16625
16626 (define-public python-sure
16627 (package
16628 (name "python-sure")
16629 (version "1.4.11")
16630 (source
16631 (origin
16632 (method url-fetch)
16633 (uri (pypi-uri "sure" version))
16634 (sha256
16635 (base32
16636 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16637 (build-system python-build-system)
16638 (propagated-inputs
16639 `(("python-mock" ,python-mock)
16640 ("python-six" ,python-six)))
16641 (native-inputs
16642 `(("python-nose" ,python-nose)))
16643 (home-page "https://github.com/gabrielfalcao/sure")
16644 (synopsis "Automated testing library in python for python")
16645 (description
16646 "Sure is a python library that leverages a DSL for writing assertions.
16647 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16648 (license license:gpl3+)))
16649
16650 (define-public python2-sure
16651 (package-with-python2 python-sure))
16652
16653 (define-public python2-couleur
16654 ;; This package does not seem to support python3 at all, hence,
16655 ;; only the python2 variant definition is provided.
16656 (package
16657 (name "python2-couleur")
16658 (version "0.6.2")
16659 (source
16660 (origin
16661 (method url-fetch)
16662 (uri (pypi-uri "couleur" version))
16663 (sha256
16664 (base32
16665 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16666 (build-system python-build-system)
16667 (arguments
16668 `(#:python ,python-2))
16669 (home-page "https://github.com/gabrielfalcao/couleur")
16670 (synopsis
16671 "ANSI terminal tool for python, colored shell and other handy fancy features")
16672 (description
16673 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16674 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16675 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16676 ;; https://github.com/gabrielfalcao/couleur/issues/11
16677 (license license:lgpl3+)))
16678
16679 (define-public python-misaka
16680 (package
16681 (name "python-misaka")
16682 (version "2.1.1")
16683 (source
16684 (origin
16685 (method url-fetch)
16686 (uri (pypi-uri "misaka" version))
16687 (sha256
16688 (base32
16689 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16690 (build-system python-build-system)
16691 (arguments
16692 `(;; Line 37 of setup.py calls self.run_command('develop')
16693 ;; in the 'check' phase. This command seems to be trying
16694 ;; to write to
16695 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16696 ;; for which it does not have the permission to write.
16697 #:tests? #f))
16698 (propagated-inputs
16699 `(("python-cffi" ,python-cffi)))
16700 (home-page "https://github.com/FSX/misaka")
16701 (synopsis "Python binding for Hoedown")
16702 (description
16703 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16704 library written in C. It features a fast HTML renderer and functionality to make custom
16705 renderers (e.g. man pages or LaTeX).")
16706 (license license:expat)))
16707
16708 (define-public python2-misaka
16709 (package-with-python2 python-misaka))
16710
16711 (define-public python2-steadymark
16712 ;; This is forced into being a python2 only variant
16713 ;; due to its dependence on couleur that has no support
16714 ;; for python3
16715 (package
16716 (name "python2-steadymark")
16717 (version "0.7.3")
16718 (source
16719 (origin
16720 (method url-fetch)
16721 (uri (pypi-uri "steadymark" version))
16722 (sha256
16723 (base32
16724 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16725 (build-system python-build-system)
16726 (native-inputs
16727 `(("python-couleur" ,python2-couleur)
16728 ("python-sure" ,python2-sure)
16729 ("python-misaka" ,python2-misaka)))
16730 (arguments
16731 `(#:python ,python-2
16732 #:phases
16733 (modify-phases %standard-phases
16734 (add-before 'build 'patch-setup-py
16735 (lambda _
16736 ;; Update requirements from dependency==version
16737 ;; to dependency>=version
16738 (substitute* "setup.py"
16739 (("==") ">="))
16740 #t)))))
16741 (home-page "https://github.com/gabrielfalcao/steadymark")
16742 (synopsis "Markdown-based test runner for python")
16743 (description
16744 "@code{Steadymark} allows documentation to be written in github-flavoured
16745 markdown. The documentation may contain snippets of code surrounded by python
16746 code blocks and @code{Steadymark} will find these snippets and run them, making
16747 sure that there are no old malfunctional examples in the documentation examples.")
16748 (license license:expat)))
16749
16750 (define-public python-jsonpointer
16751 (package
16752 (name "python-jsonpointer")
16753 (version "1.10")
16754 (source
16755 (origin
16756 (method url-fetch)
16757 (uri (pypi-uri "jsonpointer" version))
16758 (sha256
16759 (base32
16760 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16761 (build-system python-build-system)
16762 (home-page "https://github.com/stefankoegl/python-json-pointer")
16763 (synopsis "Identify specific nodes in a JSON document")
16764 (description "@code{jsonpointer} allows you to access specific nodes
16765 by path in a JSON document (see RFC 6901).")
16766 (license license:bsd-3)))
16767
16768 (define-public python2-jsonpointer
16769 (package-with-python2 python-jsonpointer))
16770
16771 (define-public python-jsonpatch
16772 (package
16773 (name "python-jsonpatch")
16774 (version "1.16")
16775 (source
16776 (origin
16777 (method git-fetch)
16778 ;; pypi version lacks tests.js
16779 (uri (git-reference
16780 (url "https://github.com/stefankoegl/python-json-patch")
16781 (commit (string-append "v" version))))
16782 (file-name (git-file-name name version))
16783 (sha256
16784 (base32
16785 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16786 (build-system python-build-system)
16787 (propagated-inputs
16788 `(("python-jsonpointer" ,python-jsonpointer)))
16789 (home-page "https://github.com/stefankoegl/python-json-patch")
16790 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16791 (description "@code{jsonpatch} is a library and program that allows
16792 applying JSON Patches according to RFC 6902.")
16793 (license license:bsd-3)))
16794
16795 (define-public python2-jsonpatch
16796 (package-with-python2 python-jsonpatch))
16797
16798 (define-public python-jsonpatch-0.4
16799 (package (inherit python-jsonpatch)
16800 (name "python-jsonpatch")
16801 (version "0.4")
16802 (source
16803 (origin
16804 (method git-fetch)
16805 (uri (git-reference
16806 (url "https://github.com/stefankoegl/python-json-patch")
16807 (commit (string-append "v" version))))
16808 (file-name (git-file-name name version))
16809 (sha256
16810 (base32
16811 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16812
16813 (define-public python2-jsonpatch-0.4
16814 (package-with-python2 python-jsonpatch-0.4))
16815
16816 (define-public python-rfc3986
16817 (package
16818 (name "python-rfc3986")
16819 (version "1.4.0")
16820 (source (origin
16821 (method url-fetch)
16822 (uri (pypi-uri "rfc3986" version))
16823 (sha256
16824 (base32
16825 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16826 (build-system python-build-system)
16827 (arguments
16828 `(#:modules ((guix build utils)
16829 (guix build python-build-system)
16830 (ice-9 ftw)
16831 (srfi srfi-1)
16832 (srfi srfi-26))
16833 #:phases
16834 (modify-phases %standard-phases
16835 (replace 'check
16836 (lambda _
16837 (let ((cwd (getcwd)))
16838 (setenv "PYTHONPATH"
16839 (string-append cwd "/build/"
16840 (find (cut string-prefix? "lib" <>)
16841 (scandir (string-append cwd "/build")))
16842 ":"
16843 (getenv "PYTHONPATH")))
16844 (invoke "pytest" "-v")))))))
16845 (native-inputs
16846 `(("python-pytest" ,python-pytest)))
16847 (home-page "https://rfc3986.readthedocs.io/")
16848 (synopsis "Parse and validate URI references")
16849 (description
16850 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16851 validation and authority parsing. This module also supports RFC@tie{}6874
16852 which adds support for zone identifiers to IPv6 addresses.")
16853 (license license:asl2.0)))
16854
16855 (define-public python2-rfc3986
16856 (package-with-python2 python-rfc3986))
16857
16858 (define-public python-rfc3987
16859 (package
16860 (name "python-rfc3987")
16861 (version "1.3.7")
16862 (source
16863 (origin
16864 (method url-fetch)
16865 (uri (pypi-uri "rfc3987" version))
16866 (sha256
16867 (base32
16868 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16869 (build-system python-build-system)
16870 (home-page "https://pypi.org/project/rfc3987/")
16871 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16872 (description "@code{rfc3987} provides routines for parsing and
16873 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16874 (license license:gpl3+)))
16875
16876 (define-public python2-rfc3987
16877 (package-with-python2 python-rfc3987))
16878
16879 ;; The latest commit contains fixes for building with both python3 and python2.
16880 (define-public python-rfc6555
16881 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16882 (revision "1"))
16883 (package
16884 (name "python-rfc6555")
16885 (version (git-version "0.0.0" revision commit))
16886 (source (origin
16887 (method git-fetch)
16888 (uri (git-reference
16889 (url "https://github.com/sethmlarson/rfc6555")
16890 (commit commit)))
16891 (file-name (git-file-name name version))
16892 (sha256
16893 (base32
16894 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16895 (build-system python-build-system)
16896 (arguments
16897 '(#:phases
16898 (modify-phases %standard-phases
16899 (replace 'check
16900 (lambda* (#:key tests? #:allow-other-keys)
16901 (if tests?
16902 ;; Other tests require network access.
16903 (invoke "pytest" "tests/test_ipv6.py")
16904 #t))))))
16905 (native-inputs
16906 `(("python-pytest" ,python-pytest)))
16907 (home-page "https://pypi.org/project/rfc6555/")
16908 (synopsis "Python implementation of RFC 6555")
16909 (description
16910 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16911 6555. Provided with a single file and dead-simple API to allow easy vendoring
16912 and integration into other projects.")
16913 (properties `((python2-variant . ,(delay python2-rfc6555))))
16914 (license license:asl2.0))))
16915
16916 (define-public python2-rfc6555
16917 (let ((base (package-with-python2
16918 (strip-python2-variant python-rfc6555))))
16919 (package/inherit base
16920 (propagated-inputs
16921 `(("python2-selectors2" ,python2-selectors2))))))
16922
16923 (define-public python-bagit
16924 (package
16925 (name "python-bagit")
16926 (version "1.7.0")
16927 (source
16928 (origin
16929 (method url-fetch)
16930 (uri (pypi-uri "bagit" version))
16931 (sha256
16932 (base32
16933 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16934 (build-system python-build-system)
16935 (native-inputs
16936 `(("python-setuptools-scm" ,python-setuptools-scm)
16937 ("python-coverage" ,python-coverage)
16938 ("python-mock" ,python-mock)))
16939 (home-page "https://libraryofcongress.github.io/bagit-python/")
16940 (synopsis "Create and validate BagIt packages")
16941 (description "Bagit is a Python library and command line utility for working
16942 with BagIt style packages. BagIt is a minimalist packaging format for digital
16943 preservation.")
16944 (license license:cc0)))
16945
16946 (define-public python-prov
16947 (package
16948 (name "python-prov")
16949 (version "2.0.0")
16950 (source
16951 (origin
16952 (method url-fetch)
16953 (uri (pypi-uri "prov" version))
16954 (sha256
16955 (base32
16956 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16957 (build-system python-build-system)
16958 (propagated-inputs
16959 `(("python-dateutil" ,python-dateutil)
16960 ("python-lxml" ,python-lxml)
16961 ("python-networkx" ,python-networkx)
16962 ("python-rdflib" ,python-rdflib)))
16963 (native-inputs
16964 `(("graphviz" ,graphviz)
16965 ("python-pydot" ,python-pydot)))
16966 (home-page "https://github.com/trungdong/prov")
16967 (synopsis
16968 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16969 (description
16970 "This package provides a library for W3C Provenance Data Model supporting
16971 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16972 (license license:expat)))
16973
16974 (define-public python-arcp
16975 (package
16976 (name "python-arcp")
16977 (version "0.2.1")
16978 (source
16979 (origin
16980 (method url-fetch)
16981 (uri (pypi-uri "arcp" version))
16982 (sha256
16983 (base32
16984 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16985 (build-system python-build-system)
16986 (native-inputs
16987 `(("python-pytest" ,python-pytest)))
16988 (home-page "http://arcp.readthedocs.io/")
16989 (synopsis
16990 "Archive and Package URI parser and generator")
16991 (description
16992 "@acronym{arcp, Archive and Package} provides functions for creating
16993 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16994 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16995 consume or reference hypermedia resources bundled inside a file archive or an
16996 application package, as well as to resolve URIs for archive resources within a
16997 programmatic framework. This URI scheme provides mechanisms to generate a
16998 unique base URI to represent the root of the archive, so that relative URI
16999 references in a bundled resource can be resolved within the archive without
17000 having to extract the archive content on the local file system. An arcp URI can
17001 be used for purposes of isolation (e.g. when consuming multiple archives),
17002 security constraints (avoiding \"climb out\" from the archive), or for
17003 externally identiyfing sub-resources referenced by hypermedia formats.")
17004 (license license:asl2.0)))
17005
17006 (define-public python-shellescape
17007 (package
17008 (name "python-shellescape")
17009 (version "3.8.1")
17010 (source
17011 (origin
17012 (method git-fetch)
17013 (uri (git-reference
17014 (url "https://github.com/chrissimpkins/shellescape")
17015 (commit (string-append "v" version))))
17016 (file-name (git-file-name name version))
17017 (sha256
17018 (base32
17019 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17020 (build-system python-build-system)
17021 (arguments
17022 '(#:phases
17023 (modify-phases %standard-phases
17024 (replace 'check
17025 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17026 (when tests?
17027 (add-installed-pythonpath inputs outputs)
17028 (invoke "python" "tests/test_shellescape.py"))
17029 #t)))))
17030 (native-inputs
17031 `(("python-pytest" ,python-pytest)))
17032 (home-page "https://github.com/chrissimpkins/shellescape")
17033 (synopsis
17034 "Shell escape a string to safely use it as a token in a shell command")
17035 (description
17036 "The shellescape Python module defines the @code{shellescape.quote()}
17037 function that returns a shell-escaped version of a Python string. This is a
17038 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17039 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17040 (license license:expat)))
17041
17042 (define-public python-validators
17043 (package
17044 (name "python-validators")
17045 (version "0.14.2")
17046 (source (origin
17047 (method url-fetch)
17048 (uri (pypi-uri "validators" version))
17049 (sha256
17050 (base32
17051 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17052 (build-system python-build-system)
17053 (arguments
17054 '(#:phases (modify-phases %standard-phases
17055 (replace 'check
17056 (lambda _
17057 (invoke "pytest" "-vv"))))))
17058 (propagated-inputs
17059 `(("python-decorator" ,python-decorator)
17060 ("python-six" ,python-six)))
17061 (native-inputs
17062 `(("python-flake8" ,python-flake8)
17063 ("python-isort" ,python-isort)
17064 ("python-pytest" ,python-pytest)))
17065 (home-page "https://github.com/kvesteri/validators")
17066 (synopsis "Data validation library")
17067 (description
17068 "This package contains validators for different things such as email
17069 addresses, IP addresses, URLs, hashes and more. It has been designed to
17070 be easy to use and not require defining a schema or form just to validate
17071 some input.")
17072 (license license:expat)))
17073
17074 (define-public python2-validators
17075 (package-with-python2 python-validators))
17076
17077 (define-public python-validate-email
17078 (package
17079 (name "python-validate-email")
17080 (version "1.3")
17081 (source
17082 (origin
17083 (method url-fetch)
17084 (uri (pypi-uri "validate_email" version))
17085 (sha256
17086 (base32
17087 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17088 (build-system python-build-system)
17089 (home-page "https://github.com/syrusakbary/validate_email")
17090 (synopsis "Verifies if an email address is valid and really exists")
17091 (description "@code{validate_email} can be used to verify if an email
17092 address is valid and really exists.")
17093 (license license:lgpl3+)))
17094
17095 (define-public python2-validate-email
17096 (package-with-python2 python-validate-email))
17097
17098 (define-public python-flex
17099 (package
17100 (name "python-flex")
17101 (version "6.10.0")
17102 (source
17103 (origin
17104 (method url-fetch)
17105 (uri (pypi-uri "flex" version))
17106 (sha256
17107 (base32
17108 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17109 (build-system python-build-system)
17110 (propagated-inputs
17111 `(("python-click" ,python-click)
17112 ("python-iso8601" ,python-iso8601)
17113 ("python-jsonpointer" ,python-jsonpointer)
17114 ("python-pyyaml" ,python-pyyaml)
17115 ("python-requests" ,python-requests)
17116 ("python-rfc3987" ,python-rfc3987)
17117 ("python-six" ,python-six)
17118 ("python-validate-email" ,python-validate-email)))
17119 (home-page "https://github.com/pipermerriam/flex")
17120 (synopsis "Validates Swagger schemata")
17121 (description "@code{flex} can be used to validate Swagger schemata.")
17122 (license license:bsd-3)))
17123
17124 (define-public python2-flex
17125 (package-with-python2 python-flex))
17126
17127 (define-public python-marshmallow
17128 (package
17129 (name "python-marshmallow")
17130 (version "3.9.1")
17131 (source
17132 (origin
17133 (method url-fetch)
17134 (uri (pypi-uri "marshmallow" version))
17135 (sha256
17136 (base32
17137 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17138 (build-system python-build-system)
17139 (propagated-inputs
17140 `(("python-dateutil" ,python-dateutil)
17141 ("python-simplejson" ,python-simplejson)))
17142 (native-inputs
17143 `(("python-pytest" ,python-pytest)
17144 ("python-pytz" ,python-pytz)))
17145 (home-page "https://github.com/marshmallow-code/marshmallow")
17146 (synopsis "Convert complex datatypes to and from native
17147 Python datatypes.")
17148 (description "@code{marshmallow} provides a library for converting
17149 complex datatypes to and from native Python datatypes.")
17150 (license license:expat)))
17151
17152 (define-public python-apispec
17153 (package
17154 (name "python-apispec")
17155 (version "4.0.0")
17156 (source
17157 (origin
17158 (method url-fetch)
17159 (uri (pypi-uri "apispec" version))
17160 (sha256
17161 (base32
17162 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17163 (build-system python-build-system)
17164 (arguments
17165 '(#:phases (modify-phases %standard-phases
17166 (add-after 'unpack 'disable-prance-tests
17167 (lambda _
17168 ;; Disable validation tests since they require the
17169 ;; optional 'prance' library which is not yet in Guix.
17170 (substitute* "tests/test_ext_marshmallow_openapi.py"
17171 (("def test_openapi_tools_validate.*" all)
17172 (string-append "@pytest.mark.xfail\n" all)))))
17173 (replace 'check
17174 (lambda _
17175 (setenv "PYTHONPATH"
17176 (string-append "./build/lib:"
17177 (getenv "PYTHONPATH")))
17178 (invoke "pytest" "-vv"))))))
17179 (propagated-inputs
17180 `(("python-pyyaml" ,python-pyyaml)))
17181 (native-inputs
17182 `(("python-pytest" ,python-pytest)
17183 ("python-marshmallow" ,python-marshmallow)))
17184 (home-page "https://github.com/marshmallow-code/apispec")
17185 (synopsis "Swagger/OpenAPI specification generator")
17186 (description "@code{python-apispec} is a pluggable API specification
17187 generator. It currently supports the OpenAPI specification, formerly known
17188 as Swagger.")
17189 (license license:expat)))
17190
17191 (define-public python-flasgger
17192 (package
17193 (name "python-flasgger")
17194 (version "0.6.3")
17195 (source
17196 (origin
17197 (method git-fetch)
17198 (uri (git-reference
17199 (url "https://github.com/rochacbruno/flasgger")
17200 (commit version)))
17201 (file-name (git-file-name name version))
17202 (sha256
17203 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17204 (build-system python-build-system)
17205 (arguments
17206 `(#:phases
17207 (modify-phases %standard-phases
17208 (replace 'check
17209 (lambda* (#:key inputs outputs #:allow-other-keys)
17210 (substitute* "Makefile"
17211 (("flake8 flasgger --ignore=F403")
17212 "flake8 flasgger --ignore=E731,F403"))
17213 (setenv "PYTHONPATH" (string-append (getcwd)
17214 ":"
17215 (getenv "PYTHONPATH")))
17216 (invoke "py.test"))))))
17217 (propagated-inputs
17218 `(("python-flask" ,python-flask)
17219 ("python-pyyaml" ,python-pyyaml)
17220 ("python-jsonschema" ,python-jsonschema)
17221 ("python-mistune" ,python-mistune)
17222 ("python-six" ,python-six)))
17223 (native-inputs
17224 `(("python-decorator" ,python-decorator)
17225 ("python-flake8" ,python-flake8)
17226 ("python-flask-restful" ,python-flask-restful)
17227 ("python-flex" ,python-flex)
17228 ("python-pytest" ,python-pytest)
17229 ("python-pytest-cov" ,python-pytest-cov)
17230 ("python-marshmallow" ,python-marshmallow)
17231 ("python-apispec" ,python-apispec)))
17232 (home-page "https://github.com/rochacbruno/flasgger/")
17233 (synopsis "Extract Swagger specs from your Flask project")
17234 (description "@code{python-flasgger} allows extracting Swagger specs
17235 from your Flask project. It is a fork of Flask-Swagger.")
17236 (license license:expat)))
17237
17238 (define-public python-swagger-spec-validator
17239 (package
17240 (name "python-swagger-spec-validator")
17241 (version "2.4.3")
17242 (source
17243 (origin
17244 (method url-fetch)
17245 (uri (pypi-uri "swagger-spec-validator" version))
17246 (sha256
17247 (base32
17248 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17249 (build-system python-build-system)
17250 (propagated-inputs
17251 `(("python-jsonschema" ,python-jsonschema)
17252 ("python-pyyaml" ,python-pyyaml)
17253 ("python-six" ,python-six)))
17254 (home-page
17255 "https://github.com/Yelp/swagger_spec_validator")
17256 (synopsis "Validation of Swagger specifications")
17257 (description "@code{swagger_spec_validator} provides a library for
17258 validating Swagger API specifications.")
17259 (license license:asl2.0)))
17260
17261 (define-public python2-swagger-spec-validator
17262 (package-with-python2 python-swagger-spec-validator))
17263
17264 (define-public python-apache-libcloud
17265 (package
17266 (name "python-apache-libcloud")
17267 (version "3.1.0")
17268 (source
17269 (origin
17270 (method url-fetch)
17271 (uri (pypi-uri "apache-libcloud" version))
17272 (sha256
17273 (base32
17274 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17275 (build-system python-build-system)
17276 (arguments
17277 `(#:phases
17278 (modify-phases %standard-phases
17279 (add-after 'unpack 'patch-ssh
17280 (lambda* (#:key inputs #:allow-other-keys)
17281 (substitute* "libcloud/compute/ssh.py"
17282 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17283 "/bin/ssh" "'")))
17284 #t))
17285 (add-after 'unpack 'patch-tests
17286 (lambda _
17287 (substitute* "libcloud/test/compute/test_ssh_client.py"
17288 (("class ShellOutSSHClientTests")
17289 "@unittest.skip(\"Guix container doesn't have ssh service\")
17290 class ShellOutSSHClientTests"))
17291 #t))
17292 (add-before 'check 'copy-secret
17293 (lambda _
17294 (copy-file "libcloud/test/secrets.py-dist"
17295 "libcloud/test/secrets.py")
17296 #t)))))
17297 (inputs
17298 `(("openssh" ,openssh)))
17299 (propagated-inputs
17300 `(("python-paramiko" ,python-paramiko)
17301 ("python-requests" ,python-requests)))
17302 (native-inputs
17303 `(("python-lockfile" ,python-lockfile)
17304 ("python-mock" ,python-mock)
17305 ("python-pytest" ,python-pytest)
17306 ("python-pytest-runner" ,python-pytest-runner)
17307 ("python-requests-mock" ,python-requests-mock)))
17308 (home-page "https://libcloud.apache.org/")
17309 (synopsis "Unified Cloud API")
17310 (description "@code{libcloud} is a Python library for interacting with
17311 many of the popular cloud service providers using a unified API.")
17312 (license license:asl2.0)))
17313
17314 (define-public python-smmap
17315 (package
17316 (name "python-smmap")
17317 (version "3.0.1")
17318 (source
17319 (origin
17320 (method url-fetch)
17321 (uri (pypi-uri "smmap" version))
17322 (sha256
17323 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17324 (build-system python-build-system)
17325 (native-inputs
17326 `(("python-nosexcover" ,python-nosexcover)))
17327 (home-page "https://github.com/Byron/smmap")
17328 (synopsis "Python sliding window memory map manager")
17329 (description "@code{smmap} is a pure Python implementation of a sliding
17330 window memory map manager.")
17331 (license license:bsd-3)))
17332
17333 (define-public python-smmap2
17334 (deprecated-package "python-smmap2" python-smmap))
17335
17336 (define-public python2-smmap
17337 (package-with-python2 python-smmap))
17338
17339 (define-public python2-smmap2
17340 (deprecated-package "python2-smmap2" python2-smmap))
17341
17342 (define-public python-regex
17343 (package
17344 (name "python-regex")
17345 (version "2020.6.8")
17346 (source (origin
17347 (method url-fetch)
17348 (uri (pypi-uri "regex" version))
17349 (sha256
17350 (base32
17351 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17352 (build-system python-build-system)
17353 (arguments
17354 '(#:phases
17355 (modify-phases %standard-phases
17356 (replace 'check
17357 (lambda* (#:key inputs outputs #:allow-other-keys)
17358 (add-installed-pythonpath inputs outputs)
17359 (invoke "python" "-c"
17360 "from regex.test_regex import test_main; test_main()"))))))
17361 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17362 (synopsis "Alternative regular expression module")
17363 (description "This regular expression implementation is backwards-
17364 compatible with the standard @code{re} module, but offers additional
17365 functionality like full case-folding for case-insensitive matches in Unicode.")
17366 (license license:psfl)))
17367
17368 (define-public python2-regex
17369 (package-with-python2 python-regex))
17370
17371 (define-public python-pyopengl
17372 (package
17373 (name "python-pyopengl")
17374 (version "3.1.5")
17375 (source
17376 (origin
17377 (method url-fetch)
17378 (uri (pypi-uri "PyOpenGL" version))
17379 (sha256
17380 (base32
17381 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17382 (build-system python-build-system)
17383 (inputs
17384 `(("mesa" ,mesa)
17385 ("freeglut" ,freeglut)
17386 ("glu" ,glu)))
17387 (arguments
17388 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17389 ;attribute 'OSMesa'
17390 #:phases
17391 (modify-phases %standard-phases
17392 (add-before 'build 'fix-paths
17393 (lambda* (#:key inputs outputs #:allow-other-keys)
17394 (substitute* '("OpenGL/platform/ctypesloader.py")
17395 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17396 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17397 (("'GL'")
17398 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17399 (("'GLU'")
17400 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17401 (("'glut',")
17402 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17403 (("'GLESv1_CM'")
17404 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17405 (("'GLESv2'")
17406 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17407 ;; Not providing libgle. It seems to be very old.
17408 #t)))))
17409 (home-page "http://pyopengl.sourceforge.net")
17410 (synopsis "Standard OpenGL bindings for Python")
17411 (description
17412 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17413 related APIs. The binding is created using the standard @code{ctypes}
17414 library.")
17415 (license license:bsd-3)))
17416
17417 (define-public python-pyopengl-accelerate
17418 (package
17419 (inherit python-pyopengl)
17420 (name "python-pyopengl-accelerate")
17421 (version "3.1.5")
17422 (source
17423 (origin
17424 (method url-fetch)
17425 (uri (pypi-uri "PyOpenGL-accelerate" version))
17426 (sha256
17427 (base32
17428 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17429 (inputs
17430 `(("mesa" ,mesa)
17431 ("python-numpy" ,python-numpy))) ; for cython module
17432 ; numpy_formathandler, thus not propagated
17433 (arguments
17434 `(#:tests? #f
17435 #:phases
17436 (modify-phases %standard-phases
17437 (delete 'fix-paths))))
17438 (synopsis "Acceleration code for PyOpenGL")
17439 (description
17440 "This is the Cython-coded accelerator module for PyOpenGL.")))
17441
17442 (define-public python-rencode
17443 (package
17444 (name "python-rencode")
17445 (version "1.0.5")
17446 (source
17447 (origin
17448 (method url-fetch)
17449 (uri (pypi-uri "rencode" version))
17450 (sha256
17451 (base32
17452 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17453 (build-system python-build-system)
17454 (arguments
17455 `(#:phases
17456 (modify-phases %standard-phases
17457 (add-before 'check 'delete-bogus-test
17458 ;; This test requires /home/aresch/Downloads, which is not provided by
17459 ;; the build environment.
17460 (lambda _
17461 (delete-file "rencode/t.py")
17462 #t)))))
17463 (native-inputs `(("pkg-config" ,pkg-config)
17464 ("python-cython" ,python-cython)))
17465 (home-page "https://github.com/aresch/rencode")
17466 (synopsis "Serialization of heterogeneous data structures")
17467 (description
17468 "The @code{rencode} module is a data structure serialization library,
17469 similar to @code{bencode} from the BitTorrent project. For complex,
17470 heterogeneous data structures with many small elements, r-encoding stake up
17471 significantly less space than b-encodings. This version of rencode is a
17472 complete rewrite in Cython to attempt to increase the performance over the
17473 pure Python module.")
17474 (license license:bsd-3)))
17475
17476 (define-public python2-rencode
17477 (package-with-python2 python-rencode))
17478
17479 (define-public python-xenon
17480 (package
17481 (name "python-xenon")
17482 (version "0.7.0")
17483 (source
17484 (origin
17485 (method url-fetch)
17486 (uri (pypi-uri "xenon" version))
17487 (sha256
17488 (base32
17489 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17490 (build-system python-build-system)
17491 (native-inputs
17492 `(("python-pyyaml" ,python-pyyaml)
17493 ("python-radon" ,python-radon)
17494 ("python-requests" ,python-requests)
17495 ("python-flake8" ,python-flake8)
17496 ("python-tox" ,python-tox)))
17497 (arguments
17498 `(#:tests? #f ;test suite not shipped with the PyPI archive
17499 #:phases
17500 (modify-phases %standard-phases
17501 (add-before 'build 'patch-test-requirements
17502 (lambda _
17503 ;; Remove httpretty dependency for tests.
17504 (substitute* "setup.py"
17505 (("httpretty") ""))
17506 #t)))))
17507 (home-page "https://xenon.readthedocs.org/")
17508 (synopsis "Monitor code metrics for Python on your CI server")
17509 (description
17510 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17511 Ideally, @code{xenon} is run every time code is committed. Through command
17512 line options, various thresholds can be set for the complexity of code. It
17513 will fail (i.e. it will exit with a non-zero exit code) when any of these
17514 requirements is not met.")
17515 (license license:expat)))
17516
17517 (define-public python-pysocks
17518 (package
17519 (name "python-pysocks")
17520 (version "1.7.1")
17521 (source
17522 (origin
17523 (method url-fetch)
17524 (uri (pypi-uri "PySocks" version))
17525 (sha256
17526 (base32
17527 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17528 (build-system python-build-system)
17529 (arguments `(#:tests? #f))
17530 (home-page "https://github.com/Anorov/PySocks")
17531 (synopsis "SOCKS client module")
17532 (description "@code{pysocks} is an updated and semi-actively maintained
17533 version of @code{SocksiPy} with bug fixes and extra features.")
17534 (license license:bsd-3)))
17535
17536 (define-public python2-pysocks
17537 (package-with-python2 python-pysocks))
17538
17539 (define-public python-pydiff
17540 (package
17541 (name "python-pydiff")
17542 (version "0.2")
17543 (source
17544 (origin
17545 (method url-fetch)
17546 (uri (pypi-uri "pydiff" version))
17547 (sha256
17548 (base32
17549 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17550 (build-system python-build-system)
17551 (home-page "https://github.com/myint/pydiff")
17552 (synopsis "Library to diff two Python files at the bytecode level")
17553 (description
17554 "@code{pydiff} makes it easy to look for actual code changes while
17555 ignoring formatting changes.")
17556 (license license:expat)))
17557
17558 (define-public python2-pydiff
17559 (package-with-python2 python-pydiff))
17560
17561 (define-public python-pydub
17562 (package
17563 (name "python-pydub")
17564 (version "0.24.1")
17565 (source
17566 (origin
17567 (method url-fetch)
17568 (uri (pypi-uri "pydub" version))
17569 (sha256
17570 (base32
17571 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17572 (build-system python-build-system)
17573 (arguments
17574 `(#:phases
17575 (modify-phases %standard-phases
17576 (add-after 'unpack 'fix-ffmpeg-path
17577 (lambda* (#:key inputs #:allow-other-keys)
17578 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17579 (substitute* '("pydub/utils.py")
17580 (("return \"ffmpeg\"")
17581 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17582 (("return \"ffplay\"")
17583 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17584 (("return \"ffprobe\"")
17585 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17586 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17587 #t))))))
17588 (home-page "https://pydub.com")
17589 (inputs
17590 `(("ffmpeg" ,ffmpeg)))
17591 (propagated-inputs
17592 `(("python-scipy" ,python-scipy)))
17593 (synopsis "Manipulate audio with a high level interface in Python")
17594 (description
17595 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17596 @code{ffmpeg} to open various audio formats.")
17597 (license license:expat))) ; MIT license
17598
17599 (define-public python-tqdm
17600 (package
17601 (name "python-tqdm")
17602 (version "4.43.0")
17603 (source
17604 (origin
17605 (method url-fetch)
17606 (uri (pypi-uri "tqdm" version))
17607 (sha256
17608 (base32
17609 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17610 (build-system python-build-system)
17611 (arguments
17612 '(#:phases (modify-phases %standard-phases
17613 (replace 'check
17614 (lambda* (#:key inputs outputs #:allow-other-keys)
17615 (add-installed-pythonpath inputs outputs)
17616 ;; This invokation is taken from tox.ini.
17617 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17618 "-d" "-v" "tqdm/"))))))
17619 (native-inputs
17620 `(("python-nose" ,python-nose)))
17621 (home-page "https://github.com/tqdm/tqdm")
17622 (synopsis "Fast, extensible progress meter")
17623 (description
17624 "Make loops show a progress bar on the console by just wrapping any
17625 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17626 design and layout.")
17627 (license (list license:mpl2.0 license:expat))))
17628
17629 (define-public python2-tqdm
17630 (package-with-python2 python-tqdm))
17631
17632 (define-public python-pkginfo
17633 (package
17634 (name "python-pkginfo")
17635 (version "1.7.0")
17636 (source
17637 (origin
17638 (method url-fetch)
17639 (uri (pypi-uri "pkginfo" version))
17640 (sha256
17641 (base32
17642 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
17643 (build-system python-build-system)
17644 (arguments
17645 `(#:phases
17646 (modify-phases %standard-phases
17647 (add-before 'check 'patch-tests
17648 (lambda _
17649 (substitute* "pkginfo/tests/test_installed.py"
17650 (("test_ctor_w_package_no_PKG_INFO")
17651 "_test_ctor_w_package_no_PKG_INFO"))
17652 #t)))))
17653 (home-page
17654 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17655 (synopsis
17656 "Query metadatdata from sdists, bdists, and installed packages")
17657 (description
17658 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17659 source distriubtion (an sdist) or a binary distribution (e.g., created by
17660 running bdist_egg). It can also query the EGG-INFO directory of an installed
17661 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17662 created by running @code{python setup.py develop}).")
17663 (license license:expat)))
17664
17665 (define-public python2-pkginfo
17666 (package-with-python2 python-pkginfo))
17667
17668 (define-public python-twine
17669 (package
17670 (name "python-twine")
17671 (version "1.15.0")
17672 (source
17673 (origin
17674 (method url-fetch)
17675 (uri (pypi-uri "twine" version))
17676 (sha256
17677 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17678 (build-system python-build-system)
17679 (propagated-inputs
17680 `(("python-tqdm" ,python-tqdm)
17681 ("python-packaging" ,python-packaging)
17682 ("python-pkginfo" ,python-pkginfo)
17683 ("python-readme-renderer" ,python-readme-renderer)
17684 ("python-requests" ,python-requests)
17685 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17686 (home-page "https://github.com/pypa/twine")
17687 (synopsis "Collection of utilities for interacting with PyPI")
17688 (description
17689 "@code{twine} currently supports registering projects and uploading
17690 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17691 their files and supports any packaging format (including wheels).")
17692 (license license:asl2.0)))
17693
17694 (define-public python2-twine
17695 (package-with-python2 python-twine))
17696
17697 (define-public python-linecache2
17698 (package
17699 (name "python-linecache2")
17700 (version "1.0.0")
17701 (source
17702 (origin
17703 (method url-fetch)
17704 (uri (pypi-uri "linecache2" version))
17705 (sha256
17706 (base32
17707 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17708 (build-system python-build-system)
17709 (arguments
17710 `(;; The tests depend on unittest2, and our version is a bit too old.
17711 #:tests? #f))
17712 (native-inputs
17713 `(("python-pbr" ,python-pbr-minimal)))
17714 (home-page
17715 "https://github.com/testing-cabal/linecache2")
17716 (synopsis "Backports of the linecache module")
17717 (description
17718 "The linecache module allows one to get any line from any file, while
17719 attempting to optimize internally, using a cache, the common case where many
17720 lines are read from a single file.")
17721 (license license:psfl)))
17722
17723 (define-public python2-linecache2
17724 (package-with-python2 python-linecache2))
17725
17726 (define-public python-traceback2
17727 (package
17728 (name "python-traceback2")
17729 (version "1.4.0")
17730 (source
17731 (origin
17732 (method url-fetch)
17733 (uri (pypi-uri "traceback2" version))
17734 (sha256
17735 (base32
17736 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17737 (build-system python-build-system)
17738 (arguments
17739 `(;; python-traceback2 and python-unittest2 depend on one another.
17740 #:tests? #f))
17741 (native-inputs
17742 `(("python-pbr" ,python-pbr-minimal)))
17743 (propagated-inputs
17744 `(("python-linecache2" ,python-linecache2)))
17745 (home-page
17746 "https://github.com/testing-cabal/traceback2")
17747 (synopsis "Backports of the traceback module")
17748 (description
17749 "This module provides a standard interface to extract, format and print
17750 stack traces of Python programs. It exactly mimics the behavior of the Python
17751 interpreter when it prints a stack trace.")
17752 (license license:psfl)))
17753
17754 (define-public python2-traceback2
17755 (package-with-python2 python-traceback2))
17756
17757 (define-public python-ratelimiter
17758 (package
17759 (name "python-ratelimiter")
17760 (version "1.2.0")
17761 (source
17762 (origin
17763 (method url-fetch)
17764 (uri (pypi-uri "ratelimiter" version))
17765 (sha256
17766 (base32
17767 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17768 (build-system python-build-system)
17769 (arguments
17770 '(#:tests? #f)) ; There are no tests in the pypi archive.
17771 (home-page "https://github.com/RazerM/ratelimiter")
17772 (synopsis "Simple rate limiting object")
17773 (description
17774 "The @code{ratelimiter} module ensures that an operation will not be
17775 executed more than a given number of times during a given period.")
17776 (license license:asl2.0)))
17777
17778 (define-public python2-ratelimiter
17779 (package-with-python2 python-ratelimiter))
17780
17781 (define-public python-dukpy
17782 (package
17783 (name "python-dukpy")
17784 (version "0.3")
17785 (source
17786 (origin
17787 (method git-fetch)
17788 (uri (git-reference
17789 (url "https://github.com/kovidgoyal/dukpy")
17790 (commit (string-append "v" version))))
17791 (file-name (git-file-name name version))
17792 (sha256
17793 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17794 (build-system python-build-system)
17795 (home-page "https://github.com/kovidgoyal/dukpy")
17796 (synopsis "Run JavaScript in python")
17797 (description
17798 "dukpy is a JavaScript runtime environment for Python using the duktape
17799 embeddable JavaScript engine.")
17800 ;; Dukpy is licensed under MIT like the embedded duktape library,
17801 ;; with 'errors.c' as GPL3.
17802 (license (list license:expat license:gpl3))))
17803
17804 (define-public python2-dukpy
17805 (package-with-python2 python-dukpy))
17806
17807 (define-public python-jsonrpclib-pelix
17808 (package
17809 (name "python-jsonrpclib-pelix")
17810 (version "0.3.2")
17811 (source
17812 (origin
17813 (method url-fetch)
17814 (uri (pypi-uri "jsonrpclib-pelix" version))
17815 (sha256
17816 (base32
17817 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17818 (build-system python-build-system)
17819 (arguments
17820 `(#:tests? #f)) ; no tests in PyPI tarball
17821 (home-page "https://github.com/tcalmant/jsonrpclib/")
17822 (synopsis "JSON-RPC 2.0 client library for Python")
17823 (description
17824 "This library implements the JSON-RPC v2.0
17825 specification (backwards-compatible) as a client library for Python. This
17826 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17827 services.")
17828 (license license:asl2.0)))
17829
17830 (define-public python2-jsonrpclib-pelix
17831 (package-with-python2 python-jsonrpclib-pelix))
17832
17833 (define-public python-setuptools-scm-git-archive
17834 (package
17835 (name "python-setuptools-scm-git-archive")
17836 (version "1.0")
17837 (source
17838 (origin
17839 (method url-fetch)
17840 (uri (pypi-uri "setuptools_scm_git_archive" version))
17841 (sha256
17842 (base32
17843 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17844 (build-system python-build-system)
17845 (native-inputs
17846 `(("python-pytest" ,python-pytest)))
17847 (propagated-inputs
17848 `(("python-setuptools-scm" ,python-setuptools-scm)))
17849 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17850 (synopsis "Setuptools_scm plugin for git archives")
17851 (description
17852 "The setuptools_scm_git_archive package is a plugin to
17853 setuptools_scm, which supports obtaining versions from git archives that
17854 belong to tagged versions.")
17855 (license license:expat)))
17856
17857 (define-public python2-setuptools-scm-git-archive
17858 (package-with-python2 python-setuptools-scm-git-archive))
17859
17860 (define-public python-setuptools-git
17861 (package
17862 (name "python-setuptools-git")
17863 (version "1.2")
17864 (source
17865 (origin
17866 (method url-fetch)
17867 (uri (pypi-uri "setuptools-git" version))
17868 (sha256
17869 (base32
17870 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17871 (build-system python-build-system)
17872 (arguments
17873 `(#:phases
17874 (modify-phases %standard-phases
17875 ;; This is needed for tests.
17876 (add-after 'unpack 'configure-git
17877 (lambda _
17878 (setenv "HOME" "/tmp")
17879 (invoke "git" "config" "--global" "user.email" "guix")
17880 (invoke "git" "config" "--global" "user.name" "guix")
17881 #t)))))
17882 (native-inputs
17883 `(("git" ,git-minimal)))
17884 (home-page "https://github.com/msabramo/setuptools-git")
17885 (synopsis "Setuptools revision control system plugin for Git")
17886 (description
17887 "This package provides a plugin for Setuptools for revision control with
17888 Git.")
17889 (license license:bsd-3)))
17890
17891 (define-public python-pyclipper
17892 (package
17893 (name "python-pyclipper")
17894 (version "1.1.0.post3")
17895 (source
17896 (origin
17897 (method url-fetch)
17898 (uri (pypi-uri "pyclipper" version ".zip"))
17899 (sha256
17900 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17901 (modules '((guix build utils)))
17902 (snippet
17903 '(begin
17904 ;; This file is generated by Cython.
17905 (delete-file "pyclipper/pyclipper.cpp") #t))))
17906 (build-system python-build-system)
17907 (arguments
17908 `(#:phases
17909 (modify-phases %standard-phases
17910 (add-before 'build 'cythonize-sources
17911 (lambda _
17912 (with-directory-excursion "pyclipper"
17913 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17914 (propagated-inputs
17915 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17916 (native-inputs
17917 `(("python-cython" ,python-cython)
17918 ("python-pytest" ,python-pytest)
17919 ("python-pytest-runner" ,python-pytest-runner)
17920 ("python-unittest2" ,python-unittest2)
17921 ("unzip" ,unzip)))
17922 (home-page "https://github.com/greginvm/pyclipper")
17923 (synopsis "Wrapper for Angus Johnson's Clipper library")
17924 (description
17925 "Pyclipper is a Cython wrapper for the C++ translation of the
17926 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17927 (license license:expat)))
17928
17929 (define-public python2-pyclipper
17930 (package-with-python2 python-pyclipper))
17931
17932 (define-public python2-booleanoperations
17933 (package
17934 (name "python2-booleanoperations")
17935 (version "0.7.1")
17936 (source
17937 (origin
17938 (method url-fetch)
17939 (uri (pypi-uri "booleanOperations" version ".zip"))
17940 (sha256
17941 (base32
17942 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17943 (build-system python-build-system)
17944 (arguments
17945 `(#:python ,python-2))
17946 (native-inputs
17947 `(("unzip" ,unzip)
17948 ("python2-pytest" ,python2-pytest)
17949 ("python2-pytest-runner" ,python2-pytest-runner)))
17950 (propagated-inputs
17951 `(("python-fonttools" ,python2-fonttools)
17952 ("python-pyclipper" ,python2-pyclipper)
17953 ("python-ufolib" ,python2-ufolib)))
17954 (home-page "https://github.com/typemytype/booleanOperations")
17955 (synopsis "Boolean operations on paths")
17956 (description
17957 "BooleanOperations provides a Python library that enables
17958 boolean operations on paths.")
17959 (license license:expat)))
17960
17961 (define-public python-tempdir
17962 (package
17963 (name "python-tempdir")
17964 (version "0.7.1")
17965 (source
17966 (origin
17967 (method url-fetch)
17968 (uri (pypi-uri "tempdir" version))
17969 (sha256
17970 (base32
17971 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17972 (build-system python-build-system)
17973 (home-page "https://pypi.org/project/tempdir/")
17974 (arguments
17975 ;; the package has no tests
17976 '(#:tests? #f))
17977 (synopsis "Python library for managing temporary directories")
17978 (description
17979 "This library manages temporary directories that are automatically
17980 deleted with all their contents when they are no longer needed. It is
17981 particularly convenient for use in tests.")
17982 (license license:expat)))
17983
17984 (define-public python2-tempdir
17985 (package-with-python2 python-tempdir))
17986
17987 (define-public python-activepapers
17988 (package
17989 (name "python-activepapers")
17990 (version "0.2.2")
17991 (source
17992 (origin
17993 (method url-fetch)
17994 (uri (pypi-uri "ActivePapers.Py" version))
17995 (sha256
17996 (base32
17997 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17998 (build-system python-build-system)
17999 (arguments
18000 `(#:modules ((ice-9 ftw)
18001 (srfi srfi-1)
18002 (guix build utils)
18003 (guix build python-build-system))
18004
18005 #:phases
18006 (modify-phases %standard-phases
18007 (add-after 'unpack 'delete-python2-code
18008 (lambda _
18009 (for-each delete-file
18010 '("lib/activepapers/builtins2.py"
18011 "lib/activepapers/standardlib2.py"
18012 "lib/activepapers/utility2.py"))))
18013 (replace 'check
18014 (lambda _
18015 ;; Deactivate the test cases that download files
18016 (setenv "NO_NETWORK_ACCESS" "1")
18017 ;; For some strange reason, some tests fail if nosetests runs all
18018 ;; test modules in a single execution. They pass if each test
18019 ;; module is run individually.
18020 (for-each (lambda (filename)
18021 (invoke "nosetests"
18022 (string-append "tests/" filename)))
18023 (scandir "tests"
18024 (lambda (filename)
18025 (string-suffix? ".py" filename)))))))))
18026 (native-inputs
18027 `(("python-tempdir" ,python-tempdir)
18028 ("python-nose" ,python-nose)))
18029 (propagated-inputs
18030 `(("python-h5py" ,python-h5py)))
18031 (home-page "https://www.activepapers.org/")
18032 (synopsis "Executable papers for scientific computing")
18033 (description
18034 "ActivePapers is a tool for working with executable papers, which
18035 combine data, code, and documentation in single-file packages,
18036 suitable for publication as supplementary material or on repositories
18037 such as figshare or Zenodo.")
18038 (properties `((python2-variant . ,(delay python2-activepapers))))
18039 (license license:bsd-3)))
18040
18041 (define-public python2-activepapers
18042 (let ((base (package-with-python2
18043 (strip-python2-variant python-activepapers))))
18044 (package/inherit base
18045 (arguments
18046 (substitute-keyword-arguments (package-arguments base)
18047 ((#:phases phases)
18048 `(modify-phases ,phases
18049 (delete 'delete-python2-code)
18050 (add-after 'unpack 'delete-python3-code
18051 (lambda _
18052 (for-each delete-file
18053 '("lib/activepapers/builtins3.py"
18054 "lib/activepapers/standardlib3.py"
18055 "lib/activepapers/utility3.py")))))))))))
18056
18057 (define-public python-semver
18058 (package
18059 (name "python-semver")
18060 (version "2.9.0")
18061 (source
18062 (origin
18063 (method url-fetch)
18064 (uri (pypi-uri "semver" version))
18065 (sha256
18066 (base32
18067 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18068 (build-system python-build-system)
18069 (arguments
18070 `(#:phases (modify-phases %standard-phases
18071 (replace 'check
18072 (lambda _
18073 (delete-file "setup.cfg")
18074 (invoke "py.test"))))))
18075 (native-inputs
18076 `(("python-pytest" ,python-pytest)))
18077 (home-page "https://github.com/k-bx/python-semver")
18078 (synopsis "Python helper for Semantic Versioning")
18079 (description "This package provides a Python library for
18080 @url{Semantic Versioning, http://semver.org/}.")
18081 (license license:bsd-3)))
18082
18083 (define-public python2-semver
18084 (package-with-python2 python-semver))
18085
18086 (define-public python-pyro4
18087 (package
18088 (name "python-pyro4")
18089 (version "4.77")
18090 (source
18091 (origin
18092 (method url-fetch)
18093 (uri (pypi-uri "Pyro4" version))
18094 (sha256
18095 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18096 (build-system python-build-system)
18097 (arguments
18098 '(#:tests? #f)) ;FIXME: Some tests require network access.
18099 (native-inputs
18100 `(("python-cloudpickle" ,python-cloudpickle)
18101 ("python-dill" ,python-dill)
18102 ("python-msgpack" ,python-msgpack)))
18103 (propagated-inputs
18104 `(("python-serpent" ,python-serpent)))
18105 (home-page "https://pyro4.readthedocs.io")
18106 (synopsis "Distributed object middleware for Python")
18107 (description
18108 "Pyro enables you to build applications in which objects can talk to each
18109 other over the network. You can just use normal Python method calls to call
18110 objects on other machines, also known as remote procedure calls (RPC).")
18111 (license license:expat)))
18112
18113 (define-public python2-pyro
18114 (package
18115 (name "python2-pyro")
18116 (version "3.16")
18117 (source
18118 (origin
18119 (method url-fetch)
18120 (uri (pypi-uri "Pyro" version))
18121 (file-name (string-append "Pyro-" version ".tar.gz"))
18122 (sha256
18123 (base32
18124 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18125 (build-system python-build-system)
18126 (arguments
18127 ;; Pyro is not compatible with Python 3
18128 `(#:python ,python-2
18129 ;; Pyro has no test cases for automatic execution
18130 #:tests? #f))
18131 (home-page "https://pythonhosted.org/Pyro/")
18132 (synopsis "Distributed object manager for Python")
18133 (description "Pyro is a Distributed Object Technology system
18134 written in Python that is designed to be easy to use. It resembles
18135 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18136 which is a system and language independent Distributed Object Technology
18137 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18138 longer maintained. New projects should use Pyro4 instead, which
18139 is the new Pyro version that is actively developed.")
18140 (license license:expat)))
18141
18142 (define-public python2-scientific
18143 (package
18144 (name "python2-scientific")
18145 (version "2.9.4")
18146 (source
18147 (origin
18148 (method git-fetch)
18149 (uri (git-reference
18150 (url "https://github.com/khinsen/ScientificPython")
18151 (commit (string-append "rel" version))))
18152 (file-name (git-file-name name version))
18153 (sha256
18154 (base32
18155 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18156 (build-system python-build-system)
18157 (inputs
18158 `(("netcdf" ,netcdf)))
18159 (propagated-inputs
18160 `(("python-numpy" ,python2-numpy-1.8)
18161 ("python-pyro" ,python2-pyro)))
18162 (arguments
18163 ;; ScientificPython is not compatible with Python 3
18164 `(#:python ,python-2
18165 #:tests? #f ; No test suite
18166 #:phases
18167 (modify-phases %standard-phases
18168 (replace 'build
18169 (lambda* (#:key inputs #:allow-other-keys)
18170 (invoke "python" "setup.py" "build"
18171 (string-append "--netcdf_prefix="
18172 (assoc-ref inputs "netcdf"))))))))
18173 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18174 (synopsis "Python modules for scientific computing")
18175 (description "ScientificPython is a collection of Python modules that are
18176 useful for scientific computing. Most modules are rather general (Geometry,
18177 physical units, automatic derivatives, ...) whereas others are more
18178 domain-specific (e.g. netCDF and PDB support). The library is currently
18179 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18180 (license license:cecill-c)))
18181
18182 (define-public python2-mmtk
18183 (package
18184 (name "python2-mmtk")
18185 (version "2.7.12")
18186 (source
18187 (origin
18188 (method git-fetch)
18189 (uri (git-reference
18190 (url "https://github.com/khinsen/MMTK")
18191 (commit (string-append "rel" version))))
18192 (file-name (git-file-name name version))
18193 (sha256
18194 (base32
18195 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18196 (build-system python-build-system)
18197 (native-inputs
18198 `(("netcdf" ,netcdf)))
18199 (propagated-inputs
18200 `(("python-scientific" ,python2-scientific)
18201 ("python-tkinter" ,python-2 "tk")))
18202 (arguments
18203 `(#:python ,python-2
18204 #:tests? #f
18205 #:phases
18206 (modify-phases %standard-phases
18207 (add-before 'build 'includes-from-scientific
18208 (lambda* (#:key inputs #:allow-other-keys)
18209 (mkdir-p "Include/Scientific")
18210 (copy-recursively
18211 (string-append
18212 (assoc-ref inputs "python-scientific")
18213 "/include/python2.7/Scientific")
18214 "Include/Scientific"))))))
18215 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18216 (synopsis "Python library for molecular simulation")
18217 (description "MMTK is a library for molecular simulations with an emphasis
18218 on biomolecules. It provides widely used methods such as Molecular Dynamics
18219 and normal mode analysis, but also basic routines for implementing new methods
18220 for simulation and analysis. The library is currently not actively maintained
18221 and works only with Python 2 and NumPy < 1.9.")
18222 (license license:cecill-c)))
18223
18224 (define-public python-phonenumbers
18225 (package
18226 (name "python-phonenumbers")
18227 (version "8.9.1")
18228 (source
18229 (origin
18230 (method url-fetch)
18231 (uri (pypi-uri "phonenumbers" version))
18232 (sha256
18233 (base32
18234 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18235 (build-system python-build-system)
18236 (home-page
18237 "https://github.com/daviddrysdale/python-phonenumbers")
18238 (synopsis
18239 "Python library for dealing with international phone numbers")
18240 (description
18241 "This package provides a Python port of Google's libphonenumber library.")
18242 (license license:asl2.0)))
18243
18244 (define-public python2-phonenumbers
18245 (package-with-python2 python-phonenumbers))
18246
18247 (define-public python-send2trash
18248 (package
18249 (name "python-send2trash")
18250 (version "1.5.0")
18251 (source
18252 (origin (method git-fetch)
18253 ;; Source tarball on PyPI doesn't include tests.
18254 (uri (git-reference
18255 (url "https://github.com/hsoft/send2trash")
18256 (commit version)))
18257 (file-name (git-file-name name version))
18258 (sha256
18259 (base32
18260 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18261 (build-system python-build-system)
18262 (arguments
18263 '(#:phases
18264 (modify-phases %standard-phases
18265 (add-before 'check 'pre-check
18266 (lambda _
18267 (mkdir-p "/tmp/foo")
18268 (setenv "HOME" "/tmp/foo")
18269 #t)))))
18270 (home-page "https://github.com/hsoft/send2trash")
18271 (synopsis "Send files to the user's @file{~/Trash} directory")
18272 (description "This package provides a Python library to send files to the
18273 user's @file{~/Trash} directory.")
18274 (properties `((python2-variant . ,(delay python2-send2trash))))
18275 (license license:bsd-3)))
18276
18277 (define-public python2-send2trash
18278 (let ((base (package-with-python2
18279 (strip-python2-variant python-send2trash))))
18280 (package/inherit base
18281 (arguments
18282 (substitute-keyword-arguments (package-arguments python-send2trash)
18283 ((#:phases phases)
18284 `(modify-phases ,phases
18285 (add-before 'check 'setenv
18286 (lambda _
18287 (setenv "PYTHONPATH"
18288 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18289 #t)))))))))
18290
18291 (define-public python-pyfavicon
18292 (package
18293 (name "python-pyfavicon")
18294 (version "0.1.1")
18295 (source
18296 (origin
18297 (method url-fetch)
18298 (uri (pypi-uri "pyfavicon" version))
18299 (sha256
18300 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18301 (build-system python-build-system)
18302 (arguments
18303 ;; There are no tests in the PyPI tarball and the tests from the
18304 ;; repository require online data.
18305 '(#:tests? #f))
18306 (propagated-inputs
18307 `(("python-aiohttp" ,python-aiohttp)
18308 ("python-beautifulsoup4" ,python-beautifulsoup4)
18309 ("python-pillow" ,python-pillow)))
18310 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18311 (synopsis "Async favicon fetcher")
18312 (description
18313 "@code{pyfavicon} is an async favicon fetcher.")
18314 (license license:expat)))
18315
18316 (define-public python-yamllint
18317 (package
18318 (name "python-yamllint")
18319 (version "1.26.0")
18320 (source
18321 (origin
18322 (method url-fetch)
18323 (uri (pypi-uri "yamllint" version))
18324 (sha256
18325 (base32 "11qhs1jk9pwvyk5k3q5blh9sq42dh1ywdf1f3i2zixf7hncwir5h"))))
18326 (build-system python-build-system)
18327 (propagated-inputs
18328 `(("python-pathspec" ,python-pathspec)
18329 ("python-pyyaml" ,python-pyyaml)
18330 ("python-setuptools" ,python-setuptools)))
18331 (home-page "https://github.com/adrienverge/yamllint")
18332 (synopsis "Linter for YAML files")
18333 (description
18334 "Yamllint is a linter for YAML files. yamllint does not only check for
18335 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18336 such as lines length, trailing spaces, indentation, etc.")
18337 (license license:gpl3+)))
18338
18339 (define-public python-yapf
18340 (package
18341 (name "python-yapf")
18342 (version "0.29.0")
18343 (source
18344 (origin
18345 (method url-fetch)
18346 (uri (pypi-uri "yapf" version))
18347 (sha256
18348 (base32
18349 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18350 (build-system python-build-system)
18351 (home-page "https://github.com/google/yapf")
18352 (synopsis "Formatter for Python code")
18353 (description "YAPF is a formatter for Python code. It's based off of
18354 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18355 takes the code and reformats it to the best formatting that conforms to the
18356 style guide, even if the original code didn't violate the style guide.")
18357 (license license:asl2.0)))
18358
18359 (define-public python2-yapf
18360 (package-with-python2 python-yapf))
18361
18362 (define-public python-yq
18363 (package
18364 (name "python-yq")
18365 (version "2.11.1")
18366 (source
18367 (origin
18368 (method url-fetch)
18369 (uri (pypi-uri "yq" version))
18370 (sha256
18371 (base32
18372 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18373 (build-system python-build-system)
18374 (arguments
18375 '(#:phases
18376 (modify-phases %standard-phases
18377 (add-after 'unpack 'patch
18378 (lambda* (#:key inputs #:allow-other-keys)
18379 (substitute* "yq/__init__.py"
18380 (("Popen\\(\\[\"jq")
18381 (string-append
18382 "Popen([\""
18383 (assoc-ref inputs "jq")
18384 "/bin/jq")))
18385 #t)))))
18386 (inputs
18387 `(("python-argcomplete" ,python-argcomplete)
18388 ("python-pyyaml" ,python-pyyaml)
18389 ("python-xmltodict" ,python-xmltodict)
18390 ("jq" ,jq)))
18391 (native-inputs
18392 `(("python-coverage" ,python-coverage)
18393 ("python-flake8" ,python-flake8)
18394 ("python-wheel" ,python-wheel)))
18395 (home-page "https://github.com/kislyuk/yq")
18396 (synopsis "Command-line YAML/XML processor")
18397 (description
18398 "This package provides @command{yq} and @command{xq} for processing YAML
18399 and XML respectively. The processing is done through @command{jq}, @command{jq}
18400 filters can be used to process the data as it passes through.")
18401 (license license:asl2.0)))
18402
18403 (define-public python-gyp
18404 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18405 (revision "0"))
18406 (package
18407 (name "python-gyp")
18408 ;; Google does not release versions,
18409 ;; based on second most recent commit date.
18410 (version (git-version "0.0.0" revision commit))
18411 (source
18412 (origin
18413 ;; Google does not release tarballs,
18414 ;; git checkout is needed.
18415 (method git-fetch)
18416 (uri (git-reference
18417 (url "https://chromium.googlesource.com/external/gyp")
18418 (commit commit)))
18419 (file-name (git-file-name name version))
18420 (sha256
18421 (base32
18422 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18423 (build-system python-build-system)
18424 (home-page "https://gyp.gsrc.io/")
18425 (synopsis "GYP is a Meta-Build system")
18426 (description
18427 "GYP builds build systems for large, cross platform applications.
18428 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18429 files, and Makefiles.")
18430 (license license:bsd-3))))
18431
18432 (define-public python2-gyp
18433 (package-with-python2 python-gyp))
18434
18435 (define-public python-whatever
18436 (package
18437 (name "python-whatever")
18438 (version "0.6")
18439 (source
18440 (origin
18441 (method git-fetch)
18442 (uri (git-reference
18443 (url "https://github.com/Suor/whatever")
18444 (commit version)))
18445 (file-name (git-file-name name version))
18446 (sha256
18447 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18448 (build-system python-build-system)
18449 (arguments
18450 `(#:phases
18451 (modify-phases %standard-phases
18452 (replace 'check
18453 (lambda _
18454 (invoke "py.test"))))))
18455 (native-inputs
18456 `(("python-pytest" ,python-pytest)))
18457 (home-page "https://github.com/Suor/whatever")
18458 (synopsis "Make anonymous functions by partial application of operators")
18459 (description "@code{whatever} provides an easy way to make anonymous
18460 functions by partial application of operators.")
18461 (license license:bsd-3)))
18462
18463 (define-public python2-whatever
18464 (package-with-python2 python-whatever))
18465
18466 (define-public python-funcy
18467 (package
18468 (name "python-funcy")
18469 (version "1.11")
18470 (source
18471 (origin
18472 (method git-fetch)
18473 (uri (git-reference
18474 (url "https://github.com/Suor/funcy")
18475 (commit version)))
18476 (sha256
18477 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18478 (file-name (git-file-name name version))))
18479 (build-system python-build-system)
18480 (arguments
18481 `(#:phases
18482 (modify-phases %standard-phases
18483 (replace 'check
18484 (lambda _
18485 (invoke "py.test"))))))
18486 (native-inputs
18487 `(("python-pytest" ,python-pytest)
18488 ("python-whatever" ,python-whatever)))
18489 (home-page "https://github.com/Suor/funcy")
18490 (synopsis "Functional tools")
18491 (description "@code{funcy} is a library that provides functional tools.
18492 Examples are:
18493 @enumerate
18494 @item merge - Merges collections of the same type
18495 @item walk - Type-preserving map
18496 @item select - Selects a part of a collection
18497 @item take - Takes the first n items of a collection
18498 @item first - Takes the first item of a collection
18499 @item remove - Predicated-removes items of a collection
18500 @item concat - Concatenates two collections
18501 @item flatten - Flattens a collection with subcollections
18502 @item distinct - Returns only distinct items
18503 @item split - Predicated-splits a collection
18504 @item split_at - Splits a collection at a given item
18505 @item group_by - Groups items by group
18506 @item pairwise - Pairs off adjacent items
18507 @item partial - Partially-applies a function
18508 @item curry - Curries a function
18509 @item compose - Composes functions
18510 @item complement - Complements a predicate
18511 @item all_fn - \"all\" with predicate
18512 @end enumerate")
18513 (license license:bsd-3)))
18514
18515 (define-public python2-funcy
18516 (package-with-python2 python-funcy))
18517
18518 (define-public python-isoweek
18519 (package
18520 (name "python-isoweek")
18521 (version "1.3.3")
18522 (source
18523 (origin
18524 (method url-fetch)
18525 (uri (pypi-uri "isoweek" version))
18526 (sha256
18527 (base32
18528 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18529 (build-system python-build-system)
18530 (home-page "https://github.com/gisle/isoweek")
18531 (synopsis "Objects representing a week")
18532 (description "The @code{isoweek} module provide the class Week that
18533 implements the week definition of ISO 8601. This standard also defines
18534 a notation for identifying weeks; yyyyWww (where the W is a literal).
18535 Week instances stringify to this form.")
18536 (license license:bsd-3)))
18537
18538 (define-public python2-isoweek
18539 (package-with-python2 python-isoweek))
18540
18541 (define-public python-pyzbar
18542 (package
18543 (name "python-pyzbar")
18544 (version "0.1.8")
18545 (source
18546 (origin
18547 ;; There's no source tarball on PyPI.
18548 (method git-fetch)
18549 (uri (git-reference
18550 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18551 (commit (string-append "v" version))))
18552 (file-name (git-file-name name version))
18553 (sha256
18554 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18555 (build-system python-build-system)
18556 (arguments
18557 `(#:phases
18558 (modify-phases %standard-phases
18559 (add-after 'unpack 'remove-failing-test
18560 (lambda _
18561 ;; This tests if find_library was called once, but we remove
18562 ;; the call in the stage below to make the library find libzbar.
18563 (delete-file "pyzbar/tests/test_zbar_library.py")
18564 #t))
18565 (add-before 'build 'set-library-file-name
18566 (lambda* (#:key inputs #:allow-other-keys)
18567 (let ((libzbar (assoc-ref inputs "zbar")))
18568 (substitute* "pyzbar/zbar_library.py"
18569 (("find_library\\('zbar'\\)")
18570 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18571 #t))))))
18572 (native-inputs
18573 `(("pkg-config" ,pkg-config)
18574 ("python-numpy" ,python-numpy)
18575 ("python-pillow" ,python-pillow)))
18576 (inputs
18577 `(("zbar" ,zbar)))
18578 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18579 (synopsis "Read one-dimensional barcodes and QR codes")
18580 (description
18581 "Read one-dimensional barcodes and QR codes using the zbar library.
18582
18583 Features:
18584
18585 @itemize
18586 @item Pure python
18587 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18588 @item Decodes locations of barcodes
18589 @item No dependencies, other than the zbar library itself
18590 @end itemize")
18591 (license license:expat)))
18592
18593 (define-public python-tokenize-rt
18594 (package
18595 (name "python-tokenize-rt")
18596 (version "2.0.1")
18597 (source
18598 (origin
18599 (method url-fetch)
18600 (uri (pypi-uri "tokenize-rt" version))
18601 (sha256
18602 (base32
18603 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18604 (build-system python-build-system)
18605 (home-page "https://github.com/asottile/tokenize-rt")
18606 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18607 (description
18608 "This Python library is a wrapper around @code{tokenize} from the Python
18609 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18610 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18611 and @code{tokens_to_src} to roundtrip.")
18612 (license license:expat)))
18613
18614 (define-public python-future-fstrings
18615 (package
18616 (name "python-future-fstrings")
18617 (version "0.4.1")
18618 (source
18619 (origin
18620 (method url-fetch)
18621 (uri (pypi-uri "future_fstrings" version))
18622 (sha256
18623 (base32
18624 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18625 (build-system python-build-system)
18626 (propagated-inputs
18627 `(("python-tokenize-rt" ,python-tokenize-rt)))
18628 (home-page "https://github.com/asottile/future-fstrings")
18629 (synopsis "Backport of fstrings to Python < 3.6")
18630 (description
18631 "This package provides a UTF-8 compatible encoding
18632 @code{future_fstrings}, which performs source manipulation. It decodes the
18633 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18634 @code{f} strings.")
18635 (license license:expat)))
18636
18637 (define-public python-typed-ast
18638 (package
18639 (name "python-typed-ast")
18640 (version "1.4.0")
18641 (source
18642 (origin
18643 (method git-fetch)
18644 (uri (git-reference
18645 (url "https://github.com/python/typed_ast")
18646 (commit version)))
18647 (sha256
18648 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18649 (file-name (git-file-name name version))))
18650 (build-system python-build-system)
18651 (arguments
18652 `(#:modules ((guix build utils)
18653 (guix build python-build-system)
18654 (ice-9 ftw)
18655 (srfi srfi-1)
18656 (srfi srfi-26))
18657 #:phases
18658 (modify-phases %standard-phases
18659 (replace 'check
18660 (lambda _
18661 (let ((cwd (getcwd)))
18662 (setenv "PYTHONPATH"
18663 (string-append cwd "/build/"
18664 (find (cut string-prefix? "lib" <>)
18665 (scandir (string-append cwd "/build")))
18666 ":"
18667 (getenv "PYTHONPATH"))))
18668 (invoke "pytest")
18669 #t)))))
18670 (native-inputs `(("python-pytest" ,python-pytest)))
18671 (home-page "https://github.com/python/typed_ast")
18672 (synopsis "Fork of Python @code{ast} modules with type comment support")
18673 (description "This package provides a parser similar to the standard
18674 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18675 include PEP 484 type comments and are independent of the version of Python
18676 under which they are run. The @code{typed_ast} parsers produce the standard
18677 Python AST (plus type comments), and are both fast and correct, as they are
18678 based on the CPython 2.7 and 3.7 parsers.")
18679 ;; See the file "LICENSE" for the details.
18680 (license (list license:psfl
18681 license:asl2.0
18682 license:expat)))) ;ast27/Parser/spark.py
18683
18684 (define-public python-typer
18685 (package
18686 (name "python-typer")
18687 (version "0.3.2")
18688 (source
18689 (origin
18690 ;; Building `python-typer` from the git repository requires the `flit-core`
18691 ;; Python package that is not installed by `python-flit`.
18692 (method url-fetch)
18693 (uri (pypi-uri "typer" version))
18694 (sha256
18695 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
18696 (build-system python-build-system)
18697 (arguments
18698 `(#:phases
18699 (modify-phases %standard-phases
18700 (add-before 'check 'disable-failing-tests
18701 (lambda _
18702 (substitute* "tests/test_completion/test_completion.py"
18703 (("def test_show_completion")
18704 "def _test_show_completion")
18705 (("def test_install_completion")
18706 "def _test_install_completion"))
18707 (substitute* "tests/test_completion/test_completion_install.py"
18708 (("def test_completion_install_bash")
18709 "def _test_completion_install_bash")
18710 (("def test_completion_install_zsh")
18711 "def _test_completion_install_zsh")
18712 (("def test_completion_install_fish")
18713 "def _test_completion_install_fish")
18714 (("def test_completion_install_powershell")
18715 "def _test_completion_install_powershell"))
18716 #t))
18717 (replace 'check
18718 (lambda _
18719 (setenv "PYTHONPATH"
18720 (string-append (getcwd) ":"
18721 (getenv "PYTHONPATH")))
18722 (invoke "python" "-m" "pytest" "tests/")
18723 #t)))))
18724 (propagated-inputs
18725 `(("python-click" ,python-click)))
18726 (native-inputs
18727 `(("python-coverage" ,python-coverage)
18728 ("python-pytest" ,python-pytest)
18729 ("python-shellingham" ,python-shellingham)))
18730 (home-page "https://github.com/tiangolo/typer")
18731 (synopsis
18732 "Typer builds CLI based on Python type hints")
18733 (description
18734 "Typer is a library for building CLI applications. It's based on
18735 Python 3.6+ type hints.")
18736 ;; MIT license
18737 (license license:expat)))
18738
18739 (define-public python-typing
18740 (package
18741 (name "python-typing")
18742 (version "3.7.4.3")
18743 (source
18744 (origin
18745 (method url-fetch)
18746 (uri (pypi-uri "typing" version))
18747 (sha256
18748 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18749 (build-system python-build-system)
18750 (home-page "https://docs.python.org/3/library/typing.html")
18751 (synopsis "Type hints for Python")
18752 (description "This is a backport of the standard library @code{typing}
18753 module to Python versions older than 3.5. Typing defines a standard notation
18754 for Python function and variable type annotations. The notation can be used
18755 for documenting code in a concise, standard format, and it has been designed
18756 to also be used by static and runtime type checkers, static analyzers, IDEs
18757 and other tools.")
18758 (license license:psfl)))
18759
18760 (define-public python2-typing
18761 (package-with-python2 python-typing))
18762
18763 (define-public python-typing-extensions
18764 (package
18765 (name "python-typing-extensions")
18766 (version "3.7.4.3")
18767 (source
18768 (origin
18769 (method url-fetch)
18770 (uri (pypi-uri "typing_extensions" version))
18771 (sha256
18772 (base32
18773 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18774 (build-system python-build-system)
18775 (home-page
18776 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18777 (synopsis "Experimental type hints for Python")
18778 (description
18779 "The typing_extensions module contains additional @code{typing} hints not
18780 yet present in the of the @code{typing} standard library.
18781 Included are implementations of:
18782 @enumerate
18783 @item ClassVar
18784 @item ContextManager
18785 @item Counter
18786 @item DefaultDict
18787 @item Deque
18788 @item NewType
18789 @item NoReturn
18790 @item overload
18791 @item Protocol
18792 @item runtime
18793 @item Text
18794 @item Type
18795 @item TYPE_CHECKING
18796 @item AsyncGenerator
18797 @end enumerate\n")
18798 (license license:psfl)))
18799
18800 (define-public bpython
18801 (package
18802 (name "bpython")
18803 (version "0.20.1")
18804 (source
18805 (origin
18806 (method url-fetch)
18807 (uri (pypi-uri "bpython" version))
18808 (sha256
18809 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
18810 (build-system python-build-system)
18811 (arguments
18812 `(#:phases
18813 (modify-phases %standard-phases
18814 (add-after 'unpack 'remove-failing-test
18815 (lambda _
18816 ;; Remove failing test. FIXME: make it pass
18817 (delete-file "bpython/test/test_args.py")
18818 #t))
18819 (add-after 'wrap 'add-aliases
18820 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18821 (lambda* (#:key outputs #:allow-other-keys)
18822 (let ((out (assoc-ref outputs "out")))
18823 (for-each
18824 (lambda (old new)
18825 (symlink old (string-append out "/bin/" new)))
18826 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18827 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18828 #t)))))
18829 (propagated-inputs
18830 `(("python-pygments" ,python-pygments)
18831 ("python-requests" ,python-requests)
18832 ("python-curtsies" ,python-curtsies)
18833 ("python-greenlet" ,python-greenlet)
18834 ("python-six" ,python-six)
18835 ("python-wcwidth" ,python-wcwidth)
18836 ;; optional dependencies
18837 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18838 ("python-watchdog" ,python-watchdog)
18839 ("python-jedi" ,python-jedi)))
18840 (native-inputs
18841 `(("python-sphinx" ,python-sphinx)
18842 ("python-mock" ,python-mock)))
18843 (home-page "https://bpython-interpreter.org/")
18844 (synopsis "Fancy interface to the Python interpreter")
18845 (description "Bpython is a fancy interface to the Python
18846 interpreter. bpython's main features are
18847
18848 @enumerate
18849 @item in-line syntax highlighting,
18850 @item readline-like autocomplete with suggestions displayed as you type,
18851 @item expected parameter list for any Python function,
18852 @item \"rewind\" function to pop the last line of code from memory and
18853 re-evaluate,
18854 @item send the code you've entered off to a pastebin,
18855 @item save the code you've entered to a file, and
18856 @item auto-indentation.
18857 @end enumerate")
18858 (license license:expat)))
18859
18860 (define-public python-pyinotify
18861 (package
18862 (name "python-pyinotify")
18863 (version "0.9.6")
18864 (source (origin
18865 (method url-fetch)
18866 (uri (pypi-uri "pyinotify" version))
18867 (sha256
18868 (base32
18869 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18870 (build-system python-build-system)
18871 (arguments `(#:tests? #f)) ;no tests
18872 (home-page "https://github.com/seb-m/pyinotify")
18873 (synopsis "Python library for monitoring inotify events")
18874 (description
18875 "@code{pyinotify} provides a Python interface for monitoring
18876 file system events on Linux.")
18877 (license license:expat)))
18878
18879 (define-public python2-pyinotify
18880 (package-with-python2 python-pyinotify))
18881
18882 ;; Ada parser uses this version.
18883 (define-public python2-quex-0.67.3
18884 (package
18885 (name "python2-quex")
18886 (version "0.67.3")
18887 (source
18888 (origin
18889 (method url-fetch)
18890 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18891 (version-major+minor version)
18892 "/quex-" version ".zip"))
18893 (sha256
18894 (base32
18895 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18896 (build-system python-build-system)
18897 (native-inputs
18898 `(("unzip" ,unzip)))
18899 (arguments
18900 `(#:python ,python-2
18901 #:tests? #f
18902 #:phases
18903 (modify-phases %standard-phases
18904 (delete 'configure)
18905 (delete 'build)
18906 (replace 'install
18907 (lambda* (#:key outputs #:allow-other-keys)
18908 (let* ((out (assoc-ref outputs "out"))
18909 (share/quex (string-append out "/share/quex"))
18910 (bin (string-append out "/bin")))
18911 (copy-recursively "." share/quex)
18912 (mkdir-p bin)
18913 (symlink (string-append share/quex "/quex-exe.py")
18914 (string-append bin "/quex"))
18915 #t))))))
18916 (native-search-paths
18917 (list (search-path-specification
18918 (variable "QUEX_PATH")
18919 (files '("share/quex")))))
18920 (home-page "http://quex.sourceforge.net/")
18921 (synopsis "Lexical analyzer generator in Python")
18922 (description "@code{quex} is a lexical analyzer generator in Python.")
18923 (license license:lgpl2.1+))) ; Non-military
18924
18925 (define-public python2-quex
18926 (package (inherit python2-quex-0.67.3)
18927 (name "python2-quex")
18928 (version "0.68.1")
18929 (source
18930 (origin
18931 (method url-fetch)
18932 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18933 (sha256
18934 (base32
18935 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18936 (file-name (string-append name "-" version ".tar.gz"))))))
18937
18938 (define-public python-more-itertools
18939 (package
18940 (name "python-more-itertools")
18941 (version "8.2.0")
18942 (source
18943 (origin
18944 (method url-fetch)
18945 (uri (pypi-uri "more-itertools" version))
18946 (sha256
18947 (base32
18948 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18949 (build-system python-build-system)
18950 (home-page "https://github.com/erikrose/more-itertools")
18951 (synopsis "More routines for operating on iterables, beyond itertools")
18952 (description "Python's built-in @code{itertools} module implements a
18953 number of iterator building blocks inspired by constructs from APL, Haskell,
18954 and SML. @code{more-itertools} includes additional building blocks for
18955 working with iterables.")
18956 (properties `((python2-variant . ,(delay python2-more-itertools))))
18957 (license license:expat)))
18958
18959 ;; The 5.x series are the last versions supporting Python 2.7.
18960 (define-public python2-more-itertools
18961 (package
18962 (inherit python-more-itertools)
18963 (name "python2-more-itertools")
18964 (version "5.0.0")
18965 (source (origin
18966 (method url-fetch)
18967 (uri (pypi-uri "more-itertools" version))
18968 (sha256
18969 (base32
18970 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18971 (arguments
18972 `(#:python ,python-2))
18973 (propagated-inputs
18974 `(("python2-six" ,python2-six-bootstrap)))))
18975
18976 (define-public python-latexcodec
18977 (package
18978 (name "python-latexcodec")
18979 (version "1.0.7")
18980 (source
18981 (origin
18982 (method url-fetch)
18983 (uri (pypi-uri "latexcodec" version))
18984 (sha256
18985 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18986 (build-system python-build-system)
18987 (inputs
18988 `(("python-six" ,python-six)))
18989 (home-page "https://readthedocs.org/projects/latexcodec/")
18990 (synopsis "Work with LaTeX code in Python")
18991 (description "Lexer and codec to work with LaTeX code in Python.")
18992 (license license:expat)))
18993
18994 (define-public python-pybtex
18995 (package
18996 (name "python-pybtex")
18997 (version "0.22.2")
18998 (source
18999 (origin
19000 (method url-fetch)
19001 (uri (pypi-uri "pybtex" version))
19002 (sha256
19003 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19004 (build-system python-build-system)
19005 (native-inputs
19006 `(("python-nose" ,python-nose)))
19007 (inputs
19008 `(("python-latexcodec" ,python-latexcodec)
19009 ("python-pyyaml" ,python-pyyaml)
19010 ("python-six" ,python-six)))
19011 (arguments
19012 `(#:test-target "nosetests"))
19013 (home-page "https://pybtex.org/")
19014 (synopsis "BibTeX-compatible bibliography processor")
19015 (description "Pybtex is a BibTeX-compatible bibliography processor written
19016 in Python. You can simply type pybtex instead of bibtex.")
19017 (license license:expat)))
19018
19019 (define-public python-onetimepass
19020 (package
19021 (name "python-onetimepass")
19022 (version "1.0.1")
19023 (source
19024 (origin
19025 (method url-fetch)
19026 (uri (pypi-uri "onetimepass" version))
19027 (sha256
19028 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19029 (build-system python-build-system)
19030 (propagated-inputs `(("python-six" ,python-six)))
19031 (home-page "https://github.com/tadeck/onetimepass/")
19032 (synopsis "One-time password library")
19033 (description "Python one-time password library for HMAC-based (HOTP) and
19034 time-based (TOTP) passwords.")
19035 (license license:expat)))
19036
19037 (define-public python-parso
19038 (package
19039 (name "python-parso")
19040 (version "0.7.1")
19041 (source
19042 (origin
19043 (method url-fetch)
19044 (uri (pypi-uri "parso" version))
19045 (sha256
19046 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19047 (native-inputs
19048 `(("python-pytest" ,python-pytest)))
19049 (build-system python-build-system)
19050 (arguments
19051 `(#:phases (modify-phases %standard-phases
19052 (replace 'check
19053 (lambda _ (invoke "pytest" "-vv"))))))
19054 (home-page "https://github.com/davidhalter/parso")
19055 (synopsis "Python Parser")
19056 (description "Parso is a Python parser that supports error recovery and
19057 round-trip parsing for different Python versions (in multiple Python versions).
19058 Parso is also able to list multiple syntax errors in your Python file.")
19059 (license license:expat)))
19060
19061 (define-public python2-parso
19062 (package-with-python2 python-parso))
19063
19064 (define-public python-async-generator
19065 (package
19066 (name "python-async-generator")
19067 (version "1.10")
19068 (source
19069 (origin
19070 (method url-fetch)
19071 (uri (pypi-uri "async_generator" version))
19072 (sha256
19073 (base32
19074 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19075 (build-system python-build-system)
19076 (native-inputs
19077 `(("python-pytest" ,python-pytest)))
19078 (home-page "https://github.com/python-trio/async_generator")
19079 (synopsis "Async generators and context managers for Python 3.5+")
19080 (description "@code{async_generator} back-ports Python 3.6's native async
19081 generators and Python 3.7's context managers into Python 3.5.")
19082 ;; Dual licensed.
19083 (license (list license:expat license:asl2.0))))
19084
19085 (define-public python-async-timeout
19086 (package
19087 (name "python-async-timeout")
19088 (version "3.0.1")
19089 (source
19090 (origin
19091 (method url-fetch)
19092 (uri (pypi-uri "async-timeout" version))
19093 (sha256
19094 (base32
19095 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19096 (build-system python-build-system)
19097 (home-page "https://github.com/aio-libs/async_timeout/")
19098 (synopsis "Timeout context manager for asyncio programs")
19099 (description "@code{async-timeout} provides a timeout timeout context
19100 manager compatible with @code{asyncio}.")
19101 (license license:asl2.0)))
19102
19103 (define-public python-glob2
19104 (package
19105 (name "python-glob2")
19106 (version "0.7")
19107 (source
19108 (origin
19109 (method git-fetch)
19110 (uri (git-reference
19111 (url "https://github.com/miracle2k/python-glob2")
19112 (commit (string-append "v" version))))
19113 (file-name (git-file-name name version))
19114 (sha256
19115 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19116 (build-system python-build-system)
19117 (home-page "https://github.com/miracle2k/python-glob2/")
19118 (synopsis "Extended Version of the python buildin glob module")
19119 (description "This is an extended version of the Python
19120 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19121 adds:
19122
19123 @itemize
19124 @item The ability to capture the text matched by glob patterns, and return
19125 those matches alongside the file names.
19126 @item A recursive @code{**} globbing syntax, akin for example to the
19127 @code{globstar} option of Bash.
19128 @item The ability to replace the file system functions used, in order to glob
19129 on virtual file systems.
19130 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19131 @end itemize
19132
19133 Glob2 currently based on the glob code from Python 3.3.1.")
19134 (license license:bsd-2)))
19135
19136 (define-public python2-glob2
19137 (package-with-python2 python-glob2))
19138
19139 (define-public python-gipc
19140 (package
19141 (name "python-gipc")
19142 (version "0.6.0")
19143 (source
19144 (origin
19145 (method url-fetch)
19146 (uri (pypi-uri "gipc" version ".zip"))
19147 (sha256
19148 (base32
19149 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19150 (build-system python-build-system)
19151 (native-inputs
19152 `(("unzip" ,unzip)))
19153 (propagated-inputs
19154 `(("python-gevent" ,python-gevent)))
19155 (home-page "https://gehrcke.de/gipc/")
19156 (synopsis "Child process management in the context of gevent")
19157 (description "Usage of Python's multiprocessing package in a
19158 gevent-powered application may raise problems. With @code{gipc},
19159 process-based child processes can safely be created anywhere within a
19160 gevent-powered application.")
19161 (license license:expat)))
19162
19163 (define-public python-beautifultable
19164 (package
19165 (name "python-beautifultable")
19166 (version "1.0.0")
19167 (source
19168 (origin
19169 (method url-fetch)
19170 (uri (pypi-uri "beautifultable" version))
19171 (sha256
19172 (base32
19173 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19174 (build-system python-build-system)
19175 (propagated-inputs
19176 `(("python-wcwidth" ,python-wcwidth)))
19177 (arguments
19178 `(#:phases
19179 (modify-phases %standard-phases
19180 (add-after 'unpack 'patch-setup.py
19181 (lambda _
19182 (substitute* "setup.py"
19183 (("setup\\(")
19184 "setup(\n test_suite=\"test\",")))))))
19185 (home-page "https://github.com/pri22296/beautifultable")
19186 (synopsis "Print ASCII tables for terminals")
19187 (description "@code{python-beautifultable} provides a class for easily
19188 printing tabular data in a visually appealing ASCII format to a terminal.
19189
19190 Features include, but are not limited to:
19191 @itemize
19192 @item Full customization of the look and feel of the table
19193 @item Row and column accessors.
19194 @item Full support for colors using ANSI sequences or any library.
19195 @item Plenty of predefined styles and option to create custom ones.
19196 @item Support for Unicode characters.
19197 @item Supports streaming table when data is slow to retrieve.
19198 @end itemize")
19199 (license license:expat)))
19200
19201 (define-public python-globber
19202 (package
19203 (name "python-globber")
19204 (version "0.2.1")
19205 (source
19206 (origin
19207 (method git-fetch)
19208 (uri (git-reference
19209 (url "https://github.com/asharov/globber")
19210 (commit version)))
19211 (file-name (git-file-name name version))
19212 (sha256
19213 (base32
19214 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19215 (build-system python-build-system)
19216 (home-page "https://github.com/asharov/globber")
19217 (synopsis "Library for string matching with glob patterns")
19218 (description
19219 "Globber is a Python library for matching file names against glob patterns.
19220 In contrast to other glob-matching libraries, it matches arbitrary strings and
19221 doesn't require the matched names to be existing files. In addition, it
19222 supports the globstar @code{**} operator to match an arbitrary number of
19223 path components.")
19224 (license license:asl2.0)))
19225
19226 (define-public python-git-hammer
19227 (package
19228 (name "python-git-hammer")
19229 (version "0.3.1")
19230 (source
19231 (origin
19232 (method git-fetch)
19233 (uri (git-reference
19234 (url "https://github.com/asharov/git-hammer")
19235 (commit version)))
19236 (file-name (git-file-name name version))
19237 (sha256
19238 (base32
19239 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19240 (build-system python-build-system)
19241 (arguments
19242 `(#:phases
19243 (modify-phases %standard-phases
19244 (add-after 'unpack 'patch-setup.py
19245 (lambda _
19246 (substitute* "setup.py"
19247 (("setup\\(")
19248 "setup(\n test_suite=\"test\",")))))))
19249 (propagated-inputs
19250 `(("python-beautifultable" ,python-beautifultable)
19251 ("python-dateutil" ,python-dateutil)
19252 ("python-gitpython" ,python-gitpython)
19253 ("python-globber" ,python-globber)
19254 ("python-matplotlib" ,python-matplotlib)
19255 ("python-sqlalchemy" ,python-sqlalchemy)
19256 ("python-sqlalchemy-utils"
19257 ,python-sqlalchemy-utils)))
19258 (home-page "https://github.com/asharov/git-hammer")
19259 (synopsis "Provide statistics for git repositories")
19260 (description
19261 "Git Hammer is a statistics tool for projects in git repositories.
19262 Its major feature is tracking the number of lines authored by each person for every
19263 commit, but it also includes some other useful statistics.")
19264 (license license:asl2.0)))
19265
19266 (define-public python-fusepy
19267 (package
19268 (name "python-fusepy")
19269 (version "2.0.4")
19270 (source
19271 (origin
19272 (method url-fetch)
19273 (uri (pypi-uri "fusepy" version))
19274 (sha256
19275 (base32
19276 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19277 (build-system python-build-system)
19278 (arguments
19279 `(#:phases
19280 (modify-phases %standard-phases
19281 (add-before 'build 'set-library-file-name
19282 (lambda* (#:key inputs #:allow-other-keys)
19283 (let ((fuse (assoc-ref inputs "fuse")))
19284 (substitute* "fuse.py"
19285 (("find_library\\('fuse'\\)")
19286 (string-append "'" fuse "/lib/libfuse.so'")))
19287 #t))))))
19288 (propagated-inputs
19289 `(("fuse" ,fuse)))
19290 (home-page "https://github.com/fusepy/fusepy")
19291 (synopsis "Simple ctypes bindings for FUSE")
19292 (description "Python module that provides a simple interface to FUSE and
19293 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19294 (license license:isc)))
19295
19296 (define-public python2-fusepy
19297 (package-with-python2 python-fusepy))
19298
19299 (define-public python-fusepyng
19300 (package
19301 (name "python-fusepyng")
19302 (version "1.0.7")
19303 (source
19304 (origin
19305 (method url-fetch)
19306 (uri (pypi-uri "fusepyng" version))
19307 (sha256
19308 (base32
19309 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19310 (build-system python-build-system)
19311 (arguments
19312 '(#:phases
19313 (modify-phases %standard-phases
19314 (add-after 'unpack 'set-libfuse-path
19315 (lambda* (#:key inputs #:allow-other-keys)
19316 (let ((fuse (assoc-ref inputs "fuse")))
19317 (substitute* "fusepyng.py"
19318 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19319 (string-append "\"" fuse "/lib/libfuse.so\""))))
19320 #t)))))
19321 (inputs
19322 `(("fuse" ,fuse)))
19323 (propagated-inputs
19324 `(("python-paramiko" ,python-paramiko)))
19325 (home-page "https://github.com/rianhunter/fusepyng")
19326 (synopsis "Simple ctypes bindings for FUSE")
19327 (description "@code{fusepyng} is a Python module that provides a simple
19328 interface to FUSE on various operating systems. It's just one file and is
19329 implemented using @code{ctypes}.")
19330 (license license:isc)))
19331
19332 (define-public python-userspacefs
19333 (package
19334 (name "python-userspacefs")
19335 (version "2.0.3")
19336 (source
19337 (origin
19338 (method url-fetch)
19339 (uri (pypi-uri "userspacefs" version))
19340 (sha256
19341 (base32
19342 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19343 (build-system python-build-system)
19344 (propagated-inputs
19345 `(("python-fusepyng" ,python-fusepyng)))
19346 (home-page "https://github.com/rianhunter/userspacefs")
19347 (synopsis "User-space file systems for Python")
19348 (description
19349 "@code{userspacefs} is a library that allows you to easily write
19350 user-space file systems in Python.")
19351 (license license:gpl3+)))
19352
19353 (define-public python-stone
19354 (package
19355 (name "python-stone")
19356 (version "3.2.1")
19357 (source
19358 (origin
19359 (method url-fetch)
19360 (uri (pypi-uri "stone" version))
19361 (sha256
19362 (base32
19363 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19364 (build-system python-build-system)
19365 (arguments
19366 `(#:phases
19367 (modify-phases %standard-phases
19368 (add-after 'unpack 'change-version-requirements
19369 (lambda _
19370 ;; Match the requirement in test/requirements.txt
19371 (substitute* "setup.py"
19372 (("pytest < 5") "pytest < 7"))
19373 ;; We don't care about a coverage report.
19374 (substitute* "test/requirements.txt"
19375 (("coverage.*") "coverage\n"))
19376 #t))
19377 (replace 'check
19378 (lambda* (#:key tests? #:allow-other-keys)
19379 (when tests?
19380 ;; These tests don't import currectly.
19381 (delete-file "test/test_js_client.py")
19382 (delete-file "test/test_tsd_types.py")
19383 (delete-file "test/test_python_gen.py")
19384 (setenv "PYTHONPATH"
19385 (string-append (getcwd) ":"
19386 (getenv "PYTHONPATH")))
19387 (invoke "pytest"))
19388 #t)))))
19389 (propagated-inputs
19390 `(("python-ply" ,python-ply)
19391 ("python-six" ,python-six)))
19392 (native-inputs
19393 `(("python-coverage" ,python-coverage)
19394 ("python-mock" ,python-mock)
19395 ("python-pytest" ,python-pytest)
19396 ("python-pytest-runner" ,python-pytest-runner)))
19397 (home-page "https://github.com/dropbox/stone")
19398 (synopsis "Official Api Spec Language for Dropbox")
19399 (description
19400 "Stone is an interface description language (IDL) for APIs.")
19401 (license license:expat)))
19402
19403 (define-public pybind11
19404 (package
19405 (name "pybind11")
19406 (version "2.6.1")
19407 (source (origin
19408 (method git-fetch)
19409 (uri (git-reference
19410 (url "https://github.com/pybind/pybind11")
19411 (commit (string-append "v" version))))
19412 (sha256
19413 (base32
19414 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19415 (file-name (git-file-name name version))))
19416 (build-system cmake-build-system)
19417 (native-inputs
19418 `(("python" ,python-wrapper)
19419
19420 ;; The following dependencies are used for tests.
19421 ("python-pytest" ,python-pytest)
19422 ("catch" ,catch-framework2-1)
19423 ("eigen" ,eigen)))
19424 (arguments
19425 `(#:configure-flags
19426 (list (string-append "-DCATCH_INCLUDE_DIR="
19427 (assoc-ref %build-inputs "catch")
19428 "/include/catch"))
19429
19430 #:phases (modify-phases %standard-phases
19431 (add-after 'install 'install-python
19432 (lambda* (#:key outputs #:allow-other-keys)
19433 (let ((out (assoc-ref outputs "out")))
19434 (with-directory-excursion "../source"
19435 (setenv "PYBIND11_USE_CMAKE" "yes")
19436 (invoke "python" "setup.py" "install"
19437 "--single-version-externally-managed"
19438 "--root=/"
19439 (string-append "--prefix=" out)))))))
19440
19441 #:test-target "check"))
19442 (home-page "https://github.com/pybind/pybind11/")
19443 (synopsis "Seamless operability between C++11 and Python")
19444 (description
19445 "@code{pybind11} is a lightweight header-only library that exposes C++
19446 types in Python and vice versa, mainly to create Python bindings of existing
19447 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19448 library: to minimize boilerplate code in traditional extension modules by
19449 inferring type information using compile-time introspection.")
19450 (license license:bsd-3)))
19451
19452 (define-public python-pooch
19453 (package
19454 (name "python-pooch")
19455 (version "1.3.0")
19456 (source
19457 (origin
19458 (method url-fetch)
19459 (uri (pypi-uri "pooch" version))
19460 (sha256
19461 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19462 (build-system python-build-system)
19463 (arguments
19464 `(#:tests? #f)) ;requires online data
19465 (propagated-inputs
19466 `(("python-appdirs" ,python-appdirs)
19467 ("python-packaging" ,python-packaging)
19468 ("python-requests" ,python-requests)))
19469 (home-page "https://github.com/fatiando/pooch")
19470 (synopsis "Manage your Python library's sample data files")
19471 (description
19472 "Pooch manages your Python library's sample data files: it automatically
19473 downloads and stores them in a local directory, with support for versioning
19474 and corruption checks.")
19475 (license license:bsd-3)))
19476
19477 (define-public python-fasteners
19478 (package
19479 (name "python-fasteners")
19480 (version "0.15")
19481 (source
19482 (origin
19483 (method url-fetch)
19484 (uri (pypi-uri "fasteners" version))
19485 (sha256
19486 (base32
19487 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19488 (build-system python-build-system)
19489 (propagated-inputs
19490 `(("python-monotonic" ,python-monotonic)
19491 ("python-six" ,python-six)))
19492 (native-inputs
19493 `(("python-testtools" ,python-testtools)))
19494 (home-page "https://github.com/harlowja/fasteners")
19495 (synopsis "Python package that provides useful locks")
19496 (description
19497 "This package provides a Python program that provides following locks:
19498
19499 @itemize
19500 @item Locking decorator
19501 @item Reader-writer locks
19502 @item Inter-process locks
19503 @item Generic helpers
19504 @end itemize\n")
19505 (license license:asl2.0)))
19506
19507 (define-public python-requests-file
19508 (package
19509 (name "python-requests-file")
19510 (version "1.4.3")
19511 (source
19512 (origin
19513 (method url-fetch)
19514 (uri (pypi-uri "requests-file" version))
19515 (sha256
19516 (base32
19517 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19518 (build-system python-build-system)
19519 (propagated-inputs
19520 `(("python-requests" ,python-requests)
19521 ("python-six" ,python-six)))
19522 (home-page
19523 "https://github.com/dashea/requests-file")
19524 (synopsis "File transport adapter for Requests")
19525 (description
19526 "Requests-File is a transport adapter for use with the Requests Python
19527 library to allow local file system access via @code{file://} URLs.")
19528 (license license:asl2.0)))
19529
19530 (define-public python2-requests-file
19531 (package-with-python2 python-requests-file))
19532
19533 (define-public python-identify
19534 (package
19535 (name "python-identify")
19536 (version "1.4.25")
19537 (source
19538 (origin
19539 ;; There are no tests in the PyPI tarball.
19540 (method git-fetch)
19541 (uri (git-reference
19542 (url "https://github.com/chriskuehl/identify")
19543 (commit (string-append "v" version))))
19544 (file-name (git-file-name name version))
19545 (sha256
19546 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19547 (build-system python-build-system)
19548 (arguments
19549 `(#:phases
19550 (modify-phases %standard-phases
19551 (replace 'check
19552 (lambda _
19553 (invoke "pytest" "-vv"))))))
19554 (native-inputs
19555 `(("python-coverage" ,python-coverage)
19556 ("python-pytest" ,python-pytest)))
19557 (propagated-inputs
19558 `(("python-editdistance" ,python-editdistance)))
19559 (home-page "https://github.com/chriskuehl/identify")
19560 (synopsis "File identification library for Python")
19561 (description
19562 "@code{identify} is a file identification library for Python. Given
19563 a file (or some information about a file), return a set of standardized tags
19564 identifying what the file is.")
19565 (license license:expat)))
19566
19567 (define-public python-tldextract
19568 (package
19569 (name "python-tldextract")
19570 (version "2.2.0")
19571 (source
19572 (origin
19573 (method url-fetch)
19574 (uri (pypi-uri "tldextract" version))
19575 (sha256
19576 (base32
19577 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19578 (build-system python-build-system)
19579 (native-inputs
19580 `(("python-pytest" ,python-pytest)
19581 ("python-responses" ,python-responses)))
19582 (propagated-inputs
19583 `(("python-idna" ,python-idna)
19584 ("python-requests" ,python-requests)
19585 ("python-requests-file" ,python-requests-file)))
19586 (home-page
19587 "https://github.com/john-kurkowski/tldextract")
19588 (synopsis
19589 "Separate the TLD from the registered domain and subdomains of a URL")
19590 (description
19591 "TLDExtract accurately separates the TLD from the registered domain and
19592 subdomains of a URL, using the Public Suffix List. By default, this includes
19593 the public ICANN TLDs and their exceptions. It can optionally support the
19594 Public Suffix List's private domains as well.")
19595 (license license:bsd-3)))
19596
19597 (define-public python2-tldextract
19598 (package-with-python2 python-tldextract))
19599
19600 (define-public python-nodeenv
19601 (package
19602 (name "python-nodeenv")
19603 (version "1.4.0")
19604 (source
19605 (origin
19606 ;; There's no tarball in PyPI.
19607 (method git-fetch)
19608 (uri (git-reference
19609 (url "https://github.com/ekalinin/nodeenv")
19610 (commit version)))
19611 (file-name (git-file-name name version))
19612 (sha256
19613 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19614 (build-system python-build-system)
19615 (arguments
19616 `(#:phases
19617 (modify-phases %standard-phases
19618 (replace 'check
19619 (lambda _
19620 ;; This test fails. It tries to open a network socket.
19621 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19622 (native-inputs
19623 `(("python-coverage" ,python-coverage)
19624 ("python-mock" ,python-mock)
19625 ("python-pytest" ,python-pytest)))
19626 (home-page "https://ekalinin.github.io/nodeenv/")
19627 (synopsis "Create isolated node.js environments")
19628 (description
19629 "Nodeenv (node.js virtual environment) is a tool to create isolated
19630 node.js environments. It creates an environment that has its own installation
19631 directories, that doesn't share libraries with other node.js virtual
19632 environments.")
19633 (license license:bsd-3)))
19634
19635 (define-public python-pynamecheap
19636 (package
19637 (name "python-pynamecheap")
19638 (version "0.0.3")
19639 (source
19640 (origin
19641 (method url-fetch)
19642 (uri (pypi-uri "PyNamecheap" version))
19643 (sha256
19644 (base32
19645 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19646 (build-system python-build-system)
19647 (propagated-inputs
19648 `(("python-requests" ,python-requests)))
19649 (home-page
19650 "https://github.com/Bemmu/PyNamecheap")
19651 (synopsis
19652 "Namecheap API client in Python")
19653 (description
19654 "PyNamecheap is a Namecheap API client in Python.")
19655 (license license:expat)))
19656
19657 (define-public python2-pynamecheap
19658 (package-with-python2 python-pynamecheap))
19659
19660 (define-public python-dns-lexicon
19661 (package
19662 (name "python-dns-lexicon")
19663 (version "2.4.0")
19664 (source
19665 (origin
19666 (method url-fetch)
19667 (uri (pypi-uri "dns-lexicon" version))
19668 (sha256
19669 (base32
19670 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19671 (build-system python-build-system)
19672 (arguments
19673 `(#:tests? #f)) ;requires internet access
19674 (propagated-inputs
19675 `(("python-future" ,python-future)
19676 ("python-pynamecheap" ,python-pynamecheap)
19677 ("python-requests" ,python-requests)
19678 ("python-tldextract" ,python-tldextract)
19679 ("python-urllib3" ,python-urllib3)))
19680 (home-page "https://github.com/AnalogJ/lexicon")
19681 (synopsis
19682 "Manipulate DNS records on various DNS providers")
19683 (description
19684 "Lexicon provides a way to manipulate DNS records on multiple DNS
19685 providers in a standardized way. It has a CLI but it can also be used as a
19686 Python library. It was designed to be used in automation, specifically with
19687 Let's Encrypt.")
19688 (license license:expat)))
19689
19690 (define-public python2-dns-lexicon
19691 (package-with-python2 python-dns-lexicon))
19692
19693 (define-public python-cfgv
19694 (package
19695 (name "python-cfgv")
19696 (version "3.1.0")
19697 (source
19698 (origin
19699 ;; There are no tests in the PyPI tarball.
19700 (method git-fetch)
19701 (uri (git-reference
19702 (url "https://github.com/asottile/cfgv")
19703 (commit (string-append "v" version))))
19704 (file-name (git-file-name name version))
19705 (sha256
19706 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19707 (build-system python-build-system)
19708 (arguments
19709 `(#:phases
19710 (modify-phases %standard-phases
19711 (replace 'check
19712 (lambda _
19713 (invoke "pytest" "-vv"))))))
19714 (native-inputs
19715 `(("python-covdefaults" ,python-covdefaults)
19716 ("python-coverage" ,python-coverage)
19717 ("python-pytest" ,python-pytest)))
19718 (home-page "https://github.com/asottile/cfgv")
19719 (synopsis "Configuration validation library")
19720 (description
19721 "This library helps to validate configuration files and produce human
19722 readable error messages.")
19723 (license license:expat)))
19724
19725 (define-public python-commandlines
19726 (package
19727 (name "python-commandlines")
19728 (version "0.4.1")
19729 (source
19730 (origin
19731 (method url-fetch)
19732 (uri (pypi-uri "commandlines" version))
19733 (sha256
19734 (base32
19735 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19736 (build-system python-build-system)
19737 (home-page "https://github.com/chrissimpkins/commandlines")
19738 (synopsis "Command line argument to object parsing library")
19739 (description
19740 "@code{Commandlines} is a Python library for command line application
19741 development that supports command line argument parsing, command string
19742 validation testing and application logic.")
19743 (license license:expat)))
19744
19745 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19746 ;; python-numba. They have a very unflexible relationship.
19747 (define-public python-numba
19748 (package
19749 (name "python-numba")
19750 (version "0.51.2")
19751 (source
19752 (origin
19753 (method url-fetch)
19754 (uri (pypi-uri "numba" version))
19755 (sha256
19756 (base32
19757 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19758 (build-system python-build-system)
19759 (arguments
19760 `(#:phases
19761 (modify-phases %standard-phases
19762 (add-after 'unpack 'disable-proprietary-features
19763 (lambda _
19764 (setenv "NUMBA_DISABLE_HSA" "1")
19765 (setenv "NUMBA_DISABLE_CUDA" "1")
19766 #t))
19767 (replace 'check
19768 (lambda* (#:key inputs outputs #:allow-other-keys)
19769 (add-installed-pythonpath inputs outputs)
19770 ;; Something is wrong with the PYTHONPATH when running the
19771 ;; tests from the build directory, as it complains about not being
19772 ;; able to import certain modules.
19773 (with-directory-excursion "/tmp"
19774 (setenv "HOME" (getcwd))
19775 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19776 (propagated-inputs
19777 `(("python-llvmlite" ,python-llvmlite)
19778 ("python-numpy" ,python-numpy)
19779 ("python-singledispatch" ,python-singledispatch)))
19780 (native-inputs ;for tests
19781 `(("python-jinja2" ,python-jinja2)
19782 ("python-pygments" ,python-pygments)))
19783 (home-page "https://numba.pydata.org")
19784 (synopsis "Compile Python code using LLVM")
19785 (description "Numba gives you the power to speed up your applications with
19786 high performance functions written directly in Python. With a few
19787 annotations, array-oriented and math-heavy Python code can be just-in-time
19788 compiled to native machine instructions, similar in performance to C, C++ and
19789 Fortran, without having to switch languages or Python interpreters.
19790
19791 Numba works by generating optimized machine code using the LLVM compiler
19792 infrastructure at import time, runtime, or statically (using the included pycc
19793 tool).")
19794 (license license:bsd-3)))
19795
19796 (define-public python-numcodecs
19797 (package
19798 (name "python-numcodecs")
19799 (version "0.6.4")
19800 (source
19801 (origin
19802 (method url-fetch)
19803 (uri (pypi-uri "numcodecs" version))
19804 (sha256
19805 (base32
19806 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19807 (build-system python-build-system)
19808 (propagated-inputs
19809 `(("python-numpy" ,python-numpy)
19810 ("python-msgpack" ,python-msgpack)))
19811 (native-inputs
19812 `(("python-pytest" ,python-pytest)
19813 ("python-setuptools-scm" ,python-setuptools-scm)))
19814 (home-page "https://github.com/zarr-developers/numcodecs")
19815 (synopsis "Buffer compression and transformation codecs")
19816 (description
19817 "This Python package provides buffer compression and transformation
19818 codecs for use in data storage and communication applications.")
19819 (license license:expat)))
19820
19821 (define-public python-asciitree
19822 (package
19823 (name "python-asciitree")
19824 (version "0.3.3")
19825 (source
19826 (origin
19827 (method url-fetch)
19828 (uri (pypi-uri "asciitree" version))
19829 (sha256
19830 (base32
19831 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19832 (build-system python-build-system)
19833 (home-page "https://github.com/mbr/asciitree")
19834 (synopsis "Draws ASCII trees")
19835 (description "This package draws tree structures using characters.")
19836 (license license:expat)))
19837
19838 (define-public python-zarr
19839 (package
19840 (name "python-zarr")
19841 (version "2.4.0")
19842 (source
19843 (origin
19844 (method url-fetch)
19845 (uri (pypi-uri "zarr" version))
19846 (sha256
19847 (base32
19848 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19849 (build-system python-build-system)
19850 (arguments
19851 `(#:phases
19852 (modify-phases %standard-phases
19853 (add-after 'unpack 'disable-service-tests
19854 (lambda _
19855 (setenv "ZARR_TEST_ABS" "0")
19856 (setenv "ZARR_TEST_MONGO" "0")
19857 (setenv "ZARR_TEST_REDIS" "0")
19858 #t))
19859 (replace 'check
19860 (lambda _
19861 (invoke "pytest" "-vv" "-k" "not lmdb")
19862 #t)))))
19863 (propagated-inputs
19864 `(("python-asciitree" ,python-asciitree)
19865 ("python-fasteners" ,python-fasteners)
19866 ("python-numcodecs" ,python-numcodecs)
19867 ("python-numpy" ,python-numpy)))
19868 (native-inputs
19869 `(("python-pytest" ,python-pytest)
19870 ("python-setuptools-scm" ,python-setuptools-scm)))
19871 (home-page "https://github.com/zarr-developers/zarr-python")
19872 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19873 (description
19874 "This package provides an implementation of chunked, compressed,
19875 N-dimensional arrays for Python.")
19876 (license license:expat)))
19877
19878 (define-public python-anndata
19879 (package
19880 (name "python-anndata")
19881 (version "0.7.1")
19882 (source
19883 (origin
19884 (method url-fetch)
19885 (uri (pypi-uri "anndata" version))
19886 (sha256
19887 (base32
19888 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19889 (build-system python-build-system)
19890 (arguments
19891 `(#:phases
19892 (modify-phases %standard-phases
19893 (add-after 'unpack 'delete-inconvenient-tests
19894 (lambda _
19895 ;; This test depends on python-scikit-learn.
19896 (delete-file "anndata/tests/test_inplace_subset.py")
19897 #t))
19898 (delete 'check)
19899 (add-after 'install 'check
19900 (lambda* (#:key inputs outputs #:allow-other-keys)
19901 (add-installed-pythonpath inputs outputs)
19902 (invoke "pytest" "-vv"))))))
19903 (propagated-inputs
19904 `(("python-h5py" ,python-h5py)
19905 ("python-importlib-metadata" ,python-importlib-metadata)
19906 ("python-natsort" ,python-natsort)
19907 ("python-numcodecs" ,python-numcodecs)
19908 ("python-packaging" ,python-packaging)
19909 ("python-pandas" ,python-pandas)
19910 ("python-scipy" ,python-scipy)
19911 ("python-zarr" ,python-zarr)))
19912 (native-inputs
19913 `(("python-joblib" ,python-joblib)
19914 ("python-pytest" ,python-pytest)
19915 ("python-setuptools-scm" ,python-setuptools-scm)))
19916 (home-page "https://github.com/theislab/anndata")
19917 (synopsis "Annotated data for data analysis pipelines")
19918 (description "Anndata is a package for simple (functional) high-level APIs
19919 for data analysis pipelines. In this context, it provides an efficient,
19920 scalable way of keeping track of data together with learned annotations and
19921 reduces the code overhead typically encountered when using a mostly
19922 object-oriented library such as @code{scikit-learn}.")
19923 (license license:bsd-3)))
19924
19925 (define-public python-dill
19926 (package
19927 (name "python-dill")
19928 (version "0.3.1.1")
19929 (source
19930 (origin
19931 (method url-fetch)
19932 (uri (pypi-uri "dill" version))
19933 (sha256
19934 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19935 (build-system python-build-system)
19936 (arguments
19937 `(#:phases
19938 (modify-phases %standard-phases
19939 (replace 'check
19940 (lambda _
19941 (with-directory-excursion "/tmp"
19942 (invoke "nosetests" "-v"))
19943 #t)))))
19944 (native-inputs
19945 `(("python-nose" ,python-nose)))
19946 (home-page "https://pypi.org/project/dill/")
19947 (synopsis "Serialize all of Python")
19948 (description "Dill extends Python's @code{pickle} module for serializing
19949 and de-serializing Python objects to the majority of the built-in Python
19950 types. Dill provides the user the same interface as the @code{pickle} module,
19951 and also includes some additional features. In addition to pickling Python
19952 objects, @code{dill} provides the ability to save the state of an interpreter
19953 session in a single command. Hence, it would be feasible to save a
19954 interpreter session, close the interpreter, ship the pickled file to another
19955 computer, open a new interpreter, unpickle the session and thus continue from
19956 the saved state of the original interpreter session.")
19957 (license license:bsd-3)))
19958
19959 (define-public python-multiprocess
19960 (package
19961 (name "python-multiprocess")
19962 (version "0.70.9")
19963 (source
19964 (origin
19965 (method url-fetch)
19966 (uri (pypi-uri "multiprocess" version))
19967 (sha256
19968 (base32
19969 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19970 (build-system python-build-system)
19971 (arguments
19972 `(#:phases
19973 (modify-phases %standard-phases
19974 (add-after 'unpack 'disable-broken-tests
19975 (lambda _
19976 ;; This test is broken as there is no keyboard interrupt.
19977 (substitute* "py3.7/multiprocess/tests/__init__.py"
19978 (("^(.*)def test_wait_result"
19979 line indent)
19980 (string-append indent
19981 "@unittest.skip(\"Disabled by Guix\")\n"
19982 line)))
19983 #t))
19984 ;; Tests must be run after installation.
19985 (delete 'check)
19986 (add-after 'install 'check
19987 (lambda* (#:key inputs outputs #:allow-other-keys)
19988 (add-installed-pythonpath inputs outputs)
19989 (invoke "python" "-m" "multiprocess.tests")
19990 #t)))))
19991 (propagated-inputs
19992 `(("python-dill" ,python-dill)))
19993 (home-page "https://pypi.org/project/multiprocess/")
19994 (synopsis "Multiprocessing and multithreading in Python")
19995 (description
19996 "This package is a fork of the multiprocessing Python package, a package
19997 which supports the spawning of processes using the API of the standard
19998 library's @code{threading} module.")
19999 (license license:bsd-3)))
20000
20001 (define-public python-toolz
20002 (package
20003 (name "python-toolz")
20004 (version "0.9.0")
20005 (source
20006 (origin
20007 (method url-fetch)
20008 (uri (pypi-uri "toolz" version))
20009 (sha256
20010 (base32
20011 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20012 (build-system python-build-system)
20013 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20014 ;; unregistered loader type"
20015 (arguments '(#:tests? #f))
20016 (home-page "https://github.com/pytoolz/toolz/")
20017 (synopsis "List processing tools and functional utilities")
20018 (description
20019 "This package provides a set of utility functions for iterators,
20020 functions, and dictionaries.")
20021 (license license:bsd-3)))
20022
20023 (define-public python2-toolz
20024 (package-with-python2 python-toolz))
20025
20026 (define-public python-cytoolz
20027 (package
20028 (name "python-cytoolz")
20029 (version "0.9.0.1")
20030 (source
20031 (origin
20032 (method url-fetch)
20033 (uri (pypi-uri "cytoolz" version))
20034 (sha256
20035 (base32
20036 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20037 (build-system python-build-system)
20038 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20039 ;; 'exceptions'"
20040 (arguments '(#:tests? #f))
20041 (propagated-inputs
20042 `(("python-toolz" ,python-toolz)))
20043 (native-inputs
20044 `(("python-cython" ,python-cython)))
20045 (home-page "https://github.com/pytoolz/cytoolz")
20046 (synopsis "High performance functional utilities")
20047 (description
20048 "The cytoolz package implements the same API as provided by toolz. The
20049 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20050 that is accessible to other projects developed in Cython.")
20051 (license license:bsd-3)))
20052
20053 (define-public python-sortedcollections
20054 (package
20055 (name "python-sortedcollections")
20056 (version "2.1.0")
20057 (source
20058 (origin
20059 (method url-fetch)
20060 (uri (pypi-uri "sortedcollections" version))
20061 (sha256
20062 (base32
20063 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20064 (build-system python-build-system)
20065 (propagated-inputs
20066 `(("python-sortedcontainers" ,python-sortedcontainers)))
20067 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20068 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20069 (synopsis "Python Sorted Collections")
20070 (description "Sorted Collections is a Python sorted collections library.")
20071 (license license:asl2.0)))
20072
20073 (define-public python-sortedcontainers
20074 (package
20075 (name "python-sortedcontainers")
20076 (version "2.1.0")
20077 (source
20078 (origin
20079 (method url-fetch)
20080 (uri (pypi-uri "sortedcontainers" version))
20081 (sha256
20082 (base32
20083 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20084 (build-system python-build-system)
20085 (arguments
20086 ;; FIXME: Tests require many extra dependencies, and would introduce
20087 ;; a circular dependency on hypothesis, which uses this package.
20088 '(#:tests? #f))
20089 (propagated-inputs
20090 `(("python-appdirs" ,python-appdirs)
20091 ("python-distlib" ,python-distlib)
20092 ("python-filelock" ,python-filelock)
20093 ("python-six" ,python-six-bootstrap)))
20094 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20095 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20096 (description
20097 "This package provides a sorted collections library, written in
20098 pure-Python.")
20099 (license license:asl2.0)))
20100
20101 (define-public python2-sortedcontainers
20102 (package-with-python2 python-sortedcontainers))
20103
20104 (define-public python-cloudpickle
20105 (package
20106 (name "python-cloudpickle")
20107 (version "1.3.0")
20108 (source
20109 (origin
20110 (method url-fetch)
20111 (uri (pypi-uri "cloudpickle" version))
20112 (sha256
20113 (base32
20114 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20115 (build-system python-build-system)
20116 (arguments
20117 '(#:phases (modify-phases %standard-phases
20118 (add-before 'check 'do-not-override-PYTHONPATH
20119 (lambda _
20120 ;; Append to PYTHONPATH instead of overriding it so
20121 ;; that dependencies from Guix can be found.
20122 (substitute* "tests/testutils.py"
20123 (("env\\['PYTHONPATH'\\] = pythonpath")
20124 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20125 #t))
20126 (replace 'check
20127 (lambda* (#:key tests? #:allow-other-keys)
20128 (if tests?
20129 (invoke "pytest" "-s" "-vv")
20130 (format #t "test suite not run~%"))
20131 #t)))))
20132 (native-inputs
20133 `(;; For tests.
20134 ("python-psutil" ,python-psutil)
20135 ("python-pytest" ,python-pytest)
20136 ("python-tornado" ,python-tornado)))
20137 (home-page "https://github.com/cloudpipe/cloudpickle")
20138 (synopsis "Extended pickling support for Python objects")
20139 (description
20140 "Cloudpickle makes it possible to serialize Python constructs not
20141 supported by the default pickle module from the Python standard library. It
20142 is especially useful for cluster computing where Python expressions are
20143 shipped over the network to execute on remote hosts, possibly close to the
20144 data.")
20145 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20146 (license license:bsd-3)))
20147
20148 (define-public python2-cloudpickle
20149 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20150 (package/inherit base
20151 (native-inputs
20152 `(("python-mock" ,python2-mock)
20153 ,@(package-native-inputs base)))
20154 (propagated-inputs
20155 `(("python-futures" ,python2-futures)
20156 ,@(package-propagated-inputs base))))))
20157
20158 (define-public python-locket
20159 (package
20160 (name "python-locket")
20161 (version "0.2.0")
20162 (source
20163 (origin
20164 (method url-fetch)
20165 (uri (pypi-uri "locket" version))
20166 (sha256
20167 (base32
20168 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20169 (build-system python-build-system)
20170 (home-page "https://github.com/mwilliamson/locket.py")
20171 (synopsis "File-based locks for Python")
20172 (description
20173 "Locket implements a lock that can be used by multiple processes provided
20174 they use the same path.")
20175 (license license:bsd-2)))
20176
20177 (define-public python2-locket
20178 (package-with-python2 python-locket))
20179
20180 (define-public python-blosc
20181 (package
20182 (name "python-blosc")
20183 (version "1.5.1")
20184 (source
20185 (origin
20186 (method url-fetch)
20187 (uri (pypi-uri "blosc" version))
20188 (sha256
20189 (base32
20190 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20191 (build-system python-build-system)
20192 ;; FIXME: all tests pass, but then this error is printed:
20193 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20194 (arguments '(#:tests? #f))
20195 (propagated-inputs
20196 `(("python-numpy" ,python-numpy)))
20197 (home-page "https://github.com/blosc/python-blosc")
20198 (synopsis "Python wrapper for the Blosc data compressor library")
20199 (description "Blosc is a high performance compressor optimized for binary
20200 data. It has been designed to transmit data to the processor cache faster
20201 than the traditional, non-compressed, direct memory fetch approach via a
20202 @code{memcpy()} system call.
20203
20204 Blosc works well for compressing numerical arrays that contains data with
20205 relatively low entropy, like sparse data, time series, grids with
20206 regular-spaced values, etc.
20207
20208 This Python package wraps the Blosc library.")
20209 (license license:bsd-3)))
20210
20211 (define-public python2-blosc
20212 (package-with-python2 python-blosc))
20213
20214 (define-public python-partd
20215 (package
20216 (name "python-partd")
20217 (version "0.3.9")
20218 (source
20219 (origin
20220 (method url-fetch)
20221 (uri (pypi-uri "partd" version))
20222 (sha256
20223 (base32
20224 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20225 (build-system python-build-system)
20226 (propagated-inputs
20227 `(("python-blosc" ,python-blosc)
20228 ("python-locket" ,python-locket)
20229 ("python-numpy" ,python-numpy)
20230 ("python-pandas" ,python-pandas)
20231 ("python-pyzmq" ,python-pyzmq)
20232 ("python-toolz" ,python-toolz)))
20233 (home-page "https://github.com/dask/partd/")
20234 (synopsis "Appendable key-value storage")
20235 (description "Partd stores key-value pairs. Values are raw bytes. We
20236 append on old values. Partd excels at shuffling operations.")
20237 (license license:bsd-3)))
20238
20239 (define-public python2-partd
20240 (package-with-python2 python-partd))
20241
20242 (define-public python-fsspec
20243 (package
20244 (name "python-fsspec")
20245 (version "0.6.1")
20246 (source
20247 (origin
20248 (method url-fetch)
20249 (uri (pypi-uri "fsspec" version))
20250 (sha256
20251 (base32
20252 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20253 (build-system python-build-system)
20254 (arguments '(#:tests? #f)) ; there are none
20255 (home-page "https://github.com/intake/filesystem_spec")
20256 (synopsis "File-system specification")
20257 (description "The purpose of this package is to produce a template or
20258 specification for a file-system interface, that specific implementations
20259 should follow, so that applications making use of them can rely on a common
20260 behavior and not have to worry about the specific internal implementation
20261 decisions with any given backend.")
20262 (license license:bsd-3)))
20263
20264 (define-public python-dask
20265 (package
20266 (name "python-dask")
20267 (version "2.14.0")
20268 (source
20269 (origin
20270 (method url-fetch)
20271 (uri (pypi-uri "dask" version))
20272 (sha256
20273 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20274 (build-system python-build-system)
20275 (arguments
20276 `(#:phases
20277 (modify-phases %standard-phases
20278 (add-after 'unpack 'disable-broken-tests
20279 (lambda _
20280 ;; This test is marked as xfail when pytest-xdist is used.
20281 (substitute* "dask/tests/test_threaded.py"
20282 (("def test_interrupt\\(\\)" m)
20283 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20284 m)))
20285 ;; This one fails with a type error:
20286 ;; TypeError: Already tz-aware, use tz_convert to convert.
20287 (substitute* "dask/dataframe/tests/test_shuffle.py"
20288 (("def test_set_index_timestamp\\(\\)" m)
20289 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20290 m)))
20291 #t))
20292 (replace 'check
20293 (lambda _ (invoke "pytest" "-vv"))))))
20294 (propagated-inputs
20295 `(("python-cloudpickle" ,python-cloudpickle)
20296 ("python-fsspec" ,python-fsspec)
20297 ("python-numpy" ,python-numpy)
20298 ("python-packaging" ,python-packaging)
20299 ("python-pandas" ,python-pandas)
20300 ("python-partd" ,python-partd)
20301 ("python-toolz" ,python-toolz)
20302 ("python-pyyaml" ,python-pyyaml)))
20303 (native-inputs
20304 `(("python-pytest" ,python-pytest)
20305 ("python-pytest-runner" ,python-pytest-runner)))
20306 (home-page "https://github.com/dask/dask/")
20307 (synopsis "Parallel computing with task scheduling")
20308 (description
20309 "Dask is a flexible parallel computing library for analytics. It
20310 consists of two components: dynamic task scheduling optimized for computation,
20311 and large data collections like parallel arrays, dataframes, and lists that
20312 extend common interfaces like NumPy, Pandas, or Python iterators to
20313 larger-than-memory or distributed environments. These parallel collections
20314 run on top of the dynamic task schedulers. ")
20315 (license license:bsd-3)))
20316
20317 (define-public python-ilinkedlist
20318 (package
20319 (name "python-ilinkedlist")
20320 (version "0.4.0")
20321 (source
20322 (origin
20323 (method url-fetch)
20324 (uri (pypi-uri "ilinkedlist" version))
20325 (sha256
20326 (base32
20327 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20328 (build-system python-build-system)
20329 (native-inputs `(("python-pytest" ,python-pytest)))
20330 (inputs `(("python" ,python)))
20331 (home-page "https://github.com/luther9/ilinkedlist-py")
20332 (synopsis "Immutable linked list library")
20333 (description
20334 "This is a implementation of immutable linked lists for Python. It
20335 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20336 Since a linked list is treated as immutable, it is hashable, and its length
20337 can be retrieved in constant time. Some of the terminology is inspired by
20338 LISP. It is possible to create an improper list by creating a @code{Pair}
20339 with a non-list @code{cdr}.")
20340 (license license:gpl3+)))
20341
20342 (define-public python-readlike
20343 (package
20344 (name "python-readlike")
20345 (version "0.1.3")
20346 (source
20347 (origin
20348 (method url-fetch)
20349 (uri (pypi-uri "readlike" version))
20350 (sha256
20351 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20352 (build-system python-build-system)
20353 (home-page "https://github.com/jangler/readlike")
20354 (synopsis "GNU Readline-like line editing module")
20355 (description
20356 "This Python module provides line editing functions similar to the default
20357 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20358 @code{readline} package, this one allows access to those capabilities in settings
20359 outside of a standard command-line interface. It is especially well-suited to
20360 interfacing with Urwid, due to a shared syntax for describing key inputs.
20361
20362 Currently, all stateless Readline commands are implemented. Yanking and history
20363 are not supported.")
20364 (license license:expat)))
20365
20366 (define-public python2-readlike
20367 (package-with-python2 python-readlike))
20368
20369 (define-public python-reparser
20370 (package
20371 (name "python-reparser")
20372 (version "1.4.3")
20373 (source
20374 (origin
20375 (method url-fetch)
20376 (uri (pypi-uri "ReParser" version))
20377 (sha256
20378 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20379 (build-system python-build-system)
20380 (home-page "https://github.com/xmikos/reparser")
20381 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20382 (description
20383 "This Python library provides a simple lexer/parser for inline markup based
20384 on regular expressions.")
20385 (license license:expat)))
20386
20387 (define-public python2-reparser
20388 (let ((reparser (package-with-python2
20389 (strip-python2-variant python-reparser))))
20390 (package/inherit reparser
20391 (propagated-inputs
20392 `(("python2-enum34" ,python2-enum34)
20393 ,@(package-propagated-inputs reparser))))))
20394
20395 (define-public python-retrying
20396 (package
20397 (name "python-retrying")
20398 (version "1.3.3")
20399 (source
20400 (origin
20401 (method git-fetch)
20402 (uri (git-reference
20403 (url "https://github.com/rholder/retrying")
20404 (commit (string-append "v" version))))
20405 (file-name (git-file-name name version))
20406 (sha256
20407 (base32
20408 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20409 (build-system python-build-system)
20410 (propagated-inputs
20411 `(("python-six" ,python-six)))
20412 (home-page "https://github.com/rholder/retrying")
20413 (synopsis "Library for adding retry behavior")
20414 (description "Retrying is a general-purpose retrying library to simplify
20415 the task of adding retry behavior to just about anything.
20416
20417 Features:
20418
20419 @itemize
20420 @item Generic Decorator API.
20421 @item Specify stop condition (i.e. limit by number of attempts).
20422 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20423 @item Customize retrying on Exceptions.
20424 @item Customize retrying on expected returned result.
20425 @end itemize")
20426 (license license:asl2.0)))
20427
20428 (define-public python-pre-commit
20429 (package
20430 (name "python-pre-commit")
20431 (version "2.10.0")
20432 (source
20433 (origin
20434 (method url-fetch)
20435 (uri (pypi-uri "pre_commit" version))
20436 (sha256
20437 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20438 (build-system python-build-system)
20439 (arguments
20440 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20441 ;; attribute 'empty_template_setup'".
20442 `(#:tests? #false))
20443 (propagated-inputs
20444 `(("python-cfgv" ,python-cfgv)
20445 ("python-identify" ,python-identify)
20446 ("python-importlib-metadata" ,python-importlib-metadata)
20447 ("python-importlib-resources" ,python-importlib-resources)
20448 ("python-nodeenv" ,python-nodeenv)
20449 ("python-pyyaml" ,python-pyyaml)
20450 ("python-toml" ,python-toml)
20451 ("python-virtualenv" ,python-virtualenv)))
20452 (home-page "https://github.com/pre-commit/pre-commit")
20453 (synopsis "Framework for managing multi-language pre-commit hooks")
20454 (description
20455 "This package provides a framework for managing and maintaining
20456 multi-language pre-commit hooks.")
20457 (license license:expat)))
20458
20459 (define-public python-precis-i18n
20460 (package
20461 (name "python-precis-i18n")
20462 (version "1.0.0")
20463 (source
20464 (origin
20465 (method url-fetch)
20466 (uri (pypi-uri "precis_i18n" version))
20467 (sha256
20468 (base32
20469 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20470 (build-system python-build-system)
20471 (home-page "https://github.com/byllyfish/precis_i18n")
20472 (synopsis "Implementation of the PRECIS framework")
20473 (description
20474 "This module implements the PRECIS Framework as described in RFC 8264,
20475 RFC 8265 and RFC 8266.")
20476 (license license:expat)))
20477
20478 (define-public python-absl-py
20479 (package
20480 (name "python-absl-py")
20481 (version "0.6.1")
20482 (source
20483 (origin
20484 (method url-fetch)
20485 (uri (pypi-uri "absl-py" version))
20486 (sha256
20487 (base32
20488 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20489 (build-system python-build-system)
20490 (propagated-inputs
20491 `(("python-six" ,python-six)))
20492 (home-page "https://github.com/abseil/abseil-py")
20493 (synopsis "Abseil Python common libraries")
20494 (description
20495 "This package provides the Abseil Python Common Libraries, a collection
20496 of Python libraries for building Python applications.")
20497 (license license:asl2.0)))
20498
20499 (define-public python-astor
20500 (package
20501 (name "python-astor")
20502 (version "0.7.1")
20503 (source
20504 (origin
20505 (method url-fetch)
20506 (uri (pypi-uri "astor" version))
20507 (sha256
20508 (base32
20509 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
20510 (build-system python-build-system)
20511 ;; FIXME: There are two errors and two test failures.
20512 (arguments `(#:tests? #f))
20513 (home-page "https://github.com/berkerpeksag/astor")
20514 (synopsis "Read and write Python ASTs")
20515 (description "Astor is designed to allow easy manipulation of Python
20516 source via the Abstract Syntax Tree.")
20517 (license license:bsd-3)))
20518
20519 (define-public python2-astor
20520 (package-with-python2 python-astor))
20521
20522 (define-public python-astunparse
20523 (package
20524 (name "python-astunparse")
20525 (version "1.6.2")
20526 (source
20527 (origin
20528 (method url-fetch)
20529 (uri (pypi-uri "astunparse" version))
20530 (sha256
20531 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20532 (build-system python-build-system)
20533 (arguments '(#:tests? #f)) ; there are none
20534 (propagated-inputs
20535 `(("python-six" ,python-six)
20536 ("python-wheel" ,python-wheel)))
20537 (home-page "https://github.com/simonpercivall/astunparse")
20538 (synopsis "AST unparser for Python")
20539 (description "This package provides an AST unparser for Python. It is a
20540 factored out version of @code{unparse} found in the Python source
20541 distribution.")
20542 (license license:bsd-3)))
20543
20544 (define-public python-gast
20545 (package
20546 (name "python-gast")
20547 (version "0.3.3")
20548 (source
20549 (origin
20550 (method url-fetch)
20551 (uri (pypi-uri "gast" version))
20552 (sha256
20553 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20554 (build-system python-build-system)
20555 (propagated-inputs
20556 `(("python-astunparse" ,python-astunparse)))
20557 (home-page "https://pypi.org/project/gast/")
20558 (synopsis "Generic Python AST that abstracts the underlying Python version")
20559 (description
20560 "GAST provides a compatibility layer between the AST of various Python
20561 versions, as produced by @code{ast.parse} from the standard @code{ast}
20562 module.")
20563 (license license:bsd-3)))
20564
20565 (define-public python-wikidata
20566 (package
20567 (name "python-wikidata")
20568 (version "0.6.1")
20569 (source
20570 (origin
20571 (method url-fetch)
20572 (uri (pypi-uri "Wikidata" version))
20573 (sha256
20574 (base32
20575 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20576 (build-system python-build-system)
20577 (propagated-inputs
20578 `(("python-babel" ,python-babel)))
20579 (home-page "https://github.com/dahlia/wikidata")
20580 (synopsis "Wikidata client library")
20581 (description
20582 "This package provides a Python interface to
20583 @url{https://www.wikidata.org/, Wikidata}.")
20584 (properties '((upstream-name . "Wikidata")))
20585 (license license:gpl3+)))
20586
20587 (define-public python-doctest-ignore-unicode
20588 (package
20589 (name "python-doctest-ignore-unicode")
20590 (version "0.1.2")
20591 (source
20592 (origin
20593 (method url-fetch)
20594 (uri (pypi-uri "doctest-ignore-unicode" version))
20595 (sha256
20596 (base32
20597 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
20598 (build-system python-build-system)
20599 (native-inputs
20600 `(("python-nose" ,python-nose)))
20601 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20602 (synopsis "Ignore Unicode literal prefixes in doctests")
20603 (description
20604 "This package adds support for a flag to ignore Unicode literal prefixes
20605 in doctests.")
20606 (license license:asl2.0)))
20607
20608 (define-public python-attr
20609 (package
20610 (name "python-attr")
20611 (version "0.3.1")
20612 (source
20613 (origin
20614 (method url-fetch)
20615 (uri (pypi-uri "attr" version))
20616 (sha256
20617 (base32
20618 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20619 (build-system python-build-system)
20620 (home-page "https://github.com/denis-ryzhkov/attr")
20621 (synopsis "Decorator for attributes of target function or class")
20622 (description "Simple decorator to set attributes of target function or
20623 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20624 (license license:expat)))
20625
20626 (define-public python-construct
20627 (package
20628 (name "python-construct")
20629 (version "2.10.56")
20630 (source
20631 (origin
20632 (method url-fetch)
20633 (uri (pypi-uri "construct" version))
20634 (sha256
20635 (base32
20636 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20637 (build-system python-build-system)
20638 (arguments
20639 `(#:tests? #f)) ; No tests exist.
20640 (propagated-inputs
20641 `(("python-extras" ,python-extras)
20642 ("python-arrow" ,python-arrow)
20643 ("python-numpy" ,python-numpy)
20644 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20645 (home-page "https://construct.readthedocs.io")
20646 (synopsis "Declarative and symmetrical parser and builder for binary data")
20647 (description
20648 "This package provides both simple, atomic constructs (such as
20649 integers of various sizes), as well as composite ones which allow you
20650 form hierarchical and sequential structures of increasing complexity.
20651 It features bit and byte granularity, easy debugging and testing, an
20652 easy-to-extend subclass system, and lots of primitive constructs to
20653 make your work easier.")
20654 (license license:expat)))
20655
20656 (define-public python-outcome
20657 (package
20658 (name "python-outcome")
20659 (version "1.0.1")
20660 (source
20661 (origin
20662 (method url-fetch)
20663 (uri (pypi-uri "outcome" version))
20664 (sha256
20665 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20666 (build-system python-build-system)
20667 (arguments
20668 `(#:phases
20669 (modify-phases %standard-phases
20670 (replace 'check
20671 (lambda* (#:key inputs outputs #:allow-other-keys)
20672 (add-installed-pythonpath inputs outputs)
20673 (invoke "pytest" "-vv"))))))
20674 (native-inputs
20675 `(("python-pytest" ,python-pytest)
20676 ("python-pytest-cov" ,python-pytest-cov)
20677 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20678 (propagated-inputs
20679 `(("python-async-generator" ,python-async-generator)
20680 ("python-attrs" ,python-attrs)))
20681 (home-page "https://github.com/python-trio/outcome")
20682 (synopsis "Capture the outcome of Python function calls")
20683 (description
20684 "Capture the outcome of Python function calls. Extracted from the Trio
20685 project.")
20686 ;; Either license applies.
20687 (license (list license:expat license:asl2.0))))
20688
20689 (define-public python-trio
20690 (package
20691 (name "python-trio")
20692 (version "0.17.0")
20693 (source
20694 (origin
20695 (method url-fetch)
20696 (uri (pypi-uri "trio" version))
20697 (sha256
20698 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20699 (build-system python-build-system)
20700 (arguments
20701 `(#:phases
20702 (modify-phases %standard-phases
20703 (add-before 'check 'change-home
20704 (lambda _
20705 ;; Tests require a writable home.
20706 (setenv "HOME" "/tmp")
20707 #t))
20708 (replace 'check
20709 (lambda _
20710 (invoke "pytest" "-vv" "-k"
20711 (string-append
20712 ;; This test times out.
20713 "not test_ki_protection_works"
20714 ;; Assertion errors.
20715 " and not test_guest_mode_ki"
20716 " and not test_run_in_trio_thread_ki"
20717 ;; These try to raise KeyboardInterrupt which does not work
20718 ;; in the build environment.
20719 " and not test_ki_self"
20720 " and not test_ki_wakes_us_up"
20721 ;; Failure in name resolution.
20722 " and not test_getnameinfo"
20723 " and not test_SocketType_resolve"
20724 ;; OSError: protocol not found.
20725 " and not test_getprotobyname")))))))
20726 (native-inputs
20727 `(("python-astor" ,python-astor)
20728 ("python-ipython" ,python-ipython)
20729 ("python-jedi" ,python-jedi)
20730 ("python-pylint" ,python-pylint)
20731 ("python-pyopenssl" ,python-pyopenssl)
20732 ("python-pytest" ,python-pytest)
20733 ("python-pytest-cov" ,python-pytest-cov)
20734 ("python-trustme" ,python-trustme)))
20735 (propagated-inputs
20736 `(("python-attrs" ,python-attrs)
20737 ("python-idna" ,python-idna)
20738 ("python-outcome" ,python-outcome)
20739 ("python-sniffio" ,python-sniffio)
20740 ("python-sortedcontainers"
20741 ,python-sortedcontainers)))
20742 (home-page "https://github.com/python-trio/trio")
20743 (synopsis "Friendly Python library for async concurrency and I/O")
20744 (description
20745 "Trio strives to be a production-quality, async/await-native I/O library
20746 for Python. Like all async libraries, its main purpose is to help you write
20747 programs that do multiple things at the same time with parallelized I/O.")
20748 ;; Either license applies.
20749 (license (list license:expat license:asl2.0))))
20750
20751 (define-public python-trio-typing
20752 (package
20753 (name "python-trio-typing")
20754 (version "0.5.0")
20755 (source
20756 (origin
20757 (method url-fetch)
20758 (uri (pypi-uri "trio-typing" version))
20759 (sha256
20760 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20761 (build-system python-build-system)
20762 (arguments
20763 `(#:phases
20764 (modify-phases %standard-phases
20765 (replace 'check
20766 (lambda _
20767 (invoke "pytest" "-vv"))))))
20768 (native-inputs
20769 `(("python-attrs" ,python-attrs)
20770 ("python-pytest" ,python-pytest)))
20771 (propagated-inputs
20772 `(("python-mypy" ,python-mypy)
20773 ("python-mypy-extensions"
20774 ,python-mypy-extensions)
20775 ("python-trio" ,python-trio)
20776 ("python-typing-extensions"
20777 ,python-typing-extensions)))
20778 (home-page "https://github.com/python-trio/trio-typing")
20779 (synopsis "Static type checking support for Trio and related projects")
20780 (description
20781 "This package provides:
20782
20783 @itemize
20784 @item PEP 561 typing stubs packages for the Trio project packages:
20785
20786 @itemize
20787 @item trio (@code{trio-stubs})
20788 @item outcome (@code{outcome-stubs})
20789 @item async_generator (@code{async_generator-stubs})
20790 @end itemize
20791
20792 @item A package @code{trio_typing} containing types that Trio programs often
20793 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20794 a mypy plugin that smooths over some limitations in the basic type hints.
20795 @end itemize")
20796 ;; Either license applies.
20797 (license (list license:expat license:asl2.0))))
20798
20799 (define-public python-humanize
20800 (package
20801 (name "python-humanize")
20802 (version "0.5.1")
20803 (source
20804 (origin
20805 (method url-fetch)
20806 (uri (pypi-uri "humanize" version))
20807 (sha256
20808 (base32
20809 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20810 (arguments
20811 '(#:tests? #f)) ; tests not in pypi archive
20812 (build-system python-build-system)
20813 (home-page "https://github.com/jmoiron/humanize")
20814 (synopsis "Print numerical information in a human-readable form")
20815 (description "This package provides a Python module that displays numbers
20816 and dates in \"human readable\" forms. For example, it would display
20817 \"12345591313\" as \"12.3 billion\".")
20818 (license license:expat)))
20819
20820 (define-public python-txaio
20821 (package
20822 (name "python-txaio")
20823 (version "18.8.1")
20824 (source
20825 (origin
20826 (method url-fetch)
20827 (uri (pypi-uri "txaio" version))
20828 (sha256
20829 (base32
20830 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20831 (build-system python-build-system)
20832 (propagated-inputs
20833 `(("python-twisted" ,python-twisted)
20834 ("python-six" ,python-six)))
20835 (home-page "https://github.com/crossbario/txaio")
20836 (synopsis "Compatibility layer between Python asyncio and Twisted")
20837 (description "Txaio provides a compatibility layer between the Python
20838 @code{asyncio} module and @code{Twisted}.")
20839 (license license:expat)))
20840
20841 (define-public python-toolshed
20842 (package
20843 (name "python-toolshed")
20844 (version "0.4.6")
20845 (source
20846 (origin
20847 (method url-fetch)
20848 (uri (pypi-uri "toolshed" version))
20849 (sha256
20850 (base32
20851 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20852 (build-system python-build-system)
20853 (native-inputs
20854 `(("python-nose" ,python-nose)))
20855 (home-page "https://github.com/brentp/toolshed/")
20856 (synopsis "Collection of modules and functions for working with data")
20857 (description "This is a collection of well-tested, simple modules and
20858 functions that aim to reduce boilerplate when working with data.")
20859 (license license:bsd-2)))
20860
20861 (define-public python-annoy
20862 (package
20863 (name "python-annoy")
20864 (version "1.15.1")
20865 (source
20866 (origin
20867 (method url-fetch)
20868 (uri (pypi-uri "annoy" version))
20869 (sha256
20870 (base32
20871 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20872 (build-system python-build-system)
20873 (native-inputs
20874 `(("python-nose" ,python-nose)))
20875 (home-page "https://github.com/spotify/annoy/")
20876 (synopsis "Approximate nearest neighbors library")
20877 (description
20878 "Annoy is a C++ library with Python bindings to search for points in
20879 space that are close to a given query point. It also creates large read-only
20880 file-based data structures that are @code{mmap}ped into memory so that many
20881 processes may share the same data.")
20882 (license license:asl2.0)))
20883
20884 (define-public python-croniter
20885 (package
20886 (name "python-croniter")
20887 (version "0.3.34")
20888 (source (origin
20889 (method url-fetch)
20890 (uri (pypi-uri "croniter" version))
20891 (sha256
20892 (base32
20893 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20894 (build-system python-build-system)
20895 (propagated-inputs
20896 `(("python-dateutil" ,python-dateutil)
20897 ("python-natsort" ,python-natsort)))
20898 (home-page "https://github.com/kiorky/croniter")
20899 (synopsis "Iterate datetime objects with cron-like syntax")
20900 (description
20901 "@code{croniter} provides iteration for datetime object with cron-like
20902 format.")
20903 (license license:expat)))
20904
20905 (define-public python-pylzma
20906 (package
20907 (name "python-pylzma")
20908 (version "0.5.0")
20909 (source
20910 (origin
20911 (method url-fetch)
20912 (uri (pypi-uri "pylzma" version))
20913 (sha256
20914 (base32
20915 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20916 (build-system python-build-system)
20917 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
20918 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20919 (description "This package provides Python bindings for the LZMA library
20920 by Igor Pavlov.")
20921 (license license:lgpl2.1+)))
20922
20923 (define-public python2-pylzma
20924 (package-with-python2 python-pylzma))
20925
20926 (define-public python2-zeroconf
20927 (package
20928 (name "python2-zeroconf")
20929
20930 ;; This is the last version that supports Python 2.x.
20931 (version "0.19.1")
20932 (source
20933 (origin
20934 (method url-fetch)
20935 (uri (pypi-uri "zeroconf" version))
20936 (sha256
20937 (base32
20938 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20939 (build-system python-build-system)
20940 (arguments
20941 `(#:python ,python-2
20942 #:phases
20943 (modify-phases %standard-phases
20944 (add-after 'unpack 'patch-requires
20945 (lambda* (#:key inputs #:allow-other-keys)
20946 (substitute* "setup.py"
20947 (("enum-compat")
20948 "enum34"))
20949 #t)))))
20950 (native-inputs
20951 `(("python2-six" ,python2-six)
20952 ("python2-enum32" ,python2-enum34)
20953 ("python2-netifaces" ,python2-netifaces)
20954 ("python2-typing" ,python2-typing)))
20955 (home-page "https://github.com/jstasiak/python-zeroconf")
20956 (synopsis "Pure Python mDNS service discovery")
20957 (description
20958 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20959 compatible).")
20960 (license license:lgpl2.1+)))
20961
20962 (define-public python-bsddb3
20963 (package
20964 (name "python-bsddb3")
20965 (version "6.2.6")
20966 (source
20967 (origin
20968 (method url-fetch)
20969 (uri (pypi-uri "bsddb3" version))
20970 (sha256
20971 (base32
20972 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20973 (build-system python-build-system)
20974 (inputs
20975 `(("bdb" ,bdb)))
20976 (arguments
20977 '(#:phases
20978 (modify-phases %standard-phases
20979 (add-after 'unpack 'configure-locations
20980 (lambda* (#:key inputs #:allow-other-keys)
20981 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20982 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20983 #t))
20984 (replace 'check
20985 (lambda _
20986 (invoke "python3" "test3.py" "-v"))))))
20987 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20988 (synopsis "Python bindings for Oracle Berkeley DB")
20989 (description
20990 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20991 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20992 Transaction objects, and each of these is exposed as a Python type in the
20993 bsddb3.db module. The database objects can use various access methods: btree,
20994 hash, recno, and queue. Complete support of Berkeley DB distributed
20995 transactions. Complete support for Berkeley DB Replication Manager.
20996 Complete support for Berkeley DB Base Replication. Support for RPC.")
20997 (license license:bsd-3)))
20998
20999 (define-public python-dbfread
21000 (package
21001 (name "python-dbfread")
21002 (version "2.0.7")
21003 (source (origin
21004 (method url-fetch)
21005 (uri (pypi-uri "dbfread" version))
21006 (sha256
21007 (base32
21008 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21009 (build-system python-build-system)
21010 (native-inputs
21011 `(("python-pytest" ,python-pytest)))
21012 (home-page "https://dbfread.readthedocs.io")
21013 (synopsis "Read DBF Files with Python")
21014 (description
21015 "This library reads DBF files and returns the data as native Python data
21016 types for further processing. It is primarily intended for batch jobs and
21017 one-off scripts.")
21018 (license license:expat)))
21019
21020 (define-public python-cached-property
21021 (package
21022 (name "python-cached-property")
21023 (version "1.5.1")
21024 (source
21025 (origin
21026 (method url-fetch)
21027 (uri (pypi-uri "cached-property" version))
21028 (sha256
21029 (base32
21030 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21031 (build-system python-build-system)
21032 (arguments
21033 `(#:phases
21034 (modify-phases %standard-phases
21035 ;; https://github.com/pydanny/cached-property/issues/131
21036 ;; recent versions of freezegun break one test
21037 (add-after 'unpack 'disable-broken-test
21038 (lambda _
21039 (substitute* "tests/test_cached_property.py"
21040 (("def test_threads_ttl_expiry\\(self\\)" m)
21041 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21042 " " m)))
21043 #t)))))
21044 (native-inputs
21045 `(("python-freezegun" ,python-freezegun)))
21046 (home-page
21047 "https://github.com/pydanny/cached-property")
21048 (synopsis
21049 "Decorator for caching properties in classes")
21050 (description
21051 "This package provides a decorator which makes caching
21052 time-or-computationally-expensive properties quick and easy and works in Python
21053 2 or 3.")
21054 (license license:bsd-3)))
21055
21056 (define-public python-folium
21057 (package
21058 (name "python-folium")
21059 (version "0.12.1")
21060 (source
21061 (origin
21062 ;; PyPI has a ".whl" file but not a proper source release.
21063 ;; Thus, fetch code from Git.
21064 (method git-fetch)
21065 (uri (git-reference
21066 (url "https://github.com/python-visualization/folium")
21067 (commit (string-append "v" version))))
21068 (file-name (git-file-name name version))
21069 (sha256
21070 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21071 (build-system python-build-system)
21072 (propagated-inputs
21073 `(("python-branca" ,python-branca)
21074 ("python-jinja2" ,python-jinja2)
21075 ("python-numpy" ,python-numpy)
21076 ("python-requests" ,python-requests)))
21077 (native-inputs
21078 `(("python-pytest" ,python-pytest)))
21079 (home-page "https://github.com/python-visualization/folium")
21080 (synopsis "Make beautiful maps with Leaflet.js & Python")
21081 (description "@code{folium} makes it easy to visualize data that’s been
21082 manipulated in Python on an interactive leaflet map. It enables both the
21083 binding of data to a map for @code{choropleth} visualizations as well as
21084 passing rich vector/raster/HTML visualizations as markers on the map.
21085
21086 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21087 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21088 supports Image, Video, GeoJSON and TopoJSON overlays.")
21089 (license license:expat)))
21090
21091 (define-public jube
21092 (package
21093 ;; This is a command-line tool, so no "python-" prefix.
21094 (name "jube")
21095 (version "2.2.2")
21096 (source (origin
21097 (method url-fetch)
21098 (uri (string-append
21099 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21100 version))
21101 (sha256
21102 (base32
21103 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21104 (file-name (string-append "jube-" version ".tar.gz"))))
21105 (build-system python-build-system)
21106 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21107 (synopsis "Benchmarking environment")
21108 (description
21109 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21110 benchmarked application, benchmark data is stored in a format that allows JUBE
21111 to deduct the desired information. This data can be parsed by automatic pre-
21112 and post-processing scripts that draw information and store it more densely
21113 for manual interpretation.")
21114 (license license:gpl3+)))
21115
21116 (define-public python-pyroutelib3
21117 (package
21118 (name "python-pyroutelib3")
21119 (version "1.3.post1")
21120 (source
21121 (origin
21122 (method url-fetch)
21123 (uri (pypi-uri "pyroutelib3" version))
21124 (sha256
21125 (base32
21126 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21127 (build-system python-build-system)
21128 (propagated-inputs
21129 `(("python-dateutil" ,python-dateutil)))
21130 (home-page "https://github.com/MKuranowski/pyroutelib3")
21131 (synopsis "Library for simple routing on OSM data")
21132 (description "Library for simple routing on OSM data")
21133 (license license:gpl3+)))
21134
21135 (define-public python-bibtexparser
21136 (package
21137 (name "python-bibtexparser")
21138 (version "1.1.0")
21139 (source
21140 (origin
21141 (method url-fetch)
21142 (uri (pypi-uri "bibtexparser" version))
21143 (sha256
21144 (base32
21145 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21146 (build-system python-build-system)
21147 (propagated-inputs
21148 `(("python-pyparsing" ,python-pyparsing)))
21149 (native-inputs
21150 `(("python-future" ,python-future)))
21151 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21152 (synopsis "Python library to parse BibTeX files")
21153 (description "BibtexParser is a Python library to parse BibTeX files.")
21154 (license (list license:bsd-3 license:lgpl3))))
21155
21156 (define-public python-distro
21157 (package
21158 (name "python-distro")
21159 (version "1.4.0")
21160 (source
21161 (origin
21162 (method url-fetch)
21163 (uri (pypi-uri "distro" version))
21164 (sha256
21165 (base32
21166 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21167 (build-system python-build-system)
21168 (native-inputs
21169 `(("python-pytest" ,python-pytest)))
21170 (home-page "https://github.com/nir0s/distro")
21171 (synopsis
21172 "OS platform information API")
21173 (description
21174 "@code{distro} provides information about the OS distribution it runs on,
21175 such as a reliable machine-readable ID, or version information.
21176
21177 It is the recommended replacement for Python's original
21178 `platform.linux_distribution` function (which will be removed in Python 3.8).
21179 @code{distro} also provides a command-line interface to output the platform
21180 information in various formats.")
21181 (license license:asl2.0)))
21182
21183 (define-public python-cairosvg
21184 (package
21185 (name "python-cairosvg")
21186 (version "2.5.0")
21187 (source
21188 (origin
21189 (method url-fetch)
21190 (uri (pypi-uri "CairoSVG" version))
21191 (sha256
21192 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21193 (build-system python-build-system)
21194 (arguments
21195 `(#:phases
21196 (modify-phases %standard-phases
21197 (replace 'check
21198 (lambda _ (invoke "pytest"))))))
21199 (propagated-inputs
21200 `(("python-cairocffi" ,python-cairocffi)
21201 ("python-cssselect2" ,python-cssselect2)
21202 ("python-defusedxml" ,python-defusedxml)
21203 ("python-pillow" ,python-pillow)
21204 ("python-tinycss2" ,python-tinycss2)))
21205 (native-inputs
21206 `(("python-pytest-flake8" ,python-pytest-flake8)
21207 ("python-pytest-isort" ,python-pytest-isort)
21208 ("python-pytest-runner" ,python-pytest-runner)))
21209 (home-page "https://cairosvg.org/")
21210 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21211 (description "CairoSVG is a SVG converter based on Cairo. It can export
21212 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21213 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21214 parsed, the result is drawn to a Cairo surface that can be exported to
21215 qvarious formats: PDF, PostScript, PNG and even SVG.")
21216 (license license:lgpl3+)))
21217
21218 (define-public python-pyphen
21219 (package
21220 (name "python-pyphen")
21221 (version "0.10.0")
21222 (source
21223 (origin
21224 (method url-fetch)
21225 (uri (pypi-uri "Pyphen" version))
21226 (sha256
21227 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21228 (build-system python-build-system)
21229 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21230 ;; embedded set provided by upstream - like Debian does.
21231 (home-page "https://github.com/Kozea/Pyphen")
21232 (synopsis "Pure Python module to hyphenate text")
21233 (description "Pyphen is a pure Python module to hyphenate text using
21234 existing Hunspell hyphenation dictionaries.")
21235 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21236
21237 (define-public python-intelhex
21238 (package
21239 (name "python-intelhex")
21240 (version "2.2.1")
21241 (source
21242 (origin
21243 (method url-fetch)
21244 (uri (pypi-uri "intelhex" version))
21245 (sha256
21246 (base32
21247 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21248 (build-system python-build-system)
21249 (arguments '(#:tests? #f)) ;issue with version
21250 (home-page "https://pypi.org/project/IntelHex/")
21251 (synopsis "Python library for Intel HEX files manipulations")
21252 (description "The Intel HEX file format is widely used in microprocessors
21253 and microcontrollers area (embedded systems etc.) as the de facto standard for
21254 representation of code to be programmed into microelectronic devices. This
21255 package provides an intelhex Python library to read, write, create from
21256 scratch and manipulate data from Intel HEX file format. It also includes
21257 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21258 converters and more, those based on the library itself.")
21259 (license license:bsd-3)))
21260
21261 (define-public python-pykwalify
21262 (package
21263 (name "python-pykwalify")
21264 (version "1.7.0")
21265 (source
21266 (origin
21267 (method url-fetch)
21268 (uri (pypi-uri "pykwalify" version))
21269 (sha256
21270 (base32
21271 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21272 (build-system python-build-system)
21273 (arguments '(#:tests? #f)) ;missing dependencies
21274 (propagated-inputs
21275 `(("python-dateutil" ,python-dateutil)
21276 ("python-docopt" ,python-docopt)
21277 ("python-pyyaml" ,python-pyyaml)))
21278 (home-page "https://github.com/grokzen/pykwalify")
21279 (synopsis
21280 "Python lib/cli for JSON/YAML schema validation")
21281 (description
21282 "This package provides a parser, schema validator, and data binding tool
21283 for YAML and JSON.")
21284 (license license:expat)))
21285
21286 (define-public python-dbusmock
21287 (package
21288 (name "python-dbusmock")
21289 (version "0.18.3")
21290 (source
21291 (origin
21292 (method url-fetch)
21293 (uri (pypi-uri "python-dbusmock" version))
21294 (sha256
21295 (base32
21296 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21297 (build-system python-build-system)
21298 (arguments
21299 '(#:phases
21300 (modify-phases %standard-phases
21301 (add-after 'unpack 'patch-shell-path
21302 (lambda _
21303 (substitute* "tests/test_code.py"
21304 (("/bin/bash") (which "bash")))
21305 #t)))))
21306 (native-inputs
21307 `(;; For tests.
21308 ("dbus" ,dbus) ; for dbus-daemon
21309 ("python-nose" ,python-nose)
21310 ("which" ,which)))
21311 (propagated-inputs
21312 `(("python-dbus" ,python-dbus)
21313 ("python-pygobject" ,python-pygobject)))
21314 (home-page "https://github.com/martinpitt/python-dbusmock")
21315 (synopsis "Python library for mock D-Bus objects")
21316 (description "python-dbusmock allows for the easy creation of mock objects on
21317 D-Bus. This is useful for writing tests for software which talks to D-Bus
21318 services such as upower, systemd, logind, gnome-session or others, and it is
21319 hard (or impossible without root privileges) to set the state of the real
21320 services to what you expect in your tests.")
21321 (license license:lgpl3+)))
21322
21323 (define-public python-jsonplus
21324 (package
21325 (name "python-jsonplus")
21326 (version "0.8.0")
21327 (home-page "https://github.com/randomir/jsonplus")
21328 (source (origin
21329 (method url-fetch)
21330 (uri (pypi-uri "jsonplus" version))
21331 (sha256
21332 (base32
21333 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21334 (build-system python-build-system)
21335 ;; XXX: No tests on PyPI, and the repository has no tags.
21336 (arguments '(#:tests? #f))
21337 (propagated-inputs
21338 `(("python-dateutil" ,python-dateutil)
21339 ("python-simplejson" ,python-simplejson)
21340 ("python-sortedcontainers" ,python-sortedcontainers)))
21341 (synopsis "Serialize Python types to/from JSON")
21342 (description
21343 "This package provides functionality to serialize arbitrary data types
21344 to and from JSON. Common data types are implemented and it is easy to
21345 register custom encoders and decoders.")
21346 (license license:expat)))
21347
21348 (define-public python-ujson
21349 (package
21350 (name "python-ujson")
21351 (version "4.0.2")
21352 (source
21353 (origin
21354 (method url-fetch)
21355 (uri (pypi-uri "ujson" version))
21356 (sha256
21357 (base32
21358 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21359 (modules '((guix build utils)))
21360 (snippet
21361 '(begin (delete-file-recursively "deps") #t))))
21362 (build-system python-build-system)
21363 (arguments
21364 `(#:phases
21365 (modify-phases %standard-phases
21366 (add-after 'unpack 'link-to-system-double-conversion
21367 (lambda* (#:key inputs #:allow-other-keys)
21368 (let ((d-c (assoc-ref inputs "double-conversion")))
21369 (substitute* "setup.py"
21370 (("./deps/double-conversion/double-conversion\"")
21371 (string-append d-c "/include/double-conversion\""))
21372 (("-lstdc++" stdc)
21373 (string-append "-L" d-c "/lib\","
21374 " \"-ldouble-conversion\","
21375 " \"" stdc)))
21376 #t)))
21377 (replace 'check
21378 (lambda* (#:key inputs outputs #:allow-other-keys)
21379 (add-installed-pythonpath inputs outputs)
21380 (invoke "pytest"))))))
21381 (native-inputs
21382 `(("double-conversion" ,double-conversion)
21383 ("python-setuptools-scm" ,python-setuptools-scm)
21384 ("python-pytest" ,python-pytest)))
21385 (home-page "https://github.com/ultrajson/ultrajson")
21386 (synopsis "Ultra fast JSON encoder and decoder for Python")
21387 (description
21388 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21389 bindings for Python 3.")
21390 (license license:bsd-3)))
21391
21392 (define-public python-iocapture
21393 ;; The latest release is more than a year older than this commit.
21394 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21395 (revision "1"))
21396 (package
21397 (name "python-iocapture")
21398 (version "0.1.2")
21399 (source
21400 (origin
21401 (method git-fetch)
21402 (uri (git-reference
21403 (url "https://github.com/oinume/iocapture")
21404 (commit commit)))
21405 (file-name (git-file-name name version))
21406 (sha256
21407 (base32
21408 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21409 (build-system python-build-system)
21410 (arguments
21411 `(#:phases
21412 (modify-phases %standard-phases
21413 (delete 'check)
21414 (add-after 'install 'check
21415 (lambda* (#:key inputs outputs #:allow-other-keys)
21416 (add-installed-pythonpath inputs outputs)
21417 (invoke "py.test" "-v" "tests")
21418 #t)))))
21419 (propagated-inputs
21420 `(("python-flexmock" ,python-flexmock)
21421 ("python-pytest" ,python-pytest)
21422 ("python-pytest-cov" ,python-pytest-cov)
21423 ("python-six" ,python-six)))
21424 (home-page "https://github.com/oinume/iocapture")
21425 (synopsis "Python capturing tool for stdout and stderr")
21426 (description
21427 "This package helps you to capture the standard out (stdout) and the
21428 standard error channel (stderr) in your program.")
21429 (license license:expat))))
21430
21431 (define-public python-argh
21432 ;; There are 21 commits since the latest release containing important
21433 ;; improvements.
21434 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21435 (revision "1"))
21436 (package
21437 (name "python-argh")
21438 (version (git-version "0.26.2" revision commit))
21439 (source
21440 (origin
21441 (method git-fetch)
21442 (uri (git-reference
21443 (url "https://github.com/neithere/argh")
21444 (commit commit)))
21445 (file-name (git-file-name name version))
21446 (sha256
21447 (base32
21448 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21449 (build-system python-build-system)
21450 (propagated-inputs
21451 `(("python-iocapture" ,python-iocapture)
21452 ("python-mock" ,python-mock)
21453 ("python-pytest" ,python-pytest)
21454 ("python-pytest-cov" ,python-pytest-cov)
21455 ("python-pytest-xdist" ,python-pytest-xdist)
21456 ("python-tox" ,python-tox)))
21457 (home-page "https://github.com/neithere/argh/")
21458 (synopsis "Argparse wrapper with natural syntax")
21459 (description
21460 "python-argh is a small library that provides several layers of
21461 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21462 always possible to declare a command with the highest possible (and least
21463 flexible) layer and then tune the behaviour with any of the lower layers
21464 including the native API of @code{python-argparse}.")
21465 (license license:lgpl3+))))
21466
21467 (define-public python-ppft
21468 (package
21469 (name "python-ppft")
21470 (version "1.6.6.1")
21471 (source
21472 (origin
21473 (method url-fetch)
21474 (uri (pypi-uri "ppft" version))
21475 (sha256
21476 (base32
21477 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21478 (build-system python-build-system)
21479 (arguments '(#:tests? #f)) ; there are none
21480 (propagated-inputs
21481 `(("python-six" ,python-six)))
21482 (home-page "https://pypi.org/project/ppft/")
21483 (synopsis "Fork of Parallel Python")
21484 (description
21485 "This package is a fork of Parallel Python. The Parallel Python
21486 module (@code{pp}) provides an easy and efficient way to create
21487 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21488 computers and clusters. It features cross-platform portability and dynamic
21489 load balancing.")
21490 (license license:bsd-3)))
21491
21492 (define-public python-pox
21493 (package
21494 (name "python-pox")
21495 (version "0.2.7")
21496 (source
21497 (origin
21498 (method url-fetch)
21499 (uri (pypi-uri "pox" version))
21500 (sha256
21501 (base32
21502 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21503 (build-system python-build-system)
21504 (arguments
21505 `(#:phases
21506 (modify-phases %standard-phases
21507 (replace 'check
21508 (lambda _
21509 (mkdir-p "/tmp/guix")
21510 (setenv "SHELL" "bash")
21511 (setenv "USERNAME" "guix")
21512 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21513 (invoke "py.test" "-vv")
21514 #t)))))
21515 (native-inputs
21516 `(("python-pytest" ,python-pytest)
21517 ("which" ,which)))
21518 (home-page "https://pypi.org/project/pox/")
21519 (synopsis "Python utilities for file system exploration and automated builds")
21520 (description
21521 "Pox provides a collection of utilities for navigating and manipulating
21522 file systems. This module is designed to facilitate some of the low-level
21523 operating system interactions that are useful when exploring a file system on a
21524 remote host. Pox provides Python equivalents of several shell commands such
21525 as @command{which} and @command{find}. These commands allow automated
21526 discovery of what has been installed on an operating system, and where the
21527 essential tools are located.")
21528 (license license:bsd-3)))
21529
21530 (define-public python-pathos
21531 (package
21532 (name "python-pathos")
21533 (version "0.2.5")
21534 (source
21535 (origin
21536 (method url-fetch)
21537 (uri (pypi-uri "pathos" version))
21538 (sha256
21539 (base32
21540 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
21541 (build-system python-build-system)
21542 (arguments
21543 '(#:phases
21544 (modify-phases %standard-phases
21545 (replace 'check
21546 (lambda _
21547 (setenv "PYTHONPATH"
21548 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
21549 (invoke "python" "./tests/__main__.py"))))))
21550 (propagated-inputs
21551 `(("python-dill" ,python-dill)
21552 ("python-multiprocess" ,python-multiprocess)
21553 ("python-pox" ,python-pox)
21554 ("python-ppft" ,python-ppft)))
21555 (native-inputs
21556 `(("python-pytest" ,python-pytest)))
21557 (home-page "https://pypi.org/project/pathos/")
21558 (synopsis
21559 "Parallel graph management and execution in heterogeneous computing")
21560 (description
21561 "Python-pathos is a framework for heterogeneous computing. It provides a
21562 consistent high-level interface for configuring and launching parallel
21563 computations across heterogeneous resources. Python-pathos provides configurable
21564 launchers for parallel and distributed computing, where each launcher contains
21565 the syntactic logic to configure and launch jobs in an execution environment.")
21566 (license license:bsd-3)))
21567
21568 (define-public python-flit
21569 (package
21570 (name "python-flit")
21571 (version "3.0.0")
21572 (source
21573 (origin
21574 (method url-fetch)
21575 (uri (pypi-uri "flit" version))
21576 (sha256
21577 (base32
21578 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
21579 (build-system python-build-system)
21580 (arguments
21581 `(#:tests? #f)) ; XXX: Check requires network access.
21582 (home-page "https://flit.readthedocs.io/")
21583 (synopsis
21584 "Simple packaging tool for simple packages")
21585 (description
21586 "Flit is a simple way to put Python packages and modules on PyPI. Flit
21587 packages a single importable module or package at a time, using the import
21588 name as the name on PyPI. All subpackages and data files within a package
21589 are included automatically.")
21590 (license license:bsd-3)))
21591
21592 (define-public python-pathtools
21593 (package
21594 (name "python-pathtools")
21595 (version "0.1.2")
21596 (source
21597 (origin
21598 (method url-fetch)
21599 (uri (pypi-uri "pathtools" version))
21600 (sha256
21601 (base32
21602 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
21603 (build-system python-build-system)
21604 (home-page
21605 "https://github.com/gorakhargosh/pathtools")
21606 (synopsis "Path utilities for Python")
21607 (description "Pattern matching and various utilities for file systems
21608 paths.")
21609 (license license:expat)))
21610
21611 (define-public python-fastentrypoints
21612 (package
21613 (name "python-fastentrypoints")
21614 (version "0.12")
21615 (source
21616 (origin
21617 (method url-fetch)
21618 (uri (pypi-uri "fastentrypoints" version))
21619 (sha256
21620 (base32
21621 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21622 (build-system python-build-system)
21623 (home-page
21624 "https://github.com/ninjaaron/fast-entry_points")
21625 (synopsis
21626 "Makes entry_points specified in setup.py load more quickly")
21627 (description
21628 "Using entry_points in your setup.py makes scripts that start really
21629 slowly because it imports pkg_resources. This package allows such setup
21630 scripts to load entry points more quickly.")
21631 (license license:bsd-3)))
21632
21633 (define-public python-funcparserlib
21634 (package
21635 (name "python-funcparserlib")
21636 (version "0.3.6")
21637 (source
21638 (origin
21639 (method url-fetch)
21640 (uri (pypi-uri "funcparserlib" version))
21641 (sha256
21642 (base32
21643 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21644 (native-inputs
21645 `(("python-tox" ,python-tox)))
21646 (arguments
21647 `(#:phases
21648 (modify-phases %standard-phases
21649 (replace 'check
21650 (lambda _
21651 (invoke "tox"))))))
21652 (build-system python-build-system)
21653 (home-page
21654 "https://github.com/vlasovskikh/funcparserlib")
21655 (synopsis
21656 "Recursive descent parsing library based on functional combinators")
21657 (description
21658 "This package is a recursive descent parsing library for Python based on
21659 functional combinators. Parser combinators are just higher-order functions
21660 that take parsers as their arguments and return them as result values.")
21661 (license license:expat)))
21662
21663 (define-public python-speg
21664 (package
21665 (name "python-speg")
21666 (version "0.3")
21667 (source
21668 (origin
21669 (method url-fetch)
21670 (uri (pypi-uri "speg" version ".zip"))
21671 (sha256
21672 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21673 (arguments
21674 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21675 (native-inputs
21676 `(("unzip" ,unzip)))
21677 (build-system python-build-system)
21678 (home-page "https://github.com/avakar/speg")
21679 (synopsis "PEG-based parser interpreter with memoization")
21680 (description "This package is a PEG-based parser and interpreter with
21681 memoization.")
21682 (license license:expat)))
21683
21684 (define-public python-cson
21685 (package
21686 (name "python-cson")
21687 (version "0.8")
21688 (source
21689 (origin
21690 (method url-fetch)
21691 (uri (pypi-uri "cson" version))
21692 (sha256
21693 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21694 (build-system python-build-system)
21695 (propagated-inputs
21696 `(("python-speg" ,python-speg)))
21697 (home-page "https://github.com/avakar/pycson")
21698 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21699 (description "This package is a parser for Coffeescript Object
21700 Notation (CSON).")
21701 (license license:expat)))
21702
21703 (define-public python-asynctest
21704 (package
21705 (name "python-asynctest")
21706 (version "0.13.0")
21707 (source
21708 (origin
21709 (method url-fetch)
21710 (uri (pypi-uri "asynctest" version))
21711 (sha256
21712 (base32
21713 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21714 (build-system python-build-system)
21715 (arguments
21716 '(#:phases
21717 (modify-phases %standard-phases
21718 (replace 'check
21719 (lambda _
21720 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21721 (add-after 'unpack 'disable-tests
21722 (lambda* _
21723 ;; XXX: 7 tests fail out of 220. Disable them for now.
21724 (substitute* (list "test/test_selector.py"
21725 "test/test_mock.py")
21726 (("def test_events_watched_outside_test_are_ignored")
21727 "@unittest.skip('disabled by guix')
21728 def test_events_watched_outside_test_are_ignored")
21729 (("def test_awaited_from_autospec_mock.*" line)
21730 (string-append line " return True\n"))
21731 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21732 (string-append line " return True\n"))
21733 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21734 (string-append line " return True\n"))
21735 (("def test_multiple_patches_on_coroutine.*" line)
21736 (string-append line " return True\n"))
21737 (("def test_patch_coroutine_only_when_running.*" line)
21738 (string-append line " return True\n")))
21739 #t)))))
21740 (home-page "https://github.com/Martiusweb/asynctest")
21741 (synopsis "Extension of unittest for testing asyncio libraries")
21742 (description
21743 "The package asynctest is built on top of the standard unittest module
21744 and cuts down boilerplate code when testing libraries for asyncio.")
21745 (license license:asl2.0)))
21746
21747 (define-public python-aionotify
21748 (package
21749 (name "python-aionotify")
21750 (version "0.2.0")
21751 (source
21752 (origin
21753 ;; Source tarball on PyPi lacks tests
21754 (method git-fetch)
21755 (uri (git-reference
21756 (url "https://github.com/rbarrois/aionotify")
21757 (commit (string-append "v" version))))
21758 (file-name (git-file-name name version))
21759 (sha256
21760 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21761 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21762 (build-system python-build-system)
21763 (home-page "https://github.com/rbarrois/aionotify")
21764 (synopsis "Asyncio-powered inotify library")
21765 (description
21766 "@code{aionotify} is a simple, asyncio-based inotify library.")
21767 (license license:bsd-3)))
21768
21769 (define-public python-forbiddenfruit
21770 (package
21771 (name "python-forbiddenfruit")
21772 (version "0.1.3")
21773 (source
21774 (origin
21775 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21776 (method git-fetch)
21777 (uri (git-reference
21778 (url "https://github.com/clarete/forbiddenfruit")
21779 (commit version)))
21780 (file-name (git-file-name name version))
21781 (sha256
21782 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21783 (build-system python-build-system)
21784 (arguments
21785 '(#:phases
21786 (modify-phases %standard-phases
21787 (replace 'check
21788 (lambda _
21789 (invoke "make" "SKIP_DEPS=1"))))))
21790 (native-inputs
21791 `(("python-nose" ,python-nose)
21792 ("python-coverage" ,python-coverage)))
21793 (home-page "https://github.com/clarete/forbiddenfruit")
21794 (synopsis "Patch python built-in objects")
21795 (description "This project allows Python code to extend built-in types.")
21796 (license (list license:gpl3+ license:expat))))
21797
21798 (define-public python-k5test
21799 (package
21800 (name "python-k5test")
21801 (version "0.9.2")
21802 (source
21803 (origin
21804 (method url-fetch)
21805 (uri (pypi-uri "k5test" version))
21806 (sha256
21807 (base32
21808 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21809 (build-system python-build-system)
21810 (propagated-inputs
21811 `(("python-six" ,python-six)
21812 ;; `which`, `kadmin.local` binaries called inside library
21813 ("which" ,which)
21814 ("mit-krb5" ,mit-krb5)))
21815 (native-inputs `(("mit-krb5" ,mit-krb5)))
21816 (arguments
21817 '(#:phases
21818 (modify-phases %standard-phases
21819 (add-after 'unpack 'patch-paths
21820 (lambda* _
21821 (substitute* "k5test/realm.py"
21822 (("'kadmin_local'") "'kadmin.local'")))))))
21823 (home-page "https://github.com/pythongssapi/k5test")
21824 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21825 (description
21826 "@code{k5test} is a library for setting up self-contained Kerberos 5
21827 environments, and running Python unit tests inside those environments. It is
21828 based on the file of the same name found alongside the MIT Kerberos 5 unit
21829 tests.")
21830 (license license:isc)))
21831
21832 (define-public python-gssapi
21833 (package
21834 (name "python-gssapi")
21835 (version "1.6.12")
21836 (source
21837 (origin
21838 (method url-fetch)
21839 (uri (pypi-uri "gssapi" version))
21840 (sha256
21841 (base32
21842 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
21843 (build-system python-build-system)
21844 (propagated-inputs
21845 `(("python-decorator" ,python-decorator)
21846 ("python-six" ,python-six)))
21847 (inputs
21848 `(("mit-krb5" ,mit-krb5)))
21849 ;; for tests
21850 (native-inputs
21851 `(("python-parameterized" ,python-parameterized)
21852 ("python-k5test" ,python-k5test)
21853 ("python-nose" ,python-nose)))
21854 (home-page "https://github.com/pythongssapi/python-gssapi")
21855 (synopsis "Python GSSAPI Wrapper")
21856 (description
21857 "Python-GSSAPI provides both low-level and high level wrappers around the
21858 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21859 also be usable with other GSSAPI mechanisms.")
21860 (license license:isc)))
21861
21862 (define-public python-check-manifest
21863 (package
21864 (name "python-check-manifest")
21865 (version "0.37")
21866 (source
21867 (origin
21868 (method url-fetch)
21869 (uri (pypi-uri "check-manifest" version))
21870 (sha256
21871 (base32
21872 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21873 (build-system python-build-system)
21874 (native-inputs
21875 `(("python-mock" ,python-mock)
21876 ("git" ,git)))
21877 (home-page "https://github.com/mgedmin/check-manifest")
21878 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21879 (description "Python package can include a MANIFEST.in file to help with
21880 sending package files to the Python Package Index. This package checks that
21881 file to ensure it completely and accurately describes your project.")
21882 (license license:expat)))
21883
21884 (define-public python-android-stringslib
21885 (package
21886 (name "python-android-stringslib")
21887 (version "0.1.2")
21888 (source
21889 (origin
21890 (method git-fetch)
21891 (uri (git-reference
21892 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21893 (commit (string-append "v" version))))
21894 (file-name (git-file-name name version))
21895 (sha256
21896 (base32
21897 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21898 (build-system python-build-system)
21899 (arguments
21900 `(#:tests? #f))
21901 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21902 (synopsis "Android strings.xml support")
21903 (description "Android Strings Lib provides support for android's strings.xml
21904 files. These files are used to translate strings in android apps.")
21905 (license license:expat)))
21906
21907 (define-public python-watchdog
21908 (package
21909 (name "python-watchdog")
21910 (version "0.9.0")
21911 (source
21912 (origin
21913 (method url-fetch)
21914 (uri (pypi-uri "watchdog" version))
21915 (sha256
21916 (base32
21917 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21918 (build-system python-build-system)
21919 (arguments
21920 `(#:phases
21921 (modify-phases %standard-phases
21922 (add-before 'check 'remove-failing
21923 (lambda _
21924 (delete-file "tests/test_inotify_buffer.py")
21925 (delete-file "tests/test_snapshot_diff.py")
21926 #t)))))
21927 (propagated-inputs
21928 `(("python-argh" ,python-argh)
21929 ("python-pathtools" ,python-pathtools)
21930 ("python-pyyaml" ,python-pyyaml)))
21931 (native-inputs
21932 `(("python-pytest-cov" ,python-pytest-cov)
21933 ("python-pytest-timeout" ,python-pytest-timeout)))
21934 (home-page "https://github.com/gorakhargosh/watchdog")
21935 (synopsis "File system events monitoring")
21936 (description "This package provides a way to monitor file system events
21937 such as a file modification and trigger an action. This is similar to inotify,
21938 but portable.")
21939 (license license:asl2.0)))
21940
21941 (define-public python-watchgod
21942 (package
21943 (name "python-watchgod")
21944 (version "0.6")
21945 (source
21946 (origin
21947 ;; There are no tests in the PyPI tarball.
21948 (method git-fetch)
21949 (uri (git-reference
21950 (url "https://github.com/samuelcolvin/watchgod")
21951 (commit (string-append "v" version))))
21952 (file-name (git-file-name name version))
21953 (sha256
21954 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21955 (build-system python-build-system)
21956 (arguments
21957 `(#:phases
21958 (modify-phases %standard-phases
21959 (replace 'check
21960 (lambda _
21961 (invoke "pytest" "-vv"))))))
21962 (native-inputs
21963 `(("python-coverage" ,python-coverage)
21964 ("python-docutils" ,python-docutils)
21965 ("python-flake8" ,python-flake8)
21966 ("python-isort" ,python-isort)
21967 ("python-pycodestyle" ,python-pycodestyle)
21968 ("python-pyflakes" ,python-pyflakes)
21969 ("python-pygments" ,python-pygments)
21970 ("python-pytest" ,python-pytest)
21971 ("python-pytest-cov" ,python-pytest-cov)
21972 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21973 ("python-pytest-mock" ,python-pytest-mock)
21974 ("python-pytest-sugar" ,python-pytest-sugar)
21975 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21976 (home-page "https://github.com/samuelcolvin/watchgod")
21977 (synopsis "Simple, modern file watching and code reload in Python")
21978 (description
21979 "Simple, modern file watching and code reload in Python inspired by
21980 @code{watchdog}. Among the differences are a unified approach for each
21981 operating systems and an elegant approach to concurrency using threading.")
21982 (license license:expat)))
21983
21984 (define-public python-wget
21985 (package
21986 (name "python-wget")
21987 (version "3.2")
21988 (source
21989 (origin
21990 (method url-fetch)
21991 (uri (pypi-uri "wget" version ".zip"))
21992 (sha256
21993 (base32
21994 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21995 (build-system python-build-system)
21996 (native-inputs `(("unzip" ,unzip)))
21997 (home-page "https://bitbucket.org/techtonik/python-wget/")
21998 (synopsis "Pure Python download utility")
21999 (description "The python-wget library provides an API to download files
22000 with features similar to the @command{wget} utility.")
22001 (license license:unlicense)))
22002
22003 (define-public offlate
22004 (package
22005 (name "offlate")
22006 (version "0.5")
22007 (source
22008 (origin
22009 (method git-fetch)
22010 (uri (git-reference
22011 (url "https://framagit.org/tyreunom/offlate")
22012 (commit version)))
22013 (file-name (git-file-name name version))
22014 (sha256
22015 (base32
22016 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22017 (build-system python-build-system)
22018 (arguments
22019 ;; No tests
22020 `(#:tests? #f))
22021 (propagated-inputs
22022 `(("python-android-stringslib" ,python-android-stringslib)
22023 ("python-dateutil" ,python-dateutil)
22024 ("python-gitlab" ,python-gitlab)
22025 ("python-lxml" ,python-lxml)
22026 ("python-polib" ,python-polib)
22027 ("python-pyenchant" ,python-pyenchant)
22028 ("python-pygit2" ,python-pygit2)
22029 ("python-pygithub" ,python-pygithub)
22030 ("python-pyqt" ,python-pyqt)
22031 ("python-requests" ,python-requests)
22032 ("python-ruamel.yaml" ,python-ruamel.yaml)
22033 ("python-translation-finder" ,python-translation-finder)
22034 ("python-watchdog" ,python-watchdog)))
22035 (native-inputs
22036 `(("qttools" ,qttools)))
22037 (home-page "https://framagit.org/tyreunom/offlate")
22038 (synopsis "Offline translation interface for online translation tools")
22039 (description "Offlate offers a unified interface for different translation
22040 file formats, as well as many different online translation platforms. You can
22041 use it to get work from online platforms, specialized such as the Translation
22042 Project, or not such a gitlab instance when your upstream doesn't use any
22043 dedicated platform. The tool proposes a unified interface for any format and
22044 an upload option to send your work back to the platform.")
22045 (license license:gpl3+)))
22046
22047 (define-public python-titlecase
22048 (package
22049 (name "python-titlecase")
22050 (version "0.12.0")
22051 (source
22052 (origin
22053 (method url-fetch)
22054 (uri (pypi-uri "titlecase" version))
22055 (sha256
22056 (base32
22057 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22058 (build-system python-build-system)
22059 (native-inputs
22060 `(("python-nose" ,python-nose)))
22061 (home-page "https://github.com/ppannuto/python-titlecase")
22062 (synopsis "Capitalize strings similar to book titles")
22063 (description
22064 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22065 It capitalizes (predominantly English) strings in a way that is similar to
22066 book titles, using the New York Times Manual of Style to leave certain words
22067 lowercase.")
22068 (license license:expat)))
22069
22070 (define-public python-pypng
22071 (package
22072 (name "python-pypng")
22073 (version "0.0.20")
22074 (source
22075 (origin
22076 (method url-fetch)
22077 (uri (pypi-uri "pypng" version))
22078 (sha256
22079 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22080 (build-system python-build-system)
22081 (home-page "https://github.com/drj11/pypng")
22082 (synopsis "Pure Python PNG image encoder/decoder")
22083 (description
22084 "The PyPNG module implements support for PNG images. It reads and writes
22085 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22086 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22087 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22088 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22089 A number of optional chunks can be specified (when writing) and
22090 understood (when reading): tRNS, bKGD, gAMA.
22091
22092 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22093 aim at being a replacement or competitor. Its strength lies in fine-grained
22094 extensive support of PNG features. It can also read and write Netpbm PAM
22095 files, with a focus on its use as an intermediate format for implementing
22096 custom PNG processing.")
22097 (license license:expat)))
22098
22099 (define-public python-fuzzywuzzy
22100 (package
22101 (name "python-fuzzywuzzy")
22102 (version "0.18.0")
22103 (source
22104 (origin
22105 (method url-fetch)
22106 (uri (pypi-uri "fuzzywuzzy" version))
22107 (sha256
22108 (base32
22109 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22110 (build-system python-build-system)
22111 (native-inputs
22112 `(("python-hypothesis" ,python-hypothesis)
22113 ("python-pycodestyle" ,python-pycodestyle)
22114 ("python-pytest" ,python-pytest)))
22115 (propagated-inputs
22116 `(("python-levenshtein" ,python-levenshtein)))
22117 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22118 (synopsis "Fuzzy string matching in Python")
22119 (description "Approximate string matching using
22120 @emph{Levenshtein Distance} to calculate the differences between
22121 sequences.")
22122 (license license:gpl2)))
22123
22124 (define-public python2-fuzzywuzzy
22125 (package-with-python2 python-fuzzywuzzy))
22126
22127 (define-public python-block-tracing
22128 (package
22129 (name "python-block-tracing")
22130 (version "1.0.1")
22131 (source
22132 (origin
22133 (method url-fetch)
22134 (uri (pypi-uri "block_tracing" version))
22135 (sha256
22136 (base32
22137 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22138 (build-system python-build-system)
22139 (arguments '(#:tests? #f)) ; no tests
22140 (home-page "https://github.com/rianhunter/block_tracing")
22141 (synopsis "Protect process memory")
22142 (description
22143 "@code{block_tracing} is a tiny Python library that can be used to
22144 prevent debuggers and other applications from inspecting the memory within
22145 your process.")
22146 (license license:expat)))
22147
22148 (define-public python-gcovr
22149 (package
22150 (name "python-gcovr")
22151 (version "4.2")
22152 (source
22153 (origin
22154 (method url-fetch)
22155 (uri (pypi-uri "gcovr" version))
22156 (sha256
22157 (base32
22158 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22159 (build-system python-build-system)
22160 (propagated-inputs
22161 `(("python-lxml" ,python-lxml)
22162 ("python-jinja2" ,python-jinja2)))
22163 (home-page "https://gcovr.com/")
22164 (synopsis "Utility for generating code coverage results")
22165 (description
22166 "Gcovr provides a utility for managing the use of the GNU gcov
22167 utility and generating summarized code coverage results. It is inspired
22168 by the Python coverage.py package, which provides a similar utility for
22169 Python.")
22170 (license license:bsd-3)))
22171
22172 (define-public python-owslib
22173 (package
22174 (name "python-owslib")
22175 (version "0.19.2")
22176 (source
22177 (origin
22178 (method url-fetch)
22179 (uri (pypi-uri "OWSLib" version))
22180 (sha256
22181 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22182 (build-system python-build-system)
22183 (arguments
22184 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22185 (synopsis "Interface for Open Geospatial Consortium web service")
22186 (description
22187 "OWSLib is a Python package for client programming with Open Geospatial
22188 Consortium (OGC) web service (hence OWS) interface standards, and their related
22189 content models.")
22190 (home-page "https://geopython.github.io/OWSLib/")
22191 (license license:bsd-3)))
22192
22193 (define-public python-docusign-esign
22194 (package
22195 (name "python-docusign-esign")
22196 (version "3.1.0")
22197 (source (origin
22198 (method url-fetch)
22199 (uri (pypi-uri "docusign_esign" version))
22200 (sha256
22201 (base32
22202 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22203 (build-system python-build-system)
22204 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22205 (arguments `(#:tests? #f))
22206 (propagated-inputs
22207 `(("python-certifi" ,python-certifi)
22208 ("python-six" ,python-six)
22209 ("python-dateutil" ,python-dateutil)
22210 ("python-urllib3" ,python-urllib3)
22211 ("python-pyjwt" ,python-pyjwt)
22212 ("python-cryptography" ,python-cryptography)
22213 ("python-nose" ,python-nose)))
22214 (synopsis "DocuSign Python Client")
22215 (description "The Official DocuSign Python Client Library used to interact
22216 with the eSign REST API. Send, sign, and approve documents using this client.")
22217 (home-page "https://www.docusign.com/devcenter")
22218 (license license:expat)))
22219
22220 (define-public python-xattr
22221 (package
22222 (name "python-xattr")
22223 (version "0.9.7")
22224 (source
22225 (origin
22226 (method url-fetch)
22227 (uri (pypi-uri "xattr" version))
22228 (sha256
22229 (base32
22230 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22231 (build-system python-build-system)
22232 (propagated-inputs
22233 `(("python-cffi" ,python-cffi)))
22234 (home-page "https://github.com/xattr/xattr")
22235 (synopsis
22236 "Python wrapper for extended file system attributes")
22237 (description "This package provides a Python wrapper for using extended
22238 file system attributes. Extended attributes extend the basic attributes of files
22239 and directories in the file system. They are stored as name:data pairs
22240 associated with file system objects (files, directories, symlinks, etc).")
22241 (license license:expat)))
22242
22243 (define-public python-json-logger
22244 (package
22245 (name "python-json-logger")
22246 (version "0.1.11")
22247 (source
22248 (origin
22249 (method url-fetch)
22250 (uri (pypi-uri "python-json-logger" version))
22251 (sha256
22252 (base32
22253 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22254 (build-system python-build-system)
22255 (home-page
22256 "https://github.com/madzak/python-json-logger")
22257 (synopsis "JSON log formatter in Python")
22258 (description "This library allows standard Python logging to output log data
22259 as JSON objects. With JSON we can make our logs more readable by machines and
22260 we can stop writing custom parsers for syslog-type records.")
22261 (license license:bsd-3)))
22262
22263 (define-public python-daiquiri
22264 (package
22265 (name "python-daiquiri")
22266 (version "2.1.1")
22267 (source
22268 (origin
22269 (method url-fetch)
22270 (uri (pypi-uri "daiquiri" version))
22271 (sha256
22272 (base32
22273 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22274 (build-system python-build-system)
22275 (propagated-inputs
22276 `(("python-json-logger" ,python-json-logger)))
22277 (native-inputs
22278 `(("python-mock" ,python-mock)
22279 ("python-pytest" ,python-pytest)
22280 ("python-setuptools-scm" ,python-setuptools-scm)
22281 ("python-six" ,python-six)))
22282 (home-page "https://github.com/jd/daiquiri")
22283 (synopsis
22284 "Library to configure Python logging easily")
22285 (description "The daiquiri library provides an easy way to configure
22286 logging in Python. It also provides some custom formatters and handlers.")
22287 (license license:asl2.0)))
22288
22289 (define-public python-pifpaf
22290 (package
22291 (name "python-pifpaf")
22292 (version "2.5.0")
22293 (source
22294 (origin
22295 (method url-fetch)
22296 (uri (pypi-uri "pifpaf" version))
22297 (sha256
22298 (base32
22299 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22300 (build-system python-build-system)
22301 (arguments
22302 '(#:phases
22303 (modify-phases %standard-phases
22304 (replace 'check
22305 (lambda _
22306 (invoke "python" "setup.py" "testr" "--slowest"
22307 "--testr-args=until-failure"))))))
22308 (propagated-inputs
22309 `(("python-click" ,python-click)
22310 ("python-daiquiri" ,python-daiquiri)
22311 ("python-fixtures" ,python-fixtures)
22312 ("python-jinja2" ,python-jinja2)
22313 ("python-pbr" ,python-pbr)
22314 ("python-psutil" ,python-psutil)
22315 ("python-six" ,python-six)
22316 ("python-xattr" ,python-xattr)))
22317 (native-inputs
22318 `(("python-mock" ,python-mock)
22319 ("python-os-testr" ,python-os-testr)
22320 ("python-requests" ,python-requests)
22321 ("python-testrepository" ,python-testrepository)
22322 ("python-testtools" ,python-testtools)))
22323 (home-page "https://github.com/jd/pifpaf")
22324 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22325 (description "Pifpaf is a suite of fixtures and a command-line tool that
22326 starts and stops daemons for a quick throw-away usage. This is typically
22327 useful when needing these daemons to run integration testing. It originally
22328 evolved from its precursor @code{overtest}.")
22329 (license license:asl2.0)))
22330
22331 (define-public python-pytest-check-links
22332 (package
22333 (name "python-pytest-check-links")
22334 (version "0.3.0")
22335 (source
22336 (origin
22337 (method url-fetch)
22338 ;; URI uses underscores
22339 (uri (pypi-uri "pytest_check_links" version))
22340 (sha256
22341 (base32
22342 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22343 (build-system python-build-system)
22344 (propagated-inputs
22345 `(("python-docutils" ,python-docutils)
22346 ("python-html5lib" ,python-html5lib)
22347 ("python-nbconvert" ,python-nbconvert)
22348 ("python-nbformat" ,python-nbformat)
22349 ("python-pytest" ,python-pytest)
22350 ("python-six" ,python-six)))
22351 (native-inputs
22352 `(("python-pbr-minimal" ,python-pbr-minimal)))
22353 (home-page "https://github.com/minrk/pytest-check-links")
22354 (synopsis "Check links in files")
22355 (description "This package provides a pytest plugin that checks URLs for
22356 HTML-containing files.")
22357 (license license:bsd-3)))
22358
22359 (define-public python-json5
22360 (package
22361 (name "python-json5")
22362 (version "0.8.5")
22363 (source
22364 (origin
22365 ;; sample.json5 is missing from PyPi source tarball
22366 (method git-fetch)
22367 (uri (git-reference
22368 (url "https://github.com/dpranke/pyjson5")
22369 (commit (string-append "v" version))))
22370 (file-name (git-file-name name version))
22371 (sha256
22372 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22373 (build-system python-build-system)
22374 (home-page "https://github.com/dpranke/pyjson5")
22375 (synopsis
22376 "Python implementation of the JSON5 data format")
22377 (description
22378 "JSON5 extends the JSON data interchange format to make it slightly more
22379 usable as a configuration language. This Python package implements parsing and
22380 dumping of JSON5 data structures.")
22381 (license license:asl2.0)))
22382
22383 (define-public python-frozendict
22384 (package
22385 (name "python-frozendict")
22386 (version "1.2")
22387 (source
22388 (origin
22389 (method url-fetch)
22390 (uri (pypi-uri "frozendict" version))
22391 (sha256
22392 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22393 (build-system python-build-system)
22394 (home-page "https://github.com/slezica/python-frozendict")
22395 (synopsis "Simple immutable mapping for Python")
22396 (description
22397 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22398 implements the complete mapping interface. It can be used as a drop-in
22399 replacement for dictionaries where immutability is desired.")
22400 (license license:expat)))
22401
22402 (define-public python-unpaddedbase64
22403 (package
22404 (name "python-unpaddedbase64")
22405 (version "1.1.0")
22406 (source
22407 (origin
22408 (method git-fetch)
22409 (uri (git-reference
22410 (url "https://github.com/matrix-org/python-unpaddedbase64")
22411 (commit (string-append "v" version))))
22412 (file-name (git-file-name name version))
22413 (sha256
22414 (base32
22415 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22416 (build-system python-build-system)
22417 (home-page "https://pypi.org/project/unpaddedbase64/")
22418 (synopsis "Encode and decode Base64 without “=” padding")
22419 (description
22420 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22421 using “=” characters. However this conveys no benefit so many protocols
22422 choose to use Base64 without the “=” padding.")
22423 (license license:asl2.0)))
22424
22425 (define-public python-py-cpuinfo
22426 (package
22427 (name "python-py-cpuinfo")
22428 (version "5.0.0")
22429 (source
22430 (origin
22431 (method url-fetch)
22432 (uri (pypi-uri "py-cpuinfo" version))
22433 (sha256
22434 (base32
22435 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22436 (build-system python-build-system)
22437 (home-page "https://github.com/workhorsy/py-cpuinfo")
22438 (synopsis "Get CPU info with Python")
22439 (description
22440 "This Python module returns the CPU info by using the best sources of
22441 information for your operating system.")
22442 (license license:expat)))
22443
22444 (define-public python-canonicaljson
22445 (package
22446 (name "python-canonicaljson")
22447 (version "1.4.0")
22448 (source
22449 (origin
22450 (method url-fetch)
22451 (uri (pypi-uri "canonicaljson" version))
22452 (sha256
22453 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22454 (build-system python-build-system)
22455 (propagated-inputs
22456 `(("python-six" ,python-six)
22457 ("python-frozendict" ,python-frozendict)
22458 ("python-simplejson" ,python-simplejson)))
22459 (home-page "https://github.com/matrix-org/python-canonicaljson")
22460 (synopsis "Canonical JSON")
22461 (description
22462 "Deterministically encode JSON.
22463
22464 @itemize
22465 @item Encodes objects and arrays as RFC 7159 JSON.
22466 @item Sorts object keys so that you get the same result each time.
22467 @item Has no insignificant whitespace to make the output as small as possible.
22468 @item Escapes only the characters that must be escaped, U+0000 to
22469 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
22470 @item Uses the shortest escape sequence for each escaped character.
22471 @item Encodes the JSON as UTF-8.
22472 @item Can encode frozendict immutable dictionaries.
22473 @end itemize")
22474 (license license:asl2.0)))
22475
22476 (define-public python-signedjson
22477 (package
22478 (name "python-signedjson")
22479 (version "1.1.1")
22480 (source
22481 (origin
22482 (method url-fetch)
22483 (uri (pypi-uri "signedjson" version))
22484 (sha256
22485 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
22486 (build-system python-build-system)
22487 (propagated-inputs
22488 `(("python-canonicaljson" ,python-canonicaljson)
22489 ("python-importlib-metadata" ,python-importlib-metadata)
22490 ("python-pynacl" ,python-pynacl)
22491 ("python-typing-extensions" ,python-typing-extensions)
22492 ("python-unpaddedbase64" ,python-unpaddedbase64)))
22493 (native-inputs
22494 `(("python-setuptools-scm" ,python-setuptools-scm)))
22495 (home-page "https://github.com/matrix-org/python-signedjson")
22496 (synopsis "Sign JSON objects with ED25519 signatures")
22497 (description
22498 "Sign JSON objects with ED25519 signatures.
22499
22500 @itemize
22501 @item More than one entity can sign the same object.
22502 @item Each entity can sign the object with more than one key making it easier to
22503 rotate keys
22504 @item ED25519 can be replaced with a different algorithm.
22505 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
22506 key.
22507 @end itemize")
22508 (license license:asl2.0)))
22509
22510 (define-public python-daemonize
22511 (package
22512 (name "python-daemonize")
22513 (version "2.5.0")
22514 (source
22515 (origin
22516 (method url-fetch)
22517 (uri (pypi-uri "daemonize" version))
22518 (sha256
22519 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
22520 (build-system python-build-system)
22521 (home-page "https://github.com/thesharp/daemonize")
22522 (synopsis "Library for writing system daemons in Python")
22523 (description "Daemonize is a library for writing system daemons in Python.")
22524 (license license:expat)))
22525
22526 (define-public python-pymacaroons
22527 (package
22528 (name "python-pymacaroons")
22529 (version "0.13.0")
22530 (source
22531 (origin
22532 (method url-fetch)
22533 (uri (pypi-uri "pymacaroons" version))
22534 (sha256
22535 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
22536 (build-system python-build-system)
22537 (propagated-inputs
22538 `(("python-six" ,python-six)
22539 ("python-pynacl" ,python-pynacl)))
22540 (home-page "https://github.com/ecordell/pymacaroons")
22541 (synopsis "Python Macaroon Library")
22542 (description
22543 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
22544 tokens, macaroons embed caveats that define specific authorization
22545 requirements for the target service, the service that issued the root macaroon
22546 and which is capable of verifying the integrity of macaroons it receives.
22547
22548 Macaroons allow for delegation and attenuation of authorization. They are
22549 simple and fast to verify, and decouple authorization policy from the
22550 enforcement of that policy.")
22551 (license license:expat)))
22552
22553 (define-public python-ldap3
22554 (package
22555 (name "python-ldap3")
22556 (version "2.7")
22557 (home-page "https://github.com/cannatag/ldap3")
22558 (source
22559 (origin
22560 (method git-fetch)
22561 (uri (git-reference (url home-page)
22562 (commit (string-append "v" version))))
22563 (file-name (git-file-name name version))
22564 (sha256
22565 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
22566 (build-system python-build-system)
22567 (arguments
22568 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22569 #:phases (modify-phases %standard-phases
22570 (replace 'check
22571 (lambda* (#:key tests? #:allow-other-keys)
22572 (when tests?
22573 (invoke "nosetests" "-s" "test"))
22574 #t)))))
22575 (native-inputs
22576 `(("python-nose" ,python-nose)))
22577 (propagated-inputs
22578 `(("python-gssapi" ,python-gssapi)
22579 ("python-pyasn1" ,python-pyasn1)))
22580 (synopsis "Python LDAP client")
22581 (description
22582 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22583 library.")
22584 (license license:lgpl3+)))
22585
22586 (define-public python-boltons
22587 (package
22588 (name "python-boltons")
22589 (version "20.0.0")
22590 (source
22591 (origin
22592 (method url-fetch)
22593 (uri (pypi-uri "boltons" version))
22594 (sha256
22595 (base32
22596 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22597 (build-system python-build-system)
22598 (home-page "https://github.com/mahmoud/boltons")
22599 (synopsis "Extensions to the Python standard library")
22600 (description
22601 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22602 as — and yet conspicuously missing from — the standard library, including:
22603
22604 @itemize
22605 @item Atomic file saving, bolted on with fileutils
22606 @item A highly-optimized OrderedMultiDict, in dictutils
22607 @item Two types of PriorityQueue, in queueutils
22608 @item Chunked and windowed iteration, in iterutils
22609 @item Recursive data structure iteration and merging, with iterutils.remap
22610 @item Exponential backoff functionality, including jitter, through
22611 iterutils.backoff
22612 @item A full-featured TracebackInfo type, for representing stack traces, in
22613 tbutils
22614 @end itemize")
22615 (license license:bsd-3)))
22616
22617 (define-public python-eliot
22618 (package
22619 (name "python-eliot")
22620 (version "1.12.0")
22621 (source
22622 (origin
22623 (method url-fetch)
22624 (uri (pypi-uri "eliot" version))
22625 (sha256
22626 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22627 (build-system python-build-system)
22628 (arguments
22629 `(#:phases
22630 (modify-phases %standard-phases
22631 (add-after 'unpack 'remove-journald-support
22632 (lambda _
22633 (for-each delete-file
22634 '("eliot/tests/test_journald.py"
22635 "eliot/journald.py"))
22636 #t))
22637 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22638 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22639 ;; be installed and these tests should pass.
22640 (lambda _
22641 (delete-file "eliot/tests/test_prettyprint.py")
22642 #t)))))
22643 (propagated-inputs
22644 `(("python-boltons" ,python-boltons)
22645 ("python-pyrsistent" ,python-pyrsistent)
22646 ("python-six" ,python-six)
22647 ("python-zope-interface" ,python-zope-interface)))
22648 (native-inputs
22649 `(("python-black" ,python-black)
22650 ("python-coverage" ,python-coverage)
22651 ("python-dask" ,python-dask)
22652 ("python-flake8" ,python-flake8)
22653 ("python-hypothesis" ,python-hypothesis)
22654 ("python-pytest" ,python-pytest)
22655 ("python-setuptools" ,python-setuptools)
22656 ("python-sphinx" ,python-sphinx)
22657 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22658 ("python-testtools" ,python-testtools)
22659 ("python-twine" ,python-twine)
22660 ("python-twisted" ,python-twisted)))
22661 (home-page "https://github.com/itamarst/eliot/")
22662 (synopsis "Eliot: the logging system that tells you why it happened")
22663 (description
22664 "@dfn{eliot} is a Python logging system that outputs causal chains of
22665 actions: actions can spawn other actions, and eventually they either succeed
22666 or fail. The resulting logs tell you the story of what your software did: what
22667 happened, and what caused it.")
22668 (license license:asl2.0)))
22669
22670 (define-public python-pem
22671 (package
22672 (name "python-pem")
22673 (version "20.1.0")
22674 (source
22675 (origin
22676 (method url-fetch)
22677 (uri (pypi-uri "pem" version))
22678 (sha256
22679 (base32
22680 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22681 (build-system python-build-system)
22682 (native-inputs
22683 `(("python-certifi" ,python-certifi)
22684 ("python-coverage" ,python-coverage)
22685 ("python-pretend" ,python-pretend)
22686 ("python-pyopenssl" ,python-pyopenssl)
22687 ("python-pytest" ,python-pytest)
22688 ("python-sphinx" ,python-sphinx)
22689 ("python-twisted" ,python-twisted)))
22690 (home-page "https://pem.readthedocs.io/")
22691 (synopsis "Easy PEM file parsing in Python")
22692 (description
22693 "This package provides a Python module for parsing and splitting PEM files.")
22694 (license license:expat)))
22695
22696 (define-public python-txsni
22697 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22698 ;; Python and OpenSSL.
22699 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22700 (revision "0"))
22701 (package
22702 (name "python-txsni")
22703 (version (git-version "0.1.9" revision commit))
22704 (home-page "https://github.com/glyph/txsni")
22705 (source
22706 (origin
22707 (method git-fetch)
22708 (uri (git-reference (url home-page) (commit commit)))
22709 (file-name (git-file-name name version))
22710 (sha256
22711 (base32
22712 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22713 (build-system python-build-system)
22714 (propagated-inputs
22715 `(("python-pyopenssl" ,python-pyopenssl)
22716 ("python-service-identity" ,python-service-identity)
22717 ("python-twisted" ,python-twisted)))
22718 (synopsis "Run TLS servers with Twisted")
22719 (description
22720 "This package provides an easy-to-use SNI endpoint for use
22721 with the Twisted web framework.")
22722 (license license:expat))))
22723
22724 (define-public python-txacme
22725 (package
22726 (name "python-txacme")
22727 (version "0.9.2")
22728 (source
22729 (origin
22730 (method url-fetch)
22731 (uri (pypi-uri "txacme" version))
22732 (sha256
22733 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22734 (build-system python-build-system)
22735 (propagated-inputs
22736 `(("python-acme" ,python-acme)
22737 ("python-attrs" ,python-attrs)
22738 ("python-eliot" ,python-eliot)
22739 ("python-josepy" ,python-josepy)
22740 ("python-pem" ,python-pem)
22741 ("python-treq" ,python-treq)
22742 ("python-twisted" ,python-twisted)
22743 ("python-txsni" ,python-txsni)))
22744 (native-inputs
22745 `(("python-fixtures" ,python-fixtures)
22746 ("python-hypothesis" ,python-hypothesis)
22747 ("python-mock" ,python-mock)
22748 ("python-service-identity"
22749 ,python-service-identity)
22750 ("python-testrepository" ,python-testrepository)
22751 ("python-testscenarios" ,python-testscenarios)
22752 ("python-testtools" ,python-testtools)))
22753 (home-page "https://github.com/twisted/txacme")
22754 (synopsis "Twisted implexmentation of the ACME protocol")
22755 (description
22756 "ACME is Automatic Certificate Management Environment, a protocol that
22757 allows clients and certificate authorities to automate verification and
22758 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22759 Certificate Authority.
22760
22761 txacme is an implementation of the protocol for Twisted, the event-driven
22762 networking engine for Python.")
22763 (license license:expat)))
22764
22765 (define-public python-pysaml2
22766 (package
22767 (name "python-pysaml2")
22768 (version "6.5.1")
22769 (source
22770 (origin
22771 (method url-fetch)
22772 (uri (pypi-uri "pysaml2" version))
22773 (sha256
22774 (base32
22775 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
22776 (build-system python-build-system)
22777 (propagated-inputs
22778 `(("python-cryptography" ,python-cryptography)
22779 ("python-dateutil" ,python-dateutil)
22780 ("python-defusedxml" ,python-defusedxml)
22781 ("python-importlib-resources"
22782 ,python-importlib-resources)
22783 ("python-pyopenssl" ,python-pyopenssl)
22784 ("python-pytz" ,python-pytz)
22785 ("python-requests" ,python-requests)
22786 ("python-six" ,python-six)
22787 ("python-xmlschema" ,python-xmlschema)))
22788 (home-page "https://idpy.org")
22789 (synopsis "Python implementation of SAML Version 2 Standard")
22790 (description
22791 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22792 It contains all necessary pieces for building a SAML2 service provider or
22793 an identity provider. The distribution contains examples of both.
22794
22795 This package was originally written to work in a WSGI environment, but
22796 there are extensions that allow you to use it with other frameworks.")
22797 (license license:asl2.0)))
22798
22799 (define-public python-click-plugins
22800 (package
22801 (name "python-click-plugins")
22802 (version "1.1.1")
22803 (source
22804 (origin
22805 (method url-fetch)
22806 (uri (pypi-uri "click-plugins" version))
22807 (sha256
22808 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22809 (build-system python-build-system)
22810 (native-inputs
22811 `(("python-pytest" ,python-pytest)))
22812 (propagated-inputs
22813 `(("python-click" ,python-click)))
22814 (synopsis "Extension for Click to register external CLI commands")
22815 (description "This package provides n extension module for Click to
22816 register external CLI commands via setuptools entry-points.")
22817 (home-page "https://github.com/click-contrib/click-plugins")
22818 (license license:bsd-3)))
22819
22820 (define-public python-diceware
22821 (package
22822 (name "python-diceware")
22823 (version "0.9.6")
22824 (source
22825 (origin
22826 (method url-fetch)
22827 (uri (pypi-uri "diceware" version))
22828 (sha256
22829 (base32
22830 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22831 (build-system python-build-system)
22832 (native-inputs
22833 `(("python-coverage" ,python-coverage)
22834 ("python-pytest" ,python-pytest)
22835 ("python-pytest-runner" ,python-pytest-runner)))
22836 (home-page "https://github.com/ulif/diceware/")
22837 (synopsis "Generates memorable passphrases")
22838 (description "This package generates passphrases by concatenating words
22839 randomly picked from wordlists. It supports several sources of
22840 randomness (including real life dice) and different wordlists (including
22841 cryptographically signed ones).")
22842 (license license:gpl3+)))
22843
22844 (define-public python-dictdiffer
22845 (package
22846 (name "python-dictdiffer")
22847 (version "0.8.1")
22848 (source (origin
22849 (method url-fetch)
22850 (uri (pypi-uri "dictdiffer" version))
22851 (sha256
22852 (base32
22853 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22854 (build-system python-build-system)
22855 (native-inputs
22856 `(("python-check-manifest" ,python-check-manifest)
22857 ("python-coverage" ,python-coverage)
22858 ("python-isort" ,python-isort)
22859 ("python-mock" ,python-mock)
22860 ("python-pydoctstyle" ,python-pydocstyle)
22861 ("python-pytest-cache" ,python-pytest-cache)
22862 ("python-pytest-cov" ,python-pytest-cov)
22863 ("python-pytest-pep8" ,python-pytest-pep8)
22864 ("python-pytest-runner" ,python-pytest-runner)
22865 ("python-pytest" ,python-pytest)
22866 ("python-setuptools-scm" ,python-setuptools-scm)
22867 ("python-tox" ,python-tox)))
22868 (home-page "https://github.com/inveniosoftware/dictdiffer")
22869 (synopsis "Diff and patch Python dictionary objects")
22870 (description
22871 "Dictdiffer is a Python module that helps you to diff and patch
22872 dictionaries.")
22873 (license license:expat)))
22874
22875 (define-public pyzo
22876 (package
22877 (name "pyzo")
22878 (version "4.11.2")
22879 (source
22880 (origin
22881 (method url-fetch)
22882 (uri (pypi-uri "pyzo" version))
22883 (sha256
22884 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22885 (build-system python-build-system)
22886 (arguments
22887 `(#:phases
22888 (modify-phases %standard-phases
22889 (add-before 'check 'fix-home-directory
22890 (lambda _
22891 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22892 (setenv "HOME" "/tmp")
22893 #t)))
22894 ;; Tests fail with "Uncaught Python exception: python: undefined
22895 ;; symbol: objc_getClass".
22896 #:tests? #f))
22897 (propagated-inputs
22898 `(("python-pyqt" ,python-pyqt)))
22899 (home-page "https://pyzo.org")
22900 (synopsis
22901 "Python IDE for scientific computing")
22902 (description
22903 "Pyzo is a Python IDE focused on interactivity and introspection,
22904 which makes it very suitable for scientific computing. Its practical
22905 design is aimed at simplicity and efficiency.
22906
22907 It consists of two main components, the editor and the shell, and uses
22908 a set of pluggable tools to help the programmer in various ways. Some
22909 example tools are source structure, project manager, interactive help,
22910 workspace...")
22911 (license license:bsd-2)))
22912
22913 (define-public python-osc
22914 (package
22915 (name "python-osc")
22916 (version "1.7.4")
22917 (source
22918 (origin
22919 (method url-fetch)
22920 (uri (pypi-uri "python-osc" version))
22921 (sha256
22922 (base32
22923 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22924 (build-system python-build-system)
22925 (home-page "https://github.com/attwad/python-osc")
22926 (synopsis "Open Sound Control server and client implementations")
22927 (description
22928 "@code{python-osc} is a pure Python library with no external
22929 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22930 Open Sound Control 1.0} specification.")
22931 (license license:unlicense)))
22932
22933 (define-public python-voluptuous
22934 (package
22935 (name "python-voluptuous")
22936 (version "0.11.7")
22937 (source
22938 (origin
22939 (method url-fetch)
22940 (uri (pypi-uri "voluptuous" version))
22941 (sha256
22942 (base32
22943 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22944 (build-system python-build-system)
22945 (native-inputs
22946 `(("python-nose" ,python-nose)))
22947 (home-page "https://github.com/alecthomas/voluptuous")
22948 (synopsis "Python data validation library")
22949 (description
22950 "Voluptuous is a Python data validation library. It is primarily
22951 intended for validating data coming into Python as JSON, YAML, etc.")
22952 (license license:bsd-3)))
22953
22954 (define-public python-cmd2
22955 (package
22956 (name "python-cmd2")
22957 (version "1.0.2")
22958 (source
22959 (origin
22960 (method url-fetch)
22961 (uri (pypi-uri "cmd2" version))
22962 (sha256
22963 (base32
22964 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22965 (build-system python-build-system)
22966 (propagated-inputs
22967 `(("python-attrs" ,python-attrs)
22968 ("python-colorama" ,python-colorama)
22969 ("python-pyperclip" ,python-pyperclip)
22970 ("python-wcwidth" ,python-wcwidth)))
22971 (native-inputs
22972 `(("python-codecov" ,python-codecov)
22973 ("python-coverage" ,python-coverage)
22974 ("python-doc8" ,python-doc8)
22975 ("python-flake8" ,python-flake8)
22976 ("python-invoke" ,python-invoke)
22977 ("python-mock" ,python-mock)
22978 ("python-pytest" ,python-pytest)
22979 ("python-pytest-cov" ,python-pytest-cov)
22980 ("python-pytest-mock" ,python-pytest-mock)
22981 ("python-setuptools-scm" ,python-setuptools-scm)
22982 ("python-sphinx" ,python-sphinx)
22983 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22984 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22985 ("python-tox" ,python-tox)
22986 ("python-twine" ,python-twine)
22987 ("which" ,which)))
22988 (home-page "https://github.com/python-cmd2/cmd2")
22989 (synopsis "Tool for building interactive command line applications")
22990 (description
22991 "Cmd2 is a tool for building interactive command line applications in
22992 Python. Its goal is to make it quick and easy for developers to build
22993 feature-rich and user-friendly interactive command line applications. It
22994 provides a simple API which is an extension of Python's built-in @code{cmd}
22995 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22996 make your life easier and eliminates much of the boilerplate code which would
22997 be necessary when using @code{cmd}.")
22998 (license license:expat)))
22999
23000 (define-public python-pytidylib
23001 (package
23002 (name "python-pytidylib")
23003 (version "0.3.2")
23004 (source (origin
23005 (method url-fetch)
23006 (uri (pypi-uri "pytidylib" version))
23007 (sha256
23008 (base32
23009 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23010 (build-system python-build-system)
23011 (arguments
23012 '(#:phases
23013 (modify-phases %standard-phases
23014 (add-before 'build 'qualify-libtidy
23015 (lambda* (#:key inputs #:allow-other-keys)
23016 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23017 "/lib/libtidy.so")))
23018 (substitute* "tidylib/tidy.py"
23019 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23020 (format #f "'~a'" libtidy)))
23021 #t))))))
23022 (inputs `(("tidy" ,tidy)))
23023 (home-page "https://github.com/countergram/pytidylib")
23024 (synopsis "Python wrapper for HTML Tidy library")
23025 (description
23026 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23027 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23028 (license license:expat)))
23029
23030 (define-public python2-pytidylib
23031 (package-with-python2 python-pytidylib))
23032
23033 (define-public python-mujson
23034 (package
23035 (name "python-mujson")
23036 (version "1.4")
23037 (source
23038 (origin
23039 (method url-fetch)
23040 (uri (pypi-uri "mujson" version))
23041 (sha256
23042 (base32
23043 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23044 (build-system python-build-system)
23045 (home-page "https://github.com/mattgiles/mujson")
23046 (synopsis "Use the fastest JSON functions available at import time")
23047 (description "This package selects the fastest JSON functions available
23048 at import time.")
23049 (license license:expat)))
23050
23051 (define-public python-bashlex
23052 (package
23053 (name "python-bashlex")
23054 (version "0.14")
23055 (source
23056 (origin
23057 (method url-fetch)
23058 (uri (pypi-uri "bashlex" version))
23059 (sha256
23060 (base32
23061 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23062 (build-system python-build-system)
23063 (arguments
23064 `(#:phases
23065 (modify-phases %standard-phases
23066 (add-before 'build 'pregenerate-yacc-tables
23067 (lambda _
23068 ;; parser.py caches tables, which attempts to write to site lib
23069 ;; see https://github.com/idank/bashlex/issues/51
23070 (invoke "python" "-c" "import bashlex"))))))
23071 (home-page
23072 "https://github.com/idank/bashlex")
23073 (synopsis "Python parser for bash")
23074 (description "@code{bashlex} is a Python port of the parser used
23075 internally by GNU bash.
23076
23077 For the most part it's transliterated from C, the major differences are:
23078
23079 @itemize
23080 @item it does not execute anything
23081 @item it is reentrant
23082 @item it generates a complete AST
23083 @end itemize
23084 ")
23085 (license license:gpl3+)))
23086
23087 (define-public python-jinxed
23088 (package
23089 (name "python-jinxed")
23090 (version "1.0.0")
23091 (source
23092 (origin
23093 (method url-fetch)
23094 (uri (pypi-uri "jinxed" version))
23095 (sha256
23096 (base32
23097 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23098 (build-system python-build-system)
23099 (arguments
23100 '(#:phases
23101 (modify-phases %standard-phases
23102 (add-before 'check 'set-environment-variables
23103 (lambda* (#:key inputs #:allow-other-keys)
23104 (let ((ncurses (assoc-ref inputs "ncurses")))
23105 (setenv "TERM" "LINUX")
23106 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23107 #t))))
23108 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23109 (native-inputs
23110 `(("ncurses" ,ncurses)))
23111 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23112 (synopsis "Jinxed Terminal Library")
23113 (description
23114 "Jinxed is an implementation of a subset of the Python curses library.")
23115 (license license:mpl2.0)))
23116
23117 (define-public python-blessed
23118 (package
23119 (name "python-blessed")
23120 (version "1.17.8")
23121 (source
23122 (origin
23123 (method url-fetch)
23124 (uri (pypi-uri "blessed" version))
23125 (sha256
23126 (base32
23127 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23128 (modules '((guix build utils)))
23129 (snippet
23130 '(begin
23131 ;; Don't get hung up on Windows test failures.
23132 (delete-file "blessed/win_terminal.py") #t))))
23133 (build-system python-build-system)
23134 (propagated-inputs
23135 `(("python-jinxed" ,python-jinxed)
23136 ("python-six" ,python-six)
23137 ("python-wcwidth" ,python-wcwidth)))
23138 (native-inputs
23139 `(("python-mock" ,python-mock)
23140 ("python-pytest" ,python-pytest)))
23141 (home-page "https://github.com/jquast/blessed")
23142 (synopsis "Wrapper around terminal capabilities")
23143 (description
23144 "Blessed is a thin, practical wrapper around terminal styling, screen
23145 positioning, and keyboard input.")
23146 (license license:expat)))
23147
23148 (define-public python-readme-renderer
23149 (package
23150 (name "python-readme-renderer")
23151 (version "26.0")
23152 (source
23153 (origin
23154 (method url-fetch)
23155 (uri (pypi-uri "readme_renderer" version))
23156 (sha256
23157 (base32
23158 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23159 (build-system python-build-system)
23160 (propagated-inputs
23161 `(("python-bleach" ,python-bleach)
23162 ("python-docutils" ,python-docutils)
23163 ("python-pygments" ,python-pygments)
23164 ("python-six" ,python-six)))
23165 (native-inputs
23166 `(("python-mock" ,python-mock)
23167 ("python-pytest" ,python-pytest)))
23168 (home-page "https://github.com/pypa/readme_renderer")
23169 (synopsis "Render README files in Warehouse")
23170 (description
23171 "Readme Renderer is a library that will safely render arbitrary README
23172 files into HTML. It is designed to be used in Warehouse to render the
23173 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23174 and plain text.")
23175 (license license:asl2.0)))
23176
23177 (define-public python-lazr-delegates
23178 (package
23179 (name "python-lazr-delegates")
23180 (version "2.0.4")
23181 (source
23182 (origin
23183 (method url-fetch)
23184 (uri (pypi-uri "lazr.delegates" version))
23185 (sha256
23186 (base32
23187 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23188 (build-system python-build-system)
23189 (arguments
23190 '(#:phases
23191 (modify-phases %standard-phases
23192 (replace 'check
23193 (lambda _
23194 (invoke "python" "setup.py" "nosetests"))))))
23195 (native-inputs
23196 `(("python-nose" ,python-nose)))
23197 (propagated-inputs
23198 `(("python-zope-interface" ,python-zope-interface)))
23199 (home-page "https://launchpad.net/lazr.delegates")
23200 (synopsis "Easily write objects that delegate behavior")
23201 (description
23202 "The @code{lazr.delegates} package makes it easy to write objects that
23203 delegate behavior to another object. The new object adds some property or
23204 behavior on to the other object, while still providing the underlying interface,
23205 and delegating behavior.")
23206 (license license:lgpl3)))
23207
23208 (define-public python-lazr-config
23209 (package
23210 (name "python-lazr-config")
23211 (version "2.2.2")
23212 (source
23213 (origin
23214 (method url-fetch)
23215 (uri (pypi-uri "lazr.config" version))
23216 (sha256
23217 (base32
23218 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23219 (build-system python-build-system)
23220 (arguments
23221 '(#:phases
23222 (modify-phases %standard-phases
23223 (replace 'check
23224 (lambda _
23225 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23226 (native-inputs
23227 `(("python-nose" ,python-nose)))
23228 (propagated-inputs
23229 `(("python-lazr-delegates" ,python-lazr-delegates)
23230 ("python-zope-interface" ,python-zope-interface)))
23231 (home-page "https://launchpad.net/lazr.config")
23232 (synopsis "Create configuration schemas and process and validate configurations")
23233 (description
23234 "The LAZR config system is typically used to manage process configuration.
23235 Process configuration is for saying how things change when we run systems on
23236 different machines, or under different circumstances. This system uses ini-like
23237 file format of section, keys, and values. The config file supports inheritance
23238 to minimize duplication of information across files. The format supports schema
23239 validation.")
23240 (license license:lgpl3)))
23241
23242 (define-public python-flufl-bounce
23243 (package
23244 (name "python-flufl-bounce")
23245 (version "3.0.1")
23246 (source
23247 (origin
23248 (method url-fetch)
23249 (uri (pypi-uri "flufl.bounce" version))
23250 (sha256
23251 (base32
23252 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23253 (build-system python-build-system)
23254 (propagated-inputs
23255 `(("python-atpublic" ,python-atpublic)
23256 ("python-zope-interface" ,python-zope-interface)))
23257 (native-inputs
23258 `(("python-nose2" ,python-nose2)))
23259 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23260 (synopsis "Email bounce detectors")
23261 (description "The @code{flufl.bounce} library provides a set of heuristics
23262 and an API for detecting the original bouncing email addresses from a bounce
23263 message. Many formats found in the wild are supported, as are VERP and
23264 RFC 3464.")
23265 (license (list license:asl2.0
23266 license:lgpl3)))) ; only for setup_headers.py
23267
23268 (define-public python-flufl-i18n
23269 (package
23270 (name "python-flufl-i18n")
23271 (version "3.0")
23272 (source
23273 (origin
23274 (method url-fetch)
23275 (uri (pypi-uri "flufl.i18n" version))
23276 (sha256
23277 (base32
23278 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23279 (build-system python-build-system)
23280 (propagated-inputs
23281 `(("python-atpublic" ,python-atpublic)))
23282 (home-page "https://flufli18n.readthedocs.io")
23283 (synopsis "API for Python internationalization")
23284 (description
23285 "This package provides a high-level, convenient API for managing
23286 internationalization/translation contexts in Python applications. There is a
23287 simple API for single-context applications, such as command line scripts which
23288 only need to translate into one language during the entire course of their
23289 execution. There is a more flexible, but still convenient API for multi-context
23290 applications, such as servers, which may need to switch language contexts for
23291 different tasks.")
23292 (license license:asl2.0)))
23293
23294 (define-public python-flufl-lock
23295 (package
23296 (name "python-flufl-lock")
23297 (version "4.0")
23298 (source
23299 (origin
23300 (method url-fetch)
23301 (uri (pypi-uri "flufl.lock" version))
23302 (sha256
23303 (base32
23304 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23305 (build-system python-build-system)
23306 (propagated-inputs
23307 `(("python-atpublic" ,python-atpublic)
23308 ("python-psutil" ,python-psutil)))
23309 (home-page "https://flufllock.readthedocs.io")
23310 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23311 (description
23312 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23313 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23314 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23315 and have a maximum lifetime built-in.")
23316 (license (list license:asl2.0
23317 license:lgpl3)))) ; only for setup_helpers.py
23318
23319 (define-public python-flufl-testing
23320 (package
23321 (name "python-flufl-testing")
23322 (version "0.8")
23323 (source
23324 (origin
23325 (method url-fetch)
23326 (uri (pypi-uri "flufl.testing" version))
23327 (sha256
23328 (base32
23329 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23330 (build-system python-build-system)
23331 (native-inputs
23332 `(("python-nose2" ,python-nose2)))
23333 (home-page "https://gitlab.com/warsaw/flufl.testing")
23334 (synopsis "Collection of test tool plugins")
23335 (description
23336 "This package contains a small collection of test tool plugins for
23337 @code{nose2} and @code{flake8}.")
23338 (license license:asl2.0)))
23339
23340 (define-public python-devtools
23341 (package
23342 (name "python-devtools")
23343 (version "0.6")
23344 (source
23345 (origin
23346 (method git-fetch)
23347 (uri (git-reference
23348 (url "https://github.com/samuelcolvin/python-devtools")
23349 (commit (string-append "v" version))))
23350 (file-name (git-file-name name version))
23351 (sha256
23352 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23353 (build-system python-build-system)
23354 (native-inputs
23355 `(("python-pytest" ,python-pytest)
23356 ("python-pytest-mock" ,python-pytest-mock)))
23357 (propagated-inputs
23358 `(("python-pygments" ,python-pygments)))
23359 (arguments
23360 `(#:phases (modify-phases %standard-phases
23361 (replace 'check
23362 (lambda _
23363 (invoke "pytest")
23364 #t)))))
23365 (home-page "https://github.com/samuelcolvin/python-devtools")
23366 (synopsis "Debug command and development tools")
23367 (description
23368 "This package provides a debug print command and other development tools.
23369 It adds a simple and readable way to print stuff during development.")
23370 (license license:expat)))
23371
23372 (define-public python-dateparser
23373 (package
23374 (name "python-dateparser")
23375 (version "0.7.6")
23376 (source
23377 (origin
23378 (method url-fetch)
23379 (uri (pypi-uri "dateparser" version))
23380 (sha256
23381 (base32
23382 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23383 (build-system python-build-system)
23384 (propagated-inputs
23385 `(("python-dateutil" ,python-dateutil)
23386 ("python-pytz" ,python-pytz)
23387 ("python-regex" ,python-regex)
23388 ("python-ruamel.yaml" ,python-ruamel.yaml)
23389 ("python-tzlocal" ,python-tzlocal)))
23390 (native-inputs
23391 `(("python-mock" ,python-mock)
23392 ("python-parameterized" ,python-parameterized)
23393 ("tzdata" ,tzdata-for-tests)))
23394 (arguments
23395 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23396 #:tests? #f
23397 #:phases
23398 (modify-phases %standard-phases
23399 (add-before 'check 'set-check-environment
23400 (lambda* (#:key inputs #:allow-other-keys)
23401 (setenv "TZ" "UTC")
23402 (setenv "TZDIR"
23403 (string-append (assoc-ref inputs "tzdata")
23404 "/share/zoneinfo"))
23405 #t)))))
23406 (home-page "https://github.com/scrapinghub/dateparser")
23407 (synopsis
23408 "Date parsing library designed to parse dates from HTML pages")
23409 (description
23410 "@code{python-dateparser} provides modules to easily parse localized
23411 dates in almost any string formats commonly found on web pages.")
23412 (license license:bsd-3)))
23413
23414 (define-public python-dparse
23415 (package
23416 (name "python-dparse")
23417 (version "0.5.1")
23418 (source
23419 (origin
23420 (method url-fetch)
23421 (uri (pypi-uri "dparse" version))
23422 (sha256
23423 (base32
23424 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23425 (build-system python-build-system)
23426 (native-inputs
23427 `(("python-pytest" ,python-pytest)))
23428 (propagated-inputs
23429 `(("python-packaging" ,python-packaging)
23430 ("python-pyyaml" ,python-pyyaml)
23431 ("python-toml" ,python-toml)))
23432 (home-page "https://github.com/pyupio/dparse")
23433 (synopsis "Parser for Python dependency files")
23434 (description "This package provides a parser for Python dependency files.")
23435 (license license:expat)))
23436
23437 (define-public python-dpath
23438 (package
23439 (name "python-dpath")
23440 (version "2.0.1")
23441 (source
23442 (origin
23443 (method url-fetch)
23444 (uri (pypi-uri "dpath" version))
23445 (sha256
23446 (base32
23447 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23448 (build-system python-build-system)
23449 (native-inputs
23450 `(("python-hypothesis" ,python-hypothesis)
23451 ("python-mock" ,python-mock)
23452 ("python-nose" ,python-nose)))
23453 (arguments
23454 '(#:phases
23455 (modify-phases %standard-phases
23456 (replace 'check
23457 (lambda* (#:key inputs outputs #:allow-other-keys)
23458 (add-installed-pythonpath inputs outputs)
23459 ;; This invokation is taken from tox.ini.
23460 (invoke "nosetests" "-d" "-v" "tests/"))))))
23461 (home-page "https://github.com/akesterson/dpath-python")
23462 (synopsis "Filesystem-like pathing and searching for dictionaries")
23463 (description
23464 "@code{python-dpath} is a library for accessing and searching
23465 dictionaries via /slashed/paths ala xpath.
23466
23467 Basically it lets you glob over a dictionary as if it were a filesystem. It
23468 allows you to specify globs (ala the bash eglob syntax, through some advanced
23469 fnmatch.fnmatch magic) to access dictionary elements, and provides some
23470 facility for filtering those results.")
23471 (license license:expat)))
23472
23473 (define-public python-safety
23474 (package
23475 (name "python-safety")
23476 (version "1.9.0")
23477 (source
23478 (origin
23479 (method url-fetch)
23480 (uri (pypi-uri "safety" version))
23481 (sha256
23482 (base32
23483 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
23484 (build-system python-build-system)
23485 (arguments
23486 `(#:phases
23487 (modify-phases %standard-phases
23488 (add-after 'unpack 'disable-tests
23489 (lambda _
23490 (substitute* "tests/test_safety.py"
23491 ;; requires network
23492 (("def test_check_live") "def _test_check_live"))
23493 #t)))))
23494 (propagated-inputs
23495 `(("python-click" ,python-click)
23496 ("python-dparse" ,python-dparse)
23497 ("python-packaging" ,python-packaging)
23498 ("python-requests" ,python-requests)))
23499 (home-page "https://github.com/pyupio/safety")
23500 (synopsis "Check installed dependencies for known vulnerabilities")
23501 (description "Safety checks installed dependencies for known vulnerabilities.
23502 By default it uses the open Python vulnerability database Safety DB.")
23503 (license license:expat)))
23504
23505 (define-public python-pypandoc
23506 (package
23507 (name "python-pypandoc")
23508 (version "1.5")
23509 (source
23510 (origin
23511 (method url-fetch)
23512 (uri (pypi-uri "pypandoc" version))
23513 (sha256
23514 (base32
23515 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
23516 (build-system python-build-system)
23517 (inputs
23518 `(("pandoc" ,pandoc)
23519 ("pandoc-citeproc" ,pandoc-citeproc)))
23520 (propagated-inputs
23521 `(("wheel" ,python-wheel)))
23522 (native-inputs
23523 `(("texlive" ,(texlive-union (list texlive-amsfonts
23524 texlive-fonts-ec
23525 texlive-latex-hyperref
23526 texlive-latex-oberdiek
23527 texlive-lm
23528 texlive-xcolor)))))
23529 (arguments
23530 `(#:phases
23531 (modify-phases %standard-phases
23532 (add-before 'check 'disable-tests
23533 (lambda _
23534 ;; Disable test requiring network access
23535 (substitute* "tests.py"
23536 (("test_basic_conversion_from_http_url")
23537 "skip_test_basic_conversion_from_http_url"))
23538 ;; Needed by texlive-union to generate fonts
23539 (setenv "HOME" "/tmp")
23540 #t)))))
23541 (home-page "https://github.com/bebraw/pypandoc")
23542 (synopsis "Python wrapper for pandoc")
23543 (description "pypandoc is a thin Python wrapper around pandoc
23544 and pandoc-citeproc.")
23545 (license license:expat)))
23546
23547 (define-public python-rnc2rng
23548 (package
23549 (name "python-rnc2rng")
23550 (version "2.6.4")
23551 (source
23552 (origin
23553 (method url-fetch)
23554 (uri (pypi-uri "rnc2rng" version))
23555 (sha256
23556 (base32
23557 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
23558 (build-system python-build-system)
23559 (propagated-inputs
23560 `(("python-rply" ,python-rply)))
23561 (arguments
23562 `(#:phases (modify-phases %standard-phases
23563 (replace 'check
23564 (lambda _
23565 (invoke "python" "test.py"))))))
23566 (home-page "https://github.com/djc/rnc2rng")
23567 (synopsis "Convert RELAX NG Compact to regular syntax")
23568 (description
23569 "This package provides the @command{rnc2rng} command-line tool as well as
23570 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23571 equivalent schemata in the XML-based default RELAX NG syntax.")
23572 (license license:expat)))
23573
23574 (define-public python-telethon
23575 (package
23576 (name "python-telethon")
23577 (version "1.17.5")
23578 (source
23579 (origin
23580 (method git-fetch)
23581 (uri (git-reference
23582 (url "https://github.com/LonamiWebs/Telethon")
23583 (commit (string-append "v" version))))
23584 (file-name (git-file-name name version))
23585 (sha256
23586 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23587 (build-system python-build-system)
23588 (arguments
23589 '(#:phases
23590 (modify-phases %standard-phases
23591 (replace 'check
23592 (lambda* (#:key tests? #:allow-other-keys)
23593 (when tests?
23594 (invoke "py.test" "-v"))
23595 #t)))))
23596 (propagated-inputs
23597 `(("python-rsa" ,python-rsa)
23598 ("python-pyaes" ,python-pyaes)))
23599 (native-inputs
23600 `(("python-pytest" ,python-pytest)
23601 ("python-pytest-asyncio" ,python-pytest-asyncio)
23602 ("python-pytest-trio" ,python-pytest-trio)))
23603 (home-page "https://docs.telethon.dev")
23604 (synopsis "Full-featured Telegram client library for Python 3")
23605 (description "This library is designed to make it easy to write Python
23606 programs that can interact with Telegram.")
23607 (license license:expat)))
23608
23609 (define-public python-citeproc-py
23610 (package
23611 (name "python-citeproc-py")
23612 (version "0.5.1")
23613 (source
23614 (origin
23615 (method url-fetch)
23616 (uri (pypi-uri "citeproc-py" version))
23617 (sha256
23618 (base32
23619 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23620 (build-system python-build-system)
23621 (propagated-inputs
23622 `(("python-lxml" ,python-lxml)
23623 ("python-rnc2rng" ,python-rnc2rng)))
23624 (home-page
23625 "https://github.com/brechtm/citeproc-py")
23626 (synopsis "Citations and bibliography formatter")
23627 (description
23628 "Citeproc-py is a CSL processor for Python. It aims to implement the
23629 CSL 1.0.1 specification. citeproc-py can output styled citations and
23630 bibliographies in a number of different output formats. Currently supported
23631 are plain text, reStructuredText and HTML.")
23632 (license license:bsd-2)))
23633
23634 (define-public python-inform
23635 (package
23636 (name "python-inform")
23637 (version "1.23.0")
23638 (source
23639 (origin
23640 (method url-fetch)
23641 (uri (pypi-uri "inform" version))
23642 (sha256
23643 (base32
23644 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23645 (build-system python-build-system)
23646 (arguments
23647 `(#:tests? #f)) ; PyPI tarball lacks tests
23648 (native-inputs
23649 `(("python-hypothesis" ,python-hypothesis)
23650 ("python-pytest-cov" ,python-pytest-cov)
23651 ("python-pytest-runner" ,python-pytest-runner)))
23652 (propagated-inputs
23653 `(("python-arrow" ,python-arrow)
23654 ("python-six" ,python-six)))
23655 (home-page "https://inform.readthedocs.io")
23656 (synopsis "Print & logging utilities for communicating with user")
23657 (description
23658 "Inform is designed to display messages from programs that are typically run from
23659 a console. It provides a collection of ‘print’ functions that allow you to simply and
23660 cleanly print different types of messages.")
23661 (license license:gpl3+)))
23662
23663 (define-public python-nestedtext
23664 (package
23665 (name "python-nestedtext")
23666 (version "1.0.0")
23667 (source
23668 (origin
23669 (method url-fetch)
23670 (uri (pypi-uri "nestedtext" version))
23671 (sha256
23672 (base32
23673 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23674 (build-system python-build-system)
23675 (arguments
23676 `(#:tests? #f)) ; PyPI tarball lacks tests
23677 (propagated-inputs
23678 `(("python-inform" ,python-inform)))
23679 (home-page "https://nestedtext.org")
23680 (synopsis "Human readable and writable data interchange format")
23681 (description
23682 "NestedText is a file format for holding data that is to be entered, edited, or
23683 viewed by people. It allows data to be organized into a nested collection of
23684 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23685 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23686 NestedText is both simple and natural. Only a small number of concepts and rules must
23687 be kept in mind when creating it. It is easily created, modified, or viewed with
23688 a text editor and easily understood and used by both programmers and non-programmers.")
23689 (license license:expat))) ; MIT license
23690
23691 (define-public python-parallel
23692 (package
23693 (name "python-parallel")
23694 (version "1.6.4.4")
23695 (source
23696 (origin
23697 (method url-fetch)
23698 (uri (string-append
23699 "https://www.parallelpython.com/downloads/pp/pp-"
23700 version ".zip"))
23701 (sha256
23702 (base32
23703 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23704 (native-inputs
23705 `(("unzip" ,unzip)))
23706 (build-system python-build-system)
23707 (arguments '(#:tests? #f)) ; No test suite.
23708 (home-page "https://www.parallelpython.com")
23709 (synopsis "Parallel and distributed programming for Python")
23710 (description "Parallel Python module (PP) provides an easy and efficient
23711 way to create parallel-enabled applications for SMP computers and clusters.
23712 PP module features cross-platform portability and dynamic load balancing.
23713 Thus applications written with PP will parallelize efficiently even on
23714 heterogeneous and multi-platform clusters (including clusters running other
23715 applications with variable CPU loads).")
23716 (license license:bsd-3)))
23717
23718 (define-public python2-parallel
23719 (package-with-python2 python-parallel))
23720
23721 (define-public python-djvulibre
23722 (package
23723 (name "python-djvulibre")
23724 (version "0.8.5")
23725 (source
23726 (origin
23727 (method url-fetch)
23728 (uri (pypi-uri "python-djvulibre" version))
23729 (sha256
23730 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23731 (build-system python-build-system)
23732 (native-inputs
23733 `(("ghostscript" ,ghostscript)
23734 ("pkg-config" ,pkg-config)
23735 ("python-nose" ,python-nose)))
23736 (inputs
23737 `(("djvulibre" ,djvulibre)
23738 ("python-cython" ,python-cython)))
23739 (arguments
23740 `(#:phases
23741 (modify-phases %standard-phases
23742 (add-after 'unpack 'fix-tests
23743 (lambda _
23744 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23745 ;; doesn't make sense on GNU/Linux.
23746 (delete-file "djvu/dllpath.py")
23747 #t)))))
23748 (synopsis "Python bindings for DjVuLibre")
23749 (description "This is a set of Python bindings for the DjVuLibre library.")
23750 (home-page "https://jwilk.net/software/python-djvulibre")
23751 (license license:gpl2)))
23752
23753 (define-public python2-djvulibre
23754 (package-with-python2 python-djvulibre))
23755
23756 (define-public python-versioneer
23757 (package
23758 (name "python-versioneer")
23759 (version "0.19")
23760 (source
23761 (origin
23762 (method url-fetch)
23763 (uri (pypi-uri "versioneer" version))
23764 (sha256
23765 (base32
23766 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23767 (build-system python-build-system)
23768 (home-page
23769 "https://github.com/python-versioneer/python-versioneer")
23770 (synopsis
23771 "Version-string management for VCS-controlled trees")
23772 (description
23773 "@code{versioneer} is a tool for managing a recorded version number in
23774 distutils-based python projects. The goal is to remove the tedious and
23775 error-prone \"update the embedded version string\" step from your release
23776 process.")
23777 (license license:public-domain)))
23778
23779 (define-public python2-gamera
23780 (package
23781 (name "python2-gamera")
23782 (version "3.4.4")
23783 (source
23784 (origin
23785 (method url-fetch)
23786 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23787 "gamera-" version ".tar.gz"))
23788 (sha256
23789 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23790 (modules '((guix build utils)))
23791 (snippet
23792 '(begin
23793 ;; Remove bundled libraries.
23794 (for-each delete-file-recursively
23795 '("src/libpng-1.2.5"
23796 "src/libtiff"
23797 "src/zlib-1.2.8"))))))
23798 (build-system python-build-system)
23799 (inputs
23800 `(("libpng" ,libpng)
23801 ("libtiff" ,libtiff)
23802 ("python2-wxpython" ,python2-wxpython)
23803 ("zlib" ,zlib)))
23804 (arguments
23805 `(#:python ,python-2))
23806 (synopsis "Framework for building document analysis applications")
23807 (description
23808 "Gamera is a toolkit for building document image recognition systems.")
23809 (home-page "https://gamera.informatik.hsnr.de/")
23810 (license license:gpl2+)))
23811
23812 (define-public python-contextvars
23813 (package
23814 (name "python-contextvars")
23815 (version "2.4")
23816 (source
23817 (origin
23818 (method url-fetch)
23819 (uri (pypi-uri "contextvars" version))
23820 (sha256
23821 (base32
23822 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
23823 (build-system python-build-system)
23824 (propagated-inputs
23825 `(("python-immutables" ,python-immutables)))
23826 (home-page
23827 "https://github.com/MagicStack/contextvars")
23828 (synopsis "PEP 567 Backport")
23829 (description "This package implements a backport of Python 3.7
23830 @code{contextvars} module (see PEP 567) for Python 3.6.")
23831 (license license:asl2.0)))
23832
23833 (define-public python-aiofiles
23834 (package
23835 (name "python-aiofiles")
23836 (version "0.6.0")
23837 (source
23838 (origin
23839 (method url-fetch)
23840 (uri (pypi-uri "aiofiles" version))
23841 (sha256
23842 (base32
23843 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
23844 (build-system python-build-system)
23845 (home-page "https://github.com/Tinche/aiofiles")
23846 (synopsis "File support for @code{asyncio}")
23847 (description "@code{python-aiofiles} is a library for handling local
23848 disk files in asyncio applications.")
23849 (license license:asl2.0)))
23850
23851 (define-public python-pyre-extensions
23852 (package
23853 (name "python-pyre-extensions")
23854 (version "0.0.18")
23855 (source
23856 (origin
23857 (method url-fetch)
23858 (uri (pypi-uri "pyre-extensions" version))
23859 (sha256
23860 (base32
23861 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
23862 (build-system python-build-system)
23863 (propagated-inputs
23864 `(("python-typing-extensions"
23865 ,python-typing-extensions)
23866 ("python-typing-inspect" ,python-typing-inspect)))
23867 (home-page "https://pyre-check.org")
23868 (synopsis
23869 "Type system extensions for use with @code{python-pyre}")
23870 (description
23871 "@code{python-pyre-extensions} defines extensions to the standard
23872 @code{typing} module that are supported by the Pyre typechecker.")
23873 (license license:expat)))
23874
23875 (define-public python-dataclasses
23876 (package
23877 (name "python-dataclasses")
23878 (version "0.7")
23879 (source
23880 (origin
23881 (method url-fetch)
23882 (uri (pypi-uri "dataclasses" version))
23883 (sha256
23884 (base32
23885 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
23886 (build-system python-build-system)
23887 (home-page
23888 "https://github.com/ericvsmith/dataclasses")
23889 (synopsis
23890 "Backport of the @code{dataclasses} module for Python 3.6")
23891 (description
23892 "This is an implementation of PEP 557, Data Classes. It is a
23893 backport of the @code{dataclasses} module for Python 3.6.")
23894 (license license:asl2.0)))
23895
23896 (define-public python-pywatchman
23897 (package
23898 (name "python-pywatchman")
23899 (version "1.4.1")
23900 (source
23901 (origin
23902 (method url-fetch)
23903 (uri (pypi-uri "pywatchman" version))
23904 (sha256
23905 (base32
23906 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
23907 (build-system python-build-system)
23908 (arguments
23909 `(#:tests? #f)) ;there are none
23910 (home-page
23911 "https://facebook.github.io/watchman/")
23912 (synopsis "Watchman client for python")
23913 (description "@code{python-pywatchman} is a library to connect and
23914 query Watchman to discover file changes.")
23915 (license license:bsd-3)))
23916
23917 (define-public python-helpdev
23918 (package
23919 (name "python-helpdev")
23920 (version "0.7.1")
23921 (source
23922 (origin
23923 (method url-fetch)
23924 (uri (pypi-uri "helpdev" version))
23925 (sha256
23926 (base32
23927 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
23928 (build-system python-build-system)
23929 (arguments
23930 `(#:phases
23931 (modify-phases %standard-phases
23932 (replace 'check
23933 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23934 (when tests?
23935 (add-installed-pythonpath inputs outputs)
23936 (invoke "pytest" "tests"))
23937 #t)))))
23938 (propagated-inputs
23939 `(("python-importlib-metadata" ,python-importlib-metadata)))
23940 (native-inputs
23941 `(("python-pytest" ,python-pytest)))
23942 (home-page "https://gitlab.com/dpizetta/helpdev")
23943 (synopsis
23944 "Extract information about the Python environment easily")
23945 (description
23946 "Helpdev is a library to easily extract information about the Python
23947 environment.")
23948 (license license:expat)))
23949
23950 (define-public python-qdarkstyle
23951 (package
23952 (name "python-qdarkstyle")
23953 (version "2.8.1")
23954 (source
23955 (origin
23956 (method url-fetch)
23957 (uri (pypi-uri "QDarkStyle" version))
23958 (sha256
23959 (base32
23960 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
23961 (build-system python-build-system)
23962 (arguments
23963 `(;; Fails unable to detect valid Qt bindings even when
23964 ;; added as native-inputs.
23965 #:tests? #f))
23966 (propagated-inputs
23967 `(("python-helpdev" ,python-helpdev)
23968 ("python-qtpy" ,python-qtpy)))
23969 (home-page
23970 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
23971 (synopsis
23972 "Complete dark stylesheet for Python and Qt applications")
23973 (description "QDarkStyle is the most complete dark stylesheet for Python and
23974 Qt applications.")
23975 (license license:expat)))
23976
23977 (define-public python-bitstring
23978 (package
23979 (name "python-bitstring")
23980 (version "3.1.7")
23981 (source
23982 (origin
23983 (method url-fetch)
23984 (uri (pypi-uri "bitstring" version))
23985 (sha256
23986 (base32
23987 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
23988 (build-system python-build-system)
23989 (arguments
23990 `(#:phases
23991 (modify-phases %standard-phases
23992 (replace 'check
23993 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
23994 (when tests?
23995 (add-installed-pythonpath inputs outputs)
23996 (with-directory-excursion "test"
23997 (invoke "pytest")))
23998 #t)))))
23999 (native-inputs
24000 `(("python-pytest" ,python-pytest)))
24001 (home-page "https://github.com/scott-griffiths/bitstring")
24002 (synopsis
24003 "Simple construction, analysis and modification of binary data")
24004 (description
24005 "Bitstring is a library for simple construction, analysis and modification
24006 of binary data.")
24007 (license license:expat)))
24008
24009 (define-public python-confuse
24010 (package
24011 (name "python-confuse")
24012 (version "1.4.0")
24013 (source
24014 (origin
24015 (method url-fetch)
24016 (uri (pypi-uri "confuse" version))
24017 (sha256
24018 (base32
24019 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24020 (build-system python-build-system)
24021 (propagated-inputs
24022 `(("python-pathlib" ,python-pathlib)
24023 ("python-pyyaml" ,python-pyyaml)))
24024 (home-page "https://github.com/beetbox/confuse")
24025 (synopsis "Painless YAML configuration.")
24026 (description "Confuse is a configuration library for Python that uses
24027 YAML. It takes care of defaults, overrides, type checking, command-line
24028 integration, human-readable errors, and standard OS-specific locations.")
24029 (license license:expat)))
24030
24031 (define-public python-reflink
24032 (package
24033 (name "python-reflink")
24034 (version "0.2.1")
24035 (source
24036 (origin
24037 (method url-fetch)
24038 (uri (pypi-uri "reflink" version))
24039 (sha256
24040 (base32
24041 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24042 (build-system python-build-system)
24043 (arguments
24044 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24045 (propagated-inputs
24046 `(("python-cffi" ,python-cffi)))
24047 (native-inputs
24048 `(("python-pytest" ,python-pytest)
24049 ("python-pytest-runner" ,python-pytest-runner)))
24050 (home-page "https://gitlab.com/rubdos/pyreflink")
24051 (synopsis "Python wrapper around reflink system call")
24052 (description
24053 "Python reflink wraps around platform specific @code{reflink}
24054 implementations.")
24055 (license license:expat)))
24056
24057 (define-public python-pivy
24058 (package
24059 (name "python-pivy")
24060 (version "0.6.5")
24061 (source
24062 (origin
24063 (method git-fetch)
24064 (uri (git-reference
24065 (url "https://github.com/coin3d/pivy")
24066 (commit version)))
24067 (file-name (git-file-name name version))
24068 (sha256
24069 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24070 (build-system python-build-system)
24071 (arguments
24072 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24073 #:tests? #f
24074 #:phases
24075 (modify-phases %standard-phases
24076 (add-after 'unpack 'patch-cmake-include-dirs
24077 (lambda _
24078 ;; Patch buildsystem to respect Coin3D include directory
24079 (substitute* "CMakeLists.txt"
24080 (("\\$\\{SoQt_INCLUDE_DIRS}")
24081 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24082 #t)))))
24083 (native-inputs
24084 `(("cmake" ,cmake)
24085 ("swig" ,swig)))
24086 (inputs
24087 `(("python-wrapper" ,python-wrapper)
24088 ("qtbase" ,qtbase)
24089 ("libxi" ,libxi)
24090 ("libice" ,libice)
24091 ("soqt" ,soqt)
24092 ("glew" ,glew)
24093 ("coin3D" ,coin3D-4)))
24094 (home-page "https://github.com/coin3d/pivy")
24095 (synopsis "Python bindings to Coin3D")
24096 (description
24097 "Pivy provides python bindings for Coin, a 3D graphics library with an
24098 Application Programming Interface based on the Open Inventor 2.1 API.")
24099 (license license:isc)))
24100
24101 (define-public python-crayons
24102 (package
24103 (name "python-crayons")
24104 (version "0.4.0")
24105 (source
24106 (origin
24107 (method url-fetch)
24108 (uri (pypi-uri "crayons" version))
24109 (sha256
24110 (base32
24111 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24112 (build-system python-build-system)
24113 (propagated-inputs
24114 `(("python-colorama" ,python-colorama)))
24115 (home-page "https://github.com/MasterOdin/crayons")
24116 (synopsis "TextUI colors for Python")
24117 (description "This package gives you colored strings for the terminal.
24118 Crayons automatically wraps a given string in the foreground color and
24119 restores the original state after the string is printed.")
24120 (license license:expat)))
24121
24122 (define-public python-sane
24123 (package
24124 (name "python-sane")
24125 (version "2.9.1")
24126 (source
24127 (origin
24128 (method url-fetch)
24129 (uri (pypi-uri name version))
24130 (sha256
24131 (base32
24132 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24133 (build-system python-build-system)
24134 (native-inputs
24135 `(("python-pytest" ,python-pytest)))
24136 (inputs
24137 `(("sane-backends" ,sane-backends)))
24138 (home-page "https://github.com/python-pillow/Sane")
24139 (synopsis "Python interface to the SANE scanner")
24140 (description "This package provides Python interface to the SANE scanner
24141 and frame grabber interface.")
24142 (license (license:non-copyleft
24143 ;; Yet another variant of the X/MIT license.
24144 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24145
24146 (define-public python-screenkey
24147 (package
24148 (name "python-screenkey")
24149 (version "1.4")
24150 (source
24151 (origin
24152 (method git-fetch)
24153 (uri (git-reference
24154 (url "https://gitlab.com/screenkey/screenkey")
24155 (commit (string-append "v" version))))
24156 (file-name (git-file-name name version))
24157 (sha256
24158 (base32
24159 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24160 (build-system python-build-system)
24161 (arguments
24162 `(#:phases
24163 (modify-phases %standard-phases
24164 (add-after 'unpack 'fix-dlopen-paths
24165 (lambda* (#:key inputs outputs #:allow-other-keys)
24166 (let* ((x11 (assoc-ref inputs "libx11"))
24167 (xtst (assoc-ref inputs "libxtst")))
24168 (substitute* "Screenkey/xlib.py"
24169 (("libX11.so.6")
24170 (string-append x11 "/lib/libX11.so.6")))
24171 (substitute* "Screenkey/xlib.py"
24172 (("libXtst.so.6")
24173 (string-append xtst "/lib/libXtst.so.6")))
24174 #t)))
24175 (add-after 'install 'wrap-screenkey
24176 (lambda* (#:key outputs #:allow-other-keys)
24177 (wrap-program
24178 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24179 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24180 `("GI_TYPELIB_PATH"
24181 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24182 #t)))))
24183 (inputs
24184 `(("python-distutils-extra" ,python-distutils-extra)
24185 ("python-tokenize-rt" ,python-tokenize-rt)
24186 ("libx11" ,libx11)
24187 ("libxtst" ,libxtst)
24188 ("gtk+" ,gtk+)
24189 ("python-pygobject" ,python-pygobject)
24190 ("python-pycairo" ,python-pycairo)
24191 ("python-setuptools-git" ,python-setuptools-git)
24192 ("python-babel" ,python-babel)))
24193 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24194 (synopsis
24195 "Screencast tool to display pressed keys")
24196 (description
24197 "A screencast tool to display your keys inspired by Screenflick.")
24198 (license license:gpl3+)))
24199
24200 (define-public python-jinja2-cli
24201 (package
24202 (name "python-jinja2-cli")
24203 (version "0.7.0")
24204 (source
24205 (origin
24206 (method url-fetch)
24207 (uri (pypi-uri "jinja2-cli" version))
24208 (sha256
24209 (base32
24210 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24211 (build-system python-build-system)
24212 (propagated-inputs
24213 `(("python-jinja2" ,python-jinja2)))
24214 (native-inputs
24215 `(("python-flake8" ,python-flake8)
24216 ("python-jinja2" ,python-jinja2)
24217 ("python-pytest" ,python-pytest)))
24218 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24219 (synopsis "Command-line interface to Jinja2")
24220 (description
24221 "This package provides a command-line interface (CLI) to the Jinja2
24222 template engine.")
24223 (license license:bsd-3)))
24224
24225 (define-public python-readability
24226 (package
24227 (name "python-readability")
24228 (version "0.3.1")
24229 (source
24230 (origin
24231 (method url-fetch)
24232 (uri (pypi-uri "readability" version))
24233 (sha256
24234 (base32
24235 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24236 (build-system python-build-system)
24237 (home-page
24238 "https://github.com/andreasvc/readability/")
24239 (synopsis
24240 "Measure the readability of a given text using surface
24241 characteristics")
24242 (description
24243 "This package provides a Python library that is an implementation of
24244 traditional readability measures based on simple surface
24245 characteristics. These measures are basically linear regressions based on the
24246 number of words, syllables, and sentences.")
24247 (license license:asl2.0)))
24248
24249 (define-public python-listparser
24250 (package
24251 (name "python-listparser")
24252 (version "0.18")
24253 (source
24254 (origin
24255 (method url-fetch)
24256 (uri (pypi-uri "listparser" version))
24257 (sha256
24258 (base32
24259 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24260 (build-system python-build-system)
24261 (home-page
24262 "https://github.com/kurtmckee/listparser")
24263 (synopsis
24264 "Parse subscription lists in Python")
24265 (description
24266 "This package provides a Python library that can parse OPML, FOAF, and
24267 iGoogle subscription lists.")
24268 (license license:expat)))